#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;
	var uLocal_18 = 0;
	var uLocal_19 = 0;
	char* sLocal_20 = NULL;
	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;
	vector3 vLocal_57 = { 0f, 0f, 0f };
	vector3 vLocal_60 = { 0f, 0f, 0f };
	int iLocal_63 = 0;
	var uLocal_64 = 0;
	var uLocal_65 = 0;
	var uLocal_66 = 0;
	var uLocal_67 = 0;
	int iLocal_68 = 0;
	int iLocal_69 = 0;
	int iLocal_70 = 0;
	int iLocal_71[11] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
	int iLocal_83 = 0;
	int iLocal_84 = 0;
	int iLocal_85 = 0;
	int iLocal_86 = 0;
	int iLocal_87 = 0;
	int iLocal_88 = 0;
	int iLocal_89 = 0;
	int iLocal_90 = 0;
	struct<5> Local_91 = { 0, 0, 0, 0, 0 } ;
	var uLocal_96 = 0;
	var uLocal_97 = 0;
	var uLocal_98 = 21;
	var uLocal_99 = 6;
	var uLocal_100 = 0;
	var uLocal_101 = 0;
	var uLocal_102 = 0;
	int iLocal_103 = 0;
	int iLocal_104 = 0;
	int iLocal_105 = 0;
	int iLocal_106[4] = { 0, 0, 0, 0 };
	int iLocal_111 = 0;
	int iLocal_112 = 0;
	int iLocal_113 = 0;
	int iLocal_114 = 0;
	int iLocal_115[5] = { 0, 0, 0, 0, 0 };
	int iLocal_121 = 0;
	int iLocal_122 = 0;
	int iLocal_123[2] = { 0, 0 };
	int iLocal_126[2] = { 0, 0 };
	var uLocal_129[2] = { 0, 0 };
	int iLocal_132 = 0;
	int iLocal_133 = 0;
	int iLocal_134 = 0;
	int iLocal_135 = 0;
	int iLocal_136 = 0;
	int iLocal_137 = 0;
	int iLocal_138 = 0;
	int iLocal_139 = 0;
	int iLocal_140 = 0;
	int iLocal_141 = 0;
	int iLocal_142 = 0;
	int iLocal_143 = 0;
	int iLocal_144 = 0;
	int iLocal_145 = 0;
	vector3 vLocal_146[15] = {{ 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f }, { 2.802597E-45f, 0f, 0f } };
	int iLocal_192 = 0;
	vector3 vLocal_193 = { 0f, 0f, 0f };
	vector3 vLocal_196 = { 0f, 0f, 0f };
	vector3 vLocal_199 = { 0f, 0f, 0f };
	float fLocal_202 = 0f;
	vector3 vLocal_203 = { 0f, 0f, 0f };
	float fLocal_206 = 0f;
	vector3 vLocal_207 = { 0f, 0f, 0f };
	float fLocal_210 = 0f;
	vector3 vLocal_211 = { 0f, 0f, 0f };
	float fLocal_214 = 0f;
	vector3 vLocal_215 = { 0f, 0f, 0f };
	vector3 vLocal_218 = { 0f, 0f, 0f };
	float fLocal_221 = 0f;
	vector3 vLocal_222 = { 0f, 0f, 0f };
	float fLocal_225 = 0f;
	vector3 vLocal_226 = { 0f, 0f, 0f };
	vector3 vLocal_229 = { 0f, 0f, 0f };
	float fLocal_232 = 0f;
	vector3 vLocal_233 = { 0f, 0f, 0f };
	vector3 vLocal_236 = { 0f, 0f, 0f };
	float fLocal_239 = 0f;
	float fLocal_240 = 0f;
	vector3 vLocal_241 = { 0f, 0f, 0f };
	vector3 vLocal_244 = { 0f, 0f, 0f };
	float fLocal_247 = 0f;
	vector3 vLocal_248 = { 0f, 0f, 0f };
	vector3 vLocal_251 = { 0f, 0f, 0f };
	float fLocal_254 = 0f;
	vector3 vLocal_255 = { 0f, 0f, 0f };
	float fLocal_258 = 0f;
	float fLocal_259 = 0f;
	float fLocal_260 = 0f;
	float fLocal_261 = 0f;
	var uLocal_262 = 0;
	int iLocal_263 = 0;
	int iLocal_264 = 0;
	int iLocal_265 = 0;
	int iLocal_266 = 0;
	char* sLocal_267 = NULL;
	char* sLocal_268 = NULL;
	int iLocal_269 = 0;
	int iLocal_270 = 0;
	int iLocal_271 = 0;
	int iLocal_272 = 0;
	int iLocal_273 = 0;
	int iLocal_274 = 0;
	int iLocal_275 = 0;
	int iLocal_276 = 0;
	int iLocal_277 = 0;
	int iLocal_278 = 0;
	int iLocal_279 = 0;
	int iLocal_280 = 0;
	int iLocal_281 = 0;
	int iLocal_282 = 0;
	int iLocal_283 = 0;
	int iLocal_284 = 0;
	int iLocal_285 = 0;
	int iLocal_286 = 0;
	int iLocal_287 = 0;
	int iLocal_288 = 0;
	int iLocal_289 = 0;
	int iLocal_290 = 0;
	int iLocal_291 = 0;
	int iLocal_292 = 0;
	int iLocal_293 = 0;
	int iLocal_294 = 0;
	int iLocal_295 = 0;
	int iLocal_296 = 0;
	int iLocal_297 = 0;
	int iLocal_298 = 0;
	int iLocal_299 = 0;
	int iLocal_300 = 0;
	int iLocal_301 = 0;
	int iLocal_302 = 0;
	int iLocal_303 = 0;
	int iLocal_304 = 0;
	int iLocal_305 = 0;
	int iLocal_306 = 0;
	int iLocal_307 = 0;
	int iLocal_308 = 0;
	int iLocal_309 = 0;
	int iLocal_310 = 0;
	int iLocal_311 = 0;
	char* sLocal_312 = NULL;
	char[] cLocal_313[8] = 0;
	int iLocal_314 = 0;
	int iLocal_315 = 0;
	int iLocal_316 = 0;
	int iLocal_317 = 0;
	int iLocal_318 = 0;
	int iLocal_319 = 0;
	vector3 vLocal_320 = { 0f, 0f, 0f };
	vector3 vLocal_323 = { 0f, 0f, 0f };
	vector3 vLocal_326 = { 0f, 0f, 0f };
	float fLocal_329 = 0f;
	var uLocal_330 = 100;
	var uLocal_331 = 0;
	var uLocal_332 = 0;
	var uLocal_333 = 0;
	var uLocal_334 = 0;
	var uLocal_335 = 0;
	var uLocal_336 = 0;
	var uLocal_337 = 0;
	var uLocal_338 = 0;
	var uLocal_339 = 0;
	var uLocal_340 = 0;
	var uLocal_341 = 0;
	var uLocal_342 = 0;
	var uLocal_343 = 0;
	var uLocal_344 = 0;
	var uLocal_345 = 0;
	var uLocal_346 = 0;
	var uLocal_347 = 0;
	var uLocal_348 = 0;
	var uLocal_349 = 0;
	var uLocal_350 = 0;
	var uLocal_351 = 0;
	var uLocal_352 = 0;
	var uLocal_353 = 0;
	var uLocal_354 = 0;
	var uLocal_355 = 0;
	var uLocal_356 = 0;
	var uLocal_357 = 0;
	var uLocal_358 = 0;
	var uLocal_359 = 0;
	var uLocal_360 = 0;
	var uLocal_361 = 0;
	var uLocal_362 = 0;
	var uLocal_363 = 0;
	var uLocal_364 = 0;
	var uLocal_365 = 0;
	var uLocal_366 = 0;
	var uLocal_367 = 0;
	var uLocal_368 = 0;
	var uLocal_369 = 0;
	var uLocal_370 = 0;
	var uLocal_371 = 0;
	var uLocal_372 = 0;
	var uLocal_373 = 0;
	var uLocal_374 = 0;
	var uLocal_375 = 0;
	var uLocal_376 = 0;
	var uLocal_377 = 0;
	var uLocal_378 = 0;
	var uLocal_379 = 0;
	var uLocal_380 = 0;
	var uLocal_381 = 0;
	var uLocal_382 = 0;
	var uLocal_383 = 0;
	var uLocal_384 = 0;
	var uLocal_385 = 0;
	var uLocal_386 = 0;
	var uLocal_387 = 0;
	var uLocal_388 = 0;
	var uLocal_389 = 0;
	var uLocal_390 = 0;
	var uLocal_391 = 0;
	var uLocal_392 = 0;
	var uLocal_393 = 0;
	var uLocal_394 = 0;
	var uLocal_395 = 0;
	var uLocal_396 = 0;
	var uLocal_397 = 0;
	var uLocal_398 = 0;
	var uLocal_399 = 0;
	var uLocal_400 = 0;
	var uLocal_401 = 0;
	var uLocal_402 = 0;
	var uLocal_403 = 0;
	var uLocal_404 = 0;
	var uLocal_405 = 0;
	var uLocal_406 = 0;
	var uLocal_407 = 0;
	var uLocal_408 = 0;
	var uLocal_409 = 0;
	var uLocal_410 = 0;
	var uLocal_411 = 0;
	var uLocal_412 = 0;
	var uLocal_413 = 0;
	var uLocal_414 = 0;
	var uLocal_415 = 0;
	var uLocal_416 = 0;
	var uLocal_417 = 0;
	var uLocal_418 = 0;
	var uLocal_419 = 0;
	var uLocal_420 = 0;
	var uLocal_421 = 0;
	var uLocal_422 = 0;
	var uLocal_423 = 0;
	var uLocal_424 = 0;
	var uLocal_425 = 0;
	var uLocal_426 = 0;
	var uLocal_427 = 0;
	var uLocal_428 = 0;
	var uLocal_429 = 0;
	var uLocal_430 = 0;
	var uLocal_431 = 0;
	var uLocal_432 = 0;
	var uLocal_433 = 0;
	var uLocal_434 = 0;
	var uLocal_435 = 0;
	var uLocal_436 = 0;
	var uLocal_437 = 0;
	var uLocal_438 = 0;
	var uLocal_439 = 0;
	var uLocal_440 = 0;
	var uLocal_441 = 0;
	var uLocal_442 = 0;
	var uLocal_443 = 0;
	var uLocal_444 = 0;
	var uLocal_445 = 0;
	var uLocal_446 = 0;
	var uLocal_447 = 0;
	var uLocal_448 = 0;
	var uLocal_449 = 0;
	var uLocal_450 = 0;
	var uLocal_451 = 0;
	var uLocal_452 = 0;
	var uLocal_453 = 0;
	var uLocal_454 = 0;
	var uLocal_455 = 0;
	var uLocal_456 = 0;
	var uLocal_457 = 0;
	var uLocal_458 = 0;
	var uLocal_459 = 0;
	var uLocal_460 = 0;
	var uLocal_461 = 0;
	var uLocal_462 = 0;
	var uLocal_463 = 0;
	var uLocal_464 = 0;
	var uLocal_465 = 0;
	var uLocal_466 = 0;
	var uLocal_467 = 0;
	var uLocal_468 = 0;
	var uLocal_469 = 0;
	var uLocal_470 = 0;
	var uLocal_471 = 0;
	var uLocal_472 = 0;
	var uLocal_473 = 0;
	var uLocal_474 = 0;
	var uLocal_475 = 0;
	var uLocal_476 = 0;
	var uLocal_477 = 0;
	var uLocal_478 = 0;
	var uLocal_479 = 0;
	var uLocal_480 = 0;
	var uLocal_481 = 0;
	var uLocal_482 = 0;
	var uLocal_483 = 0;
	var uLocal_484 = 0;
	var uLocal_485 = 0;
	var uLocal_486 = 0;
	var uLocal_487 = 0;
	var uLocal_488 = 0;
	var uLocal_489 = 0;
	var uLocal_490 = 0;
	var uLocal_491 = 0;
	var uLocal_492 = 0;
	var uLocal_493 = 0;
	var uLocal_494 = 0;
	var uLocal_495 = 0;
	var uLocal_496 = 0;
	var uLocal_497 = 0;
	var uLocal_498 = 0;
	var uLocal_499 = 0;
	var uLocal_500 = 0;
	var uLocal_501 = 0;
	var uLocal_502 = 0;
	var uLocal_503 = 0;
	var uLocal_504 = 0;
	var uLocal_505 = 0;
	var uLocal_506 = 0;
	var uLocal_507 = 0;
	var uLocal_508 = 0;
	var uLocal_509 = 0;
	var uLocal_510 = 0;
	var uLocal_511 = 0;
	var uLocal_512 = 0;
	var uLocal_513 = 0;
	var uLocal_514 = 0;
	var uLocal_515 = 0;
	var uLocal_516 = 0;
	var uLocal_517 = 0;
	var uLocal_518 = 0;
	var uLocal_519 = 0;
	var uLocal_520 = 0;
	var uLocal_521 = 0;
	var uLocal_522 = 0;
	var uLocal_523 = 0;
	var uLocal_524 = 0;
	var uLocal_525 = 0;
	var uLocal_526 = 0;
	var uLocal_527 = 0;
	var uLocal_528 = 0;
	var uLocal_529 = 0;
	var uLocal_530 = 0;
	var uLocal_531 = 0;
	var uLocal_532 = 0;
	var uLocal_533 = 0;
	var uLocal_534 = 0;
	var uLocal_535 = 0;
	var uLocal_536 = 0;
	var uLocal_537 = 0;
	var uLocal_538 = 0;
	var uLocal_539 = 0;
	var uLocal_540 = 0;
	var uLocal_541 = 0;
	var uLocal_542 = 0;
	var uLocal_543 = 0;
	var uLocal_544 = 0;
	var uLocal_545 = 0;
	var uLocal_546 = 0;
	var uLocal_547 = 0;
	var uLocal_548 = 0;
	var uLocal_549 = 0;
	var uLocal_550 = 0;
	var uLocal_551 = 0;
	var uLocal_552 = 0;
	var uLocal_553 = 0;
	var uLocal_554 = 0;
	var uLocal_555 = 0;
	var uLocal_556 = 0;
	var uLocal_557 = 0;
	var uLocal_558 = 0;
	var uLocal_559 = 0;
	var uLocal_560 = 0;
	var uLocal_561 = 0;
	var uLocal_562 = 0;
	var uLocal_563 = 0;
	var uLocal_564 = 0;
	var uLocal_565 = 0;
	var uLocal_566 = 0;
	var uLocal_567 = 0;
	var uLocal_568 = 0;
	var uLocal_569 = 0;
	var uLocal_570 = 0;
	var uLocal_571 = 0;
	var uLocal_572 = 0;
	var uLocal_573 = 0;
	var uLocal_574 = 0;
	var uLocal_575 = 0;
	var uLocal_576 = 0;
	var uLocal_577 = 0;
	var uLocal_578 = 0;
	var uLocal_579 = 0;
	var uLocal_580 = 0;
	var uLocal_581 = 0;
	var uLocal_582 = 0;
	var uLocal_583 = 0;
	var uLocal_584 = 0;
	var uLocal_585 = 0;
	var uLocal_586 = 0;
	var uLocal_587 = 0;
	var uLocal_588 = 0;
	var uLocal_589 = 0;
	var uLocal_590 = 0;
	var uLocal_591 = 0;
	var uLocal_592 = 0;
	var uLocal_593 = 0;
	var uLocal_594 = 0;
	var uLocal_595 = 0;
	var uLocal_596 = 0;
	var uLocal_597 = 0;
	var uLocal_598 = 0;
	var uLocal_599 = 0;
	var uLocal_600 = 0;
	var uLocal_601 = 0;
	var uLocal_602 = 0;
	var uLocal_603 = 0;
	var uLocal_604 = 0;
	var uLocal_605 = 0;
	var uLocal_606 = 0;
	var uLocal_607 = 0;
	var uLocal_608 = 0;
	var uLocal_609 = 0;
	var uLocal_610 = 0;
	var uLocal_611 = 0;
	var uLocal_612 = 0;
	var uLocal_613 = 0;
	var uLocal_614 = 0;
	var uLocal_615 = 0;
	var uLocal_616 = 0;
	var uLocal_617 = 0;
	var uLocal_618 = 0;
	var uLocal_619 = 0;
	var uLocal_620 = 0;
	var uLocal_621 = 0;
	var uLocal_622 = 0;
	var uLocal_623 = 0;
	var uLocal_624 = 0;
	var uLocal_625 = 0;
	var uLocal_626 = 0;
	var uLocal_627 = 0;
	var uLocal_628 = 0;
	var uLocal_629 = 0;
	var uLocal_630 = 0;
	vector3 vLocal_631 = { 0f, 0f, 0f };
	vector3 vLocal_634 = { 0f, 0f, 0f };
	vector3 vLocal_637 = { 0f, 0f, 0f };
	float fLocal_640 = 0f;
	int iLocal_641 = 0;
	int iLocal_642 = 0;
	int iLocal_643 = 0;
	var uLocal_644 = 0;
	var uLocal_645 = 0;
	var uLocal_646 = 0;
	var uLocal_647 = 0;
	var uLocal_648 = 0;
	var uLocal_649 = 0;
	var uLocal_650 = 0;
	var uLocal_651 = 0;
	var uLocal_652 = 0;
	var uLocal_653 = 0;
	var uLocal_654 = 0;
	var uLocal_655 = 0;
	var uLocal_656 = 0;
	var uLocal_657 = 0;
	var uLocal_658 = 0;
	var uLocal_659 = 0;
	var uLocal_660 = 0;
	var uLocal_661 = 0;
	int iLocal_662 = 0;
	int iLocal_663 = 0;
	int iLocal_664 = 0;
	int iLocal_665 = 0;
	struct<2> Local_666 = { 0, 0 } ;
	struct<2> Local_668 = { 0, 0 } ;
	struct<2> Local_670 = { 0, 0 } ;
	struct<2> Local_672 = { 0, 0 } ;
	int iLocal_674 = 0;
	char[] cLocal_675[8] = 0;
	struct<10> Local_676[16];
	var uLocal_837 = 0;
	var uLocal_838 = 0;
	var uLocal_839 = 0;
	var uLocal_840 = 0;
	int iLocal_841 = 0;
	int iLocal_842 = 0;
	struct<6> Local_843 = { 0, 0, 0, 0, 0, 0 } ;
	int iLocal_849 = 0;
	int iLocal_850 = 0;
	int iLocal_851 = 0;
	int iLocal_852 = 0;
	struct<7> Local_853[2];
	int iLocal_868[2] = { 0, 0 };
	int iLocal_871[2] = { 0, 0 };
	int iLocal_874 = 0;
	int iLocal_875 = 0;
	int iLocal_876 = 0;
	int iLocal_877 = 0;
	int iLocal_878 = 0;
	int iLocal_879 = 0;
	float fLocal_880 = 0f;
	int iLocal_881 = 0;
	struct<8> Local_882[2];
	float fLocal_899 = 0f;
	int iLocal_900 = 0;
	int iLocal_901 = 0;
	int iLocal_902 = 0;
	int iLocal_903 = 0;
	int iLocal_904 = 0;
	int iLocal_905 = 0;
	int iLocal_906 = 0;
	int iLocal_907 = 0;
	int iLocal_908 = 0;
	int iLocal_909 = 0;
	int iLocal_910 = 0;
	int iLocal_911 = 0;
	int iLocal_912 = 0;
	int iLocal_913 = 0;
	int iLocal_914 = 0;
	int iLocal_915 = 0;
	int iLocal_916 = 0;
	int iLocal_917 = 0;
	int iLocal_918 = 0;
	int iLocal_919 = 0;
	int iLocal_920 = 0;
	int iLocal_921 = 0;
	int iLocal_922 = 0;
	int iLocal_923 = 0;
	float fLocal_924 = 0f;
	float fLocal_925 = 0f;
	float fLocal_926 = 0f;
	int iLocal_927 = 0;
	int iLocal_928 = 0;
	vector3 vLocal_929[4] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	int iLocal_942 = 0;
	var uLocal_943 = 0;
	var uLocal_944 = 0;
	int iLocal_945 = 0;
	vector3 vLocal_946 = { 0f, 0f, 0f };
	float fLocal_949 = 0f;
	char* sLocal_950[6] = { NULL, NULL, NULL, NULL, NULL, NULL };
	int iLocal_957 = 0;
	int iLocal_958 = 0;
	int iLocal_959 = 0;
	int iLocal_960[3] = { 0, 0, 0 };
	int iLocal_964 = 0;
	int iLocal_965 = 0;
	int iLocal_966 = 0;
	int iLocal_967 = 0;
	int iLocal_968 = 0;
	int iLocal_969 = 0;
	int iLocal_970 = 0;
	int iLocal_971 = 0;
	int iLocal_972 = 0;
	int iLocal_973 = 0;
	int iLocal_974 = 0;
	float fLocal_975 = 0f;
	int iLocal_976 = 0;
	int iLocal_977 = 0;
	int iLocal_978 = 0;
	int iLocal_979 = 0;
	float fLocal_980 = 0f;
	vector3 vLocal_981[4] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	vector3 vLocal_994[6] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	vector3 vLocal_1013[6] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	vector3 vLocal_1032[5] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	vector3 vLocal_1048[4] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	vector3 vLocal_1061[5] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	vector3 vLocal_1077[5] = {{ 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f }, { 0f, 0f, 0f } };
	float fLocal_1093[5] = { 0f, 0f, 0f, 0f, 0f };
	var uLocal_1099 = 4;
	var uLocal_1100 = 0;
	var uLocal_1101 = 0;
	var uLocal_1102 = 0;
	var uLocal_1103 = 0;
	var uLocal_1104 = 0;
	var uLocal_1105 = 0;
	var uLocal_1106 = 0;
	var uLocal_1107 = 0;
	var uLocal_1108 = 0;
	var uLocal_1109 = 0;
	var uLocal_1110 = 0;
	var uLocal_1111 = 0;
	var uLocal_1112 = 4;
	var uLocal_1113 = 0;
	var uLocal_1114 = 0;
	var uLocal_1115 = 0;
	var uLocal_1116 = 0;
	var uLocal_1117 = 0;
	var uLocal_1118 = 0;
	var uLocal_1119 = 0;
	var uLocal_1120 = 0;
	var uLocal_1121 = 0;
	var uLocal_1122 = 0;
	var uLocal_1123 = 0;
	var uLocal_1124 = 0;
	var uLocal_1125 = 15;
	var uLocal_1126 = 0;
	var uLocal_1127 = 0;
	var uLocal_1128 = 0;
	var uLocal_1129 = 0;
	var uLocal_1130 = 0;
	var uLocal_1131 = 0;
	var uLocal_1132 = 0;
	var uLocal_1133 = 0;
	var uLocal_1134 = 0;
	var uLocal_1135 = 0;
	var uLocal_1136 = 0;
	var uLocal_1137 = 0;
	var uLocal_1138 = 0;
	var uLocal_1139 = 0;
	var uLocal_1140 = 0;
	var uLocal_1141 = 0;
	var uLocal_1142 = 0;
	var uLocal_1143 = 0;
	var uLocal_1144 = 0;
	var uLocal_1145 = 0;
	var uLocal_1146 = 0;
	var uLocal_1147 = 0;
	var uLocal_1148 = 0;
	var uLocal_1149 = 0;
	var uLocal_1150 = 0;
	var uLocal_1151 = 0;
	var uLocal_1152 = 0;
	var uLocal_1153 = 0;
	var uLocal_1154 = 0;
	var uLocal_1155 = 0;
	var uLocal_1156 = 0;
	var uLocal_1157 = 0;
	var uLocal_1158 = 0;
	var uLocal_1159 = 0;
	var uLocal_1160 = 0;
	var uLocal_1161 = 0;
	var uLocal_1162 = 0;
	var uLocal_1163 = 0;
	var uLocal_1164 = 0;
	var uLocal_1165 = 0;
	var uLocal_1166 = 0;
	var uLocal_1167 = 0;
	var uLocal_1168 = 0;
	var uLocal_1169 = 0;
	var uLocal_1170 = 0;
	var uLocal_1171 = 15;
	var uLocal_1172 = 0;
	var uLocal_1173 = 0;
	var uLocal_1174 = 0;
	var uLocal_1175 = 0;
	var uLocal_1176 = 0;
	var uLocal_1177 = 0;
	var uLocal_1178 = 0;
	var uLocal_1179 = 0;
	var uLocal_1180 = 0;
	var uLocal_1181 = 0;
	var uLocal_1182 = 0;
	var uLocal_1183 = 0;
	var uLocal_1184 = 0;
	var uLocal_1185 = 0;
	var uLocal_1186 = 0;
	var uLocal_1187 = 0;
	var uLocal_1188 = 0;
	var uLocal_1189 = 0;
	var uLocal_1190 = 0;
	var uLocal_1191 = 0;
	var uLocal_1192 = 0;
	var uLocal_1193 = 0;
	var uLocal_1194 = 0;
	var uLocal_1195 = 0;
	var uLocal_1196 = 0;
	var uLocal_1197 = 0;
	var uLocal_1198 = 0;
	var uLocal_1199 = 0;
	var uLocal_1200 = 0;
	var uLocal_1201 = 0;
	var uLocal_1202 = 0;
	var uLocal_1203 = 0;
	var uLocal_1204 = 0;
	var uLocal_1205 = 0;
	var uLocal_1206 = 0;
	var uLocal_1207 = 0;
	var uLocal_1208 = 0;
	var uLocal_1209 = 0;
	var uLocal_1210 = 0;
	var uLocal_1211 = 0;
	var uLocal_1212 = 0;
	var uLocal_1213 = 0;
	var uLocal_1214 = 0;
	var uLocal_1215 = 0;
	var uLocal_1216 = 0;
	var uLocal_1217 = 8;
	var uLocal_1218 = 0;
	var uLocal_1219 = 0;
	var uLocal_1220 = 0;
	var uLocal_1221 = 0;
	var uLocal_1222 = 0;
	var uLocal_1223 = 0;
	var uLocal_1224 = 0;
	var uLocal_1225 = 0;
	var uLocal_1226 = 0;
	var uLocal_1227 = 0;
	var uLocal_1228 = 0;
	var uLocal_1229 = 0;
	var uLocal_1230 = 0;
	var uLocal_1231 = 0;
	var uLocal_1232 = 0;
	var uLocal_1233 = 0;
	var uLocal_1234 = 0;
	var uLocal_1235 = 0;
	var uLocal_1236 = 0;
	var uLocal_1237 = 0;
	var uLocal_1238 = 0;
	var uLocal_1239 = 0;
	var uLocal_1240 = 0;
	var uLocal_1241 = 0;
	var uLocal_1242 = 8;
	var uLocal_1243 = 0;
	var uLocal_1244 = 0;
	var uLocal_1245 = 0;
	var uLocal_1246 = 0;
	var uLocal_1247 = 0;
	var uLocal_1248 = 0;
	var uLocal_1249 = 0;
	var uLocal_1250 = 0;
	var uLocal_1251 = 0;
	var uLocal_1252 = 0;
	var uLocal_1253 = 0;
	var uLocal_1254 = 0;
	var uLocal_1255 = 0;
	var uLocal_1256 = 0;
	var uLocal_1257 = 0;
	var uLocal_1258 = 0;
	var uLocal_1259 = 0;
	var uLocal_1260 = 0;
	var uLocal_1261 = 0;
	var uLocal_1262 = 0;
	var uLocal_1263 = 0;
	var uLocal_1264 = 0;
	var uLocal_1265 = 0;
	var uLocal_1266 = 0;
	struct<25> Local_1267[2];
	var uLocal_1318 = 8;
	var uLocal_1319 = 0;
	var uLocal_1320 = 0;
	var uLocal_1321 = 0;
	var uLocal_1322 = 0;
	var uLocal_1323 = 0;
	var uLocal_1324 = 0;
	var uLocal_1325 = 0;
	var uLocal_1326 = 0;
	var uLocal_1327 = 0;
	var uLocal_1328 = 0;
	var uLocal_1329 = 0;
	var uLocal_1330 = 0;
	var uLocal_1331 = 0;
	var uLocal_1332 = 0;
	var uLocal_1333 = 0;
	var uLocal_1334 = 0;
	var uLocal_1335 = 0;
	var uLocal_1336 = 0;
	var uLocal_1337 = 0;
	var uLocal_1338 = 0;
	var uLocal_1339 = 0;
	var uLocal_1340 = 0;
	var uLocal_1341 = 0;
	var uLocal_1342 = 0;
	var uLocal_1343 = 6;
	var uLocal_1344 = 0;
	var uLocal_1345 = 0;
	var uLocal_1346 = 0;
	var uLocal_1347 = 0;
	var uLocal_1348 = 0;
	var uLocal_1349 = 0;
	var uLocal_1350 = 0;
	var uLocal_1351 = 0;
	var uLocal_1352 = 0;
	var uLocal_1353 = 0;
	var uLocal_1354 = 0;
	var uLocal_1355 = 0;
	var uLocal_1356 = 0;
	var uLocal_1357 = 0;
	var uLocal_1358 = 0;
	var uLocal_1359 = 0;
	var uLocal_1360 = 0;
	var uLocal_1361 = 0;
	var uLocal_1362 = 6;
	var uLocal_1363 = 0;
	var uLocal_1364 = 0;
	var uLocal_1365 = 0;
	var uLocal_1366 = 0;
	var uLocal_1367 = 0;
	var uLocal_1368 = 0;
	var uLocal_1369 = 0;
	var uLocal_1370 = 0;
	var uLocal_1371 = 0;
	var uLocal_1372 = 0;
	var uLocal_1373 = 0;
	var uLocal_1374 = 0;
	var uLocal_1375 = 0;
	var uLocal_1376 = 0;
	var uLocal_1377 = 0;
	var uLocal_1378 = 0;
	var uLocal_1379 = 0;
	var uLocal_1380 = 0;
	int iLocal_1381[2] = { 0, 0 };
	int iLocal_1384 = 0;
	int iLocal_1385[2] = { 0, 0 };
	int iLocal_1388[2] = { 0, 0 };
	int iLocal_1391 = 0;
	int iLocal_1392 = 0;
	int iLocal_1393 = 0;
	int iLocal_1394 = 0;
	int iLocal_1395[2] = { 0, 0 };
	int iLocal_1398 = 0;
	int iLocal_1399 = 0;
	int iLocal_1400 = 0;
	int iLocal_1401 = 0;
	int iLocal_1402 = 0;
	float fLocal_1403 = 0f;
	float fLocal_1404 = 0f;
	int iLocal_1405 = 0;
	int iLocal_1406 = 0;
	int iLocal_1407 = 0;
	float fLocal_1408 = 0f;
	int iLocal_1409 = 0;
	float fLocal_1410[2] = { 0f, 0f };
	int iLocal_1413 = 0;
	int iLocal_1414 = 0;
	int iLocal_1415 = 0;
	int iLocal_1416 = 0;
	var uLocal_1417 = 0;
	int iLocal_1418 = 0;
	int iLocal_1419 = 0;
	int iLocal_1420 = 0;
	int iLocal_1421 = 0;
	float fLocal_1422 = 0f;
	int iLocal_1423 = 0;
	int iLocal_1424 = 0;
	int iLocal_1425 = 0;
	int iLocal_1426 = 0;
#endregion

void __EntryFunction__()//Position - 0x0
{
	int iVar0;
	int iVar1;
	
	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 = 3;
	fLocal_31 = 80f;
	fLocal_32 = 140f;
	fLocal_33 = 180f;
	iLocal_39 = 1;
	iLocal_40 = 65;
	iLocal_41 = 49;
	iLocal_42 = 64;
	vLocal_57 = { 0f, 0f, 0f };
	vLocal_60 = { 0f, 0f, 0f };
	iLocal_63 = -1;
	iLocal_68 = ui::_0x4A9923385BDB9DAD();
	iLocal_69 = ui::_get_blip_info_id_iterator();
	iLocal_70 = -1;
	iLocal_89 = 6;
	vLocal_193 = { -1614.526f, -1137.882f, 0.9178f };
	vLocal_196 = { -1626.046f, -1137.165f, 0.47598f };
	vLocal_199 = { -805.4391f, 175.644f, 75.7407f };
	fLocal_202 = 336.1657f;
	vLocal_203 = { -804.3638f, 178.5257f, 75.7407f };
	fLocal_206 = 14.3431f;
	vLocal_207 = { -1862.529f, -1211.253f, 12.017f };
	fLocal_210 = 45.6064f;
	vLocal_211 = { -823.2707f, 181.5663f, 70.6967f };
	fLocal_214 = 136.7262f;
	vLocal_215 = { -2019.921f, -1030.525f, 0.001f };
	vLocal_218 = { -2008.722f, -1033.154f, 0f };
	fLocal_221 = 280.6858f;
	vLocal_222 = { -1072.8f, -1703.924f, 3.514f };
	fLocal_225 = 181.9476f;
	vLocal_226 = { -1105.932f, -1695.893f, 3.3731f };
	vLocal_229 = { -1106.255f, -1694.977f, 3.3742f };
	fLocal_232 = 122.5477f;
	vLocal_233 = { -1866.951f, -1208.529f, 12.63051f };
	vLocal_236 = { -1865.153f, -1210.694f, 12.60679f };
	fLocal_239 = 54.5399f;
	fLocal_240 = 65.01204f;
	vLocal_241 = { -1627.998f, -1143.906f, -0.612126f };
	vLocal_244 = { -1608.71f, -1116.125f, 7.893201f };
	fLocal_247 = 45f;
	vLocal_248 = { -1084.216f, -1707.052f, -6.638385f };
	vLocal_251 = { -967.2344f, -1829.366f, 40.31441f };
	fLocal_254 = 116f;
	vLocal_255 = { -1851.92f, -1217.777f, 12.01752f };
	fLocal_258 = 332.3918f;
	fLocal_259 = 113.3809f;
	fLocal_260 = -107.7502f;
	iLocal_265 = true;
	sLocal_267 = "fam2";
	sLocal_268 = "fam2stairs";
	iLocal_269 = 2;
	iLocal_275 = 4;
	iLocal_276 = 4;
	iLocal_277 = 1;
	iLocal_279 = -1;
	iLocal_280 = -1;
	iLocal_281 = -1;
	iLocal_282 = 900;
	iLocal_285 = true;
	sLocal_312 = "family_2_mcs_4";
	cLocal_313 = "FAM2AUD";
	vLocal_320 = { -2030.409f, -1039.463f, -23.59287f };
	vLocal_323 = { -1797.853f, -982.6022f, 0f };
	vLocal_326 = { -934.5598f, -1360.544f, 0f };
	fLocal_329 = 288.2051f;
	vLocal_631 = { -816.716f, 179.098f, 72.8274f };
	vLocal_634 = { -816.1068f, 177.5108f, 72.8274f };
	cLocal_675 = cLocal_313;
	StringCopy(&Local_843, "", 24);
	iLocal_928 = -1;
	fLocal_980 = 0f;
	fLocal_1404 = 0f;
	fLocal_1408 = 0f;
	if (player::has_force_cleanup_occurred(3))
	{
		func_534(3);
		func_532();
		audio::trigger_music_event("FAM2_STOP");
		func_530();
	}
	gameplay::set_mission_flag(1);
	func_499();
	func_498(0, 1);
	iLocal_1426 = 0;
	while (true)
	{
		if (!iLocal_284)
		{
			func_495();
		}
		if (!iLocal_283)
		{
			func_439();
		}
		func_436();
		func_433();
		unk1::_0x208784099002BC30("M_DaddysLittleGirl", 0);
		switch (iLocal_70)
		{
			case -1:
				if (player::is_player_playing(player::player_id()) && !ped::is_ped_injured(player::player_ped_id()))
				{
					ped::set_ped_max_move_blend_ratio(player::player_ped_id(), 1f);
				}
				switch (iLocal_270)
				{
					case 0:
						if (!entity::does_entity_exist(iLocal_104))
						{
							if (!entity::does_entity_exist(Global_88316.f_9[0]))
							{
								func_432(-808.0422f, 168.5755f, 75.7504f, 244.0649f);
							}
							else
							{
								entity::set_entity_as_mission_entity(Global_88316.f_9[0], true, 1);
								iLocal_104 = Global_88316.f_9[0];
							}
						}
						if (!interior::is_valid_interior(iLocal_143))
						{
							iLocal_143 = interior::get_interior_at_coords(-813.1963f, 179.4912f, 71.1592f);
						}
						streaming::request_anim_dict("missfam2mcs_intp1");
						ai::request_waypoint_recording(sLocal_268);
						streaming::request_model(joaat("v_ilev_mm_doorm_l"));
						streaming::request_model(joaat("v_ilev_mm_doorm_r"));
						ui::request_additional_text("FAMILY2", 0);
						ui::request_additional_text(cLocal_313, 6);
						if (!iLocal_1426)
						{
							streaming::prefetch_srl("family_2_Timelapse_srl");
							iLocal_1426 = 1;
						}
						if ((((((((((interior::is_interior_ready(iLocal_143) && streaming::has_anim_dict_loaded("missfam2mcs_intp1")) && entity::does_entity_exist(iLocal_104)) && audio::request_ambient_audio_bank("TIME_LAPSE", 0, -1)) && entity::does_entity_exist(iLocal_104)) && streaming::has_model_loaded(joaat("v_ilev_mm_doorm_l"))) && streaming::has_model_loaded(joaat("v_ilev_mm_doorm_r"))) && ai::get_is_waypoint_recording_loaded(sLocal_268)) && streaming::is_srl_loaded()) && ui::has_additional_text_loaded(0)) && ui::has_additional_text_loaded(6))
						{
							unk1::_0xAF66DCEE6609B148();
							ai::clear_ped_tasks_immediately(player::player_ped_id());
							iLocal_1425 = ped::create_synchronized_scene(-817.311f, 179.33f, 71.241f, 0f, 0f, -113f, 2);
							ai::task_synchronized_scene(player::player_ped_id(), iLocal_1425, "missfam2mcs_intp1", "fam_2_int_p1_michael", 1000f, -1000f, 8, 0, 1148846080, 0);
							ped::_0x2208438012482A1A(player::player_ped_id(), 0, 0);
							if (object::_does_door_exist(-2097039789))
							{
								object::_set_door_ajar_angle(-2097039789, 1f, 0, 0);
								object::_set_door_acceleration_limit(-2097039789, 1, 0, 1);
							}
							if (object::_does_door_exist(-2127416656))
							{
								object::_set_door_ajar_angle(-2127416656, -1f, 0, 0);
								object::_set_door_acceleration_limit(-2127416656, 1, 0, 1);
							}
							entity::create_model_hide(vLocal_631, 1f, joaat("v_ilev_mm_doorm_l"), 0);
							entity::create_model_hide(vLocal_634, 1f, joaat("v_ilev_mm_doorm_r"), 0);
							iLocal_139 = object::create_object(joaat("v_ilev_mm_doorm_l"), vLocal_631, 1, true, false);
							iLocal_140 = object::create_object(joaat("v_ilev_mm_doorm_r"), vLocal_634, 1, true, false);
							entity::play_synchronized_entity_anim(iLocal_139, iLocal_1425, "fam_2_int_p1_doorl", "missfam2mcs_intp1", 1000f, -1000f, 0, 1148846080);
							entity::play_synchronized_entity_anim(iLocal_140, iLocal_1425, "fam_2_int_p1_doorr", "missfam2mcs_intp1", 1000f, -1000f, 0, 1148846080);
							entity::force_entity_ai_and_animation_update(iLocal_139);
							entity::force_entity_ai_and_animation_update(iLocal_140);
							cam::destroy_all_cams(0);
							iLocal_141 = cam::create_camera(964613260, 1);
							cam::play_synchronized_cam_anim(iLocal_141, iLocal_1425, "fam_2_int_p1_cam", "missfam2mcs_intp1");
							cam::set_widescreen_borders(true, 0);
							cam::render_script_cams(true, false, 3000, 1, 0, 0);
							func_431(18);
							streaming::_0xBEB2D9A1D9A8F55A(5, 5, 5, 5);
							streaming::begin_srl();
							system::settimera(0);
							streaming::set_model_as_no_longer_needed(joaat("v_ilev_mm_doorm_l"));
							streaming::set_model_as_no_longer_needed(joaat("v_ilev_mm_doorm_r"));
							func_429(player::player_ped_id(), 32);
							ped::_0x39D55A620FCB6A3A(player::player_ped_id(), 3, 17, 0);
							ped::_0x39D55A620FCB6A3A(player::player_ped_id(), 4, 16, 0);
							ped::_0x39D55A620FCB6A3A(player::player_ped_id(), 6, 1, 0);
							ped::remove_ped_helmet(player::player_ped_id(), 1);
							if (entity::does_entity_exist(player::get_players_last_vehicle()))
							{
								if (func_428(player::get_players_last_vehicle()))
								{
									iVar0 = 0;
									while (iVar0 < 3)
									{
										if (entity::does_entity_exist(Global_89180[iVar0]))
										{
											if (system::vdist2(entity::get_entity_coords(Global_89180[iVar0], 1), vLocal_211) < 900f)
											{
												entity::set_entity_as_mission_entity(Global_89180[iVar0], true, 1);
												vehicle::delete_vehicle(&(Global_89180[iVar0]));
												iVar0 = 3;
											}
										}
										iVar0++;
									}
								}
							}
							func_424(vLocal_203, 1000f, 0);
							if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
							{
								iVar1 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
							}
							else
							{
								iVar1 = vehicle::_0xB2D06FAEDE65B577();
							}
							if (entity::does_entity_exist(iVar1) && vehicle::is_vehicle_driveable(iVar1, 0))
							{
								if (!vehicle::is_vehicle_model(iVar1, joaat("taxi")) && !func_422(iVar1, 0, 1))
								{
									if (func_421(iVar1) && system::vdist(entity::get_entity_coords(iVar1, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 50f)
									{
										entity::set_entity_as_mission_entity(iVar1, true, 1);
										if (func_420(iVar1) == 0)
										{
											vehicle::delete_vehicle(&iVar1);
										}
										else
										{
											func_409(iVar1, -822.4229f, 157.8134f, 69.0913f, 91.16499f, 24, 0);
											entity::set_entity_coords(iVar1, -822.4229f, 157.8134f, 69.0913f, 1, false, 0, 1);
											entity::set_entity_heading(iVar1, 91.16499f);
											vehicle::set_vehicle_doors_shut(iVar1, 1);
										}
									}
								}
							}
							gameplay::clear_area(vLocal_211, 200f, 1, 0, 0, false);
							func_408(24);
							fire::stop_fire_in_range(entity::get_entity_coords(player::player_ped_id(), 1), 300f);
							graphics::remove_particle_fx_in_range(entity::get_entity_coords(player::player_ped_id(), 1), 300f);
							ped::_0x129466ED55140F8D(player::player_ped_id(), 1);
							iLocal_270++;
						}
						break;
					
					case 1:
						unk1::_0xAF66DCEE6609B148();
						streaming::set_srl_time(system::to_float(system::timera()));
						if (func_407(1000))
						{
							func_406(500);
							iLocal_270 += 2;
						}
						if ((ped::is_synchronized_scene_running(iLocal_1425) && ped::get_synchronized_scene_phase(iLocal_1425) > 0.95f) || !ped::is_synchronized_scene_running(iLocal_1425))
						{
							iLocal_1425 = -1;
							Local_91.f_4 = cam::create_cam("DEFAULT_SPLINE_CAMERA", false);
							cam::add_cam_spline_node(Local_91.f_4, -835.1494f, 180.1434f, 71.9064f, 12.6567f, 0f, -102.44f, 5000, 3, 2);
							cam::add_cam_spline_node(Local_91.f_4, -835.7494f, 180.2434f, 71.9064f, 12.6567f, 0f, -102.44f, 5000, 3, 2);
							cam::set_cam_fov(Local_91.f_4, 47.9931f);
							cam::set_cam_active(Local_91.f_4, true);
							audio::play_sound_frontend(-1, "TIME_LAPSE_MASTER", 0, 1);
							func_405(&Local_91, 1, 0, 2000, 1, 1, 0, 1);
							cam::set_cam_active(iLocal_141, false);
							iLocal_1424 = 10;
							ped::_0x129466ED55140F8D(player::player_ped_id(), 0);
							iLocal_270++;
						}
						break;
					
					case 2:
						unk1::_0xAF66DCEE6609B148();
						streaming::set_srl_time(system::to_float(system::timera()));
						if (func_374(iLocal_1424, 0, "EXTRASUNNY", "cirrocumulus", &Local_91, -1082130432, 0, 1, 1065353216))
						{
							audio::release_ambient_audio_bank();
							system::settimera(0);
							iLocal_270++;
						}
						if (func_373())
						{
							func_405(&Local_91, 0, 0, 2000, 1, 1, 0, 1);
							system::wait(0);
							func_406(500);
							iLocal_270++;
						}
						break;
					
					case 3:
						unk1::_0xAF66DCEE6609B148();
						if ((system::timera() > 300 && ped::_0x66680A92700F43DF(player::player_ped_id())) && ai::get_is_waypoint_recording_loaded("fam2Stairs"))
						{
							func_344(0, 0);
							if (entity::does_entity_exist(iLocal_104))
							{
								entity::set_entity_visible(iLocal_104, true, 0);
								entity::set_entity_collision(iLocal_104, true, 0);
								entity::freeze_entity_position(iLocal_104, false);
							}
							time::set_clock_time(10, 0, 0);
							iLocal_270++;
						}
						break;
					
					case 4:
						unk1::_0xAF66DCEE6609B148();
						iLocal_270 = 0;
						iLocal_70 = 0;
						break;
				}
				break;
			
			case 0:
				func_333();
				break;
			
			case 1:
				func_305();
				break;
			
			case 2:
				func_276();
				break;
			
			case 3:
				func_267();
				break;
			
			case 4:
				func_265();
				break;
			
			case 5:
				func_254();
				break;
			
			case 6:
				func_252();
				break;
			
			case 7:
				func_214();
				func_211();
				break;
			
			case 8:
				func_193();
				break;
			
			case 9:
				func_171();
				break;
			
			case 11:
				func_145();
				break;
			
			default:
				break;
		}
		func_144();
		if (vehicle::is_vehicle_driveable(iLocal_114, 0) && !ped::is_ped_injured(iLocal_104))
		{
			if (ped::is_ped_in_vehicle(iLocal_104, iLocal_114, 0))
			{
				ped::set_ped_can_play_ambient_base_anims(iLocal_104, 0);
			}
		}
		func_142(0);
		func_100();
		func_1();
		if (entity::does_entity_exist(iLocal_104) && !ped::is_ped_injured(iLocal_104))
		{
			ped::set_ped_reset_flag(iLocal_104, 328, true);
		}
		if (entity::does_entity_exist(iLocal_103) && !ped::is_ped_injured(iLocal_103))
		{
			ped::set_ped_reset_flag(iLocal_103, 328, true);
		}
		if (iLocal_263)
		{
			iLocal_263 = 0;
		}
		if (iLocal_264)
		{
			iLocal_264 = 0;
		}
		system::wait(0);
	}
}

void func_1()//Position - 0xB6C
{
	int iVar0;
	int iVar1;
	
	switch (iLocal_877)
	{
		case 0:
			if (iLocal_70 == 5 && system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), -2033.821f, -1031.864f, 4.89f) < 62500f)
			{
				streaming::request_model(joaat("csb_porndudes"));
				streaming::request_model(joaat("a_f_y_beach_01"));
				streaming::request_anim_dict("missfam2leadinoutmcs3");
				if (((streaming::has_model_loaded(joaat("csb_porndudes")) && streaming::has_model_loaded(joaat("a_f_y_beach_01"))) && streaming::has_anim_dict_loaded("missfam2leadinoutmcs3")) && func_95(-2033.23f, -1032.27f, 4.89f, 0f))
				{
					if (!ped::is_ped_injured(iLocal_103))
					{
						iLocal_106[0] = ped::create_ped(26, joaat("csb_porndudes"), -2032.69f, -1031.36f, 5.59f, 0f, 1, true);
						ped::set_ped_lod_multiplier(iLocal_106[0], 1.75f);
						iLocal_106[1] = ped::create_ped(26, joaat("csb_porndudes"), -2034.42f, -1032.71f, 5.54f, 0f, 1, true);
						iLocal_106[2] = ped::create_ped(26, joaat("a_f_y_beach_01"), -2033.32f, -1031.07f, 5.54f, 0f, 1, true);
						iLocal_106[3] = ped::create_ped(26, joaat("a_f_y_beach_01"), -2034.48f, -1031.6f, 5.48f, 0f, 1, true);
						iLocal_878 = ped::create_synchronized_scene(-2033.821f, -1031.864f, 4.89f, 0f, 0f, -4.4f, 2);
						ai::task_synchronized_scene(iLocal_106[0], iLocal_878, "missfam2leadinoutmcs3", "onboat_leadin_pornguy_a", 1000f, -1000f, 0, 0, 1148846080, 0);
						ai::task_synchronized_scene(iLocal_106[1], iLocal_878, "missfam2leadinoutmcs3", "onboat_leadin_pornguy_b", 1000f, -1000f, 0, 0, 1148846080, 0);
						ai::task_synchronized_scene(iLocal_106[2], iLocal_878, "missfam2leadinoutmcs3", "onboat_leadin_porngal_a", 1000f, -1000f, 0, 0, 1148846080, 0);
						ai::task_synchronized_scene(iLocal_106[3], iLocal_878, "missfam2leadinoutmcs3", "onboat_leadin_porngal_b", 1000f, -1000f, 0, 0, 1148846080, 0);
						ai::task_synchronized_scene(iLocal_103, iLocal_878, "missfam2leadinoutmcs3", "onboat_leadin_tracy", 1000f, -1000f, 0, 0, 1148846080, 0);
						ped::set_ped_component_variation(iLocal_106[0], 0, 0, 0, 0);
						ped::set_ped_component_variation(iLocal_106[0], 3, 0, 0, 0);
						ped::set_ped_component_variation(iLocal_106[0], 4, 0, 0, 0);
						ped::set_ped_prop_index(iLocal_106[0], 1, 0, 0, false);
						ped::set_ped_component_variation(iLocal_106[1], 0, 2, 0, 0);
						ped::set_ped_component_variation(iLocal_106[1], 3, 2, 0, 0);
						ped::set_ped_component_variation(iLocal_106[1], 4, 2, 0, 0);
						ped::set_ped_prop_index(iLocal_106[1], 0, 0, 0, false);
						ped::set_synchronized_scene_looped(iLocal_878, true);
						streaming::set_model_as_no_longer_needed(joaat("csb_porndudes"));
						streaming::set_model_as_no_longer_needed(joaat("a_f_y_beach_01"));
						streaming::set_model_as_no_longer_needed(joaat("ig_tracydisanto"));
						iLocal_877++;
					}
				}
			}
			break;
		
		case 1:
			func_94("family_2_mcs_3", -2033.821f, -1031.864f, 4.89f, 100f, &iLocal_289);
			if (iLocal_289)
			{
				if (cutscene::_0xB56BBBCC2955D9CB())
				{
					vehicle::request_vehicle_recording(1, "famtwoplayer");
					func_2("Michael", player::player_ped_id(), 0, 2);
					if (entity::does_entity_exist(iLocal_106[0]) && !ped::is_ped_injured(iLocal_106[0]))
					{
						func_2("Guy_on_sofa", iLocal_106[0], 0, 2);
					}
					if (entity::does_entity_exist(iLocal_106[1]) && !ped::is_ped_injured(iLocal_106[1]))
					{
						func_2("Man_getting_wood", iLocal_106[1], 0, 2);
					}
					if (entity::does_entity_exist(iLocal_106[2]) && !ped::is_ped_injured(iLocal_106[2]))
					{
						func_2("Girl_on_sofa", iLocal_106[2], 0, 2);
					}
					if (entity::does_entity_exist(iLocal_106[3]) && !ped::is_ped_injured(iLocal_106[3]))
					{
						func_2("Girl_being_chatted_up", iLocal_106[3], 0, 2);
					}
					if (entity::does_entity_exist(iLocal_103) && !ped::is_ped_injured(iLocal_103))
					{
						func_2("Tracy", iLocal_103, 0, 2);
					}
				}
			}
			if (iLocal_289)
			{
				if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), -2033.821f, -1031.864f, 4.89f) > (120f * 120f))
				{
					iLocal_289 = 0;
					cutscene::remove_cutscene();
				}
			}
			if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), -2033.821f, -1031.864f, 4.89f) > 75625f || (iLocal_70 != 5 && iLocal_70 != 6))
			{
				if (iLocal_70 != 6)
				{
					iVar1 = true;
					iVar0 = 0;
					while (iVar0 < iLocal_106)
					{
						if (!ped::is_ped_injured(iLocal_106[iVar0]))
						{
							if (!entity::is_entity_occluded(iLocal_106[iVar0]))
							{
								iVar1 = false;
							}
						}
						iVar0++;
					}
					if (!ped::is_ped_injured(iLocal_103))
					{
						if (!entity::is_entity_occluded(iLocal_103))
						{
							iVar1 = false;
						}
					}
					if (iVar1)
					{
						iVar0 = 0;
						while (iVar0 < iLocal_106)
						{
							if (entity::does_entity_exist(iLocal_106[iVar0]))
							{
								ai::clear_ped_tasks_immediately(iLocal_106[iVar0]);
								ped::delete_ped(&(iLocal_106[iVar0]));
							}
							iVar0++;
						}
					}
					iLocal_877 = 0;
				}
			}
			break;
	}
}

void func_2(char* sParam0, int iParam1, int iParam2, int iParam3)//Position - 0x102E
{
	struct<50> Var0;
	int iVar65;
	
	Var0 = 12;
	Var0.f_13 = 12;
	Var0.f_26 = 12;
	Var0.f_39 = 9;
	Var0.f_49 = 9;
	func_3(iParam1, &Var0, iParam3);
	iVar65 = 0;
	while (iVar65 < 12)
	{
		cutscene::set_cutscene_ped_component_variation(sParam0, iVar65, Var0.f_13[iVar65], Var0[iVar65], iParam2);
		iVar65++;
	}
	iVar65 = 0;
	while (iVar65 < 9)
	{
		if (Var0.f_39[iVar65] == -1 || Var0.f_39[iVar65] == 255)
		{
			cutscene::set_cutscene_ped_prop_variation(sParam0, iVar65, -1, 0, iParam2);
		}
		else
		{
			cutscene::set_cutscene_ped_prop_variation(sParam0, iVar65, Var0.f_39[iVar65], Var0.f_49[iVar65], iParam2);
		}
		iVar65++;
	}
}

void func_3(int iParam0, var uParam1, int iParam2)//Position - 0x10E9
{
	int iVar0;
	int iVar1;
	struct<50> Var2;
	struct<14> Var67;
	int iVar81;
	int iVar82;
	int iVar83;
	int iVar84;
	int iVar85;
	int iVar86;
	
	Var2 = 12;
	Var2.f_13 = 12;
	Var2.f_26 = 12;
	Var2.f_39 = 9;
	Var2.f_49 = 9;
	iVar81 = entity::get_entity_model(iParam0);
	func_87(iParam0, &Var2, 0);
	func_87(iParam0, uParam1, iParam2);
	iVar82 = 0;
	iVar83 = 0;
	iVar0 = 0;
	while (iVar0 < 12)
	{
		if (uParam1->f_13[iVar0] != Var2.f_13[iVar0] || (*uParam1)[iVar0] != Var2[iVar0])
		{
			if (func_84(iVar81, func_86(iVar0), func_85(iParam0, Var2.f_13[iVar0], Var2[iVar0], func_86(iVar0)), &iVar1))
			{
				Var67 = { func_14(iVar81, 2, uParam1->f_59) };
				uParam1->f_13[2] = Var67.f_3;
				(*uParam1)[2] = Var67.f_4;
				iVar82 = 1;
			}
			if (func_12(iVar81, func_86(iVar0), func_85(iParam0, Var2.f_13[iVar0], Var2[iVar0], func_86(iVar0)), &iVar1))
			{
				Var67 = { func_14(iVar81, 1, uParam1->f_62) };
				uParam1->f_13[1] = Var67.f_3;
				(*uParam1)[1] = Var67.f_4;
				iVar83 = 1;
			}
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (uParam1->f_39[iVar0] != Var2.f_39[iVar0] || uParam1->f_49[iVar0] != Var2.f_49[iVar0])
		{
			if (func_84(iVar81, 14, func_5(iParam0, Var2.f_39[iVar0], Var2.f_49[iVar0], iVar0), &iVar1))
			{
				Var67 = { func_14(iVar81, 2, uParam1->f_59) };
				uParam1->f_13[2] = Var67.f_3;
				(*uParam1)[2] = Var67.f_4;
				iVar82 = 1;
			}
			if (func_12(iVar81, 14, func_5(iParam0, Var2.f_39[iVar0], Var2.f_49[iVar0], iVar0), &iVar1))
			{
				Var67 = { func_14(iVar81, 1, uParam1->f_62) };
				uParam1->f_13[1] = Var67.f_3;
				(*uParam1)[1] = Var67.f_4;
				iVar83 = 1;
			}
		}
		iVar0++;
	}
	if (iVar83 || iVar82)
	{
		iVar84 = func_85(iParam0, uParam1->f_13[1], (*uParam1)[1], 1);
		iVar85 = func_85(iParam0, uParam1->f_13[2], (*uParam1)[2], 2);
		iVar86 = func_4(iVar81, iVar85, iVar84);
		if (iVar86 != -99)
		{
			Var67 = { func_14(iVar81, 0, iVar86) };
			uParam1->f_13[0] = Var67.f_3;
			(*uParam1)[0] = Var67.f_4;
		}
	}
}

int func_4(int iParam0, int iParam1, int iParam2)//Position - 0x1357
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			if (iParam1 == 1)
			{
				if (iParam2 == 0)
				{
					return 1;
				}
				else if (iParam2 == 4)
				{
					return 5;
				}
				else
				{
					return 3;
				}
			}
			else if (iParam2 == 0)
			{
				return 0;
			}
			else if (iParam2 == 4)
			{
				return 4;
			}
			else
			{
				return 2;
			}
			break;
		
		case joaat("player_one"):
			if (iParam1 >= 0 && iParam1 <= 15)
			{
				if (iParam2 == 0)
				{
					return 0;
				}
				else
				{
					return 3;
				}
			}
			else if (iParam1 >= 16 && iParam1 <= 17)
			{
				if (iParam2 == 0)
				{
					return 2;
				}
				else
				{
					return 5;
				}
			}
			else if (iParam1 == 18)
			{
				if (iParam2 == 0)
				{
					return 6;
				}
				else
				{
					return 7;
				}
			}
			else if (iParam1 == 19)
			{
				if (iParam2 == 0)
				{
					return 1;
				}
				else
				{
					return 4;
				}
			}
			else if (iParam2 == 0)
			{
				return 1;
			}
			else
			{
				return 4;
			}
			break;
		
		case joaat("player_two"):
			if (iParam1 == 2)
			{
				if (iParam2 == 0)
				{
					return 2;
				}
				else
				{
					return 3;
				}
			}
			else if (iParam1 == 3)
			{
				if (iParam2 == 0)
				{
					return 4;
				}
				else
				{
					return 6;
				}
			}
			else if (iParam1 == 8)
			{
				return 5;
			}
			else if (iParam2 == 0)
			{
				return 0;
			}
			else
			{
				return 1;
			}
			break;
	}
	return -99;
}

int func_5(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x14AE
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	
	if (iParam1 == -1)
	{
		return func_11(iParam3);
	}
	iVar0 = entity::get_entity_model(iParam0);
	iVar1 = dlc1::get_hash_name_for_prop(iParam0, iParam3, iParam1, iParam2);
	if (iVar1 != -1 && iVar1 != 0)
	{
		if (iVar0 == joaat("mp_m_freemode_01"))
		{
			return func_7(entity::get_entity_model(iParam0), iVar1, 14, 3);
		}
		else if (iVar0 == joaat("mp_f_freemode_01"))
		{
			return func_7(entity::get_entity_model(iParam0), iVar1, 14, 4);
		}
	}
	iVar2 = ped::get_number_of_ped_prop_drawable_variations(iParam0, iParam3);
	iVar4 = 0;
	while (iVar4 <= (iVar2 - 1))
	{
		iVar6 = ped::get_number_of_ped_prop_texture_variations(iParam0, iParam3, iVar4);
		if (iVar4 != iParam1)
		{
			iVar3 = (iVar3 + iVar6);
		}
		else
		{
			iVar5 = 0;
			while (iVar5 <= (iVar6 - 1))
			{
				if (iVar4 == iParam1 && iVar5 == iParam2)
				{
					iVar3 = (iVar3 + func_6(iParam0, iParam3));
					return iVar3;
				}
				else
				{
					iVar3++;
				}
				iVar5++;
			}
		}
		iVar4++;
	}
	return func_11(iParam3);
}

int func_6(int iParam0, int iParam1)//Position - 0x15AA
{
	int iVar0;
	
	iVar0 = entity::get_entity_model(iParam0);
	switch (iVar0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 0:
					return 10;
					break;
				
				case 1:
					return 58;
					break;
				
				case 2:
					return 112;
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 0:
					return 10;
					break;
				
				case 1:
					return 82;
					break;
				
				case 2:
					return 158;
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 0:
					return 10;
					break;
				
				case 1:
					return 88;
					break;
				
				case 2:
					return 154;
					break;
			}
			break;
		
		case joaat("mp_m_freemode_01"):
			switch (iParam1)
			{
				case 0:
					return 10;
					break;
				
				case 1:
					return 155;
					break;
				
				case 6:
					return 319;
					break;
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			switch (iParam1)
			{
				case 0:
					return 10;
					break;
				
				case 1:
					return 155;
					break;
				
				case 6:
					return 319;
					break;
			}
			break;
	}
	return -99;
}

int func_7(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x16E8
{
	struct<2> Var0;
	int iVar17;
	int iVar18;
	int iVar19;
	struct<2> Var20;
	int iVar37;
	int iVar38;
	int iVar39;
	
	if (iParam2 == 12)
	{
	}
	else if (iParam2 == 13)
	{
	}
	else if (iParam2 == 14)
	{
		dlc1::init_shop_ped_prop(&Var0);
		iVar18 = 0;
		iVar19 = dlc1::_get_num_props_from_outfit(iParam3, 6, -1, 1, -1, -1);
		iVar17 = 0;
		while (iVar17 < iVar19)
		{
			dlc1::get_shop_ped_query_prop(iVar17, &Var0);
			if (!dlc1::_is_dlc_data_empty(Var0))
			{
				if (iParam1 == Var0.f_1)
				{
					return (func_10(iParam0) + iVar18);
				}
				iVar18++;
			}
			iVar17++;
		}
	}
	else
	{
		dlc1::init_shop_ped_component(&Var20);
		iVar38 = 0;
		iVar39 = dlc1::_get_num_props_from_outfit(iParam3, 6, -1, 0, -1, func_9(iParam2));
		iVar37 = 0;
		while (iVar37 < iVar39)
		{
			dlc1::get_shop_ped_query_component(iVar37, &Var20);
			if (!dlc1::_is_dlc_data_empty(Var20))
			{
				if (iParam1 == Var20.f_1)
				{
					return (func_8(iParam0, func_9(iParam2)) + iVar38);
				}
				iVar38++;
			}
			iVar37++;
		}
	}
	return -99;
}

int func_8(int iParam0, int iParam1)//Position - 0x17C8
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 0:
					return 7;
					break;
				
				case 1:
					return 5;
					break;
				
				case 2:
					return 6;
					break;
				
				case 3:
					return 181;
					break;
				
				case 4:
					return 113;
					break;
				
				case 5:
					return 14;
					break;
				
				case 6:
					return 99;
					break;
				
				case 7:
					return 1;
					break;
				
				case 8:
					return 24;
					break;
				
				case 9:
					return 20;
					break;
				
				case 10:
					return 48;
					break;
				
				case 11:
					return 45;
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 0:
					return 10;
					break;
				
				case 1:
					return 5;
					break;
				
				case 2:
					return 21;
					break;
				
				case 3:
					return 318;
					break;
				
				case 4:
					return 117;
					break;
				
				case 5:
					return 7;
					break;
				
				case 6:
					return 134;
					break;
				
				case 7:
					return 1;
					break;
				
				case 8:
					return 77;
					break;
				
				case 9:
					return 12;
					break;
				
				case 10:
					return 53;
					break;
				
				case 11:
					return 63;
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 0:
					return 7;
					break;
				
				case 1:
					return 6;
					break;
				
				case 2:
					return 9;
					break;
				
				case 3:
					return 242;
					break;
				
				case 4:
					return 104;
					break;
				
				case 5:
					return 7;
					break;
				
				case 6:
					return 84;
					break;
				
				case 7:
					return 1;
					break;
				
				case 8:
					return 18;
					break;
				
				case 9:
					return 17;
					break;
				
				case 10:
					return 33;
					break;
				
				case 11:
					return 1;
					break;
			}
			break;
	}
	switch (iParam0)
	{
		case joaat("mp_m_freemode_01"):
			switch (iParam1)
			{
				case 0:
					return 0;
					break;
				
				case 1:
					return 26;
					break;
				
				case 2:
					return 91;
					break;
				
				case 3:
					return 16;
					break;
				
				case 4:
					return 256;
					break;
				
				case 5:
					return 9;
					break;
				
				case 6:
					return 256;
					break;
				
				case 7:
					return 92;
					break;
				
				case 8:
					return 241;
					break;
				
				case 9:
					return 46;
					break;
				
				case 10:
					return 7;
					break;
				
				case 11:
					return 237;
					break;
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			switch (iParam1)
			{
				case 0:
					return 0;
					break;
				
				case 1:
					return 26;
					break;
				
				case 2:
					return 92;
					break;
				
				case 3:
					return 16;
					break;
				
				case 4:
					return 256;
					break;
				
				case 5:
					return 9;
					break;
				
				case 6:
					return 256;
					break;
				
				case 7:
					return 55;
					break;
				
				case 8:
					return 136;
					break;
				
				case 9:
					return 36;
					break;
				
				case 10:
					return 6;
					break;
				
				case 11:
					return 256;
					break;
			}
			break;
	}
	return -99;
}

int func_9(int iParam0)//Position - 0x1B6F
{
	switch (iParam0)
	{
		case 0:
			return 0;
			break;
		
		case 2:
			return 2;
			break;
		
		case 3:
			return 3;
			break;
		
		case 4:
			return 4;
			break;
		
		case 6:
			return 6;
			break;
		
		case 5:
			return 5;
			break;
		
		case 8:
			return 8;
			break;
		
		case 9:
			return 9;
			break;
		
		case 10:
			return 10;
			break;
		
		case 1:
			return 1;
			break;
		
		case 7:
			return 7;
			break;
		
		case 11:
			return 11;
			break;
	}
	return 0;
}

int func_10(int iParam0)//Position - 0x1C1F
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			return 113;
			break;
		
		case joaat("player_one"):
			return 175;
			break;
		
		case joaat("player_two"):
			return 155;
			break;
	}
	switch (iParam0)
	{
		case joaat("mp_m_freemode_01"):
			return 327;
			break;
		
		case joaat("mp_f_freemode_01"):
			return 327;
			break;
	}
	return -99;
}

int func_11(int iParam0)//Position - 0x1C80
{
	switch (iParam0)
	{
		case 0:
			return 0;
			break;
		
		case 1:
			return 1;
			break;
		
		case 2:
			return 2;
			break;
		
		case 3:
			return 3;
			break;
		
		case 4:
			return 4;
			break;
		
		case 5:
			return 5;
			break;
		
		case 6:
			return 6;
			break;
		
		case 7:
			return 7;
			break;
		
		case 8:
			return 8;
			break;
	}
	return 0;
}

bool func_12(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x1D06
{
	var uVar0;
	
	*iParam3 = -99;
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 10:
					if (iParam2 >= 44 && iParam2 <= 47)
					{
						*iParam3 = 0;
					}
					break;
				
				case 14:
					if (((((((iParam2 >= 31 && iParam2 <= 32) || (iParam2 >= 33 && iParam2 <= 34)) || (iParam2 >= 35 && iParam2 <= 36)) || iParam2 == 37) || (iParam2 >= 38 && iParam2 <= 39)) || (iParam2 >= 40 && iParam2 <= 41)) || (iParam2 >= 42 && iParam2 <= 44))
					{
						*iParam3 = 0;
					}
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 10:
					if (iParam2 >= 47 && iParam2 <= 50)
					{
						*iParam3 = 0;
					}
					break;
				
				case 14:
					if (((((iParam2 >= 26 && iParam2 <= 27) || (iParam2 >= 28 && iParam2 <= 29)) || (iParam2 >= 30 && iParam2 <= 31)) || iParam2 == 32) || (iParam2 >= 35 && iParam2 <= 36))
					{
						*iParam3 = 0;
					}
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 9:
					if (iParam2 >= 15 && iParam2 <= 16)
					{
						*iParam3 = 0;
					}
					break;
				
				case 10:
					if (iParam2 >= 29 && iParam2 <= 32)
					{
						*iParam3 = 0;
					}
					break;
				
				case 14:
					if (((((((iParam2 >= 47 && iParam2 <= 48) || (iParam2 >= 49 && iParam2 <= 50)) || (iParam2 >= 51 && iParam2 <= 52)) || iParam2 == 53) || (iParam2 >= 54 && iParam2 <= 55)) || (iParam2 >= 56 && iParam2 <= 57)) || (iParam2 >= 58 && iParam2 <= 60))
					{
						*iParam3 = 0;
					}
					break;
			}
			break;
	}
	if (*iParam3 != -99)
	{
		uVar0 = func_13(iParam0);
		Global_101652.f_2079.f_539[uVar0 /*65*/].f_63 = iParam2;
		Global_101652.f_2079.f_539[uVar0 /*65*/].f_64 = iParam1;
		return true;
	}
	return false;
}

int func_13(int iParam0)//Position - 0x1F90
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			return 0;
			break;
		
		case joaat("player_one"):
			return 1;
			break;
		
		case joaat("player_two"):
			return 2;
			break;
		
		default:
			break;
	}
	return 145;
}

struct<14> func_14(int iParam0, int iParam1, int iParam2)//Position - 0x1FCB
{
	func_83();
	if (iParam0 == joaat("player_zero"))
	{
		func_65(iParam1, iParam2);
	}
	else if (iParam0 == joaat("player_one"))
	{
		func_46(iParam1, iParam2);
	}
	else if (iParam0 == joaat("player_two"))
	{
		func_15(iParam1, iParam2);
	}
	return Global_69518[0 /*14*/];
}

void func_15(int iParam0, int iParam1)//Position - 0x201D
{
	switch (iParam0)
	{
		case 0:
			func_45(iParam1);
			break;
		
		case 2:
			func_44(iParam1);
			break;
		
		case 3:
			func_41(iParam1);
			break;
		
		case 4:
			func_40(iParam1);
			break;
		
		case 6:
			func_39(iParam1);
			break;
		
		case 5:
			func_38(iParam1);
			break;
		
		case 8:
			func_37(iParam1);
			break;
		
		case 9:
			func_36(iParam1);
			break;
		
		case 10:
			func_35(iParam1);
			break;
		
		case 1:
			func_34(iParam1);
			break;
		
		case 7:
			func_33(iParam1);
			break;
		
		case 11:
			func_32(iParam1);
			break;
		
		case 12:
			func_31(iParam1);
			break;
		
		case 13:
			func_30(iParam1);
			break;
		
		case 14:
			func_16(iParam1);
			break;
	}
}

void func_16(int iParam0)//Position - 0x210D
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 14;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 6;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 7;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 8;
			break;
		
		case 154:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 2;
			break;
		
		case 88:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 10;
			break;
		
		case 89:
			StringCopy(&Var2, "PROPS_P2_E1", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar1 = 45;
			iVar8 = 10;
			break;
		
		case 90:
			StringCopy(&Var2, "PROPS_P2_E2", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar8 = 10;
			break;
		
		case 91:
			StringCopy(&Var2, "PROPS_P2_E2_1", 16);
			iVar6 = 2;
			iVar7 = 1;
			iVar1 = 50;
			iVar8 = 10;
			break;
		
		case 92:
			StringCopy(&Var2, "PROPS_P2_E2_2", 16);
			iVar6 = 2;
			iVar7 = 2;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 93:
			StringCopy(&Var2, "PROPS_P2_E2_3", 16);
			iVar6 = 2;
			iVar7 = 3;
			iVar1 = 52;
			iVar8 = 10;
			break;
		
		case 94:
			StringCopy(&Var2, "PROPS_P2_E2_4", 16);
			iVar6 = 2;
			iVar7 = 4;
			iVar1 = 54;
			iVar8 = 10;
			break;
		
		case 95:
			StringCopy(&Var2, "PROPS_P2_E2_5", 16);
			iVar6 = 2;
			iVar7 = 5;
			iVar1 = 54;
			iVar8 = 10;
			break;
		
		case 96:
			StringCopy(&Var2, "PROPS_P2_E2_6", 16);
			iVar6 = 2;
			iVar7 = 6;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 97:
			StringCopy(&Var2, "PROPS_P2_E2_7", 16);
			iVar6 = 2;
			iVar7 = 7;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 98:
			StringCopy(&Var2, "PROPS_P2_E2_8", 16);
			iVar6 = 2;
			iVar7 = 8;
			iVar1 = 58;
			iVar8 = 10;
			break;
		
		case 99:
			StringCopy(&Var2, "PROPS_P2_E2_9", 16);
			iVar6 = 2;
			iVar7 = 9;
			iVar1 = 58;
			iVar8 = 10;
			break;
		
		case 100:
			StringCopy(&Var2, "PROPS_P2_E3", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 101:
			StringCopy(&Var2, "PROPS_P2_E3_1", 16);
			iVar6 = 3;
			iVar7 = 1;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 102:
			StringCopy(&Var2, "PROPS_P2_E3_2", 16);
			iVar6 = 3;
			iVar7 = 2;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 103:
			StringCopy(&Var2, "PROPS_P2_E3_3", 16);
			iVar6 = 3;
			iVar7 = 3;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 104:
			StringCopy(&Var2, "PROPS_P2_E3_4", 16);
			iVar6 = 3;
			iVar7 = 4;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 105:
			StringCopy(&Var2, "PROPS_P2_E3_5", 16);
			iVar6 = 3;
			iVar7 = 5;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 106:
			StringCopy(&Var2, "PROPS_P2_E3_6", 16);
			iVar6 = 3;
			iVar7 = 6;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 107:
			StringCopy(&Var2, "PROPS_P2_E3_7", 16);
			iVar6 = 3;
			iVar7 = 7;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 108:
			StringCopy(&Var2, "PROPS_P2_E3_8", 16);
			iVar6 = 3;
			iVar7 = 8;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 109:
			StringCopy(&Var2, "PROPS_P2_E3_9", 16);
			iVar6 = 3;
			iVar7 = 9;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 110:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar8 = 10;
			break;
		
		case 111:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar8 = 10;
			break;
		
		case 112:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar8 = 10;
			break;
		
		case 113:
			StringCopy(&Var2, "PROPS_P2_E7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar1 = 60;
			iVar8 = 10;
			break;
		
		case 114:
			StringCopy(&Var2, "PROPS_P2_E7_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar1 = 50;
			iVar8 = 10;
			break;
		
		case 115:
			StringCopy(&Var2, "PROPS_P2_E7_2", 16);
			iVar6 = 7;
			iVar7 = 2;
			iVar1 = 50;
			iVar8 = 10;
			break;
		
		case 116:
			StringCopy(&Var2, "PROPS_P2_E7_3", 16);
			iVar6 = 7;
			iVar7 = 3;
			iVar1 = 59;
			iVar8 = 10;
			break;
		
		case 117:
			StringCopy(&Var2, "PROPS_P2_E7_4", 16);
			iVar6 = 7;
			iVar7 = 4;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 118:
			StringCopy(&Var2, "PROPS_P2_E7_5", 16);
			iVar6 = 7;
			iVar7 = 5;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 119:
			StringCopy(&Var2, "PROPS_P2_E7_6", 16);
			iVar6 = 7;
			iVar7 = 6;
			iVar1 = 65;
			iVar8 = 10;
			break;
		
		case 120:
			StringCopy(&Var2, "PROPS_P2_E7_7", 16);
			iVar6 = 7;
			iVar7 = 7;
			iVar1 = 59;
			iVar8 = 10;
			break;
		
		case 121:
			StringCopy(&Var2, "PROPS_P2_E7_8", 16);
			iVar6 = 7;
			iVar7 = 8;
			iVar1 = 79;
			iVar8 = 10;
			break;
		
		case 122:
			StringCopy(&Var2, "PROPS_P2_E7_9", 16);
			iVar6 = 7;
			iVar7 = 9;
			iVar1 = 79;
			iVar8 = 10;
			break;
		
		case 123:
			StringCopy(&Var2, "PROPS_P2_E8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar1 = 150;
			iVar8 = 10;
			break;
		
		case 124:
			StringCopy(&Var2, "PROPS_P2_E8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 150;
			iVar8 = 10;
			break;
		
		case 125:
			StringCopy(&Var2, "PROPS_P2_E8_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 170;
			iVar8 = 10;
			break;
		
		case 126:
			StringCopy(&Var2, "PROPS_P2_E8_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 127:
			StringCopy(&Var2, "PROPS_P2_E8_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 180;
			iVar8 = 10;
			break;
		
		case 128:
			StringCopy(&Var2, "PROPS_P2_E8_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 185;
			iVar8 = 10;
			break;
		
		case 129:
			StringCopy(&Var2, "PROPS_P2_E8_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 189;
			iVar8 = 10;
			break;
		
		case 130:
			StringCopy(&Var2, "PROPS_P2_E8_7", 16);
			iVar6 = 8;
			iVar7 = 7;
			iVar1 = 195;
			iVar8 = 10;
			break;
		
		case 131:
			StringCopy(&Var2, "PROPS_P2_E8_8", 16);
			iVar6 = 8;
			iVar7 = 8;
			iVar1 = 210;
			iVar8 = 10;
			break;
		
		case 132:
			StringCopy(&Var2, "PROPS_P2_E8_9", 16);
			iVar6 = 8;
			iVar7 = 9;
			iVar1 = 215;
			iVar8 = 10;
			break;
		
		case 133:
			StringCopy(&Var2, "PROPS_P2_E9_0", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar1 = 165;
			iVar8 = 10;
			break;
		
		case 134:
			StringCopy(&Var2, "PROPS_P2_E9_1", 16);
			iVar6 = 9;
			iVar7 = 1;
			iVar1 = 165;
			iVar8 = 10;
			break;
		
		case 135:
			StringCopy(&Var2, "PROPS_P2_E9_2", 16);
			iVar6 = 9;
			iVar7 = 2;
			iVar1 = 169;
			iVar8 = 10;
			break;
		
		case 136:
			StringCopy(&Var2, "PROPS_P2_E9_3", 16);
			iVar6 = 9;
			iVar7 = 3;
			iVar1 = 169;
			iVar8 = 10;
			break;
		
		case 137:
			StringCopy(&Var2, "PROPS_P2_E9_4", 16);
			iVar6 = 9;
			iVar7 = 4;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 138:
			StringCopy(&Var2, "PROPS_P2_E9_5", 16);
			iVar6 = 9;
			iVar7 = 5;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 139:
			StringCopy(&Var2, "PROPS_P2_E9_6", 16);
			iVar6 = 9;
			iVar7 = 6;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 140:
			StringCopy(&Var2, "PROPS_P2_E9_7", 16);
			iVar6 = 9;
			iVar7 = 7;
			iVar1 = 189;
			iVar8 = 10;
			break;
		
		case 141:
			StringCopy(&Var2, "PROPS_P2_E9_8", 16);
			iVar6 = 9;
			iVar7 = 8;
			iVar1 = 195;
			iVar8 = 10;
			break;
		
		case 142:
			StringCopy(&Var2, "PROPS_P2_E9_9", 16);
			iVar6 = 9;
			iVar7 = 9;
			iVar1 = 195;
			iVar8 = 10;
			break;
		
		case 143:
			StringCopy(&Var2, "PROPS_P2_E10_0", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar1 = 49;
			iVar8 = 10;
			break;
		
		case 144:
			StringCopy(&Var2, "PROPS_P2_E10_1", 16);
			iVar6 = 10;
			iVar7 = 1;
			iVar1 = 50;
			iVar8 = 10;
			break;
		
		case 145:
			StringCopy(&Var2, "PROPS_P2_E10_2", 16);
			iVar6 = 10;
			iVar7 = 2;
			iVar1 = 52;
			iVar8 = 10;
			break;
		
		case 146:
			StringCopy(&Var2, "PROPS_P2_E10_3", 16);
			iVar6 = 10;
			iVar7 = 3;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 147:
			StringCopy(&Var2, "PROPS_P2_E10_4", 16);
			iVar6 = 10;
			iVar7 = 4;
			iVar1 = 60;
			iVar8 = 10;
			break;
		
		case 148:
			StringCopy(&Var2, "PROPS_P2_E10_5", 16);
			iVar6 = 10;
			iVar7 = 5;
			iVar1 = 58;
			iVar8 = 10;
			break;
		
		case 149:
			StringCopy(&Var2, "PROPS_P2_E10_6", 16);
			iVar6 = 10;
			iVar7 = 6;
			iVar1 = 60;
			iVar8 = 10;
			break;
		
		case 150:
			StringCopy(&Var2, "PROPS_P2_E10_7", 16);
			iVar6 = 10;
			iVar7 = 7;
			iVar1 = 63;
			iVar8 = 10;
			break;
		
		case 151:
			StringCopy(&Var2, "PROPS_P2_E10_8", 16);
			iVar6 = 10;
			iVar7 = 8;
			iVar1 = 65;
			iVar8 = 10;
			break;
		
		case 152:
			StringCopy(&Var2, "PROPS_P2_E10_9", 16);
			iVar6 = 10;
			iVar7 = 9;
			iVar1 = 68;
			iVar8 = 10;
			break;
		
		case 153:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar1 = 100;
			iVar8 = 10;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 12:
			StringCopy(&Var2, "PROPS_P2_H2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar1 = 320;
			iVar8 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "PROPS_P2_H7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 18:
			StringCopy(&Var2, "PROPS_P2_H7_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 26:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 6;
			iVar8 = 0;
			break;
		
		case 27:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 7;
			iVar8 = 0;
			break;
		
		case 28:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 8;
			iVar8 = 0;
			break;
		
		case 29:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 9;
			iVar8 = 0;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 10;
			iVar8 = 0;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 11;
			iVar8 = 0;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 12;
			iVar8 = 0;
			break;
		
		case 33:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 13;
			iVar8 = 0;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 14;
			iVar8 = 0;
			break;
		
		case 35:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 15;
			iVar8 = 0;
			break;
		
		case 36:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 37:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 38:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 39:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 40:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 41:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 42:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 43:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar8 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar8 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 46:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 47:
			StringCopy(&Var2, "PROPS_P1_H8_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar1 = 270;
			iVar8 = 0;
			break;
		
		case 48:
			StringCopy(&Var2, "PROPS_P1_H8_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 270;
			iVar8 = 0;
			break;
		
		case 49:
			StringCopy(&Var2, "PROPS_P1_H9_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar1 = 200;
			iVar8 = 0;
			break;
		
		case 50:
			StringCopy(&Var2, "PROPS_P1_H9_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			iVar1 = 200;
			iVar8 = 0;
			break;
		
		case 51:
			StringCopy(&Var2, "PROPS_P1_H10_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar1 = 350;
			iVar8 = 0;
			break;
		
		case 52:
			StringCopy(&Var2, "PROPS_P1_H10_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar1 = 350;
			iVar8 = 0;
			break;
		
		case 53:
			StringCopy(&Var2, "PROPS_P1_H11_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar1 = 450;
			iVar8 = 0;
			break;
		
		case 54:
			StringCopy(&Var2, "PROPS_P1_H12_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar1 = 500;
			iVar8 = 0;
			break;
		
		case 55:
			StringCopy(&Var2, "PROPS_P1_H12_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 500;
			iVar8 = 0;
			break;
		
		case 56:
			StringCopy(&Var2, "PROPS_P1_H13_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 50;
			iVar8 = 0;
			break;
		
		case 57:
			StringCopy(&Var2, "PROPS_P1_H13_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 50;
			iVar8 = 0;
			break;
		
		case 58:
			StringCopy(&Var2, "PROPS_P1_H14_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 59:
			StringCopy(&Var2, "PROPS_P1_H14_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 60:
			StringCopy(&Var2, "PROPS_P1_H14_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 61:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 62:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 63:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 64:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 65:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 66:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 67:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 68:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 69:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 24;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 70:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 71:
			StringCopy(&Var2, "PROPS_P1_H26_0", 16);
			iVar6 = 26;
			iVar7 = 0;
			iVar1 = 20;
			iVar8 = 0;
			break;
		
		case 72:
			StringCopy(&Var2, "PROPS_P1_H26_1", 16);
			iVar6 = 26;
			iVar7 = 1;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 73:
			StringCopy(&Var2, "PROPS_P1_H26_2", 16);
			iVar6 = 26;
			iVar7 = 2;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 74:
			StringCopy(&Var2, "PROPS_P1_H26_3", 16);
			iVar6 = 26;
			iVar7 = 3;
			iVar1 = 22;
			iVar8 = 0;
			break;
		
		case 75:
			StringCopy(&Var2, "PROPS_P1_H26_4", 16);
			iVar6 = 26;
			iVar7 = 4;
			iVar1 = 20;
			iVar8 = 0;
			break;
		
		case 76:
			StringCopy(&Var2, "PROPS_P1_H26_5", 16);
			iVar6 = 26;
			iVar7 = 5;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 77:
			StringCopy(&Var2, "PROPS_P1_H26_6", 16);
			iVar6 = 26;
			iVar7 = 6;
			iVar1 = 28;
			iVar8 = 0;
			break;
		
		case 78:
			StringCopy(&Var2, "PROPS_P1_H26_7", 16);
			iVar6 = 26;
			iVar7 = 7;
			iVar1 = 24;
			iVar8 = 0;
			break;
		
		case 79:
			StringCopy(&Var2, "PROPS_P1_H26_8", 16);
			iVar6 = 26;
			iVar7 = 8;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 80:
			StringCopy(&Var2, "PROPS_P1_H26_9", 16);
			iVar6 = 26;
			iVar7 = 9;
			iVar1 = 22;
			iVar8 = 0;
			break;
		
		case 81:
			StringCopy(&Var2, "PROPS_P1_H26_10", 16);
			iVar6 = 26;
			iVar7 = 10;
			iVar1 = 18;
			iVar8 = 0;
			break;
		
		case 82:
			StringCopy(&Var2, "PROPS_P1_H26_11", 16);
			iVar6 = 26;
			iVar7 = 11;
			iVar1 = 20;
			iVar8 = 0;
			break;
		
		case 83:
			StringCopy(&Var2, "PROPS_P1_H26_12", 16);
			iVar6 = 26;
			iVar7 = 12;
			iVar1 = 24;
			iVar8 = 0;
			break;
		
		case 84:
			StringCopy(&Var2, "PROPS_P1_H26_13", 16);
			iVar6 = 26;
			iVar7 = 13;
			iVar1 = 22;
			iVar8 = 0;
			break;
		
		case 85:
			StringCopy(&Var2, "PROPS_P1_H26_14", 16);
			iVar6 = 26;
			iVar7 = 14;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 86:
			StringCopy(&Var2, "PROPS_P1_H26_15", 16);
			iVar6 = 26;
			iVar7 = 15;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 87:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 27;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 155);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_17(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10)//Position - 0x3383
{
	int iVar0;
	var uVar1;
	
	uParam0->f_6 = 0;
	*uParam0 = iParam9;
	uParam0->f_1 = (iParam2 % 32);
	uParam0->f_2 = (iParam2 / 32);
	uParam0->f_3 = iParam4;
	uParam0->f_4 = iParam5;
	uParam0->f_7 = iParam6;
	StringCopy(&(uParam0->f_8), sParam3, 16);
	uParam0->f_13 = iParam8;
	uParam0->f_12 = func_28(iParam8);
	if ((uParam0->f_2 >= 10 && uParam0->f_5 >= 0) && uParam0->f_5 < 3)
	{
		if (!iParam10)
		{
		}
		uParam0->f_2 = 0;
	}
	if (gameplay::get_hash_key(sParam3) != gameplay::get_hash_key("NO_LABEL"))
	{
	}
	if (iParam7)
	{
		gameplay::set_bit(&(uParam0->f_6), 3);
	}
	if (iParam10)
	{
		gameplay::set_bit(&(uParam0->f_6), 0);
		if (uParam0->f_5 >= 0 && uParam0->f_5 < 3)
		{
			gameplay::set_bit(&(uParam0->f_6), 5);
		}
		gameplay::set_bit(&(uParam0->f_6), 1);
		gameplay::set_bit(&(uParam0->f_6), 2);
		gameplay::set_bit(&(uParam0->f_6), 6);
		if (func_27(14))
		{
			return;
		}
		if (iParam1 == 1)
		{
			if (dlc1::_0x341DE7ED1D2A1BFD(Global_2621444, 1827025211, 0))
			{
				gameplay::set_bit(&(uParam0->f_6), 7);
			}
		}
		if (iParam1 == 12)
		{
			if (!func_25(Global_2621444, 1, 1, 1, -1))
			{
				gameplay::clear_bit(&(uParam0->f_6), 2);
			}
			if (!func_25(Global_2621444, 2, 1, 1, -1))
			{
				gameplay::set_bit(&(uParam0->f_6), 4);
			}
		}
		else if (iParam1 == 13)
		{
		}
		else if (iParam1 == 14)
		{
			if (!func_25(Global_2621444, 1, 1, 1, -1))
			{
				gameplay::clear_bit(&(uParam0->f_6), 2);
			}
			if (!func_25(Global_2621444, 2, 1, 1, -1))
			{
				gameplay::set_bit(&(uParam0->f_6), 4);
			}
		}
		else
		{
			if (!func_25(Global_2621444, 1, 1, 1, -1))
			{
				gameplay::clear_bit(&(uParam0->f_6), 2);
			}
			if (!func_25(Global_2621444, 2, 1, 1, -1))
			{
				gameplay::set_bit(&(uParam0->f_6), 4);
			}
		}
	}
	else if (uParam0->f_5 >= 0 && uParam0->f_5 < 3)
	{
		gameplay::set_bit(&(uParam0->f_6), 0);
		gameplay::set_bit(&(uParam0->f_6), 5);
		if (func_24(iParam1, uParam0->f_5, uParam0->f_2, 0, uParam0->f_1, 0, 0))
		{
			gameplay::set_bit(&(uParam0->f_6), 1);
		}
		if (func_24(iParam1, uParam0->f_5, uParam0->f_2, 1, uParam0->f_1, 0, 0))
		{
			gameplay::set_bit(&(uParam0->f_6), 2);
		}
		if (!func_24(iParam1, uParam0->f_5, uParam0->f_2, 2, uParam0->f_1, 0, 0))
		{
			gameplay::set_bit(&(uParam0->f_6), 4);
		}
	}
	else
	{
		gameplay::set_bit(&(uParam0->f_6), 0);
		if ((((((((((iParam1 == 11 || iParam1 == 4) || iParam1 == 6) || iParam1 == 1) || iParam1 == 14) || iParam1 == 2) || iParam1 == 8) || iParam1 == 9) || iParam1 == 10) || iParam1 == 7) || iParam1 == 12)
		{
			if (func_27(14))
			{
				return;
			}
			iVar0 = func_20(func_23(iParam1, uParam0->f_2), Global_69516, 0);
			if (gameplay::is_bit_set(iVar0, uParam0->f_1))
			{
				gameplay::set_bit(&(uParam0->f_6), 1);
			}
			iVar0 = func_20(func_19(iParam1, uParam0->f_2), Global_69516, 0);
			if (gameplay::is_bit_set(iVar0, uParam0->f_1))
			{
				gameplay::set_bit(&(uParam0->f_6), 2);
			}
			if (func_18(iParam1, uParam0->f_2, &uVar1))
			{
				iVar0 = func_20(uVar1, Global_69516, 0);
				if (!gameplay::is_bit_set(iVar0, uParam0->f_1))
				{
					gameplay::set_bit(&(uParam0->f_6), 4);
				}
			}
		}
		else
		{
			gameplay::set_bit(&(uParam0->f_6), 1);
			gameplay::set_bit(&(uParam0->f_6), 2);
		}
	}
	if (iParam1 == 14)
	{
		if (iParam4 == -1)
		{
			gameplay::set_bit(&(uParam0->f_6), 1);
			gameplay::set_bit(&(uParam0->f_6), 2);
		}
	}
}

int func_18(int iParam0, int iParam1, var uParam2)//Position - 0x3714
{
	*uParam2 = 973;
	switch (iParam1)
	{
		case 0:
			switch (iParam0)
			{
				case 2:
					*uParam2 = 974;
					break;
				
				case 3:
					*uParam2 = 1424;
					break;
				
				case 4:
					*uParam2 = 990;
					break;
				
				case 6:
					*uParam2 = 998;
					break;
				
				case 8:
					*uParam2 = 1425;
					break;
				
				case 9:
					*uParam2 = 1433;
					break;
				
				case 10:
					*uParam2 = 1435;
					break;
				
				case 1:
					*uParam2 = 1006;
					break;
				
				case 7:
					*uParam2 = 1436;
					break;
				
				case 11:
					*uParam2 = 982;
					break;
				
				case 14:
					*uParam2 = 1014;
					break;
				
				case 12:
					*uParam2 = 1025;
					break;
			}
			break;
		
		case 1:
			switch (iParam0)
			{
				case 2:
					*uParam2 = 975;
					break;
				
				case 4:
					*uParam2 = 991;
					break;
				
				case 6:
					*uParam2 = 999;
					break;
				
				case 8:
					*uParam2 = 1426;
					break;
				
				case 9:
					*uParam2 = 1434;
					break;
				
				case 7:
					*uParam2 = 1437;
					break;
				
				case 11:
					*uParam2 = 983;
					break;
				
				case 14:
					*uParam2 = 1015;
					break;
			}
			break;
		
		case 2:
			switch (iParam0)
			{
				case 2:
					*uParam2 = 976;
					break;
				
				case 4:
					*uParam2 = 992;
					break;
				
				case 6:
					*uParam2 = 1000;
					break;
				
				case 8:
					*uParam2 = 1427;
					break;
				
				case 7:
					*uParam2 = 1438;
					break;
				
				case 11:
					*uParam2 = 984;
					break;
				
				case 14:
					*uParam2 = 1016;
					break;
			}
			break;
		
		case 3:
			switch (iParam0)
			{
				case 4:
					*uParam2 = 993;
					break;
				
				case 6:
					*uParam2 = 1001;
					break;
				
				case 8:
					*uParam2 = 1428;
					break;
				
				case 11:
					*uParam2 = 985;
					break;
				
				case 14:
					*uParam2 = 1017;
					break;
			}
			break;
		
		case 4:
			switch (iParam0)
			{
				case 4:
					*uParam2 = 994;
					break;
				
				case 6:
					*uParam2 = 1002;
					break;
				
				case 8:
					*uParam2 = 1429;
					break;
				
				case 11:
					*uParam2 = 986;
					break;
				
				case 14:
					*uParam2 = 1018;
					break;
			}
			break;
		
		case 5:
			switch (iParam0)
			{
				case 4:
					*uParam2 = 995;
					break;
				
				case 6:
					*uParam2 = 1003;
					break;
				
				case 8:
					*uParam2 = 1430;
					break;
				
				case 11:
					*uParam2 = 987;
					break;
				
				case 14:
					*uParam2 = 1019;
					break;
			}
			break;
		
		case 6:
			switch (iParam0)
			{
				case 4:
					*uParam2 = 996;
					break;
				
				case 6:
					*uParam2 = 1004;
					break;
				
				case 8:
					*uParam2 = 1431;
					break;
				
				case 11:
					*uParam2 = 988;
					break;
				
				case 14:
					*uParam2 = 1020;
					break;
			}
			break;
		
		case 7:
			switch (iParam0)
			{
				case 4:
					*uParam2 = 997;
					break;
				
				case 6:
					*uParam2 = 1005;
					break;
				
				case 8:
					*uParam2 = 1432;
					break;
				
				case 11:
					*uParam2 = 989;
					break;
				
				case 14:
					*uParam2 = 1021;
					break;
			}
			break;
		
		case 8:
			switch (iParam0)
			{
				case 14:
					*uParam2 = 1022;
					break;
			}
			break;
		
		case 9:
			switch (iParam0)
			{
				case 14:
					*uParam2 = 1023;
					break;
			}
			break;
		
		case 10:
			switch (iParam0)
			{
				case 14:
					*uParam2 = 1024;
					break;
			}
			break;
	}
	return *uParam2 != 973;
}

int func_19(int iParam0, int iParam1)//Position - 0x3B19
{
	switch (iParam1)
	{
		case 0:
			switch (iParam0)
			{
				case 2:
					return 922;
					break;
				
				case 3:
					return 1409;
					break;
				
				case 4:
					return 938;
					break;
				
				case 6:
					return 946;
					break;
				
				case 8:
					return 1410;
					break;
				
				case 9:
					return 1418;
					break;
				
				case 10:
					return 1420;
					break;
				
				case 1:
					return 954;
					break;
				
				case 7:
					return 1421;
					break;
				
				case 11:
					return 930;
					break;
				
				case 14:
					return 962;
					break;
				
				case 12:
					return 973;
					break;
			}
			break;
		
		case 1:
			switch (iParam0)
			{
				case 2:
					return 923;
					break;
				
				case 4:
					return 939;
					break;
				
				case 6:
					return 947;
					break;
				
				case 8:
					return 1411;
					break;
				
				case 9:
					return 1419;
					break;
				
				case 7:
					return 1422;
					break;
				
				case 11:
					return 931;
					break;
				
				case 14:
					return 963;
					break;
			}
			break;
		
		case 2:
			switch (iParam0)
			{
				case 2:
					return 924;
					break;
				
				case 4:
					return 940;
					break;
				
				case 6:
					return 948;
					break;
				
				case 8:
					return 1412;
					break;
				
				case 7:
					return 1423;
					break;
				
				case 11:
					return 932;
					break;
				
				case 14:
					return 964;
					break;
			}
			break;
		
		case 3:
			switch (iParam0)
			{
				case 4:
					return 941;
					break;
				
				case 6:
					return 949;
					break;
				
				case 8:
					return 1413;
					break;
				
				case 11:
					return 933;
					break;
				
				case 14:
					return 965;
					break;
			}
			break;
		
		case 4:
			switch (iParam0)
			{
				case 4:
					return 942;
					break;
				
				case 6:
					return 950;
					break;
				
				case 8:
					return 1414;
					break;
				
				case 11:
					return 934;
					break;
				
				case 14:
					return 966;
					break;
			}
			break;
		
		case 5:
			switch (iParam0)
			{
				case 4:
					return 943;
					break;
				
				case 6:
					return 951;
					break;
				
				case 8:
					return 1415;
					break;
				
				case 11:
					return 935;
					break;
				
				case 14:
					return 967;
					break;
			}
			break;
		
		case 6:
			switch (iParam0)
			{
				case 4:
					return 944;
					break;
				
				case 6:
					return 952;
					break;
				
				case 8:
					return 1416;
					break;
				
				case 11:
					return 936;
					break;
				
				case 14:
					return 968;
					break;
			}
			break;
		
		case 7:
			switch (iParam0)
			{
				case 4:
					return 945;
					break;
				
				case 6:
					return 953;
					break;
				
				case 8:
					return 1417;
					break;
				
				case 11:
					return 937;
					break;
				
				case 14:
					return 969;
					break;
			}
			break;
		
		case 8:
			switch (iParam0)
			{
				case 14:
					return 970;
					break;
			}
			break;
		
		case 9:
			switch (iParam0)
			{
				case 14:
					return 971;
					break;
			}
			break;
		
		case 10:
			switch (iParam0)
			{
				case 14:
					return 972;
					break;
			}
			break;
	}
	return 930;
}

int func_20(int iParam0, int iParam1, int iParam2)//Position - 0x3F14
{
	int iVar0;
	var uVar1;
	
	if (iParam2 == 0)
	{
	}
	iVar0 = Global_2503773[iParam0 /*3*/][func_21(iParam1)];
	if (stats::stat_get_int(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

int func_21(var uParam0)//Position - 0x3F46
{
	int iVar0;
	int iVar1;
	
	iVar0 = uParam0;
	if (iVar0 == -1)
	{
		iVar1 = func_22();
		if (iVar1 > -1)
		{
			Global_2503486 = 0;
			iVar0 = iVar1;
		}
		else
		{
			iVar0 = 0;
			Global_2503486 = 1;
		}
	}
	return iVar0;
}

var func_22()//Position - 0x3F7A
{
	return Global_1312731;
}

int func_23(int iParam0, int iParam1)//Position - 0x3F86
{
	switch (iParam1)
	{
		case 0:
			switch (iParam0)
			{
				case 2:
					return 870;
					break;
				
				case 3:
					return 1394;
					break;
				
				case 4:
					return 886;
					break;
				
				case 6:
					return 894;
					break;
				
				case 8:
					return 1395;
					break;
				
				case 9:
					return 1403;
					break;
				
				case 10:
					return 1405;
					break;
				
				case 1:
					return 902;
					break;
				
				case 7:
					return 1406;
					break;
				
				case 11:
					return 878;
					break;
				
				case 14:
					return 910;
					break;
				
				case 12:
					return 921;
					break;
			}
			break;
		
		case 1:
			switch (iParam0)
			{
				case 2:
					return 871;
					break;
				
				case 4:
					return 887;
					break;
				
				case 6:
					return 895;
					break;
				
				case 8:
					return 1396;
					break;
				
				case 9:
					return 1404;
					break;
				
				case 7:
					return 1407;
					break;
				
				case 11:
					return 879;
					break;
				
				case 14:
					return 911;
					break;
			}
			break;
		
		case 2:
			switch (iParam0)
			{
				case 2:
					return 872;
					break;
				
				case 4:
					return 888;
					break;
				
				case 6:
					return 896;
					break;
				
				case 8:
					return 1397;
					break;
				
				case 7:
					return 1408;
					break;
				
				case 11:
					return 880;
					break;
				
				case 14:
					return 912;
					break;
			}
			break;
		
		case 3:
			switch (iParam0)
			{
				case 4:
					return 889;
					break;
				
				case 6:
					return 897;
					break;
				
				case 8:
					return 1398;
					break;
				
				case 11:
					return 881;
					break;
				
				case 14:
					return 913;
					break;
			}
			break;
		
		case 4:
			switch (iParam0)
			{
				case 4:
					return 890;
					break;
				
				case 6:
					return 898;
					break;
				
				case 8:
					return 1399;
					break;
				
				case 11:
					return 882;
					break;
				
				case 14:
					return 914;
					break;
			}
			break;
		
		case 5:
			switch (iParam0)
			{
				case 4:
					return 891;
					break;
				
				case 6:
					return 899;
					break;
				
				case 8:
					return 1400;
					break;
				
				case 11:
					return 883;
					break;
				
				case 14:
					return 915;
					break;
			}
			break;
		
		case 6:
			switch (iParam0)
			{
				case 4:
					return 892;
					break;
				
				case 6:
					return 900;
					break;
				
				case 8:
					return 1401;
					break;
				
				case 11:
					return 884;
					break;
				
				case 14:
					return 916;
					break;
			}
			break;
		
		case 7:
			switch (iParam0)
			{
				case 4:
					return 893;
					break;
				
				case 6:
					return 901;
					break;
				
				case 8:
					return 1402;
					break;
				
				case 11:
					return 885;
					break;
				
				case 14:
					return 917;
					break;
			}
			break;
		
		case 8:
			switch (iParam0)
			{
				case 14:
					return 918;
					break;
			}
			break;
		
		case 9:
			switch (iParam0)
			{
				case 14:
					return 919;
					break;
			}
			break;
		
		case 10:
			switch (iParam0)
			{
				case 14:
					return 920;
					break;
			}
			break;
	}
	return 878;
}

int func_24(int iParam0, var uParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x43AB
{
	if (iParam0 == 0)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/][iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/][iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/][iParam3], iParam4);
	}
	else if (iParam0 == 1)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_4[iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_4[iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_4[iParam3], iParam4);
	}
	else if (iParam0 == 2)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_8[iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_8[iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_8[iParam3], iParam4);
	}
	else if (iParam0 == 3)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_12[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_12[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_12[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_16[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_16[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_16[iParam3], iParam4);
		}
		else if (iParam2 == 2)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_20[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_20[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_20[iParam3], iParam4);
		}
		else if (iParam2 == 3)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_24[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_24[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_24[iParam3], iParam4);
		}
		else if (iParam2 == 4)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_28[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_28[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_28[iParam3], iParam4);
		}
		else if (iParam2 == 5)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_32[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_32[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_32[iParam3], iParam4);
		}
		else if (iParam2 == 6)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_36[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_36[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_36[iParam3], iParam4);
		}
		else if (iParam2 == 7)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_40[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_40[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_40[iParam3], iParam4);
		}
		else if (iParam2 == 8)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_44[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_44[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_44[iParam3], iParam4);
		}
		else if (iParam2 == 9)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_48[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_48[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_48[iParam3], iParam4);
		}
	}
	else if (iParam0 == 4)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_52[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_52[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_52[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_56[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_56[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_56[iParam3], iParam4);
		}
		else if (iParam2 == 2)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_60[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_60[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_60[iParam3], iParam4);
		}
		else if (iParam2 == 3)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_64[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_64[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_64[iParam3], iParam4);
		}
	}
	else if (iParam0 == 5)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_68[iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_68[iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_68[iParam3], iParam4);
	}
	else if (iParam0 == 6)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_72[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_72[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_72[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_76[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_76[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_76[iParam3], iParam4);
		}
		else if (iParam2 == 2)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_80[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_80[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_80[iParam3], iParam4);
		}
		else if (iParam2 == 3)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_84[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_84[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_84[iParam3], iParam4);
		}
		else if (iParam2 == 4)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_88[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_88[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_88[iParam3], iParam4);
		}
	}
	else if (iParam0 == 7)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_92[iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_92[iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_92[iParam3], iParam4);
	}
	else if (iParam0 == 8)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_96[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_96[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_96[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_100[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_100[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_100[iParam3], iParam4);
		}
		else if (iParam2 == 2)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_104[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_104[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_104[iParam3], iParam4);
		}
	}
	else if (iParam0 == 9)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_108[iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_108[iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_108[iParam3], iParam4);
	}
	else if (iParam0 == 10)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_112[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_112[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_112[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_116[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_116[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_116[iParam3], iParam4);
		}
	}
	else if (iParam0 == 11)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_120[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_120[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_120[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_124[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_124[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_124[iParam3], iParam4);
		}
	}
	else if (iParam0 == 12)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_128[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_128[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_128[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_132[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_132[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_132[iParam3], iParam4);
		}
	}
	else if (iParam0 == 13)
	{
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_136[iParam3]), iParam4);
		}
		if (iParam6 == 1)
		{
			gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_136[iParam3]), iParam4);
		}
		return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_136[iParam3], iParam4);
	}
	else if (iParam0 == 14)
	{
		if (iParam2 == 0)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_140[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_140[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_140[iParam3], iParam4);
		}
		else if (iParam2 == 1)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_144[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_144[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_144[iParam3], iParam4);
		}
		else if (iParam2 == 2)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_148[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_148[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_148[iParam3], iParam4);
		}
		else if (iParam2 == 3)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_152[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_152[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_152[iParam3], iParam4);
		}
		else if (iParam2 == 4)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_156[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_156[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_156[iParam3], iParam4);
		}
		else if (iParam2 == 5)
		{
			if (iParam5 == 1)
			{
				gameplay::set_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_160[iParam3]), iParam4);
			}
			if (iParam6 == 1)
			{
				gameplay::clear_bit(&(Global_101652.f_2079[uParam1 /*164*/].f_160[iParam3]), iParam4);
			}
			return gameplay::is_bit_set(Global_101652.f_2079[uParam1 /*164*/].f_160[iParam3], iParam4);
		}
	}
	return false;
}

int func_25(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x52C9
{
	int iVar0;
	int iVar1;
	var uVar2;
	int iVar3;
	
	iVar0 = Global_69516;
	if (iParam4 != -1)
	{
		iVar0 = iParam4;
	}
	if (func_26(iParam0, iParam1, &uVar2, &iVar1, iParam2, iParam3))
	{
		iVar3 = func_20(uVar2, iVar0, 0);
		return gameplay::is_bit_set(iVar3, iVar1);
	}
	return false;
}

int func_26(int iParam0, int iParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0x530B
{
	int iVar0;
	
	*uParam2 = 6022;
	if ((iParam4 && Global_2592834) || (!iParam4 && iParam5))
	{
		switch (iParam1)
		{
			case 1:
				switch (iParam0)
				{
					case 8886212:
					case -969630947:
						*uParam2 = 966;
						*uParam3 = 19;
						return true;
						break;
					
					case 1857811503:
					case -1198063650:
						*uParam2 = 966;
						*uParam3 = 20;
						return true;
						break;
					
					case 552556691:
					case -1596927918:
						*uParam2 = 966;
						*uParam3 = 21;
						return true;
						break;
					
					case 328711652:
					case 2093516866:
						*uParam2 = 966;
						*uParam3 = 22;
						return true;
						break;
					
					case 1194403102:
					case 1863511255:
						*uParam2 = 966;
						*uParam3 = 23;
						return true;
						break;
					
					case 1107630790:
					case 1503248869:
						*uParam2 = 966;
						*uParam3 = 24;
						return true;
						break;
					
					case 1807937089:
					case 1263478096:
						*uParam2 = 966;
						*uParam3 = 25;
						return true;
						break;
					
					case 1453442047:
					case 745170819:
						*uParam2 = 966;
						*uParam3 = 26;
						return true;
						break;
					
					case -1071423629:
					case -1382822784:
					case 385813134:
						*uParam2 = 930;
						*uParam3 = 0;
						return true;
						break;
					
					case -833094692:
					case -1731353868:
					case 675392787:
						*uParam2 = 930;
						*uParam3 = 1;
						return true;
						break;
					
					case -1836153782:
					case -1960638561:
					case -238272479:
						*uParam2 = 930;
						*uParam3 = 2;
						return true;
						break;
					
					case -1598414687:
					case 147161830:
					case 67757212:
						*uParam2 = 930;
						*uParam3 = 3;
						return true;
						break;
					
					case 123661793:
					case -92608943:
					case -536372072:
						*uParam2 = 930;
						*uParam3 = 4;
						return true;
						break;
					
					case 330958487:
					case -162931217:
					case -247578875:
						*uParam2 = 930;
						*uParam3 = 5;
						return true;
						break;
					
					case -142717408:
					case 1665087452:
					case -854821214:
						*uParam2 = 930;
						*uParam3 = 7;
						return true;
						break;
					
					case 1290696959:
					case 1012984348:
					case -1458295118:
						*uParam2 = 930;
						*uParam3 = 8;
						return true;
						break;
					
					case 2059568454:
					case 933072050:
					case -1454802604:
						*uParam2 = 930;
						*uParam3 = 11;
						return true;
						break;
				}
				break;
			
			case 2:
				switch (iParam0)
				{
					case 8886212:
					case -969630947:
						*uParam2 = 1018;
						*uParam3 = 19;
						return true;
						break;
					
					case 1857811503:
					case -1198063650:
						*uParam2 = 1018;
						*uParam3 = 20;
						return true;
						break;
					
					case 552556691:
					case -1596927918:
						*uParam2 = 1018;
						*uParam3 = 21;
						return true;
						break;
					
					case 328711652:
					case 2093516866:
						*uParam2 = 1018;
						*uParam3 = 22;
						return true;
						break;
					
					case 1194403102:
					case 1863511255:
						*uParam2 = 1018;
						*uParam3 = 23;
						return true;
						break;
					
					case 1107630790:
					case 1503248869:
						*uParam2 = 1018;
						*uParam3 = 24;
						return true;
						break;
					
					case 1807937089:
					case 1263478096:
						*uParam2 = 1018;
						*uParam3 = 25;
						return true;
						break;
					
					case 1453442047:
					case 745170819:
						*uParam2 = 1018;
						*uParam3 = 26;
						return true;
						break;
				}
				break;
		}
	}
	else
	{
		switch (iParam1)
		{
			case 1:
				switch (iParam0)
				{
					case -1795774903:
					case -379046860:
						*uParam2 = 966;
						*uParam3 = 19;
						return true;
						break;
					
					case 1655095722:
					case 472553912:
						*uParam2 = 966;
						*uParam3 = 20;
						return true;
						break;
					
					case -1951624263:
					case 147288818:
						*uParam2 = 966;
						*uParam3 = 21;
						return true;
						break;
					
					case -1586249913:
					case 1027988462:
						*uParam2 = 966;
						*uParam3 = 22;
						return true;
						break;
					
					case -1472181024:
					case 788217689:
						*uParam2 = 966;
						*uParam3 = 23;
						return true;
						break;
					
					case -1116178608:
					case 1338147047:
						*uParam2 = 966;
						*uParam3 = 24;
						return true;
						break;
					
					case -1028914761:
					case 1095820292:
						*uParam2 = 966;
						*uParam3 = 25;
						return true;
						break;
					
					case -654496167:
					case -1989217217:
						*uParam2 = 966;
						*uParam3 = 26;
						return true;
						break;
				}
				break;
			
			case 2:
				switch (iParam0)
				{
					case -1795774903:
					case -379046860:
						*uParam2 = 1018;
						*uParam3 = 19;
						return true;
						break;
					
					case 1655095722:
					case 472553912:
						*uParam2 = 1018;
						*uParam3 = 20;
						return true;
						break;
					
					case -1951624263:
					case 147288818:
						*uParam2 = 1018;
						*uParam3 = 21;
						return true;
						break;
					
					case -1586249913:
					case 1027988462:
						*uParam2 = 1018;
						*uParam3 = 22;
						return true;
						break;
					
					case -1472181024:
					case 788217689:
						*uParam2 = 1018;
						*uParam3 = 23;
						return true;
						break;
					
					case -1116178608:
					case 1338147047:
						*uParam2 = 1018;
						*uParam3 = 24;
						return true;
						break;
					
					case -1028914761:
					case 1095820292:
						*uParam2 = 1018;
						*uParam3 = 25;
						return true;
						break;
					
					case -654496167:
					case -1989217217:
						*uParam2 = 1018;
						*uParam3 = 26;
						return true;
						break;
				}
				break;
			}
	}
	iVar0 = -1;
	if (iParam4)
	{
		if (Global_2592834)
		{
			iVar0 = ped::_0x1E77FA7A62EE6C4C(iParam0);
		}
		else
		{
			iVar0 = ped::_0xF033419D1B81FAE8(iParam0);
		}
	}
	else if (iParam5)
	{
		iVar0 = ped::_0x1E77FA7A62EE6C4C(iParam0);
	}
	else
	{
		iVar0 = ped::_0xF033419D1B81FAE8(iParam0);
	}
	if (iVar0 == -1)
	{
		return false;
	}
	switch (iParam1)
	{
		case 1:
			switch (system::floor((system::to_float(iVar0) / 32f)))
			{
				case 0:
					*uParam2 = 1753;
					break;
				
				case 1:
					*uParam2 = 1754;
					break;
				
				case 2:
					*uParam2 = 1755;
					break;
				
				case 3:
					*uParam2 = 1756;
					break;
				
				case 4:
					*uParam2 = 1757;
					break;
				
				case 5:
					*uParam2 = 1758;
					break;
				
				case 6:
					*uParam2 = 1765;
					break;
				
				case 7:
					*uParam2 = 1766;
					break;
				
				case 8:
					*uParam2 = 1767;
					break;
				
				case 9:
					*uParam2 = 1768;
					break;
				
				case 10:
					*uParam2 = 1769;
					break;
				
				case 11:
					*uParam2 = 1770;
					break;
				
				case 12:
					*uParam2 = 1771;
					break;
				
				case 13:
					*uParam2 = 1779;
					break;
				
				case 14:
					*uParam2 = 1780;
					break;
				
				case 15:
					*uParam2 = 1881;
					break;
				
				case 16:
					*uParam2 = 1882;
					break;
				
				case 17:
					*uParam2 = 1913;
					break;
				
				case 18:
					*uParam2 = 1927;
					break;
				
				case 19:
					*uParam2 = 1928;
					break;
				
				case 20:
					*uParam2 = 1929;
					break;
				
				case 21:
					*uParam2 = 1930;
					break;
				
				case 22:
					*uParam2 = 1931;
					break;
				
				case 23:
					*uParam2 = 2035;
					break;
				
				case 24:
					*uParam2 = 2036;
					break;
				
				case 25:
					*uParam2 = 2062;
					break;
				
				case 26:
					*uParam2 = 2063;
					break;
				
				case 27:
					*uParam2 = 2064;
					break;
				
				case 28:
					*uParam2 = 2065;
					break;
				
				case 29:
					*uParam2 = 2066;
					break;
				
				case 30:
					*uParam2 = 2067;
					break;
				
				case 31:
					*uParam2 = 2068;
					break;
				
				case 32:
					*uParam2 = 2069;
					break;
				
				case 33:
					*uParam2 = 2070;
					break;
				
				case 34:
					*uParam2 = 2071;
					break;
				
				case 35:
					*uParam2 = 2318;
					break;
				
				case 36:
					*uParam2 = 2319;
					break;
				
				case 37:
					*uParam2 = 2371;
					break;
				
				case 38:
					*uParam2 = 2372;
					break;
				
				case 39:
					*uParam2 = 2373;
					break;
				
				case 40:
					*uParam2 = 2374;
					break;
				
				case 41:
					*uParam2 = 2433;
					break;
				
				case 42:
					*uParam2 = 2434;
					break;
				
				case 43:
					*uParam2 = 2435;
					break;
				
				case 44:
					*uParam2 = 2436;
					break;
				
				case 45:
					*uParam2 = 2437;
					break;
				
				case 46:
					*uParam2 = 2438;
					break;
				
				case 47:
					*uParam2 = 2439;
					break;
				
				case 48:
					*uParam2 = 2440;
					break;
				
				case 49:
					*uParam2 = 2441;
					break;
				
				case 50:
					*uParam2 = 2442;
					break;
				
				case 51:
					*uParam2 = 2571;
					break;
				
				case 52:
					*uParam2 = 2572;
					break;
				
				case 53:
					*uParam2 = 2573;
					break;
				
				case 54:
					*uParam2 = 2574;
					break;
				
				case 55:
					*uParam2 = 2575;
					break;
				
				case 56:
					*uParam2 = 2576;
					break;
				
				case 57:
					*uParam2 = 2577;
					break;
				
				case 58:
					*uParam2 = 2578;
					break;
				
				case 59:
					*uParam2 = 2579;
					break;
				
				case 60:
					*uParam2 = 2580;
					break;
				
				case 61:
					*uParam2 = 2581;
					break;
				
				case 62:
					*uParam2 = 3178;
					break;
				
				case 63:
					*uParam2 = 3179;
					break;
				
				case 64:
					*uParam2 = 3180;
					break;
				
				case 65:
					*uParam2 = 3181;
					break;
				
				case 66:
					*uParam2 = 3182;
					break;
				
				case 67:
					*uParam2 = 3183;
					break;
				
				case 68:
					*uParam2 = 3651;
					break;
				
				case 69:
					*uParam2 = 3652;
					break;
				
				case 70:
					*uParam2 = 3653;
					break;
				
				case 71:
					*uParam2 = 3654;
					break;
				
				case 72:
					*uParam2 = 3655;
					break;
				
				case 73:
					*uParam2 = 3656;
					break;
				
				case 74:
					*uParam2 = 3657;
					break;
				
				case 75:
					*uParam2 = 3658;
					break;
				
				case 76:
					*uParam2 = 3659;
					break;
				
				case 77:
					*uParam2 = 3660;
					break;
				
				case 78:
					*uParam2 = 3764;
					break;
				
				case 79:
					*uParam2 = 3765;
					break;
				
				case 80:
					*uParam2 = 3766;
					break;
				
				case 81:
					*uParam2 = 3767;
					break;
				
				case 82:
					*uParam2 = 3768;
					break;
				
				case 83:
					*uParam2 = 3769;
					break;
				
				case 84:
					*uParam2 = 3770;
					break;
				
				case 85:
					*uParam2 = 3771;
					break;
				
				case 86:
					*uParam2 = 3874;
					break;
				
				case 87:
					*uParam2 = 3875;
					break;
				
				case 88:
					*uParam2 = 3876;
					break;
				
				case 89:
					*uParam2 = 5309;
					break;
				
				case 90:
					*uParam2 = 5310;
					break;
				
				case 91:
					*uParam2 = 5311;
					break;
				
				case 92:
					*uParam2 = 5312;
					break;
				
				case 93:
					*uParam2 = 5313;
					break;
				
				case 94:
					*uParam2 = 5314;
					break;
				
				case 95:
					*uParam2 = 5315;
					break;
				
				case 96:
					*uParam2 = 5316;
					break;
				
				case 97:
					*uParam2 = 5317;
					break;
				
				case 98:
					*uParam2 = 5318;
					break;
				
				case 99:
					*uParam2 = 5319;
					break;
				
				case 100:
					*uParam2 = 5320;
					break;
				
				default:
					break;
			}
			break;
		
		case 2:
			switch (system::floor((system::to_float(iVar0) / 32f)))
			{
				case 0:
					*uParam2 = 1759;
					break;
				
				case 1:
					*uParam2 = 1760;
					break;
				
				case 2:
					*uParam2 = 1761;
					break;
				
				case 3:
					*uParam2 = 1762;
					break;
				
				case 4:
					*uParam2 = 1763;
					break;
				
				case 5:
					*uParam2 = 1764;
					break;
				
				case 6:
					*uParam2 = 1772;
					break;
				
				case 7:
					*uParam2 = 1773;
					break;
				
				case 8:
					*uParam2 = 1774;
					break;
				
				case 9:
					*uParam2 = 1775;
					break;
				
				case 10:
					*uParam2 = 1776;
					break;
				
				case 11:
					*uParam2 = 1777;
					break;
				
				case 12:
					*uParam2 = 1778;
					break;
				
				case 13:
					*uParam2 = 1781;
					break;
				
				case 14:
					*uParam2 = 1782;
					break;
				
				case 15:
					*uParam2 = 1883;
					break;
				
				case 16:
					*uParam2 = 1884;
					break;
				
				case 17:
					*uParam2 = 1914;
					break;
				
				case 18:
					*uParam2 = 1932;
					break;
				
				case 19:
					*uParam2 = 1933;
					break;
				
				case 20:
					*uParam2 = 1934;
					break;
				
				case 21:
					*uParam2 = 1935;
					break;
				
				case 22:
					*uParam2 = 1936;
					break;
				
				case 23:
					*uParam2 = 2037;
					break;
				
				case 24:
					*uParam2 = 2038;
					break;
				
				case 25:
					*uParam2 = 2072;
					break;
				
				case 26:
					*uParam2 = 2073;
					break;
				
				case 27:
					*uParam2 = 2074;
					break;
				
				case 28:
					*uParam2 = 2075;
					break;
				
				case 29:
					*uParam2 = 2076;
					break;
				
				case 30:
					*uParam2 = 2077;
					break;
				
				case 31:
					*uParam2 = 2078;
					break;
				
				case 32:
					*uParam2 = 2079;
					break;
				
				case 33:
					*uParam2 = 2080;
					break;
				
				case 34:
					*uParam2 = 2081;
					break;
				
				case 35:
					*uParam2 = 2320;
					break;
				
				case 36:
					*uParam2 = 2321;
					break;
				
				case 37:
					*uParam2 = 2375;
					break;
				
				case 38:
					*uParam2 = 2376;
					break;
				
				case 39:
					*uParam2 = 2377;
					break;
				
				case 40:
					*uParam2 = 2378;
					break;
				
				case 41:
					*uParam2 = 2443;
					break;
				
				case 42:
					*uParam2 = 2444;
					break;
				
				case 43:
					*uParam2 = 2445;
					break;
				
				case 44:
					*uParam2 = 2446;
					break;
				
				case 45:
					*uParam2 = 2447;
					break;
				
				case 46:
					*uParam2 = 2448;
					break;
				
				case 47:
					*uParam2 = 2449;
					break;
				
				case 48:
					*uParam2 = 2450;
					break;
				
				case 49:
					*uParam2 = 2451;
					break;
				
				case 50:
					*uParam2 = 2452;
					break;
				
				case 51:
					*uParam2 = 2582;
					break;
				
				case 52:
					*uParam2 = 2583;
					break;
				
				case 53:
					*uParam2 = 2584;
					break;
				
				case 54:
					*uParam2 = 2585;
					break;
				
				case 55:
					*uParam2 = 2586;
					break;
				
				case 56:
					*uParam2 = 2587;
					break;
				
				case 57:
					*uParam2 = 2588;
					break;
				
				case 58:
					*uParam2 = 2589;
					break;
				
				case 59:
					*uParam2 = 2590;
					break;
				
				case 60:
					*uParam2 = 2591;
					break;
				
				case 61:
					*uParam2 = 2592;
					break;
				
				case 62:
					*uParam2 = 3184;
					break;
				
				case 63:
					*uParam2 = 3185;
					break;
				
				case 64:
					*uParam2 = 3186;
					break;
				
				case 65:
					*uParam2 = 3187;
					break;
				
				case 66:
					*uParam2 = 3188;
					break;
				
				case 67:
					*uParam2 = 3189;
					break;
				
				case 68:
					*uParam2 = 3661;
					break;
				
				case 69:
					*uParam2 = 3662;
					break;
				
				case 70:
					*uParam2 = 3663;
					break;
				
				case 71:
					*uParam2 = 3664;
					break;
				
				case 72:
					*uParam2 = 3665;
					break;
				
				case 73:
					*uParam2 = 3666;
					break;
				
				case 74:
					*uParam2 = 3667;
					break;
				
				case 75:
					*uParam2 = 3668;
					break;
				
				case 76:
					*uParam2 = 3669;
					break;
				
				case 77:
					*uParam2 = 3670;
					break;
				
				case 78:
					*uParam2 = 3772;
					break;
				
				case 79:
					*uParam2 = 3773;
					break;
				
				case 80:
					*uParam2 = 3774;
					break;
				
				case 81:
					*uParam2 = 3775;
					break;
				
				case 82:
					*uParam2 = 3776;
					break;
				
				case 83:
					*uParam2 = 3777;
					break;
				
				case 84:
					*uParam2 = 3778;
					break;
				
				case 85:
					*uParam2 = 3779;
					break;
				
				case 86:
					*uParam2 = 3877;
					break;
				
				case 87:
					*uParam2 = 3878;
					break;
				
				case 88:
					*uParam2 = 3879;
					break;
				
				case 89:
					*uParam2 = 5321;
					break;
				
				case 90:
					*uParam2 = 5322;
					break;
				
				case 91:
					*uParam2 = 5323;
					break;
				
				case 92:
					*uParam2 = 5324;
					break;
				
				case 93:
					*uParam2 = 5325;
					break;
				
				case 94:
					*uParam2 = 5326;
					break;
				
				case 95:
					*uParam2 = 5327;
					break;
				
				case 96:
					*uParam2 = 5328;
					break;
				
				case 97:
					*uParam2 = 5329;
					break;
				
				case 98:
					*uParam2 = 5330;
					break;
				
				case 99:
					*uParam2 = 5331;
					break;
				
				case 100:
					*uParam2 = 5332;
					break;
				
				default:
					break;
			}
			break;
	}
	*uParam3 = (iVar0 % 32);
	return *uParam2 != 6022;
}

int func_27(int iParam0)//Position - 0x64FA
{
	return Global_35777 == iParam0;
}

int func_28(int iParam0)//Position - 0x6508
{
	switch (iParam0)
	{
		case -1:
			return 0;
			break;
		
		case 0:
			return 0;
			break;
		
		case 1:
			return 1;
			break;
		
		case 2:
			return 2;
			break;
		
		case 3:
			return 3;
			break;
		
		case 4:
			return 4;
			break;
		
		case 5:
			return 5;
			break;
		
		case 6:
			return 6;
			break;
		
		case 7:
			return 7;
			break;
		
		case 8:
			return 8;
			break;
		
		case 9:
			return 0;
			break;
		
		case 10:
			return 1;
			break;
		
		case 11:
			return 0;
			break;
		
		case 12:
			return 0;
			break;
		
		case 13:
			return 0;
			break;
	}
	return 0;
}

void func_29(int iParam0, int iParam1, int iParam2)//Position - 0x65DC
{
	int iVar0;
	int iVar1;
	struct<8> Var2;
	int iVar17;
	int iVar18;
	int iVar19;
	struct<10> Var20;
	int iVar37;
	int iVar38;
	int iVar39;
	int iVar40;
	struct<10> Var41;
	int iVar58;
	int iVar59;
	int iVar60;
	
	iVar0 = (iParam1 - iParam2);
	iVar0 = iVar0;
	if (iVar0 < 0)
	{
		return;
	}
	iVar1 = Global_69518[0 /*14*/].f_5;
	if (iParam0 == 12)
	{
		iVar18 = 0;
		iVar19 = dlc1::_0xF3FBE2D50A6A8C28(iVar1, 0);
		iVar17 = 0;
		while (iVar17 < iVar19)
		{
			dlc1::get_shop_ped_query_outfit(iVar17, &Var2);
			if (!dlc1::_is_dlc_data_empty(Var2))
			{
				if (iVar18 == (iParam1 - iParam2))
				{
					Global_2621444 = Var2.f_1;
					Global_2621445 = Var2;
					func_17(&(Global_69518[0 /*14*/]), iParam0, iParam1, &(Var2.f_7), 0, 0, Var2.f_2, 0, -1, 2, 1);
					return;
				}
				iVar18++;
			}
			iVar17++;
		}
	}
	else if (iParam0 == 13)
	{
		func_17(&(Global_69518[0 /*14*/]), iParam0, iParam1, "NO_LABEL", 0, 0, 0, 1, -1, 2, 1);
	}
	else if (iParam0 == 14)
	{
		dlc1::init_shop_ped_prop(&Var20);
		iVar39 = 0;
		iVar40 = dlc1::_get_num_props_from_outfit(iVar1, 6, -1, 1, -1, -1);
		iVar38 = 0;
		while (iVar38 < iVar40)
		{
			dlc1::get_shop_ped_query_prop(iVar38, &Var20);
			if (!dlc1::_is_dlc_data_empty(Var20))
			{
				if (iVar39 == (iParam1 - iParam2))
				{
					if (Var20.f_6 == 0)
					{
						iVar37 = 9;
					}
					else if (Var20.f_6 == 1)
					{
						iVar37 = 10;
					}
					else if (Var20.f_6 == 2)
					{
						iVar37 = 2;
					}
					else if (Var20.f_6 == 3)
					{
						iVar37 = 3;
					}
					else if (Var20.f_6 == 4)
					{
						iVar37 = 4;
					}
					else if (Var20.f_6 == 5)
					{
						iVar37 = 5;
					}
					else if (Var20.f_6 == 6)
					{
						iVar37 = 6;
					}
					else if (Var20.f_6 == 7)
					{
						iVar37 = 7;
					}
					else if (Var20.f_6 == 8)
					{
						iVar37 = 8;
					}
					else
					{
						iVar37 = -1;
					}
					Global_2621444 = Var20.f_1;
					Global_2621445 = Var20;
					func_17(&(Global_69518[0 /*14*/]), iParam0, iParam1, &(Var20.f_9), Var20.f_3, Var20.f_4, Var20.f_5, dlc1::_0x341DE7ED1D2A1BFD(Var20.f_1, -2050632586, 0), iVar37, 2, Var20.f_1 != 0);
					return;
				}
				iVar39++;
			}
			iVar38++;
		}
	}
	else
	{
		dlc1::init_shop_ped_component(&Var41);
		iVar59 = 0;
		iVar60 = dlc1::_get_num_props_from_outfit(iVar1, 6, -1, 0, -1, func_9(iParam0));
		iVar58 = 0;
		while (iVar58 < iVar60)
		{
			dlc1::get_shop_ped_query_component(iVar58, &Var41);
			if (!dlc1::_is_dlc_data_empty(Var41))
			{
				if (iVar59 == (iParam1 - iParam2))
				{
					Global_2621444 = Var41.f_1;
					Global_2621445 = Var41;
					func_17(&(Global_69518[0 /*14*/]), iParam0, iParam1, &(Var41.f_9), Var41.f_3, Var41.f_4, Var41.f_5, dlc1::_0x341DE7ED1D2A1BFD(Var41.f_1, -2050632586, 0), -1, 2, Var41.f_1 != 0);
					return;
				}
				iVar59++;
			}
			iVar58++;
		}
	}
}

void func_30(int iParam0)//Position - 0x6857
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 13;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 9);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_31(int iParam0)//Position - 0x69AD
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 12;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "OUTFIT_P2_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "OUTFIT_P2_5", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "OUTFIT_P2_6", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "OUTFIT_P2_7", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "OUTFIT_P2_8", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "OUTFIT_P2_9", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "OUTFIT_P2_10", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "OUTFIT_P2_12", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 9:
			StringCopy(&Var2, "OUTFIT_P2_13", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 10:
			StringCopy(&Var2, "OUTFIT_P2_14", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "OUTFIT_P2_15", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 12:
			StringCopy(&Var2, "OUTFIT_P2_16", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "OUTFIT_P2_17", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 14:
			StringCopy(&Var2, "OUTFIT_P2_18", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 10000;
			break;
		
		case 15:
			StringCopy(&Var2, "OUTFIT_P2_19", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "OUTFIT_P2_20", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "OUTFIT_P2_21", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 18:
			StringCopy(&Var2, "OUTFIT_P2_22", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 19:
			StringCopy(&Var2, "OUTFIT_P2_23", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 20:
			StringCopy(&Var2, "OUTFIT_P2_24", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 21:
			StringCopy(&Var2, "OUTFIT_P2_25", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "OUTFIT_P2_26", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 23:
			StringCopy(&Var2, "OUTFIT_P2_27", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 24:
			StringCopy(&Var2, "OUTFIT_P2_28", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 119;
			break;
		
		case 25:
			StringCopy(&Var2, "OUTFIT_P2_29", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 99;
			break;
		
		case 26:
			StringCopy(&Var2, "OUTFIT_P2_30", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 129;
			break;
		
		case 27:
			StringCopy(&Var2, "OUTFIT_P2_44", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 125;
			break;
		
		case 28:
			StringCopy(&Var2, "OUTFIT_P2_45", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 120;
			break;
		
		case 29:
			StringCopy(&Var2, "OUTFIT_P2_46", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 139;
			break;
		
		case 30:
			StringCopy(&Var2, "OUTFIT_P2_47", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 149;
			break;
		
		case 31:
			StringCopy(&Var2, "OUTFIT_P2_48", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 145;
			break;
		
		case 32:
			StringCopy(&Var2, "OUTFIT_P2_49", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 140;
			break;
		
		case 33:
			StringCopy(&Var2, "OUTFIT_P2_50", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 135;
			break;
		
		case 34:
			StringCopy(&Var2, "OUTFIT_P2_31", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4900;
			break;
		
		case 35:
			StringCopy(&Var2, "OUTFIT_P2_32", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 36:
			StringCopy(&Var2, "OUTFIT_P2_33", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4500;
			break;
		
		case 37:
			StringCopy(&Var2, "OUTFIT_P2_34", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4900;
			break;
		
		case 38:
			StringCopy(&Var2, "OUTFIT_P2_35", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4500;
			break;
		
		case 39:
			StringCopy(&Var2, "OUTFIT_P2_36", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 40:
			StringCopy(&Var2, "OUTFIT_P2_37", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5500;
			break;
		
		case 41:
			StringCopy(&Var2, "OUTFIT_P2_38", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 42:
			StringCopy(&Var2, "OUTFIT_P2_39", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 43:
			StringCopy(&Var2, "OUTFIT_P2_40", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "OUTFIT_P2_41", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "OUTFIT_P2_42", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 46:
			StringCopy(&Var2, "OUTFIT_P2_43", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 47:
			StringCopy(&Var2, "OUTFIT_P2_12", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 48);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_32(int iParam0)//Position - 0x6EBA
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 11;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 1);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_33(int iParam0)//Position - 0x6F2E
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 7;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 1);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_34(int iParam0)//Position - 0x6FA1
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 1;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "BERD_P2_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "BERD_P2_1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "BERD_P2_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "BERD_P2_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "BERD_P2_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "BERD_P2_5_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 6);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_35(int iParam0)//Position - 0x7087
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 10;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 1;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 2;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 3;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 4;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 5;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 1;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 2;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 3;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 4;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 5;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 6;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 7;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 8;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 9;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 1;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 2;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 3;
			break;
		
		case 26:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 4;
			break;
		
		case 27:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 5;
			break;
		
		case 28:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 6;
			break;
		
		case 29:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 1;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 2;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 3;
			break;
		
		default:
			func_29(iVar10, iParam0, 33);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_36(int iParam0)//Position - 0x73E9
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 9;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 1;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 2;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 3;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "SPEC2_P0_08_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar1 = 125;
			break;
		
		case 10:
			StringCopy(&Var2, "SPEC2_P0_08_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar1 = 150;
			break;
		
		case 11:
			StringCopy(&Var2, "SPEC2_P0_08_2", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar1 = 175;
			break;
		
		case 12:
			StringCopy(&Var2, "SPEC2_P0_08_3", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar1 = 85;
			break;
		
		case 13:
			StringCopy(&Var2, "SPEC2_P0_08_4", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar1 = 150;
			break;
		
		case 14:
			StringCopy(&Var2, "SPEC2_P0_08_5", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar1 = 175;
			break;
		
		case 15:
			StringCopy(&Var2, "PROPS_P1_H8_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar1 = 270;
			break;
		
		case 16:
			StringCopy(&Var2, "PROPS_P1_H8_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar1 = 270;
			break;
		
		default:
			func_29(iVar10, iParam0, 17);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_37(int iParam0)//Position - 0x75F9
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 8;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "SPEC_P2_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "SPEC_P2_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 14;
			iVar7 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 18);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_38(int iParam0)//Position - 0x7828
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 5;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 7);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_39(int iParam0)//Position - 0x7937
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 6;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "FEET_P2_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "FEET_P2_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar1 = 22;
			break;
		
		case 2:
			StringCopy(&Var2, "FEET_P2_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 45;
			break;
		
		case 3:
			StringCopy(&Var2, "FEET_P2_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 65;
			break;
		
		case 4:
			StringCopy(&Var2, "FEET_P2_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			iVar1 = 58;
			break;
		
		case 5:
			StringCopy(&Var2, "FEET_P2_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			iVar1 = 72;
			break;
		
		case 6:
			StringCopy(&Var2, "FEET_P2_0_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			iVar1 = 68;
			break;
		
		case 7:
			StringCopy(&Var2, "FEET_P2_0_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			iVar1 = 60;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "FEET_P2_5_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 15:
			StringCopy(&Var2, "FEET_P2_8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 16:
			StringCopy(&Var2, "FEET_P2_9_0", 16);
			iVar6 = 9;
			iVar7 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "FEET_P2_9_1", 16);
			iVar6 = 9;
			iVar7 = 1;
			iVar1 = 680;
			break;
		
		case 18:
			StringCopy(&Var2, "FEET_P2_9_2", 16);
			iVar6 = 9;
			iVar7 = 2;
			iVar1 = 650;
			break;
		
		case 19:
			StringCopy(&Var2, "FEET_P2_9_3", 16);
			iVar6 = 9;
			iVar7 = 3;
			iVar1 = 670;
			break;
		
		case 20:
			StringCopy(&Var2, "FEET_P2_9_4", 16);
			iVar6 = 9;
			iVar7 = 4;
			iVar1 = 700;
			break;
		
		case 21:
			StringCopy(&Var2, "FEET_P2_9_5", 16);
			iVar6 = 9;
			iVar7 = 5;
			iVar1 = 680;
			break;
		
		case 22:
			StringCopy(&Var2, "FEET_P2_9_6", 16);
			iVar6 = 9;
			iVar7 = 6;
			iVar1 = 720;
			break;
		
		case 23:
			StringCopy(&Var2, "FEET_P2_9_7", 16);
			iVar6 = 9;
			iVar7 = 7;
			iVar1 = 740;
			break;
		
		case 24:
			StringCopy(&Var2, "FEET_P2_9_8", 16);
			iVar6 = 9;
			iVar7 = 8;
			iVar1 = 760;
			break;
		
		case 25:
			StringCopy(&Var2, "FEET_P2_9_9", 16);
			iVar6 = 9;
			iVar7 = 9;
			iVar1 = 780;
			break;
		
		case 26:
			StringCopy(&Var2, "FEET_P2_9_10", 16);
			iVar6 = 9;
			iVar7 = 10;
			iVar1 = 750;
			break;
		
		case 27:
			StringCopy(&Var2, "FEET_P2_9_11", 16);
			iVar6 = 9;
			iVar7 = 11;
			iVar1 = 700;
			break;
		
		case 28:
			StringCopy(&Var2, "FEET_P2_10_0", 16);
			iVar6 = 10;
			iVar7 = 0;
			break;
		
		case 29:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 33:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 35:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 0;
			break;
		
		case 36:
			StringCopy(&Var2, "FEET_P2_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar1 = 790;
			break;
		
		case 37:
			StringCopy(&Var2, "FEET_P2_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 750;
			break;
		
		case 38:
			StringCopy(&Var2, "FEET_P2_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 860;
			break;
		
		case 39:
			StringCopy(&Var2, "FEET_P2_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 750;
			break;
		
		case 40:
			StringCopy(&Var2, "FEET_P2_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar1 = 790;
			break;
		
		case 41:
			StringCopy(&Var2, "FEET_P2_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 42:
			StringCopy(&Var2, "FEET_P2_18_6", 16);
			iVar6 = 18;
			iVar7 = 6;
			iVar1 = 820;
			break;
		
		case 43:
			StringCopy(&Var2, "FEET_P2_18_7", 16);
			iVar6 = 18;
			iVar7 = 7;
			iVar1 = 800;
			break;
		
		case 44:
			StringCopy(&Var2, "FEET_P2_18_8", 16);
			iVar6 = 18;
			iVar7 = 8;
			iVar1 = 850;
			break;
		
		case 45:
			StringCopy(&Var2, "FEET_P2_18_9", 16);
			iVar6 = 18;
			iVar7 = 9;
			iVar1 = 870;
			break;
		
		case 46:
			StringCopy(&Var2, "FEET_P2_18_10", 16);
			iVar6 = 18;
			iVar7 = 10;
			iVar1 = 720;
			break;
		
		case 47:
			StringCopy(&Var2, "FEET_P2_18_11", 16);
			iVar6 = 18;
			iVar7 = 11;
			iVar1 = 740;
			break;
		
		case 48:
			StringCopy(&Var2, "FEET_P2_18_12", 16);
			iVar6 = 18;
			iVar7 = 12;
			iVar1 = 800;
			break;
		
		case 49:
			StringCopy(&Var2, "FEET_P2_18_13", 16);
			iVar6 = 18;
			iVar7 = 13;
			iVar1 = 750;
			break;
		
		case 50:
			StringCopy(&Var2, "FEET_P2_18_14", 16);
			iVar6 = 18;
			iVar7 = 14;
			iVar1 = 770;
			break;
		
		case 51:
			StringCopy(&Var2, "FEET_P2_18_15", 16);
			iVar6 = 18;
			iVar7 = 15;
			iVar1 = 860;
			break;
		
		case 52:
			StringCopy(&Var2, "FEET_P2_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 850;
			break;
		
		case 53:
			StringCopy(&Var2, "FEET_P2_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 800;
			break;
		
		case 54:
			StringCopy(&Var2, "FEET_P2_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 780;
			break;
		
		case 55:
			StringCopy(&Var2, "FEET_P2_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 890;
			break;
		
		case 56:
			StringCopy(&Var2, "FEET_P2_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 820;
			break;
		
		case 57:
			StringCopy(&Var2, "FEET_P2_19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 58:
			StringCopy(&Var2, "FEET_P2_19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 870;
			break;
		
		case 59:
			StringCopy(&Var2, "FEET_P2_19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 930;
			break;
		
		case 60:
			StringCopy(&Var2, "FEET_P2_19_8", 16);
			iVar6 = 19;
			iVar7 = 8;
			iVar1 = 880;
			break;
		
		case 61:
			StringCopy(&Var2, "FEET_P2_19_9", 16);
			iVar6 = 19;
			iVar7 = 9;
			iVar1 = 900;
			break;
		
		case 62:
			StringCopy(&Var2, "FEET_P2_19_10", 16);
			iVar6 = 19;
			iVar7 = 10;
			iVar1 = 920;
			break;
		
		case 63:
			StringCopy(&Var2, "FEET_P2_19_11", 16);
			iVar6 = 19;
			iVar7 = 11;
			iVar1 = 970;
			break;
		
		case 64:
			StringCopy(&Var2, "FEET_P2_19_12", 16);
			iVar6 = 19;
			iVar7 = 12;
			iVar1 = 990;
			break;
		
		case 65:
			StringCopy(&Var2, "FEET_P2_19_13", 16);
			iVar6 = 19;
			iVar7 = 13;
			iVar1 = 960;
			break;
		
		case 66:
			StringCopy(&Var2, "FEET_P2_19_14", 16);
			iVar6 = 19;
			iVar7 = 14;
			iVar1 = 980;
			break;
		
		case 67:
			StringCopy(&Var2, "FEET_P2_19_15", 16);
			iVar6 = 19;
			iVar7 = 15;
			iVar1 = 950;
			break;
		
		case 68:
			StringCopy(&Var2, "FEET_P2_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 110;
			break;
		
		case 69:
			StringCopy(&Var2, "FEET_P2_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 115;
			break;
		
		case 70:
			StringCopy(&Var2, "FEET_P2_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 120;
			break;
		
		case 71:
			StringCopy(&Var2, "FEET_P2_20_3", 16);
			iVar6 = 20;
			iVar7 = 3;
			iVar1 = 110;
			break;
		
		case 72:
			StringCopy(&Var2, "FEET_P2_20_4", 16);
			iVar6 = 20;
			iVar7 = 4;
			iVar1 = 125;
			break;
		
		case 73:
			StringCopy(&Var2, "FEET_P2_20_5", 16);
			iVar6 = 20;
			iVar7 = 5;
			iVar1 = 128;
			break;
		
		case 74:
			StringCopy(&Var2, "FEET_P2_20_6", 16);
			iVar6 = 20;
			iVar7 = 6;
			iVar1 = 135;
			break;
		
		case 75:
			StringCopy(&Var2, "FEET_P2_20_7", 16);
			iVar6 = 20;
			iVar7 = 7;
			iVar1 = 130;
			break;
		
		case 76:
			StringCopy(&Var2, "FEET_P2_20_8", 16);
			iVar6 = 20;
			iVar7 = 8;
			iVar1 = 145;
			break;
		
		case 77:
			StringCopy(&Var2, "FEET_P2_20_9", 16);
			iVar6 = 20;
			iVar7 = 9;
			iVar1 = 110;
			break;
		
		case 78:
			StringCopy(&Var2, "FEET_P2_20_10", 16);
			iVar6 = 20;
			iVar7 = 10;
			iVar1 = 120;
			break;
		
		case 79:
			StringCopy(&Var2, "FEET_P2_20_11", 16);
			iVar6 = 20;
			iVar7 = 11;
			iVar1 = 150;
			break;
		
		case 80:
			StringCopy(&Var2, "FEET_P2_20_12", 16);
			iVar6 = 20;
			iVar7 = 12;
			iVar1 = 125;
			break;
		
		case 81:
			StringCopy(&Var2, "FEET_P2_20_13", 16);
			iVar6 = 20;
			iVar7 = 13;
			iVar1 = 120;
			break;
		
		case 82:
			StringCopy(&Var2, "FEET_P2_20_14", 16);
			iVar6 = 20;
			iVar7 = 14;
			iVar1 = 130;
			break;
		
		case 83:
			StringCopy(&Var2, "FEET_P2_20_15", 16);
			iVar6 = 20;
			iVar7 = 15;
			iVar1 = 110;
			break;
		
		default:
			func_29(iVar10, iParam0, 84);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_40(int iParam0)//Position - 0x82D6
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 4;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "LEGS_P2_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "LEGS_P2_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar1 = 95;
			break;
		
		case 2:
			StringCopy(&Var2, "LEGS_P2_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 129;
			break;
		
		case 3:
			StringCopy(&Var2, "LEGS_P2_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 115;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 2;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 3;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 4;
			iVar0 = true;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 18:
			StringCopy(&Var2, "LEGS_P2_11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "LEGS_P2_11_1", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar1 = 750;
			break;
		
		case 20:
			StringCopy(&Var2, "LEGS_P2_11_2", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar1 = 650;
			break;
		
		case 21:
			StringCopy(&Var2, "LEGS_P2_11_3", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar1 = 850;
			break;
		
		case 22:
			StringCopy(&Var2, "LEGS_P2_11_4", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar1 = 850;
			break;
		
		case 23:
			StringCopy(&Var2, "LEGS_P2_11_5", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar1 = 750;
			break;
		
		case 24:
			StringCopy(&Var2, "LEGS_P2_11_6", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar1 = 690;
			break;
		
		case 25:
			StringCopy(&Var2, "LEGS_P2_11_7", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar1 = 820;
			break;
		
		case 26:
			StringCopy(&Var2, "LEGS_P2_11_8", 16);
			iVar6 = 11;
			iVar7 = 8;
			iVar1 = 650;
			break;
		
		case 27:
			StringCopy(&Var2, "LEGS_P2_11_9", 16);
			iVar6 = 11;
			iVar7 = 9;
			iVar1 = 690;
			break;
		
		case 28:
			StringCopy(&Var2, "LEGS_P2_11_10", 16);
			iVar6 = 11;
			iVar7 = 10;
			iVar1 = 690;
			break;
		
		case 29:
			StringCopy(&Var2, "LEGS_P2_11_11", 16);
			iVar6 = 11;
			iVar7 = 11;
			iVar1 = 820;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 32:
			StringCopy(&Var2, "LEGS_P2_14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			break;
		
		case 33:
			StringCopy(&Var2, "LEGS_P2_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			break;
		
		case 34:
			StringCopy(&Var2, "LEGS_P2_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 35:
			StringCopy(&Var2, "LEGS_P2_17_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar1 = 58;
			break;
		
		case 36:
			StringCopy(&Var2, "LEGS_P2_17_1", 16);
			iVar6 = 17;
			iVar7 = 1;
			iVar1 = 68;
			break;
		
		case 37:
			StringCopy(&Var2, "LEGS_P2_17_2", 16);
			iVar6 = 17;
			iVar7 = 2;
			iVar1 = 65;
			break;
		
		case 38:
			StringCopy(&Var2, "LEGS_P2_17_3", 16);
			iVar6 = 17;
			iVar7 = 3;
			iVar1 = 60;
			break;
		
		case 39:
			StringCopy(&Var2, "LEGS_P2_17_4", 16);
			iVar6 = 17;
			iVar7 = 4;
			iVar1 = 65;
			break;
		
		case 40:
			StringCopy(&Var2, "LEGS_P2_17_5", 16);
			iVar6 = 17;
			iVar7 = 5;
			iVar1 = 63;
			break;
		
		case 41:
			StringCopy(&Var2, "LEGS_P2_17_6", 16);
			iVar6 = 17;
			iVar7 = 6;
			iVar1 = 60;
			break;
		
		case 42:
			StringCopy(&Var2, "LEGS_P2_17_7", 16);
			iVar6 = 17;
			iVar7 = 7;
			iVar1 = 58;
			break;
		
		case 43:
			StringCopy(&Var2, "LEGS_P2_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "LEGS_P2_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			break;
		
		case 45:
			StringCopy(&Var2, "LEGS_P2_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 99;
			break;
		
		case 46:
			StringCopy(&Var2, "LEGS_P2_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 105;
			break;
		
		case 47:
			StringCopy(&Var2, "LEGS_P2_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar1 = 110;
			break;
		
		case 48:
			StringCopy(&Var2, "LEGS_P2_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar1 = 110;
			break;
		
		case 49:
			StringCopy(&Var2, "LEGS_P2_18_6", 16);
			iVar6 = 18;
			iVar7 = 6;
			iVar1 = 99;
			break;
		
		case 50:
			StringCopy(&Var2, "LEGS_P2_18_7", 16);
			iVar6 = 18;
			iVar7 = 7;
			iVar1 = 110;
			break;
		
		case 51:
			StringCopy(&Var2, "LEGS_P2_18_8", 16);
			iVar6 = 18;
			iVar7 = 8;
			iVar1 = 110;
			break;
		
		case 52:
			StringCopy(&Var2, "LEGS_P2_18_9", 16);
			iVar6 = 18;
			iVar7 = 9;
			iVar1 = 105;
			break;
		
		case 53:
			StringCopy(&Var2, "LEGS_P2_18_10", 16);
			iVar6 = 18;
			iVar7 = 10;
			iVar1 = 105;
			break;
		
		case 54:
			StringCopy(&Var2, "LEGS_P2_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 15;
			break;
		
		case 55:
			StringCopy(&Var2, "LEGS_P2_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 15;
			break;
		
		case 56:
			StringCopy(&Var2, "LEGS_P2_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 15;
			break;
		
		case 57:
			StringCopy(&Var2, "LEGS_P2_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 15;
			break;
		
		case 58:
			StringCopy(&Var2, "LEGS_P2_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 15;
			break;
		
		case 59:
			StringCopy(&Var2, "LEGS_P2_19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 15;
			break;
		
		case 60:
			StringCopy(&Var2, "LEGS_P2_19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 15;
			break;
		
		case 61:
			StringCopy(&Var2, "LEGS_P2_19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 15;
			break;
		
		case 62:
			StringCopy(&Var2, "LEGS_P2_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 600;
			break;
		
		case 63:
			StringCopy(&Var2, "LEGS_P2_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 600;
			break;
		
		case 64:
			StringCopy(&Var2, "LEGS_P2_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 600;
			break;
		
		case 65:
			StringCopy(&Var2, "LEGS_P2_20_3", 16);
			iVar6 = 20;
			iVar7 = 3;
			iVar1 = 600;
			break;
		
		case 66:
			StringCopy(&Var2, "LEGS_P2_20_4", 16);
			iVar6 = 20;
			iVar7 = 4;
			iVar1 = 600;
			break;
		
		case 67:
			StringCopy(&Var2, "LEGS_P2_20_5", 16);
			iVar6 = 20;
			iVar7 = 5;
			iVar1 = 600;
			break;
		
		case 68:
			StringCopy(&Var2, "LEGS_P2_20_6", 16);
			iVar6 = 20;
			iVar7 = 6;
			iVar1 = 600;
			break;
		
		case 69:
			StringCopy(&Var2, "LEGS_P2_20_7", 16);
			iVar6 = 20;
			iVar7 = 7;
			iVar1 = 600;
			break;
		
		case 70:
			StringCopy(&Var2, "LEGS_P2_20_8", 16);
			iVar6 = 20;
			iVar7 = 8;
			iVar1 = 600;
			break;
		
		case 71:
			StringCopy(&Var2, "LEGS_P2_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 80;
			break;
		
		case 72:
			StringCopy(&Var2, "LEGS_P2_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 80;
			break;
		
		case 73:
			StringCopy(&Var2, "LEGS_P2_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 80;
			break;
		
		case 74:
			StringCopy(&Var2, "LEGS_P2_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 80;
			break;
		
		case 75:
			StringCopy(&Var2, "LEGS_P2_21_4", 16);
			iVar6 = 21;
			iVar7 = 4;
			iVar1 = 80;
			break;
		
		case 76:
			StringCopy(&Var2, "LEGS_P2_21_5", 16);
			iVar6 = 21;
			iVar7 = 5;
			iVar1 = 80;
			break;
		
		case 77:
			StringCopy(&Var2, "LEGS_P2_21_6", 16);
			iVar6 = 21;
			iVar7 = 6;
			iVar1 = 80;
			break;
		
		case 78:
			StringCopy(&Var2, "LEGS_P2_21_7", 16);
			iVar6 = 21;
			iVar7 = 7;
			iVar1 = 80;
			break;
		
		case 79:
			StringCopy(&Var2, "LEGS_P2_21_8", 16);
			iVar6 = 21;
			iVar7 = 8;
			iVar1 = 80;
			break;
		
		case 80:
			StringCopy(&Var2, "LEGS_P2_21_9", 16);
			iVar6 = 21;
			iVar7 = 9;
			iVar1 = 80;
			break;
		
		case 81:
			StringCopy(&Var2, "LEGS_P2_22_0", 16);
			iVar6 = 22;
			iVar7 = 0;
			break;
		
		case 82:
			StringCopy(&Var2, "LEGS_P2_22_1", 16);
			iVar6 = 22;
			iVar7 = 1;
			iVar1 = 12;
			break;
		
		case 83:
			StringCopy(&Var2, "LEGS_P2_22_2", 16);
			iVar6 = 22;
			iVar7 = 2;
			iVar1 = 12;
			break;
		
		case 84:
			StringCopy(&Var2, "LEGS_P2_22_3", 16);
			iVar6 = 22;
			iVar7 = 3;
			iVar1 = 22;
			break;
		
		case 85:
			StringCopy(&Var2, "LEGS_P2_22_4", 16);
			iVar6 = 22;
			iVar7 = 4;
			iVar1 = 18;
			break;
		
		case 86:
			StringCopy(&Var2, "LEGS_P2_22_5", 16);
			iVar6 = 22;
			iVar7 = 5;
			iVar1 = 20;
			break;
		
		case 87:
			StringCopy(&Var2, "LEGS_P2_22_6", 16);
			iVar6 = 22;
			iVar7 = 6;
			iVar1 = 30;
			break;
		
		case 88:
			StringCopy(&Var2, "LEGS_P2_22_7", 16);
			iVar6 = 22;
			iVar7 = 7;
			iVar1 = 30;
			break;
		
		case 89:
			StringCopy(&Var2, "LEGS_P2_22_8", 16);
			iVar6 = 22;
			iVar7 = 8;
			iVar1 = 30;
			break;
		
		case 90:
			StringCopy(&Var2, "LEGS_P2_22_9", 16);
			iVar6 = 22;
			iVar7 = 9;
			iVar1 = 30;
			break;
		
		case 91:
			StringCopy(&Var2, "LEGS_P2_23_0", 16);
			iVar6 = 23;
			iVar7 = 0;
			break;
		
		case 92:
			StringCopy(&Var2, "LEGS_P2_24_0", 16);
			iVar6 = 24;
			iVar7 = 0;
			break;
		
		case 93:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 94:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 0;
			break;
		
		case 95:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 1;
			break;
		
		case 96:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 2;
			break;
		
		case 97:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 3;
			break;
		
		case 98:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 4;
			break;
		
		case 99:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 5;
			break;
		
		case 100:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 6;
			break;
		
		case 101:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 7;
			break;
		
		case 102:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 8;
			break;
		
		case 103:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 9;
			break;
		
		default:
			func_29(iVar10, iParam0, 104);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_41(int iParam0)//Position - 0x8E48
{
	if (iParam0 < 136)
	{
		func_43(iParam0);
	}
	else
	{
		func_42(iParam0);
	}
	if (Global_69518[0 /*14*/].f_2 == -1)
	{
		func_29(3, iParam0, 242);
	}
}

void func_42(int iParam0)//Position - 0x8E7C
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 136:
			StringCopy(&Var2, "TORSO_P2_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 32;
			break;
		
		case 137:
			StringCopy(&Var2, "TORSO_P2_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 39;
			break;
		
		case 138:
			StringCopy(&Var2, "TORSO_P2_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 40;
			break;
		
		case 139:
			StringCopy(&Var2, "TORSO_P2_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 42;
			break;
		
		case 140:
			StringCopy(&Var2, "TORSO_P2_21_4", 16);
			iVar6 = 21;
			iVar7 = 4;
			iVar1 = 45;
			break;
		
		case 141:
			StringCopy(&Var2, "TORSO_P2_21_5", 16);
			iVar6 = 21;
			iVar7 = 5;
			iVar1 = 48;
			break;
		
		case 142:
			StringCopy(&Var2, "TORSO_P2_21_6", 16);
			iVar6 = 21;
			iVar7 = 6;
			iVar1 = 52;
			break;
		
		case 143:
			StringCopy(&Var2, "TORSO_P2_21_7", 16);
			iVar6 = 21;
			iVar7 = 7;
			iVar1 = 55;
			break;
		
		case 144:
			StringCopy(&Var2, "TORSO_P2_22_0", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar1 = 390;
			break;
		
		case 145:
			StringCopy(&Var2, "TORSO_P2_22_1", 16);
			iVar6 = 22;
			iVar7 = 1;
			iVar1 = 390;
			break;
		
		case 146:
			StringCopy(&Var2, "TORSO_P2_22_2", 16);
			iVar6 = 22;
			iVar7 = 2;
			iVar1 = 560;
			break;
		
		case 147:
			StringCopy(&Var2, "TORSO_P2_22_3", 16);
			iVar6 = 22;
			iVar7 = 3;
			iVar1 = 390;
			break;
		
		case 148:
			StringCopy(&Var2, "TORSO_P2_22_4", 16);
			iVar6 = 22;
			iVar7 = 4;
			iVar1 = 390;
			break;
		
		case 149:
			StringCopy(&Var2, "TORSO_P2_22_5", 16);
			iVar6 = 22;
			iVar7 = 5;
			iVar1 = 390;
			break;
		
		case 150:
			StringCopy(&Var2, "TORSO_P2_22_6", 16);
			iVar6 = 22;
			iVar7 = 6;
			iVar1 = 560;
			break;
		
		case 151:
			StringCopy(&Var2, "TORSO_P2_22_7", 16);
			iVar6 = 22;
			iVar7 = 7;
			iVar1 = 390;
			break;
		
		case 152:
			StringCopy(&Var2, "TORSO_P2_22_8", 16);
			iVar6 = 22;
			iVar7 = 8;
			iVar1 = 390;
			break;
		
		case 153:
			StringCopy(&Var2, "TORSO_P2_22_9", 16);
			iVar6 = 22;
			iVar7 = 9;
			iVar1 = 390;
			break;
		
		case 154:
			StringCopy(&Var2, "TORSO_P2_22_10", 16);
			iVar6 = 22;
			iVar7 = 10;
			iVar1 = 390;
			break;
		
		case 155:
			StringCopy(&Var2, "TORSO_P2_22_11", 16);
			iVar6 = 22;
			iVar7 = 11;
			iVar1 = 3950;
			break;
		
		case 156:
			StringCopy(&Var2, "TORSO_P2_23_0", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar1 = 150;
			break;
		
		case 157:
			StringCopy(&Var2, "TORSO_P2_23_1", 16);
			iVar6 = 23;
			iVar7 = 1;
			break;
		
		case 158:
			StringCopy(&Var2, "TORSO_P2_23_2", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar1 = 150;
			break;
		
		case 159:
			StringCopy(&Var2, "TORSO_P2_23_3", 16);
			iVar6 = 23;
			iVar7 = 3;
			iVar1 = 150;
			break;
		
		case 160:
			StringCopy(&Var2, "TORSO_P2_23_4", 16);
			iVar6 = 23;
			iVar7 = 4;
			iVar1 = 160;
			break;
		
		case 161:
			StringCopy(&Var2, "TORSO_P2_23_5", 16);
			iVar6 = 23;
			iVar7 = 5;
			break;
		
		case 162:
			StringCopy(&Var2, "TORSO_P2_24_0", 16);
			iVar6 = 24;
			iVar7 = 0;
			iVar1 = 19;
			break;
		
		case 163:
			StringCopy(&Var2, "TORSO_P2_24_1", 16);
			iVar6 = 24;
			iVar7 = 1;
			iVar1 = 20;
			break;
		
		case 164:
			StringCopy(&Var2, "TORSO_P2_24_2", 16);
			iVar6 = 24;
			iVar7 = 2;
			iVar1 = 19;
			break;
		
		case 165:
			StringCopy(&Var2, "TORSO_P2_24_3", 16);
			iVar6 = 24;
			iVar7 = 3;
			iVar1 = 22;
			break;
		
		case 166:
			StringCopy(&Var2, "TORSO_P2_24_4", 16);
			iVar6 = 24;
			iVar7 = 4;
			iVar1 = 20;
			break;
		
		case 167:
			StringCopy(&Var2, "TORSO_P2_24_5", 16);
			iVar6 = 24;
			iVar7 = 5;
			iVar1 = 28;
			break;
		
		case 168:
			StringCopy(&Var2, "TORSO_P2_24_6", 16);
			iVar6 = 24;
			iVar7 = 6;
			iVar1 = 28;
			break;
		
		case 169:
			StringCopy(&Var2, "TORSO_P2_24_7", 16);
			iVar6 = 24;
			iVar7 = 7;
			iVar1 = 25;
			break;
		
		case 170:
			StringCopy(&Var2, "TORSO_P2_24_8", 16);
			iVar6 = 24;
			iVar7 = 8;
			iVar1 = 22;
			break;
		
		case 171:
			StringCopy(&Var2, "TORSO_P2_24_9", 16);
			iVar6 = 24;
			iVar7 = 9;
			iVar1 = 19;
			break;
		
		case 172:
			StringCopy(&Var2, "TORSO_P2_24_10", 16);
			iVar6 = 24;
			iVar7 = 10;
			iVar1 = 22;
			break;
		
		case 173:
			StringCopy(&Var2, "TORSO_P2_24_11", 16);
			iVar6 = 24;
			iVar7 = 11;
			iVar1 = 19;
			break;
		
		case 174:
			StringCopy(&Var2, "TORSO_P2_24_12", 16);
			iVar6 = 24;
			iVar7 = 12;
			iVar1 = 20;
			break;
		
		case 175:
			StringCopy(&Var2, "TORSO_P2_24_13", 16);
			iVar6 = 24;
			iVar7 = 13;
			iVar1 = 25;
			break;
		
		case 176:
			StringCopy(&Var2, "TORSO_P2_24_14", 16);
			iVar6 = 24;
			iVar7 = 14;
			iVar1 = 20;
			break;
		
		case 177:
			StringCopy(&Var2, "TORSO_P2_24_15", 16);
			iVar6 = 24;
			iVar7 = 15;
			iVar1 = 28;
			break;
		
		case 178:
			StringCopy(&Var2, "TORSO_P2_25_0", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar1 = 35;
			break;
		
		case 179:
			StringCopy(&Var2, "TORSO_P2_25_1", 16);
			iVar6 = 25;
			iVar7 = 1;
			iVar1 = 40;
			break;
		
		case 180:
			StringCopy(&Var2, "TORSO_P2_25_2", 16);
			iVar6 = 25;
			iVar7 = 2;
			iVar1 = 45;
			break;
		
		case 181:
			StringCopy(&Var2, "TORSO_P2_25_3", 16);
			iVar6 = 25;
			iVar7 = 3;
			iVar1 = 45;
			break;
		
		case 182:
			StringCopy(&Var2, "TORSO_P2_25_4", 16);
			iVar6 = 25;
			iVar7 = 4;
			iVar1 = 49;
			break;
		
		case 183:
			StringCopy(&Var2, "TORSO_P2_25_5", 16);
			iVar6 = 25;
			iVar7 = 5;
			iVar1 = 820;
			break;
		
		case 184:
			StringCopy(&Var2, "TORSO_P2_25_6", 16);
			iVar6 = 25;
			iVar7 = 6;
			iVar1 = 790;
			break;
		
		case 185:
			StringCopy(&Var2, "TORSO_P2_25_7", 16);
			iVar6 = 25;
			iVar7 = 7;
			iVar1 = 820;
			break;
		
		case 186:
			StringCopy(&Var2, "TORSO_P2_25_8", 16);
			iVar6 = 25;
			iVar7 = 8;
			iVar1 = 929;
			break;
		
		case 187:
			StringCopy(&Var2, "TORSO_P2_25_9", 16);
			iVar6 = 25;
			iVar7 = 9;
			iVar1 = 40;
			break;
		
		case 188:
			StringCopy(&Var2, "TORSO_P2_25_10", 16);
			iVar6 = 25;
			iVar7 = 10;
			iVar1 = 850;
			break;
		
		case 189:
			StringCopy(&Var2, "TORSO_P2_25_11", 16);
			iVar6 = 25;
			iVar7 = 11;
			iVar1 = 790;
			break;
		
		case 190:
			StringCopy(&Var2, "TORSO_P2_26_0", 16);
			iVar6 = 26;
			iVar7 = 0;
			break;
		
		case 191:
			StringCopy(&Var2, "TORSO_P2_26_1", 16);
			iVar6 = 26;
			iVar7 = 1;
			break;
		
		case 192:
			StringCopy(&Var2, "TORSO_P2_26_2", 16);
			iVar6 = 26;
			iVar7 = 2;
			break;
		
		case 193:
			StringCopy(&Var2, "TORSO_P2_26_3", 16);
			iVar6 = 26;
			iVar7 = 3;
			break;
		
		case 194:
			StringCopy(&Var2, "TORSO_P2_26_4", 16);
			iVar6 = 26;
			iVar7 = 4;
			break;
		
		case 195:
			StringCopy(&Var2, "TORSO_P2_26_5", 16);
			iVar6 = 26;
			iVar7 = 5;
			break;
		
		case 196:
			StringCopy(&Var2, "TORSO_P2_26_6", 16);
			iVar6 = 26;
			iVar7 = 6;
			break;
		
		case 197:
			StringCopy(&Var2, "TORSO_P2_26_7", 16);
			iVar6 = 26;
			iVar7 = 7;
			break;
		
		case 198:
			StringCopy(&Var2, "TORSO_P2_26_8", 16);
			iVar6 = 26;
			iVar7 = 8;
			break;
		
		case 199:
			StringCopy(&Var2, "TORSO_P2_26_9", 16);
			iVar6 = 26;
			iVar7 = 9;
			break;
		
		case 200:
			StringCopy(&Var2, "TORSO_P2_27_0", 16);
			iVar6 = 27;
			iVar7 = 0;
			iVar1 = 2200;
			break;
		
		case 201:
			StringCopy(&Var2, "TORSO_P2_27_1", 16);
			iVar6 = 27;
			iVar7 = 1;
			iVar1 = 2500;
			break;
		
		case 202:
			StringCopy(&Var2, "TORSO_P2_27_2", 16);
			iVar6 = 27;
			iVar7 = 2;
			iVar1 = 2500;
			break;
		
		case 203:
			StringCopy(&Var2, "TORSO_P2_27_3", 16);
			iVar6 = 27;
			iVar7 = 3;
			iVar1 = 2200;
			break;
		
		case 204:
			StringCopy(&Var2, "TORSO_P2_27_4", 16);
			iVar6 = 27;
			iVar7 = 4;
			iVar1 = 2500;
			break;
		
		case 205:
			StringCopy(&Var2, "TORSO_P2_27_5", 16);
			iVar6 = 27;
			iVar7 = 5;
			iVar1 = 2500;
			break;
		
		case 206:
			StringCopy(&Var2, "TORSO_P2_27_6", 16);
			iVar6 = 27;
			iVar7 = 6;
			iVar1 = 2200;
			break;
		
		case 207:
			StringCopy(&Var2, "TORSO_P2_28_0", 16);
			iVar6 = 28;
			iVar7 = 0;
			iVar1 = 1100;
			break;
		
		case 208:
			StringCopy(&Var2, "TORSO_P2_28_1", 16);
			iVar6 = 28;
			iVar7 = 1;
			iVar1 = 1200;
			break;
		
		case 209:
			StringCopy(&Var2, "TORSO_P2_28_2", 16);
			iVar6 = 28;
			iVar7 = 2;
			iVar1 = 1220;
			break;
		
		case 210:
			StringCopy(&Var2, "TORSO_P2_28_3", 16);
			iVar6 = 28;
			iVar7 = 3;
			iVar1 = 1250;
			break;
		
		case 211:
			StringCopy(&Var2, "TORSO_P2_28_4", 16);
			iVar6 = 28;
			iVar7 = 4;
			iVar1 = 1300;
			break;
		
		case 212:
			StringCopy(&Var2, "TORSO_P2_28_5", 16);
			iVar6 = 28;
			iVar7 = 5;
			iVar1 = 1360;
			break;
		
		case 213:
			StringCopy(&Var2, "TORSO_P2_28_6", 16);
			iVar6 = 28;
			iVar7 = 6;
			iVar1 = 35;
			break;
		
		case 214:
			StringCopy(&Var2, "TORSO_P2_28_7", 16);
			iVar6 = 28;
			iVar7 = 7;
			iVar1 = 38;
			break;
		
		case 215:
			StringCopy(&Var2, "TORSO_P2_28_8", 16);
			iVar6 = 28;
			iVar7 = 8;
			iVar1 = 40;
			break;
		
		case 216:
			StringCopy(&Var2, "TORSO_P2_28_9", 16);
			iVar6 = 28;
			iVar7 = 9;
			iVar1 = 42;
			break;
		
		case 217:
			StringCopy(&Var2, "TORSO_P2_28_10", 16);
			iVar6 = 28;
			iVar7 = 10;
			iVar1 = 50;
			break;
		
		case 218:
			StringCopy(&Var2, "TORSO_P2_28_11", 16);
			iVar6 = 28;
			iVar7 = 11;
			iVar1 = 45;
			break;
		
		case 219:
			StringCopy(&Var2, "TORSO_P2_28_12", 16);
			iVar6 = 28;
			iVar7 = 12;
			iVar1 = 45;
			break;
		
		case 220:
			StringCopy(&Var2, "TORSO_P2_28_13", 16);
			iVar6 = 28;
			iVar7 = 13;
			iVar1 = 44;
			break;
		
		case 221:
			StringCopy(&Var2, "TORSO_P2_28_14", 16);
			iVar6 = 28;
			iVar7 = 14;
			iVar1 = 46;
			break;
		
		case 222:
			StringCopy(&Var2, "TORSO_P2_28_15", 16);
			iVar6 = 28;
			iVar7 = 15;
			iVar1 = 52;
			break;
		
		case 223:
			StringCopy(&Var2, "TORSO_P2_29_0", 16);
			iVar6 = 29;
			iVar7 = 0;
			iVar1 = 3200;
			break;
		
		case 224:
			StringCopy(&Var2, "TORSO_P2_29_1", 16);
			iVar6 = 29;
			iVar7 = 1;
			iVar1 = 3200;
			break;
		
		case 225:
			StringCopy(&Var2, "TORSO_P2_29_2", 16);
			iVar6 = 29;
			iVar7 = 2;
			iVar1 = 2550;
			break;
		
		case 226:
			StringCopy(&Var2, "TORSO_P2_29_3", 16);
			iVar6 = 29;
			iVar7 = 3;
			iVar1 = 2750;
			break;
		
		case 227:
			StringCopy(&Var2, "TORSO_P2_29_4", 16);
			iVar6 = 29;
			iVar7 = 4;
			iVar1 = 2590;
			break;
		
		case 228:
			StringCopy(&Var2, "TORSO_P2_29_5", 16);
			iVar6 = 29;
			iVar7 = 5;
			iVar1 = 2750;
			break;
		
		case 229:
			StringCopy(&Var2, "TORSO_P2_29_6", 16);
			iVar6 = 29;
			iVar7 = 6;
			iVar1 = 2550;
			break;
		
		case 230:
			StringCopy(&Var2, "TORSO_P2_29_7", 16);
			iVar6 = 29;
			iVar7 = 7;
			iVar1 = 2590;
			break;
		
		case 231:
			StringCopy(&Var2, "TORSO_P2_29_8", 16);
			iVar6 = 29;
			iVar7 = 8;
			iVar1 = 2720;
			break;
		
		case 232:
			StringCopy(&Var2, "TORSO_P2_29_9", 16);
			iVar6 = 29;
			iVar7 = 9;
			iVar1 = 2750;
			break;
		
		case 233:
			StringCopy(&Var2, "TORSO_P2_30_0", 16);
			iVar6 = 30;
			iVar7 = 0;
			iVar1 = 3250;
			break;
		
		case 234:
			StringCopy(&Var2, "TORSO_P2_30_1", 16);
			iVar6 = 30;
			iVar7 = 1;
			iVar1 = 2950;
			break;
		
		case 235:
			StringCopy(&Var2, "TORSO_P2_30_2", 16);
			iVar6 = 30;
			iVar7 = 2;
			iVar1 = 3100;
			break;
		
		case 236:
			StringCopy(&Var2, "TORSO_P2_30_3", 16);
			iVar6 = 30;
			iVar7 = 3;
			iVar1 = 3150;
			break;
		
		case 237:
			StringCopy(&Var2, "TORSO_P2_30_4", 16);
			iVar6 = 30;
			iVar7 = 4;
			iVar1 = 3240;
			break;
		
		case 238:
			StringCopy(&Var2, "TORSO_P2_30_5", 16);
			iVar6 = 30;
			iVar7 = 5;
			iVar1 = 3350;
			break;
		
		case 239:
			StringCopy(&Var2, "TORSO_P2_30_6", 16);
			iVar6 = 30;
			iVar7 = 6;
			iVar1 = 3400;
			break;
		
		case 240:
			StringCopy(&Var2, "TORSO_P2_30_7", 16);
			iVar6 = 30;
			iVar7 = 7;
			iVar1 = 3280;
			break;
		
		case 241:
			StringCopy(&Var2, "TORSO_P2_31_0", 16);
			iVar6 = 31;
			iVar7 = 0;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_43(int iParam0)//Position - 0x9A80
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "TORSO_P2_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "TORSO_P2_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar1 = 25;
			break;
		
		case 2:
			StringCopy(&Var2, "TORSO_P2_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "TORSO_P2_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 15;
			break;
		
		case 4:
			StringCopy(&Var2, "TORSO_P2_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			iVar1 = 25;
			break;
		
		case 5:
			StringCopy(&Var2, "TORSO_P2_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			iVar1 = 25;
			break;
		
		case 6:
			StringCopy(&Var2, "TORSO_P2_0_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			iVar1 = 22;
			break;
		
		case 7:
			StringCopy(&Var2, "TORSO_P2_0_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			iVar1 = 22;
			break;
		
		case 8:
			StringCopy(&Var2, "TORSO_P2_0_8", 16);
			iVar6 = 0;
			iVar7 = 8;
			iVar1 = 20;
			break;
		
		case 9:
			StringCopy(&Var2, "TORSO_P2_0_9", 16);
			iVar6 = 0;
			iVar7 = 9;
			iVar1 = 20;
			break;
		
		case 10:
			StringCopy(&Var2, "TORSO_P2_0_10", 16);
			iVar6 = 0;
			iVar7 = 10;
			iVar1 = 24;
			break;
		
		case 11:
			StringCopy(&Var2, "TORSO_P2_0_11", 16);
			iVar6 = 0;
			iVar7 = 11;
			iVar1 = 26;
			break;
		
		case 12:
			StringCopy(&Var2, "TORSO_P2_0_12", 16);
			iVar6 = 0;
			iVar7 = 12;
			iVar1 = 28;
			break;
		
		case 13:
			StringCopy(&Var2, "TORSO_P2_0_13", 16);
			iVar6 = 0;
			iVar7 = 13;
			iVar1 = 29;
			break;
		
		case 14:
			StringCopy(&Var2, "TORSO_P2_0_14", 16);
			iVar6 = 0;
			iVar7 = 14;
			iVar1 = 22;
			break;
		
		case 15:
			StringCopy(&Var2, "TORSO_P2_0_15", 16);
			iVar6 = 0;
			iVar7 = 15;
			iVar1 = 20;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 18:
			StringCopy(&Var2, "TORSO_P2_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar1 = 35;
			break;
		
		case 19:
			StringCopy(&Var2, "TORSO_P2_3_1", 16);
			iVar6 = 3;
			iVar7 = 1;
			iVar1 = 22;
			break;
		
		case 20:
			StringCopy(&Var2, "TORSO_P2_3_2", 16);
			iVar6 = 3;
			iVar7 = 2;
			iVar1 = 25;
			break;
		
		case 21:
			StringCopy(&Var2, "TORSO_P2_3_3", 16);
			iVar6 = 3;
			iVar7 = 3;
			iVar1 = 38;
			break;
		
		case 22:
			StringCopy(&Var2, "TORSO_P2_3_4", 16);
			iVar6 = 3;
			iVar7 = 4;
			iVar1 = 40;
			break;
		
		case 23:
			StringCopy(&Var2, "TORSO_P2_3_5", 16);
			iVar6 = 3;
			iVar7 = 5;
			iVar1 = 40;
			break;
		
		case 24:
			StringCopy(&Var2, "TORSO_P2_3_6", 16);
			iVar6 = 3;
			iVar7 = 6;
			iVar1 = 40;
			break;
		
		case 25:
			StringCopy(&Var2, "TORSO_P2_3_7", 16);
			iVar6 = 3;
			iVar7 = 7;
			iVar1 = 40;
			break;
		
		case 26:
			StringCopy(&Var2, "TORSO_P2_3_8", 16);
			iVar6 = 3;
			iVar7 = 8;
			iVar1 = 40;
			break;
		
		case 27:
			StringCopy(&Var2, "TORSO_P2_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 28:
			StringCopy(&Var2, "TORSO_P2_4_1", 16);
			iVar6 = 4;
			iVar7 = 1;
			iVar1 = 500;
			break;
		
		case 29:
			StringCopy(&Var2, "TORSO_P2_4_2", 16);
			iVar6 = 4;
			iVar7 = 2;
			iVar1 = 560;
			break;
		
		case 30:
			StringCopy(&Var2, "TORSO_P2_4_3", 16);
			iVar6 = 4;
			iVar7 = 3;
			iVar1 = 600;
			break;
		
		case 31:
			StringCopy(&Var2, "TORSO_P2_4_4tu", 16);
			iVar6 = 4;
			iVar7 = 4;
			iVar1 = 650;
			break;
		
		case 32:
			StringCopy(&Var2, "TORSO_P2_4_5tu", 16);
			iVar6 = 4;
			iVar7 = 5;
			iVar1 = 500;
			break;
		
		case 33:
			StringCopy(&Var2, "TORSO_P2_4_6tu", 16);
			iVar6 = 4;
			iVar7 = 6;
			iVar1 = 560;
			break;
		
		case 34:
			StringCopy(&Var2, "TORSO_P2_4_7", 16);
			iVar6 = 4;
			iVar7 = 7;
			iVar1 = 500;
			break;
		
		case 35:
			StringCopy(&Var2, "TORSO_P2_4_8", 16);
			iVar6 = 4;
			iVar7 = 8;
			iVar1 = 650;
			break;
		
		case 36:
			StringCopy(&Var2, "TORSO_P2_4_9", 16);
			iVar6 = 4;
			iVar7 = 9;
			iVar1 = 540;
			break;
		
		case 37:
			StringCopy(&Var2, "TORSO_P2_4_10", 16);
			iVar6 = 4;
			iVar7 = 10;
			iVar1 = 690;
			break;
		
		case 38:
			StringCopy(&Var2, "TORSO_P2_4_11", 16);
			iVar6 = 4;
			iVar7 = 11;
			iVar1 = 560;
			break;
		
		case 39:
			StringCopy(&Var2, "TORSO_P2_4_12", 16);
			iVar6 = 4;
			iVar7 = 12;
			iVar1 = 590;
			break;
		
		case 40:
			StringCopy(&Var2, "TORSO_P2_4_13", 16);
			iVar6 = 4;
			iVar7 = 13;
			iVar1 = 690;
			break;
		
		case 41:
			StringCopy(&Var2, "TORSO_P2_4_14", 16);
			iVar6 = 4;
			iVar7 = 14;
			iVar1 = 540;
			break;
		
		case 42:
			StringCopy(&Var2, "TORSO_P2_4_15", 16);
			iVar6 = 4;
			iVar7 = 15;
			iVar1 = 500;
			break;
		
		case 43:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 44:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 45:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 2;
			iVar0 = true;
			break;
		
		case 46:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 3;
			iVar0 = true;
			break;
		
		case 47:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 4;
			iVar0 = true;
			break;
		
		case 48:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 5;
			iVar0 = true;
			break;
		
		case 49:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 50:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 51:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 52:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 53:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 54:
			StringCopy(&Var2, "TORSO_P2_11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			break;
		
		case 55:
			StringCopy(&Var2, "TORSO_P2_11_1", 16);
			iVar6 = 11;
			iVar7 = 1;
			break;
		
		case 56:
			StringCopy(&Var2, "TORSO_P2_11_2", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar1 = 25;
			break;
		
		case 57:
			StringCopy(&Var2, "TORSO_P2_11_3", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar1 = 27;
			break;
		
		case 58:
			StringCopy(&Var2, "TORSO_P2_11_4", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar1 = 22;
			break;
		
		case 59:
			StringCopy(&Var2, "TORSO_P2_11_5", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar1 = 350;
			break;
		
		case 60:
			StringCopy(&Var2, "TORSO_P2_11_6", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar1 = 27;
			break;
		
		case 61:
			StringCopy(&Var2, "TORSO_P2_11_7", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar1 = 370;
			break;
		
		case 62:
			StringCopy(&Var2, "TORSO_P2_11_8", 16);
			iVar6 = 11;
			iVar7 = 8;
			iVar1 = 25;
			break;
		
		case 63:
			StringCopy(&Var2, "TORSO_P2_11_9", 16);
			iVar6 = 11;
			iVar7 = 9;
			iVar1 = 22;
			break;
		
		case 64:
			StringCopy(&Var2, "TORSO_P2_11_10", 16);
			iVar6 = 11;
			iVar7 = 10;
			iVar1 = 25;
			break;
		
		case 65:
			StringCopy(&Var2, "TORSO_P2_11_11", 16);
			iVar6 = 11;
			iVar7 = 11;
			break;
		
		case 66:
			StringCopy(&Var2, "TORSO_P2_11_12", 16);
			iVar6 = 11;
			iVar7 = 12;
			iVar1 = 22;
			break;
		
		case 67:
			StringCopy(&Var2, "TORSO_P2_11_13", 16);
			iVar6 = 11;
			iVar7 = 13;
			iVar1 = 27;
			break;
		
		case 68:
			StringCopy(&Var2, "TORSO_P2_11_14", 16);
			iVar6 = 11;
			iVar7 = 14;
			iVar1 = 25;
			break;
		
		case 69:
			StringCopy(&Var2, "TORSO_P2_11_15", 16);
			iVar6 = 11;
			iVar7 = 15;
			iVar1 = 27;
			break;
		
		case 70:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 1;
			break;
		
		case 71:
			StringCopy(&Var2, "TORSO_P2_13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			break;
		
		case 72:
			StringCopy(&Var2, "TORSO_P2_13_1", 16);
			iVar6 = 13;
			iVar7 = 1;
			iVar1 = 39;
			break;
		
		case 73:
			StringCopy(&Var2, "TORSO_P2_13_2", 16);
			iVar6 = 13;
			iVar7 = 2;
			iVar1 = 42;
			break;
		
		case 74:
			StringCopy(&Var2, "TORSO_P2_13_3", 16);
			iVar6 = 13;
			iVar7 = 3;
			iVar1 = 49;
			break;
		
		case 75:
			StringCopy(&Var2, "TORSO_P2_13_4", 16);
			iVar6 = 13;
			iVar7 = 4;
			iVar1 = 35;
			break;
		
		case 76:
			StringCopy(&Var2, "TORSO_P2_13_5", 16);
			iVar6 = 13;
			iVar7 = 5;
			iVar1 = 50;
			break;
		
		case 77:
			StringCopy(&Var2, "TORSO_P2_13_6", 16);
			iVar6 = 13;
			iVar7 = 6;
			iVar1 = 50;
			break;
		
		case 78:
			StringCopy(&Var2, "TORSO_P2_13_7", 16);
			iVar6 = 13;
			iVar7 = 7;
			iVar1 = 50;
			break;
		
		case 79:
			StringCopy(&Var2, "TORSO_P2_14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			break;
		
		case 80:
			StringCopy(&Var2, "TORSO_P2_14_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 88;
			break;
		
		case 81:
			StringCopy(&Var2, "TORSO_P2_14_2", 16);
			iVar6 = 14;
			iVar7 = 2;
			iVar1 = 60;
			break;
		
		case 82:
			StringCopy(&Var2, "TORSO_P2_14_3", 16);
			iVar6 = 14;
			iVar7 = 3;
			iVar1 = 80;
			break;
		
		case 83:
			StringCopy(&Var2, "TORSO_P2_14_4", 16);
			iVar6 = 14;
			iVar7 = 4;
			iVar1 = 70;
			break;
		
		case 84:
			StringCopy(&Var2, "TORSO_P2_14_5", 16);
			iVar6 = 14;
			iVar7 = 5;
			iVar1 = 80;
			break;
		
		case 85:
			StringCopy(&Var2, "TORSO_P2_14_6", 16);
			iVar6 = 14;
			iVar7 = 6;
			iVar1 = 70;
			break;
		
		case 86:
			StringCopy(&Var2, "TORSO_P2_14_7", 16);
			iVar6 = 14;
			iVar7 = 7;
			iVar1 = 90;
			break;
		
		case 87:
			StringCopy(&Var2, "TORSO_P2_14_8", 16);
			iVar6 = 14;
			iVar7 = 8;
			iVar1 = 95;
			break;
		
		case 88:
			StringCopy(&Var2, "TORSO_P2_14_9", 16);
			iVar6 = 14;
			iVar7 = 9;
			iVar1 = 105;
			break;
		
		case 89:
			StringCopy(&Var2, "TORSO_P2_14_10", 16);
			iVar6 = 14;
			iVar7 = 10;
			iVar1 = 95;
			break;
		
		case 90:
			StringCopy(&Var2, "TORSO_P2_14_11", 16);
			iVar6 = 14;
			iVar7 = 11;
			iVar1 = 110;
			break;
		
		case 91:
			StringCopy(&Var2, "TORSO_P2_14_12", 16);
			iVar6 = 14;
			iVar7 = 12;
			iVar1 = 98;
			break;
		
		case 92:
			StringCopy(&Var2, "TORSO_P2_14_13", 16);
			iVar6 = 14;
			iVar7 = 13;
			iVar1 = 88;
			break;
		
		case 93:
			StringCopy(&Var2, "TORSO_P2_14_14", 16);
			iVar6 = 14;
			iVar7 = 14;
			iVar1 = 98;
			break;
		
		case 94:
			StringCopy(&Var2, "TORSO_P2_14_15", 16);
			iVar6 = 14;
			iVar7 = 15;
			iVar1 = 110;
			break;
		
		case 95:
			StringCopy(&Var2, "TORSO_P2_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 96:
			StringCopy(&Var2, "TORSO_P2_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 97:
			StringCopy(&Var2, "TORSO_P2_17_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 98:
			StringCopy(&Var2, "TORSO_P2_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			break;
		
		case 99:
			StringCopy(&Var2, "TORSO_P2_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 520;
			break;
		
		case 100:
			StringCopy(&Var2, "TORSO_P2_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 490;
			break;
		
		case 101:
			StringCopy(&Var2, "TORSO_P2_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 450;
			break;
		
		case 102:
			StringCopy(&Var2, "TORSO_P2_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar1 = 420;
			break;
		
		case 103:
			StringCopy(&Var2, "TORSO_P2_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar1 = 420;
			break;
		
		case 104:
			StringCopy(&Var2, "TORSO_P2_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 85;
			break;
		
		case 105:
			StringCopy(&Var2, "TORSO_P2_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 85;
			break;
		
		case 106:
			StringCopy(&Var2, "TORSO_P2_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 75;
			break;
		
		case 107:
			StringCopy(&Var2, "TORSO_P2_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 68;
			break;
		
		case 108:
			StringCopy(&Var2, "TORSO_P2_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 68;
			break;
		
		case 109:
			StringCopy(&Var2, "TORSO_P2_19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 78;
			break;
		
		case 110:
			StringCopy(&Var2, "TORSO_P2_19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 85;
			break;
		
		case 111:
			StringCopy(&Var2, "TORSO_P2_19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 68;
			break;
		
		case 112:
			StringCopy(&Var2, "TORSO_P2_19_8", 16);
			iVar6 = 19;
			iVar7 = 8;
			iVar1 = 75;
			break;
		
		case 113:
			StringCopy(&Var2, "TORSO_P2_19_9", 16);
			iVar6 = 19;
			iVar7 = 9;
			iVar1 = 75;
			break;
		
		case 114:
			StringCopy(&Var2, "TORSO_P2_19_10", 16);
			iVar6 = 19;
			iVar7 = 10;
			iVar1 = 78;
			break;
		
		case 115:
			StringCopy(&Var2, "TORSO_P2_19_11", 16);
			iVar6 = 19;
			iVar7 = 11;
			iVar1 = 75;
			break;
		
		case 116:
			StringCopy(&Var2, "TORSO_P2_19_12", 16);
			iVar6 = 19;
			iVar7 = 12;
			iVar1 = 75;
			break;
		
		case 117:
			StringCopy(&Var2, "TORSO_P2_19_13", 16);
			iVar6 = 19;
			iVar7 = 13;
			iVar1 = 75;
			break;
		
		case 118:
			StringCopy(&Var2, "TORSO_P2_19_14", 16);
			iVar6 = 19;
			iVar7 = 14;
			iVar1 = 78;
			break;
		
		case 119:
			StringCopy(&Var2, "TORSO_P2_19_15", 16);
			iVar6 = 19;
			iVar7 = 15;
			iVar1 = 78;
			break;
		
		case 120:
			StringCopy(&Var2, "TORSO_P2_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 40;
			break;
		
		case 121:
			StringCopy(&Var2, "TORSO_P2_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 32;
			break;
		
		case 122:
			StringCopy(&Var2, "TORSO_P2_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 32;
			break;
		
		case 123:
			StringCopy(&Var2, "TORSO_P2_20_3", 16);
			iVar6 = 20;
			iVar7 = 3;
			iVar1 = 32;
			break;
		
		case 124:
			StringCopy(&Var2, "TORSO_P2_20_4", 16);
			iVar6 = 20;
			iVar7 = 4;
			break;
		
		case 125:
			StringCopy(&Var2, "TORSO_P2_20_5", 16);
			iVar6 = 20;
			iVar7 = 5;
			iVar1 = 38;
			break;
		
		case 126:
			StringCopy(&Var2, "TORSO_P2_20_6", 16);
			iVar6 = 20;
			iVar7 = 6;
			iVar1 = 35;
			break;
		
		case 127:
			StringCopy(&Var2, "TORSO_P2_20_7", 16);
			iVar6 = 20;
			iVar7 = 7;
			iVar1 = 38;
			break;
		
		case 128:
			StringCopy(&Var2, "TORSO_P2_20_8", 16);
			iVar6 = 20;
			iVar7 = 8;
			iVar1 = 29;
			break;
		
		case 129:
			StringCopy(&Var2, "TORSO_P2_20_9", 16);
			iVar6 = 20;
			iVar7 = 9;
			iVar1 = 32;
			break;
		
		case 130:
			StringCopy(&Var2, "TORSO_P2_20_10", 16);
			iVar6 = 20;
			iVar7 = 10;
			iVar1 = 29;
			break;
		
		case 131:
			StringCopy(&Var2, "TORSO_P2_20_11", 16);
			iVar6 = 20;
			iVar7 = 11;
			iVar1 = 35;
			break;
		
		case 132:
			StringCopy(&Var2, "TORSO_P2_20_12", 16);
			iVar6 = 20;
			iVar7 = 12;
			iVar1 = 32;
			break;
		
		case 133:
			StringCopy(&Var2, "TORSO_P2_20_13", 16);
			iVar6 = 20;
			iVar7 = 13;
			iVar1 = 35;
			break;
		
		case 134:
			StringCopy(&Var2, "TORSO_P2_20_14", 16);
			iVar6 = 20;
			iVar7 = 14;
			iVar1 = 32;
			break;
		
		case 135:
			StringCopy(&Var2, "TORSO_P2_20_15", 16);
			iVar6 = 20;
			iVar7 = 15;
			iVar1 = 40;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_44(int iParam0)//Position - 0xA98E
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 2;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "HAIR_P2_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "HAIR_P2_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "HAIR_P2_1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "HAIR_P2_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "HAIR_P2_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "HAIR_P2_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "HAIR_P2_5_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "HAIR_P2_6_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "HAIR_P2_7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 9);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_45(int iParam0)//Position - 0xAABA
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 0;
	Global_69518[0 /*14*/].f_5 = 2;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 6;
			break;
		
		default:
			func_29(iVar10, iParam0, 7);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_46(int iParam0, int iParam1)//Position - 0xABB7
{
	switch (iParam0)
	{
		case 0:
			func_64(iParam1);
			break;
		
		case 2:
			func_63(iParam1);
			break;
		
		case 3:
			func_59(iParam1);
			break;
		
		case 4:
			func_58(iParam1);
			break;
		
		case 6:
			func_57(iParam1);
			break;
		
		case 5:
			func_56(iParam1);
			break;
		
		case 8:
			func_55(iParam1);
			break;
		
		case 9:
			func_54(iParam1);
			break;
		
		case 10:
			func_53(iParam1);
			break;
		
		case 1:
			func_52(iParam1);
			break;
		
		case 7:
			func_51(iParam1);
			break;
		
		case 11:
			func_50(iParam1);
			break;
		
		case 12:
			func_49(iParam1);
			break;
		
		case 13:
			func_48(iParam1);
			break;
		
		case 14:
			func_47(iParam1);
			break;
	}
}

void func_47(int iParam0)//Position - 0xACA7
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 14;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 6;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 7;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 8;
			break;
		
		case 158:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 2;
			break;
		
		case 159:
			StringCopy(&Var2, "PROPS_P1_EA1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar1 = 4590;
			iVar8 = 2;
			break;
		
		case 160:
			StringCopy(&Var2, "PROPS_P1_EA1_1", 16);
			iVar6 = 1;
			iVar7 = 1;
			iVar1 = 4100;
			iVar8 = 2;
			break;
		
		case 161:
			StringCopy(&Var2, "PROPS_P1_EA1_2", 16);
			iVar6 = 1;
			iVar7 = 2;
			iVar1 = 3850;
			iVar8 = 2;
			break;
		
		case 162:
			StringCopy(&Var2, "PROPS_P1_EA1_3", 16);
			iVar6 = 1;
			iVar7 = 3;
			iVar1 = 1850;
			iVar8 = 2;
			break;
		
		case 163:
			StringCopy(&Var2, "PROPS_P1_EA1_4", 16);
			iVar6 = 1;
			iVar7 = 4;
			iVar1 = 5250;
			iVar8 = 2;
			break;
		
		case 164:
			StringCopy(&Var2, "PROPS_P1_EA1_5", 16);
			iVar6 = 1;
			iVar7 = 5;
			iVar1 = 2700;
			iVar8 = 2;
			break;
		
		case 165:
			StringCopy(&Var2, "PROPS_P1_EA1_6", 16);
			iVar6 = 1;
			iVar7 = 6;
			iVar1 = 3100;
			iVar8 = 2;
			break;
		
		case 166:
			StringCopy(&Var2, "PROPS_P1_EA1_7", 16);
			iVar6 = 1;
			iVar7 = 7;
			iVar1 = 5050;
			iVar8 = 2;
			break;
		
		case 167:
			StringCopy(&Var2, "PROPS_P1_EA2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar1 = 2500;
			iVar8 = 2;
			break;
		
		case 168:
			StringCopy(&Var2, "PROPS_P1_EA2_1", 16);
			iVar6 = 2;
			iVar7 = 1;
			iVar1 = 1950;
			iVar8 = 2;
			break;
		
		case 169:
			StringCopy(&Var2, "PROPS_P1_EA2_2", 16);
			iVar6 = 2;
			iVar7 = 2;
			iVar1 = 3900;
			iVar8 = 2;
			break;
		
		case 170:
			StringCopy(&Var2, "PROPS_P1_EA2_3", 16);
			iVar6 = 2;
			iVar7 = 3;
			iVar1 = 3550;
			iVar8 = 2;
			break;
		
		case 171:
			StringCopy(&Var2, "PROPS_P1_EA2_4", 16);
			iVar6 = 2;
			iVar7 = 4;
			iVar1 = 4500;
			iVar8 = 2;
			break;
		
		case 172:
			StringCopy(&Var2, "PROPS_P1_EA2_5", 16);
			iVar6 = 2;
			iVar7 = 5;
			iVar1 = 2700;
			iVar8 = 2;
			break;
		
		case 173:
			StringCopy(&Var2, "PROPS_P1_EA2_6", 16);
			iVar6 = 2;
			iVar7 = 6;
			iVar1 = 3100;
			iVar8 = 2;
			break;
		
		case 174:
			StringCopy(&Var2, "PROPS_P1_EA2_7", 16);
			iVar6 = 2;
			iVar7 = 7;
			iVar1 = 2950;
			iVar8 = 2;
			break;
		
		case 82:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 10;
			break;
		
		case 83:
			StringCopy(&Var2, "PROPS_P1_E1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 84:
			StringCopy(&Var2, "PROPS_P1_E1_1", 16);
			iVar6 = 1;
			iVar7 = 1;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 85:
			StringCopy(&Var2, "PROPS_P1_E1_2", 16);
			iVar6 = 1;
			iVar7 = 2;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 86:
			StringCopy(&Var2, "PROPS_P1_E1_3", 16);
			iVar6 = 1;
			iVar7 = 3;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 87:
			StringCopy(&Var2, "PROPS_P1_E1_4", 16);
			iVar6 = 1;
			iVar7 = 4;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 88:
			StringCopy(&Var2, "PROPS_P1_E1_5", 16);
			iVar6 = 1;
			iVar7 = 5;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 89:
			StringCopy(&Var2, "PROPS_P1_E1_6", 16);
			iVar6 = 1;
			iVar7 = 6;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 90:
			StringCopy(&Var2, "PROPS_P1_E1_7", 16);
			iVar6 = 1;
			iVar7 = 7;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 91:
			StringCopy(&Var2, "PROPS_P1_E1_8", 16);
			iVar6 = 1;
			iVar7 = 8;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 92:
			StringCopy(&Var2, "PROPS_P1_E1_9", 16);
			iVar6 = 1;
			iVar7 = 9;
			iVar1 = 75;
			iVar8 = 10;
			break;
		
		case 93:
			StringCopy(&Var2, "PROPS_P1_E2", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar8 = 10;
			break;
		
		case 94:
			StringCopy(&Var2, "PROPS_P1_E3", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar1 = 110;
			iVar8 = 10;
			break;
		
		case 95:
			StringCopy(&Var2, "PROPS_P1_E4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar1 = 120;
			iVar8 = 10;
			break;
		
		case 96:
			StringCopy(&Var2, "PROPS_P1_E4_1", 16);
			iVar6 = 4;
			iVar7 = 1;
			iVar1 = 128;
			iVar8 = 10;
			break;
		
		case 97:
			StringCopy(&Var2, "PROPS_P1_E4_2", 16);
			iVar6 = 4;
			iVar7 = 2;
			iVar1 = 130;
			iVar8 = 10;
			break;
		
		case 98:
			StringCopy(&Var2, "PROPS_P1_E4_3", 16);
			iVar6 = 4;
			iVar7 = 3;
			iVar1 = 140;
			iVar8 = 10;
			break;
		
		case 99:
			StringCopy(&Var2, "PROPS_P1_E4_4", 16);
			iVar6 = 4;
			iVar7 = 4;
			iVar1 = 145;
			iVar8 = 10;
			break;
		
		case 100:
			StringCopy(&Var2, "PROPS_P1_E4_5", 16);
			iVar6 = 4;
			iVar7 = 5;
			iVar1 = 135;
			iVar8 = 10;
			break;
		
		case 101:
			StringCopy(&Var2, "PROPS_P1_E4_6", 16);
			iVar6 = 4;
			iVar7 = 6;
			iVar1 = 138;
			iVar8 = 10;
			break;
		
		case 102:
			StringCopy(&Var2, "PROPS_P1_E5_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar1 = 110;
			iVar8 = 10;
			break;
		
		case 103:
			StringCopy(&Var2, "PROPS_P1_E5_1", 16);
			iVar6 = 5;
			iVar7 = 1;
			iVar1 = 112;
			iVar8 = 10;
			break;
		
		case 104:
			StringCopy(&Var2, "PROPS_P1_E5_2", 16);
			iVar6 = 5;
			iVar7 = 2;
			iVar1 = 115;
			iVar8 = 10;
			break;
		
		case 105:
			StringCopy(&Var2, "PROPS_P1_E5_3", 16);
			iVar6 = 5;
			iVar7 = 3;
			iVar1 = 118;
			iVar8 = 10;
			break;
		
		case 106:
			StringCopy(&Var2, "PROPS_P1_E5_4", 16);
			iVar6 = 5;
			iVar7 = 4;
			iVar1 = 120;
			iVar8 = 10;
			break;
		
		case 107:
			StringCopy(&Var2, "PROPS_P1_E5_5", 16);
			iVar6 = 5;
			iVar7 = 5;
			iVar1 = 125;
			iVar8 = 10;
			break;
		
		case 108:
			StringCopy(&Var2, "PROPS_P1_E5_6", 16);
			iVar6 = 5;
			iVar7 = 6;
			iVar1 = 128;
			iVar8 = 10;
			break;
		
		case 109:
			StringCopy(&Var2, "PROPS_P1_E5_7", 16);
			iVar6 = 5;
			iVar7 = 7;
			iVar1 = 138;
			iVar8 = 10;
			break;
		
		case 110:
			StringCopy(&Var2, "PROPS_P1_E5_8", 16);
			iVar6 = 5;
			iVar7 = 8;
			iVar1 = 140;
			iVar8 = 10;
			break;
		
		case 111:
			StringCopy(&Var2, "PROPS_P1_E5_9", 16);
			iVar6 = 5;
			iVar7 = 9;
			iVar1 = 155;
			iVar8 = 10;
			break;
		
		case 112:
			StringCopy(&Var2, "PROPS_P1_E6_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 113:
			StringCopy(&Var2, "PROPS_P1_E6_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 114:
			StringCopy(&Var2, "PROPS_P1_E6_2", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar1 = 58;
			iVar8 = 10;
			break;
		
		case 115:
			StringCopy(&Var2, "PROPS_P1_E6_3", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar1 = 58;
			iVar8 = 10;
			break;
		
		case 116:
			StringCopy(&Var2, "PROPS_P1_E6_4", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar1 = 60;
			iVar8 = 10;
			break;
		
		case 117:
			StringCopy(&Var2, "PROPS_P1_E6_5", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar1 = 62;
			iVar8 = 10;
			break;
		
		case 118:
			StringCopy(&Var2, "PROPS_P1_E6_6", 16);
			iVar6 = 6;
			iVar7 = 6;
			iVar1 = 65;
			iVar8 = 10;
			break;
		
		case 119:
			StringCopy(&Var2, "PROPS_P1_E6_7", 16);
			iVar6 = 6;
			iVar7 = 7;
			iVar1 = 68;
			iVar8 = 10;
			break;
		
		case 120:
			StringCopy(&Var2, "PROPS_P1_E6_8", 16);
			iVar6 = 6;
			iVar7 = 8;
			iVar1 = 68;
			iVar8 = 10;
			break;
		
		case 121:
			StringCopy(&Var2, "PROPS_P1_E6_9", 16);
			iVar6 = 6;
			iVar7 = 9;
			iVar1 = 72;
			iVar8 = 10;
			break;
		
		case 122:
			StringCopy(&Var2, "PROPS_P1_E7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar1 = 145;
			iVar8 = 10;
			break;
		
		case 123:
			StringCopy(&Var2, "PROPS_P1_E7_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar1 = 149;
			iVar8 = 10;
			break;
		
		case 124:
			StringCopy(&Var2, "PROPS_P1_E7_2", 16);
			iVar6 = 7;
			iVar7 = 2;
			iVar1 = 139;
			iVar8 = 10;
			break;
		
		case 125:
			StringCopy(&Var2, "PROPS_P1_E7_3", 16);
			iVar6 = 7;
			iVar7 = 3;
			iVar1 = 149;
			iVar8 = 10;
			break;
		
		case 126:
			StringCopy(&Var2, "PROPS_P1_E7_4", 16);
			iVar6 = 7;
			iVar7 = 4;
			iVar1 = 135;
			iVar8 = 10;
			break;
		
		case 127:
			StringCopy(&Var2, "PROPS_P1_E7_5", 16);
			iVar6 = 7;
			iVar7 = 5;
			iVar1 = 138;
			iVar8 = 10;
			break;
		
		case 128:
			StringCopy(&Var2, "PROPS_P1_E7_6", 16);
			iVar6 = 7;
			iVar7 = 6;
			iVar1 = 140;
			iVar8 = 10;
			break;
		
		case 129:
			StringCopy(&Var2, "PROPS_P1_E7_7", 16);
			iVar6 = 7;
			iVar7 = 7;
			iVar1 = 145;
			iVar8 = 10;
			break;
		
		case 130:
			StringCopy(&Var2, "PROPS_P1_E7_8", 16);
			iVar6 = 7;
			iVar7 = 8;
			iVar1 = 159;
			iVar8 = 10;
			break;
		
		case 131:
			StringCopy(&Var2, "PROPS_P1_E7_9", 16);
			iVar6 = 7;
			iVar7 = 9;
			iVar1 = 155;
			iVar8 = 10;
			break;
		
		case 132:
			StringCopy(&Var2, "PROPS_P1_E8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar1 = 198;
			iVar8 = 10;
			break;
		
		case 133:
			StringCopy(&Var2, "PROPS_P1_E8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 210;
			iVar8 = 10;
			break;
		
		case 134:
			StringCopy(&Var2, "PROPS_P1_E8_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 185;
			iVar8 = 10;
			break;
		
		case 135:
			StringCopy(&Var2, "PROPS_P1_E8_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 220;
			iVar8 = 10;
			break;
		
		case 136:
			StringCopy(&Var2, "PROPS_P1_E8_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 190;
			iVar8 = 10;
			break;
		
		case 137:
			StringCopy(&Var2, "PROPS_P1_E8_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 200;
			iVar8 = 10;
			break;
		
		case 138:
			StringCopy(&Var2, "PROPS_P1_E8_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 208;
			iVar8 = 10;
			break;
		
		case 139:
			StringCopy(&Var2, "PROPS_P1_E8_7", 16);
			iVar6 = 8;
			iVar7 = 7;
			iVar1 = 210;
			iVar8 = 10;
			break;
		
		case 140:
			StringCopy(&Var2, "PROPS_P1_E9_0", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar1 = 165;
			iVar8 = 10;
			break;
		
		case 141:
			StringCopy(&Var2, "PROPS_P1_E9_1", 16);
			iVar6 = 9;
			iVar7 = 1;
			iVar1 = 185;
			iVar8 = 10;
			break;
		
		case 142:
			StringCopy(&Var2, "PROPS_P1_E9_2", 16);
			iVar6 = 9;
			iVar7 = 2;
			iVar1 = 190;
			iVar8 = 10;
			break;
		
		case 143:
			StringCopy(&Var2, "PROPS_P1_E9_3", 16);
			iVar6 = 9;
			iVar7 = 3;
			iVar1 = 178;
			iVar8 = 10;
			break;
		
		case 144:
			StringCopy(&Var2, "PROPS_P1_E9_4", 16);
			iVar6 = 9;
			iVar7 = 4;
			iVar1 = 180;
			iVar8 = 10;
			break;
		
		case 145:
			StringCopy(&Var2, "PROPS_P1_E9_5", 16);
			iVar6 = 9;
			iVar7 = 5;
			iVar1 = 168;
			iVar8 = 10;
			break;
		
		case 146:
			StringCopy(&Var2, "PROPS_P1_E9_6", 16);
			iVar6 = 9;
			iVar7 = 6;
			iVar1 = 170;
			iVar8 = 10;
			break;
		
		case 147:
			StringCopy(&Var2, "PROPS_P1_E9_7", 16);
			iVar6 = 9;
			iVar7 = 7;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 148:
			StringCopy(&Var2, "PROPS_P1_E9_8", 16);
			iVar6 = 9;
			iVar7 = 8;
			iVar1 = 170;
			iVar8 = 10;
			break;
		
		case 149:
			StringCopy(&Var2, "PROPS_P1_E9_9", 16);
			iVar6 = 9;
			iVar7 = 9;
			iVar1 = 178;
			iVar8 = 10;
			break;
		
		case 150:
			StringCopy(&Var2, "PROPS_P1_E10_0", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar1 = 140;
			iVar8 = 10;
			break;
		
		case 151:
			StringCopy(&Var2, "PROPS_P1_E10_1", 16);
			iVar6 = 10;
			iVar7 = 1;
			iVar1 = 145;
			iVar8 = 10;
			break;
		
		case 152:
			StringCopy(&Var2, "PROPS_P1_E10_2", 16);
			iVar6 = 10;
			iVar7 = 2;
			iVar1 = 150;
			iVar8 = 10;
			break;
		
		case 153:
			StringCopy(&Var2, "PROPS_P1_E10_3", 16);
			iVar6 = 10;
			iVar7 = 3;
			iVar1 = 165;
			iVar8 = 10;
			break;
		
		case 154:
			StringCopy(&Var2, "PROPS_P1_E10_4", 16);
			iVar6 = 10;
			iVar7 = 4;
			iVar1 = 168;
			iVar8 = 10;
			break;
		
		case 155:
			StringCopy(&Var2, "PROPS_P1_E10_5", 16);
			iVar6 = 10;
			iVar7 = 5;
			iVar1 = 178;
			iVar8 = 10;
			break;
		
		case 156:
			StringCopy(&Var2, "PROPS_P1_E10_6", 16);
			iVar6 = 10;
			iVar7 = 6;
			iVar1 = 160;
			iVar8 = 10;
			break;
		
		case 157:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar1 = 100;
			iVar8 = 10;
			break;
		
		case 10:
			StringCopy(&Var2, "PROPS_P1_H0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 320;
			iVar8 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "PROPS_P1_H3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 6;
			iVar8 = 0;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 7;
			iVar8 = 0;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 8;
			iVar8 = 0;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 26:
			StringCopy(&Var2, "PROPS_P1_H8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar1 = 270;
			iVar8 = 0;
			break;
		
		case 27:
			StringCopy(&Var2, "PROPS_P1_H8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 270;
			iVar8 = 0;
			break;
		
		case 28:
			StringCopy(&Var2, "PROPS_P1_H9_0", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar1 = 200;
			iVar8 = 0;
			break;
		
		case 29:
			StringCopy(&Var2, "PROPS_P1_H9_1", 16);
			iVar6 = 9;
			iVar7 = 1;
			iVar1 = 200;
			iVar8 = 0;
			break;
		
		case 30:
			StringCopy(&Var2, "PROPS_P1_H10_0", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar1 = 350;
			iVar8 = 0;
			break;
		
		case 31:
			StringCopy(&Var2, "PROPS_P1_H10_1", 16);
			iVar6 = 10;
			iVar7 = 1;
			iVar1 = 350;
			iVar8 = 0;
			break;
		
		case 32:
			StringCopy(&Var2, "PROPS_P1_H11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar1 = 450;
			iVar8 = 0;
			break;
		
		case 33:
			StringCopy(&Var2, "PROPS_P1_H12_0", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar1 = 500;
			iVar8 = 0;
			break;
		
		case 34:
			StringCopy(&Var2, "PROPS_P1_H12_1", 16);
			iVar6 = 12;
			iVar7 = 1;
			iVar1 = 500;
			iVar8 = 0;
			break;
		
		case 35:
			StringCopy(&Var2, "PROPS_P1_H13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar1 = 50;
			iVar8 = 0;
			break;
		
		case 36:
			StringCopy(&Var2, "PROPS_P1_H13_1", 16);
			iVar6 = 13;
			iVar7 = 1;
			iVar1 = 50;
			iVar8 = 0;
			break;
		
		case 37:
			StringCopy(&Var2, "PROPS_P1_H14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 38:
			StringCopy(&Var2, "PROPS_P1_H14_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 39:
			StringCopy(&Var2, "PROPS_P1_H14_2", 16);
			iVar6 = 14;
			iVar7 = 2;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 40:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 41:
			StringCopy(&Var2, "PROPS_P1_H19_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 42:
			StringCopy(&Var2, "PROPS_P1_H19_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 43:
			StringCopy(&Var2, "PROPS_P1_H19_2", 16);
			iVar6 = 16;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "PROPS_P1_H19_3", 16);
			iVar6 = 16;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "PROPS_P1_H19_4", 16);
			iVar6 = 16;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 46:
			StringCopy(&Var2, "PROPS_P1_H19_5", 16);
			iVar6 = 16;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 47:
			StringCopy(&Var2, "PROPS_P1_H19_6", 16);
			iVar6 = 16;
			iVar7 = 6;
			iVar8 = 0;
			break;
		
		case 48:
			StringCopy(&Var2, "PROPS_P1_H19_7", 16);
			iVar6 = 16;
			iVar7 = 7;
			iVar8 = 0;
			break;
		
		case 49:
			StringCopy(&Var2, "PROPS_P1_H19_8", 16);
			iVar6 = 16;
			iVar7 = 8;
			iVar8 = 0;
			break;
		
		case 50:
			StringCopy(&Var2, "PROPS_P1_H19_9", 16);
			iVar6 = 16;
			iVar7 = 9;
			iVar8 = 0;
			break;
		
		case 51:
			StringCopy(&Var2, "PROPS_P1_H19_10", 16);
			iVar6 = 16;
			iVar7 = 10;
			iVar8 = 0;
			break;
		
		case 52:
			StringCopy(&Var2, "PROPS_P1_H19_11", 16);
			iVar6 = 16;
			iVar7 = 11;
			iVar8 = 0;
			break;
		
		case 53:
			StringCopy(&Var2, "PROPS_P1_H19_12", 16);
			iVar6 = 16;
			iVar7 = 12;
			iVar8 = 0;
			break;
		
		case 54:
			StringCopy(&Var2, "PROPS_P1_H19_13", 16);
			iVar6 = 16;
			iVar7 = 13;
			iVar8 = 0;
			break;
		
		case 55:
			StringCopy(&Var2, "PROPS_P1_H19_14", 16);
			iVar6 = 16;
			iVar7 = 14;
			iVar8 = 0;
			break;
		
		case 56:
			StringCopy(&Var2, "PROPS_P1_H19_15", 16);
			iVar6 = 16;
			iVar7 = 15;
			iVar8 = 0;
			break;
		
		case 57:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 58:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 59:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 60:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 61:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 62:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 63:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 64:
			StringCopy(&Var2, "PROPS_P1_H19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 30;
			iVar8 = 0;
			break;
		
		case 65:
			StringCopy(&Var2, "PROPS_P1_H19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 30;
			iVar8 = 0;
			break;
		
		case 66:
			StringCopy(&Var2, "PROPS_P1_H19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 32;
			iVar8 = 0;
			break;
		
		case 67:
			StringCopy(&Var2, "PROPS_P1_H19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 35;
			iVar8 = 0;
			break;
		
		case 68:
			StringCopy(&Var2, "PROPS_P1_H19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 38;
			iVar8 = 0;
			break;
		
		case 69:
			StringCopy(&Var2, "PROPS_P1_H19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 42;
			iVar8 = 0;
			break;
		
		case 70:
			StringCopy(&Var2, "PROPS_P1_H19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 42;
			iVar8 = 0;
			break;
		
		case 71:
			StringCopy(&Var2, "PROPS_P1_H19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 40;
			iVar8 = 0;
			break;
		
		case 72:
			StringCopy(&Var2, "PROPS_P1_H19_8", 16);
			iVar6 = 19;
			iVar7 = 8;
			iVar1 = 45;
			iVar8 = 0;
			break;
		
		case 73:
			StringCopy(&Var2, "PROPS_P1_H19_9", 16);
			iVar6 = 19;
			iVar7 = 9;
			iVar1 = 48;
			iVar8 = 0;
			break;
		
		case 74:
			StringCopy(&Var2, "PROPS_P1_H19_10", 16);
			iVar6 = 19;
			iVar7 = 10;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 75:
			StringCopy(&Var2, "PROPS_P1_H19_11", 16);
			iVar6 = 19;
			iVar7 = 11;
			iVar1 = 25;
			iVar8 = 0;
			break;
		
		case 76:
			StringCopy(&Var2, "PROPS_P1_H19_12", 16);
			iVar6 = 19;
			iVar7 = 12;
			iVar1 = 28;
			iVar8 = 0;
			break;
		
		case 77:
			StringCopy(&Var2, "PROPS_P1_H19_13", 16);
			iVar6 = 19;
			iVar7 = 13;
			iVar1 = 28;
			iVar8 = 0;
			break;
		
		case 78:
			StringCopy(&Var2, "PROPS_P1_H19_14", 16);
			iVar6 = 19;
			iVar7 = 14;
			iVar1 = 30;
			iVar8 = 0;
			break;
		
		case 79:
			StringCopy(&Var2, "PROPS_P1_H19_15", 16);
			iVar6 = 19;
			iVar7 = 15;
			iVar1 = 35;
			iVar8 = 0;
			break;
		
		case 80:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 81:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 175);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_48(int iParam0)//Position - 0xC199
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 13;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 9);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_49(int iParam0)//Position - 0xC2E9
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 12;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "OUTFIT_P1_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 1:
			StringCopy(&Var2, "OUTFIT_P1_2", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "OUTFIT_P1_4", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "OUTFIT_P1_7", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "OUTFIT_P1_10", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "OUTFIT_P1_11", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "OUTFIT_P1_12", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "OUTFIT_P1_13", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 9:
			StringCopy(&Var2, "OUTFIT_P1_15", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 10:
			StringCopy(&Var2, "OUTFIT_P1_16", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "OUTFIT_P1_17", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 10000;
			break;
		
		case 12:
			StringCopy(&Var2, "OUTFIT_P1_18", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "OUTFIT_P1_19", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 14:
			StringCopy(&Var2, "OUTFIT_P1_20", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 15:
			StringCopy(&Var2, "OUTFIT_P1_21", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 16:
			StringCopy(&Var2, "OUTFIT_P1_22", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "OUTFIT_P1_23", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 18:
			StringCopy(&Var2, "OUTFIT_P1_24", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "OUTFIT_P1_25", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 20:
			StringCopy(&Var2, "OUTFIT_P1_26", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 21:
			StringCopy(&Var2, "OUTFIT_P1_27", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "OUTFIT_P1_28", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4000;
			break;
		
		case 23:
			StringCopy(&Var2, "OUTFIT_P1_29", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4500;
			break;
		
		case 24:
			StringCopy(&Var2, "OUTFIT_P1_30", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4500;
			break;
		
		case 25:
			StringCopy(&Var2, "OUTFIT_P1_31", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4650;
			break;
		
		case 26:
			StringCopy(&Var2, "OUTFIT_P1_32", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4900;
			break;
		
		case 27:
			StringCopy(&Var2, "OUTFIT_P1_33", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5000;
			break;
		
		case 28:
			StringCopy(&Var2, "OUTFIT_P1_34", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4750;
			break;
		
		case 29:
			StringCopy(&Var2, "OUTFIT_P1_35", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4750;
			break;
		
		case 30:
			StringCopy(&Var2, "OUTFIT_P1_36", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5200;
			break;
		
		case 31:
			StringCopy(&Var2, "OUTFIT_P1_37", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5200;
			break;
		
		case 32:
			StringCopy(&Var2, "OUTFIT_P1_38", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5500;
			break;
		
		case 33:
			StringCopy(&Var2, "OUTFIT_P1_39", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 34:
			StringCopy(&Var2, "OUTFIT_P1_40", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 35:
			StringCopy(&Var2, "OUTFIT_P1_41", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 36:
			StringCopy(&Var2, "OUTFIT_P1_42", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 37:
			StringCopy(&Var2, "OUTFIT_P1_43", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 38:
			StringCopy(&Var2, "OUTFIT_P1_47", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 3000;
			break;
		
		case 39:
			StringCopy(&Var2, "OUTFIT_P1_48", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 3000;
			break;
		
		case 40:
			StringCopy(&Var2, "OUTFIT_P1_49", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 3000;
			break;
		
		case 41:
			StringCopy(&Var2, "OUTFIT_P1_10", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 42:
			StringCopy(&Var2, "OUTFIT_P1_50", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 43:
			StringCopy(&Var2, "OUTFIT_P1_51", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "OUTFIT_P1_52", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "OUTFIT_P1_53", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 46:
			StringCopy(&Var2, "OUTFIT_P1_54", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 47);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_50(int iParam0)//Position - 0xC7F3
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 11;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 1;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 2;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 3;
			break;
		
		case 5:
			StringCopy(&Var2, "JBIB_P1_1_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "JBIB_P1_1_1", 16);
			iVar6 = 2;
			iVar7 = 1;
			break;
		
		case 7:
			StringCopy(&Var2, "JBIB_P1_1_2", 16);
			iVar6 = 2;
			iVar7 = 2;
			break;
		
		case 8:
			StringCopy(&Var2, "JBIB_P1_1_3", 16);
			iVar6 = 2;
			iVar7 = 3;
			break;
		
		case 9:
			StringCopy(&Var2, "JBIB_P1_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 10:
			StringCopy(&Var2, "JBIB_P1_3_1", 16);
			iVar6 = 3;
			iVar7 = 1;
			break;
		
		case 11:
			StringCopy(&Var2, "JBIB_P1_3_2", 16);
			iVar6 = 3;
			iVar7 = 2;
			break;
		
		case 12:
			StringCopy(&Var2, "JBIB_P1_3_3", 16);
			iVar6 = 3;
			iVar7 = 3;
			break;
		
		case 13:
			StringCopy(&Var2, "JBIB_P1_3_4", 16);
			iVar6 = 3;
			iVar7 = 4;
			break;
		
		case 14:
			StringCopy(&Var2, "JBIB_P1_3_5", 16);
			iVar6 = 3;
			iVar7 = 5;
			break;
		
		case 15:
			StringCopy(&Var2, "JBIB_P1_3_6", 16);
			iVar6 = 3;
			iVar7 = 6;
			break;
		
		case 16:
			StringCopy(&Var2, "JBIB_P1_3_7", 16);
			iVar6 = 3;
			iVar7 = 7;
			break;
		
		case 17:
			StringCopy(&Var2, "JBIB_P1_3_8", 16);
			iVar6 = 3;
			iVar7 = 8;
			break;
		
		case 18:
			StringCopy(&Var2, "JBIB_P1_3_9", 16);
			iVar6 = 3;
			iVar7 = 9;
			break;
		
		case 19:
			StringCopy(&Var2, "JBIB_P1_3_10", 16);
			iVar6 = 3;
			iVar7 = 10;
			break;
		
		case 20:
			StringCopy(&Var2, "JBIB_P1_3_11", 16);
			iVar6 = 3;
			iVar7 = 11;
			break;
		
		case 21:
			StringCopy(&Var2, "JBIB_P1_3_12", 16);
			iVar6 = 3;
			iVar7 = 12;
			break;
		
		case 22:
			StringCopy(&Var2, "JBIB_P1_3_13", 16);
			iVar6 = 3;
			iVar7 = 13;
			break;
		
		case 23:
			StringCopy(&Var2, "JBIB_P1_3_14", 16);
			iVar6 = 3;
			iVar7 = 14;
			break;
		
		case 24:
			StringCopy(&Var2, "JBIB_P1_3_15", 16);
			iVar6 = 3;
			iVar7 = 15;
			break;
		
		case 25:
			StringCopy(&Var2, "JBIB_P1_3_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 26:
			StringCopy(&Var2, "JBIB_P1_3_1", 16);
			iVar6 = 4;
			iVar7 = 1;
			break;
		
		case 27:
			StringCopy(&Var2, "JBIB_P1_3_2", 16);
			iVar6 = 4;
			iVar7 = 2;
			break;
		
		case 28:
			StringCopy(&Var2, "JBIB_P1_3_3", 16);
			iVar6 = 4;
			iVar7 = 3;
			break;
		
		case 29:
			StringCopy(&Var2, "JBIB_P1_3_4", 16);
			iVar6 = 4;
			iVar7 = 4;
			break;
		
		case 30:
			StringCopy(&Var2, "JBIB_P1_3_5", 16);
			iVar6 = 4;
			iVar7 = 5;
			break;
		
		case 31:
			StringCopy(&Var2, "JBIB_P1_3_6", 16);
			iVar6 = 4;
			iVar7 = 6;
			break;
		
		case 32:
			StringCopy(&Var2, "JBIB_P1_3_7", 16);
			iVar6 = 4;
			iVar7 = 7;
			break;
		
		case 33:
			StringCopy(&Var2, "JBIB_P1_3_8", 16);
			iVar6 = 4;
			iVar7 = 8;
			break;
		
		case 34:
			StringCopy(&Var2, "JBIB_P1_3_9", 16);
			iVar6 = 4;
			iVar7 = 9;
			break;
		
		case 35:
			StringCopy(&Var2, "JBIB_P1_3_10", 16);
			iVar6 = 4;
			iVar7 = 10;
			break;
		
		case 36:
			StringCopy(&Var2, "JBIB_P1_3_11", 16);
			iVar6 = 4;
			iVar7 = 11;
			break;
		
		case 37:
			StringCopy(&Var2, "JBIB_P1_3_12", 16);
			iVar6 = 4;
			iVar7 = 12;
			break;
		
		case 38:
			StringCopy(&Var2, "JBIB_P1_3_13", 16);
			iVar6 = 4;
			iVar7 = 13;
			break;
		
		case 39:
			StringCopy(&Var2, "JBIB_P1_3_14", 16);
			iVar6 = 4;
			iVar7 = 14;
			break;
		
		case 40:
			StringCopy(&Var2, "JBIB_P1_3_15", 16);
			iVar6 = 4;
			iVar7 = 15;
			break;
		
		case 41:
			StringCopy(&Var2, "JBIB_P1_5_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 42:
			StringCopy(&Var2, "JBIB_P1_6_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 43:
			StringCopy(&Var2, "JBIB_P1_6_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			break;
		
		case 44:
			StringCopy(&Var2, "JBIB_P1_7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "JBIB_P1_8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 46:
			StringCopy(&Var2, "JBIB_P1_9_0", 16);
			iVar6 = 9;
			iVar7 = 0;
			break;
		
		case 47:
			StringCopy(&Var2, "JBIB_P1_10_0", 16);
			iVar6 = 10;
			iVar7 = 0;
			break;
		
		case 48:
			StringCopy(&Var2, "JBIB_P1_10_1", 16);
			iVar6 = 10;
			iVar7 = 1;
			iVar1 = 48;
			break;
		
		case 49:
			StringCopy(&Var2, "JBIB_P1_10_2", 16);
			iVar6 = 10;
			iVar7 = 2;
			iVar1 = 35;
			break;
		
		case 50:
			StringCopy(&Var2, "JBIB_P1_10_3", 16);
			iVar6 = 10;
			iVar7 = 3;
			iVar1 = 32;
			break;
		
		case 51:
			StringCopy(&Var2, "JBIB_P1_10_4", 16);
			iVar6 = 10;
			iVar7 = 4;
			iVar1 = 35;
			break;
		
		case 52:
			StringCopy(&Var2, "JBIB_P1_10_5", 16);
			iVar6 = 10;
			iVar7 = 5;
			iVar1 = 48;
			break;
		
		case 53:
			StringCopy(&Var2, "JBIB_P1_10_6", 16);
			iVar6 = 10;
			iVar7 = 6;
			iVar1 = 52;
			break;
		
		case 54:
			StringCopy(&Var2, "JBIB_P1_10_7", 16);
			iVar6 = 10;
			iVar7 = 7;
			iVar1 = 38;
			break;
		
		case 55:
			StringCopy(&Var2, "JBIB_P1_10_8", 16);
			iVar6 = 10;
			iVar7 = 8;
			iVar1 = 42;
			break;
		
		case 56:
			StringCopy(&Var2, "JBIB_P1_10_9", 16);
			iVar6 = 10;
			iVar7 = 9;
			iVar1 = 38;
			break;
		
		case 57:
			StringCopy(&Var2, "JBIB_P1_10_10", 16);
			iVar6 = 10;
			iVar7 = 10;
			iVar1 = 35;
			break;
		
		case 58:
			StringCopy(&Var2, "JBIB_P1_10_11", 16);
			iVar6 = 10;
			iVar7 = 11;
			iVar1 = 48;
			break;
		
		case 59:
			StringCopy(&Var2, "JBIB_P1_10_12", 16);
			iVar6 = 10;
			iVar7 = 12;
			iVar1 = 42;
			break;
		
		case 60:
			StringCopy(&Var2, "JBIB_P1_10_13", 16);
			iVar6 = 10;
			iVar7 = 13;
			iVar1 = 45;
			break;
		
		case 61:
			StringCopy(&Var2, "JBIB_P1_10_14", 16);
			iVar6 = 10;
			iVar7 = 14;
			iVar1 = 45;
			break;
		
		case 62:
			StringCopy(&Var2, "JBIB_P1_10_15", 16);
			iVar6 = 10;
			iVar7 = 15;
			iVar1 = 49;
			break;
		
		default:
			func_29(iVar10, iParam0, 63);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_51(int iParam0)//Position - 0xCE60
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 7;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 1);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_52(int iParam0)//Position - 0xCED3
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 1;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "BERD_P1_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "BERD_P1_1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "BERD_P1_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "BERD_P1_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "BERD_P1_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 5);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_53(int iParam0)//Position - 0xCFA2
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 10;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 1;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 2;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 3;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 4;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 5;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 1;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 2;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 3;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 4;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 5;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 6;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 1;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 2;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 3;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 4;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 5;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 6;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 7;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 8;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 9;
			break;
		
		case 26:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 10;
			break;
		
		case 27:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 11;
			break;
		
		case 28:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 12;
			break;
		
		case 29:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 13;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 14;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 15;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 33:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 1;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 2;
			break;
		
		case 35:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 3;
			break;
		
		case 36:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 4;
			break;
		
		case 37:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 5;
			break;
		
		case 38:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 6;
			break;
		
		case 39:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			break;
		
		case 40:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 1;
			break;
		
		case 41:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 2;
			break;
		
		case 42:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 3;
			break;
		
		case 43:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 4;
			break;
		
		case 44:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 5;
			break;
		
		case 45:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 6;
			break;
		
		case 46:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 7;
			break;
		
		case 47:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 48:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 1;
			break;
		
		case 49:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 2;
			break;
		
		case 50:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 3;
			break;
		
		case 51:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			break;
		
		case 52:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 53);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_54(int iParam0)//Position - 0xD4D1
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 9;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "SPEC2_P0_08_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar1 = 125;
			break;
		
		case 6:
			StringCopy(&Var2, "SPEC2_P0_08_1", 16);
			iVar6 = 5;
			iVar7 = 1;
			iVar1 = 150;
			break;
		
		case 7:
			StringCopy(&Var2, "SPEC2_P0_08_2", 16);
			iVar6 = 5;
			iVar7 = 2;
			iVar1 = 175;
			break;
		
		case 8:
			StringCopy(&Var2, "SPEC2_P0_08_3", 16);
			iVar6 = 5;
			iVar7 = 3;
			iVar1 = 85;
			break;
		
		case 9:
			StringCopy(&Var2, "SPEC2_P0_08_4", 16);
			iVar6 = 5;
			iVar7 = 4;
			iVar1 = 150;
			break;
		
		case 10:
			StringCopy(&Var2, "SPEC2_P0_08_5", 16);
			iVar6 = 5;
			iVar7 = 5;
			iVar1 = 175;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 12);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_55(int iParam0)//Position - 0xD667
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 8;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "SPEC_P1_9_0", 16);
			iVar6 = 9;
			iVar7 = 0;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "SPEC_P1_11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar1 = 195;
			break;
		
		case 12:
			StringCopy(&Var2, "SPEC_P1_11_1", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar1 = 195;
			break;
		
		case 13:
			StringCopy(&Var2, "SPEC_P1_11_2", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar1 = 195;
			break;
		
		case 14:
			StringCopy(&Var2, "SPEC_P1_11_3", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar1 = 250;
			break;
		
		case 15:
			StringCopy(&Var2, "SPEC_P1_11_4", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar1 = 250;
			break;
		
		case 16:
			StringCopy(&Var2, "SPEC_P1_11_5", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar1 = 250;
			break;
		
		case 17:
			StringCopy(&Var2, "SPEC_P1_11_6", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar1 = 195;
			break;
		
		case 18:
			StringCopy(&Var2, "SPEC_P1_11_7", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar1 = 250;
			break;
		
		case 19:
			StringCopy(&Var2, "SPEC_P1_11_8", 16);
			iVar6 = 11;
			iVar7 = 8;
			iVar1 = 250;
			break;
		
		case 20:
			StringCopy(&Var2, "SPEC_P1_11_9", 16);
			iVar6 = 11;
			iVar7 = 9;
			iVar1 = 250;
			break;
		
		case 21:
			StringCopy(&Var2, "SPEC_P1_11_10", 16);
			iVar6 = 11;
			iVar7 = 10;
			iVar1 = 250;
			break;
		
		case 22:
			StringCopy(&Var2, "SPEC_P1_11_11", 16);
			iVar6 = 11;
			iVar7 = 11;
			iVar1 = 195;
			break;
		
		case 23:
			StringCopy(&Var2, "SPEC_P1_11_12", 16);
			iVar6 = 11;
			iVar7 = 12;
			iVar1 = 250;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 26:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 14;
			iVar7 = 0;
			break;
		
		case 27:
			StringCopy(&Var2, "SPEC_P1_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			break;
		
		case 28:
			StringCopy(&Var2, "SPEC_P1_15_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			break;
		
		case 29:
			StringCopy(&Var2, "SPEC_P1_15_2", 16);
			iVar6 = 15;
			iVar7 = 2;
			break;
		
		case 30:
			StringCopy(&Var2, "SPEC_P1_15_3", 16);
			iVar6 = 15;
			iVar7 = 3;
			break;
		
		case 31:
			StringCopy(&Var2, "SPEC_P1_15_4", 16);
			iVar6 = 15;
			iVar7 = 4;
			break;
		
		case 32:
			StringCopy(&Var2, "SPEC_P1_15_5", 16);
			iVar6 = 15;
			iVar7 = 5;
			break;
		
		case 33:
			StringCopy(&Var2, "SPEC_P1_15_6", 16);
			iVar6 = 15;
			iVar7 = 6;
			break;
		
		case 34:
			StringCopy(&Var2, "SPEC_P1_15_7", 16);
			iVar6 = 15;
			iVar7 = 7;
			break;
		
		case 35:
			StringCopy(&Var2, "SPEC_P1_15_8", 16);
			iVar6 = 15;
			iVar7 = 8;
			break;
		
		case 36:
			StringCopy(&Var2, "SPEC_P1_15_9", 16);
			iVar6 = 15;
			iVar7 = 9;
			break;
		
		case 37:
			StringCopy(&Var2, "SPEC_P1_15_10", 16);
			iVar6 = 15;
			iVar7 = 10;
			break;
		
		case 38:
			StringCopy(&Var2, "SPEC_P1_15_11", 16);
			iVar6 = 15;
			iVar7 = 11;
			break;
		
		case 39:
			StringCopy(&Var2, "SPEC_P1_15_12", 16);
			iVar6 = 15;
			iVar7 = 12;
			break;
		
		case 40:
			StringCopy(&Var2, "SPEC_P1_15_13", 16);
			iVar6 = 15;
			iVar7 = 13;
			break;
		
		case 41:
			StringCopy(&Var2, "SPEC_P1_15_14", 16);
			iVar6 = 15;
			iVar7 = 14;
			break;
		
		case 42:
			StringCopy(&Var2, "SPEC_P1_15_15", 16);
			iVar6 = 15;
			iVar7 = 15;
			break;
		
		case 43:
			StringCopy(&Var2, "SPEC_P1_15_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "SPEC_P1_15_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			break;
		
		case 45:
			StringCopy(&Var2, "SPEC_P1_15_2", 16);
			iVar6 = 16;
			iVar7 = 2;
			break;
		
		case 46:
			StringCopy(&Var2, "SPEC_P1_15_3", 16);
			iVar6 = 16;
			iVar7 = 3;
			break;
		
		case 47:
			StringCopy(&Var2, "SPEC_P1_15_4", 16);
			iVar6 = 16;
			iVar7 = 4;
			break;
		
		case 48:
			StringCopy(&Var2, "SPEC_P1_15_5", 16);
			iVar6 = 16;
			iVar7 = 5;
			break;
		
		case 49:
			StringCopy(&Var2, "SPEC_P1_15_6", 16);
			iVar6 = 16;
			iVar7 = 6;
			break;
		
		case 50:
			StringCopy(&Var2, "SPEC_P1_15_7", 16);
			iVar6 = 16;
			iVar7 = 7;
			break;
		
		case 51:
			StringCopy(&Var2, "SPEC_P1_15_8", 16);
			iVar6 = 16;
			iVar7 = 8;
			break;
		
		case 52:
			StringCopy(&Var2, "SPEC_P1_15_9", 16);
			iVar6 = 16;
			iVar7 = 9;
			break;
		
		case 53:
			StringCopy(&Var2, "SPEC_P1_15_10", 16);
			iVar6 = 16;
			iVar7 = 10;
			break;
		
		case 54:
			StringCopy(&Var2, "SPEC_P1_15_11", 16);
			iVar6 = 16;
			iVar7 = 11;
			break;
		
		case 55:
			StringCopy(&Var2, "SPEC_P1_15_12", 16);
			iVar6 = 16;
			iVar7 = 12;
			break;
		
		case 56:
			StringCopy(&Var2, "SPEC_P1_15_13", 16);
			iVar6 = 16;
			iVar7 = 13;
			break;
		
		case 57:
			StringCopy(&Var2, "SPEC_P1_15_14", 16);
			iVar6 = 16;
			iVar7 = 14;
			break;
		
		case 58:
			StringCopy(&Var2, "SPEC_P1_15_15", 16);
			iVar6 = 16;
			iVar7 = 15;
			break;
		
		case 59:
			StringCopy(&Var2, "SPEC_P1_15_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			break;
		
		case 60:
			StringCopy(&Var2, "SPEC_P1_15_1", 16);
			iVar6 = 17;
			iVar7 = 1;
			break;
		
		case 61:
			StringCopy(&Var2, "SPEC_P1_15_2", 16);
			iVar6 = 17;
			iVar7 = 2;
			break;
		
		case 62:
			StringCopy(&Var2, "SPEC_P1_15_3", 16);
			iVar6 = 17;
			iVar7 = 3;
			break;
		
		case 63:
			StringCopy(&Var2, "SPEC_P1_15_4", 16);
			iVar6 = 17;
			iVar7 = 4;
			break;
		
		case 64:
			StringCopy(&Var2, "SPEC_P1_15_5", 16);
			iVar6 = 17;
			iVar7 = 5;
			break;
		
		case 65:
			StringCopy(&Var2, "SPEC_P1_15_6", 16);
			iVar6 = 17;
			iVar7 = 6;
			break;
		
		case 66:
			StringCopy(&Var2, "SPEC_P1_15_7", 16);
			iVar6 = 17;
			iVar7 = 7;
			break;
		
		case 67:
			StringCopy(&Var2, "SPEC_P1_15_8", 16);
			iVar6 = 17;
			iVar7 = 8;
			break;
		
		case 68:
			StringCopy(&Var2, "SPEC_P1_15_9", 16);
			iVar6 = 17;
			iVar7 = 9;
			break;
		
		case 69:
			StringCopy(&Var2, "SPEC_P1_15_10", 16);
			iVar6 = 17;
			iVar7 = 10;
			break;
		
		case 70:
			StringCopy(&Var2, "SPEC_P1_15_11", 16);
			iVar6 = 17;
			iVar7 = 11;
			break;
		
		case 71:
			StringCopy(&Var2, "SPEC_P1_15_12", 16);
			iVar6 = 17;
			iVar7 = 12;
			break;
		
		case 72:
			StringCopy(&Var2, "SPEC_P1_15_13", 16);
			iVar6 = 17;
			iVar7 = 13;
			break;
		
		case 73:
			StringCopy(&Var2, "SPEC_P1_15_14", 16);
			iVar6 = 17;
			iVar7 = 14;
			break;
		
		case 74:
			StringCopy(&Var2, "SPEC_P1_15_15", 16);
			iVar6 = 17;
			iVar7 = 15;
			break;
		
		case 75:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 18;
			iVar7 = 0;
			break;
		
		case 76:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 19;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 77);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_56(int iParam0)//Position - 0xDE64
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 5;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 7);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_57(int iParam0)//Position - 0xDF73
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 6;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "FEET_P1_00_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "FEET_P1_00_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar1 = 80;
			break;
		
		case 2:
			StringCopy(&Var2, "FEET_P1_00_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 80;
			break;
		
		case 3:
			StringCopy(&Var2, "FEET_P1_00_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 89;
			break;
		
		case 4:
			StringCopy(&Var2, "FEET_P1_00_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			iVar1 = 45;
			break;
		
		case 5:
			StringCopy(&Var2, "FEET_P1_00_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			iVar1 = 35;
			break;
		
		case 6:
			StringCopy(&Var2, "FEET_P1_00_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			iVar1 = 89;
			break;
		
		case 7:
			StringCopy(&Var2, "FEET_P1_00_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			iVar1 = 95;
			break;
		
		case 8:
			StringCopy(&Var2, "FEET_P1_00_8", 16);
			iVar6 = 0;
			iVar7 = 8;
			iVar1 = 115;
			break;
		
		case 9:
			StringCopy(&Var2, "FEET_P1_00_9", 16);
			iVar6 = 0;
			iVar7 = 9;
			iVar1 = 40;
			break;
		
		case 10:
			StringCopy(&Var2, "FEET_P1_00_10", 16);
			iVar6 = 0;
			iVar7 = 10;
			iVar1 = 145;
			break;
		
		case 11:
			StringCopy(&Var2, "FEET_P1_00_11", 16);
			iVar6 = 0;
			iVar7 = 11;
			iVar1 = 145;
			break;
		
		case 12:
			StringCopy(&Var2, "FEET_P1_01_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 18:
			StringCopy(&Var2, "FEET_P1_06_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "FEET_P1_06_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar1 = 180;
			break;
		
		case 20:
			StringCopy(&Var2, "FEET_P1_06_2", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar1 = 80;
			break;
		
		case 21:
			StringCopy(&Var2, "FEET_P1_06_3", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar1 = 200;
			break;
		
		case 22:
			StringCopy(&Var2, "FEET_P1_06_4", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar1 = 220;
			break;
		
		case 23:
			StringCopy(&Var2, "FEET_P1_06_5", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar1 = 235;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 25:
			StringCopy(&Var2, "FEET_P1_08_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar1 = 870;
			break;
		
		case 26:
			StringCopy(&Var2, "FEET_P1_08_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 870;
			break;
		
		case 27:
			StringCopy(&Var2, "FEET_P1_08_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 870;
			break;
		
		case 28:
			StringCopy(&Var2, "FEET_P1_08_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 1275;
			break;
		
		case 29:
			StringCopy(&Var2, "FEET_P1_08_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 1275;
			break;
		
		case 30:
			StringCopy(&Var2, "FEET_P1_08_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 1275;
			break;
		
		case 31:
			StringCopy(&Var2, "FEET_P1_08_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 1275;
			break;
		
		case 32:
			StringCopy(&Var2, "FEET_P1_08_7", 16);
			iVar6 = 8;
			iVar7 = 7;
			iVar1 = 1275;
			break;
		
		case 33:
			StringCopy(&Var2, "FEET_P1_08_8", 16);
			iVar6 = 8;
			iVar7 = 8;
			iVar1 = 1275;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 35:
			StringCopy(&Var2, "FEET_P1_10_0", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 36:
			StringCopy(&Var2, "FEET_P1_11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			break;
		
		case 37:
			StringCopy(&Var2, "FEET_P1_11_1", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar1 = 50;
			break;
		
		case 38:
			StringCopy(&Var2, "FEET_P1_11_2", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar1 = 50;
			break;
		
		case 39:
			StringCopy(&Var2, "FEET_P1_11_3", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar1 = 50;
			break;
		
		case 40:
			StringCopy(&Var2, "FEET_P1_11_4", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar1 = 50;
			break;
		
		case 41:
			StringCopy(&Var2, "FEET_P1_11_5", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar1 = 50;
			break;
		
		case 42:
			StringCopy(&Var2, "FEET_P1_11_6", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar1 = 50;
			break;
		
		case 43:
			StringCopy(&Var2, "FEET_P1_11_7", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar1 = 50;
			break;
		
		case 44:
			StringCopy(&Var2, "FEET_P1_11_8", 16);
			iVar6 = 11;
			iVar7 = 8;
			iVar1 = 50;
			break;
		
		case 45:
			StringCopy(&Var2, "FEET_P1_11_9", 16);
			iVar6 = 11;
			iVar7 = 9;
			iVar1 = 50;
			break;
		
		case 46:
			StringCopy(&Var2, "FEET_P1_11_10", 16);
			iVar6 = 11;
			iVar7 = 10;
			iVar1 = 50;
			break;
		
		case 47:
			StringCopy(&Var2, "FEET_P1_11_11", 16);
			iVar6 = 11;
			iVar7 = 11;
			iVar1 = 50;
			break;
		
		case 48:
			StringCopy(&Var2, "FEET_P1_11_12", 16);
			iVar6 = 11;
			iVar7 = 12;
			iVar1 = 50;
			break;
		
		case 49:
			StringCopy(&Var2, "FEET_P1_11_13", 16);
			iVar6 = 11;
			iVar7 = 13;
			iVar1 = 50;
			break;
		
		case 50:
			StringCopy(&Var2, "FEET_P1_11_14", 16);
			iVar6 = 11;
			iVar7 = 14;
			iVar1 = 50;
			break;
		
		case 51:
			StringCopy(&Var2, "FEET_P1_11_15", 16);
			iVar6 = 11;
			iVar7 = 15;
			iVar1 = 50;
			break;
		
		case 52:
			StringCopy(&Var2, "FEET_P1_12_0", 16);
			iVar6 = 12;
			iVar7 = 0;
			break;
		
		case 53:
			StringCopy(&Var2, "FEET_P1_12_1", 16);
			iVar6 = 12;
			iVar7 = 1;
			iVar1 = 25;
			break;
		
		case 54:
			StringCopy(&Var2, "FEET_P1_12_2", 16);
			iVar6 = 12;
			iVar7 = 2;
			iVar1 = 20;
			break;
		
		case 55:
			StringCopy(&Var2, "FEET_P1_12_3", 16);
			iVar6 = 12;
			iVar7 = 3;
			iVar1 = 24;
			break;
		
		case 56:
			StringCopy(&Var2, "FEET_P1_12_4", 16);
			iVar6 = 12;
			iVar7 = 4;
			iVar1 = 25;
			break;
		
		case 57:
			StringCopy(&Var2, "FEET_P1_12_5", 16);
			iVar6 = 12;
			iVar7 = 5;
			iVar1 = 27;
			break;
		
		case 58:
			StringCopy(&Var2, "FEET_P1_12_6", 16);
			iVar6 = 12;
			iVar7 = 6;
			iVar1 = 29;
			break;
		
		case 59:
			StringCopy(&Var2, "FEET_P1_12_7", 16);
			iVar6 = 12;
			iVar7 = 7;
			iVar1 = 27;
			break;
		
		case 60:
			StringCopy(&Var2, "FEET_P1_12_8", 16);
			iVar6 = 12;
			iVar7 = 8;
			iVar1 = 25;
			break;
		
		case 61:
			StringCopy(&Var2, "FEET_P1_12_9", 16);
			iVar6 = 12;
			iVar7 = 9;
			iVar1 = 30;
			break;
		
		case 62:
			StringCopy(&Var2, "FEET_P1_12_10", 16);
			iVar6 = 12;
			iVar7 = 10;
			iVar1 = 28;
			break;
		
		case 63:
			StringCopy(&Var2, "FEET_P1_12_11", 16);
			iVar6 = 12;
			iVar7 = 11;
			iVar1 = 30;
			break;
		
		case 64:
			StringCopy(&Var2, "FEET_P1_13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 65:
			StringCopy(&Var2, "FEET_P1_14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar1 = 155;
			break;
		
		case 66:
			StringCopy(&Var2, "FEET_P1_14_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 155;
			break;
		
		case 67:
			StringCopy(&Var2, "FEET_P1_14_2", 16);
			iVar6 = 14;
			iVar7 = 2;
			iVar1 = 165;
			break;
		
		case 68:
			StringCopy(&Var2, "FEET_P1_14_3", 16);
			iVar6 = 14;
			iVar7 = 3;
			iVar1 = 170;
			break;
		
		case 69:
			StringCopy(&Var2, "FEET_P1_14_4", 16);
			iVar6 = 14;
			iVar7 = 4;
			iVar1 = 160;
			break;
		
		case 70:
			StringCopy(&Var2, "FEET_P1_14_5", 16);
			iVar6 = 14;
			iVar7 = 5;
			iVar1 = 165;
			break;
		
		case 71:
			StringCopy(&Var2, "FEET_P1_14_6", 16);
			iVar6 = 14;
			iVar7 = 6;
			iVar1 = 170;
			break;
		
		case 72:
			StringCopy(&Var2, "FEET_P1_14_7", 16);
			iVar6 = 14;
			iVar7 = 7;
			iVar1 = 160;
			break;
		
		case 73:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 15;
			iVar7 = 0;
			break;
		
		case 74:
			StringCopy(&Var2, "FEET_P1_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar1 = 720;
			break;
		
		case 75:
			StringCopy(&Var2, "FEET_P1_16_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar1 = 680;
			break;
		
		case 76:
			StringCopy(&Var2, "FEET_P1_16_2", 16);
			iVar6 = 16;
			iVar7 = 2;
			iVar1 = 650;
			break;
		
		case 77:
			StringCopy(&Var2, "FEET_P1_16_3", 16);
			iVar6 = 16;
			iVar7 = 3;
			iVar1 = 670;
			break;
		
		case 78:
			StringCopy(&Var2, "FEET_P1_16_4", 16);
			iVar6 = 16;
			iVar7 = 4;
			iVar1 = 700;
			break;
		
		case 79:
			StringCopy(&Var2, "FEET_P1_16_5", 16);
			iVar6 = 16;
			iVar7 = 5;
			iVar1 = 680;
			break;
		
		case 80:
			StringCopy(&Var2, "FEET_P1_16_6", 16);
			iVar6 = 16;
			iVar7 = 6;
			iVar1 = 720;
			break;
		
		case 81:
			StringCopy(&Var2, "FEET_P1_16_7", 16);
			iVar6 = 16;
			iVar7 = 7;
			iVar1 = 740;
			break;
		
		case 82:
			StringCopy(&Var2, "FEET_P1_16_8", 16);
			iVar6 = 16;
			iVar7 = 8;
			iVar1 = 760;
			break;
		
		case 83:
			StringCopy(&Var2, "FEET_P1_16_9", 16);
			iVar6 = 16;
			iVar7 = 9;
			iVar1 = 780;
			break;
		
		case 84:
			StringCopy(&Var2, "FEET_P1_16_10", 16);
			iVar6 = 16;
			iVar7 = 10;
			iVar1 = 750;
			break;
		
		case 85:
			StringCopy(&Var2, "FEET_P1_16_11", 16);
			iVar6 = 16;
			iVar7 = 11;
			iVar1 = 700;
			break;
		
		case 86:
			StringCopy(&Var2, "FEET_P1_17_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar1 = 790;
			break;
		
		case 87:
			StringCopy(&Var2, "FEET_P1_17_1", 16);
			iVar6 = 17;
			iVar7 = 1;
			iVar1 = 750;
			break;
		
		case 88:
			StringCopy(&Var2, "FEET_P1_17_2", 16);
			iVar6 = 17;
			iVar7 = 2;
			iVar1 = 860;
			break;
		
		case 89:
			StringCopy(&Var2, "FEET_P1_17_3", 16);
			iVar6 = 17;
			iVar7 = 3;
			iVar1 = 750;
			break;
		
		case 90:
			StringCopy(&Var2, "FEET_P1_17_4", 16);
			iVar6 = 17;
			iVar7 = 4;
			iVar1 = 790;
			break;
		
		case 91:
			StringCopy(&Var2, "FEET_P1_17_5", 16);
			iVar6 = 17;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 92:
			StringCopy(&Var2, "FEET_P1_17_6", 16);
			iVar6 = 17;
			iVar7 = 6;
			iVar1 = 820;
			break;
		
		case 93:
			StringCopy(&Var2, "FEET_P1_17_7", 16);
			iVar6 = 17;
			iVar7 = 7;
			iVar1 = 800;
			break;
		
		case 94:
			StringCopy(&Var2, "FEET_P1_17_8", 16);
			iVar6 = 17;
			iVar7 = 8;
			iVar1 = 850;
			break;
		
		case 95:
			StringCopy(&Var2, "FEET_P1_17_9", 16);
			iVar6 = 17;
			iVar7 = 9;
			iVar1 = 870;
			break;
		
		case 96:
			StringCopy(&Var2, "FEET_P1_17_10", 16);
			iVar6 = 17;
			iVar7 = 10;
			iVar1 = 720;
			break;
		
		case 97:
			StringCopy(&Var2, "FEET_P1_17_11", 16);
			iVar6 = 17;
			iVar7 = 11;
			iVar1 = 740;
			break;
		
		case 98:
			StringCopy(&Var2, "FEET_P1_17_12", 16);
			iVar6 = 17;
			iVar7 = 12;
			iVar1 = 800;
			break;
		
		case 99:
			StringCopy(&Var2, "FEET_P1_17_13", 16);
			iVar6 = 17;
			iVar7 = 13;
			iVar1 = 750;
			break;
		
		case 100:
			StringCopy(&Var2, "FEET_P1_17_14", 16);
			iVar6 = 17;
			iVar7 = 14;
			iVar1 = 770;
			break;
		
		case 101:
			StringCopy(&Var2, "FEET_P1_17_15", 16);
			iVar6 = 17;
			iVar7 = 15;
			iVar1 = 860;
			break;
		
		case 102:
			StringCopy(&Var2, "FEET_P1_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar1 = 850;
			break;
		
		case 103:
			StringCopy(&Var2, "FEET_P1_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 800;
			break;
		
		case 104:
			StringCopy(&Var2, "FEET_P1_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 780;
			break;
		
		case 105:
			StringCopy(&Var2, "FEET_P1_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 890;
			break;
		
		case 106:
			StringCopy(&Var2, "FEET_P1_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar1 = 820;
			break;
		
		case 107:
			StringCopy(&Var2, "FEET_P1_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 108:
			StringCopy(&Var2, "FEET_P1_18_6", 16);
			iVar6 = 18;
			iVar7 = 6;
			iVar1 = 870;
			break;
		
		case 109:
			StringCopy(&Var2, "FEET_P1_18_7", 16);
			iVar6 = 18;
			iVar7 = 7;
			iVar1 = 930;
			break;
		
		case 110:
			StringCopy(&Var2, "FEET_P1_18_8", 16);
			iVar6 = 18;
			iVar7 = 8;
			iVar1 = 880;
			break;
		
		case 111:
			StringCopy(&Var2, "FEET_P1_18_9", 16);
			iVar6 = 18;
			iVar7 = 9;
			iVar1 = 900;
			break;
		
		case 112:
			StringCopy(&Var2, "FEET_P1_18_10", 16);
			iVar6 = 18;
			iVar7 = 10;
			iVar1 = 920;
			break;
		
		case 113:
			StringCopy(&Var2, "FEET_P1_18_11", 16);
			iVar6 = 18;
			iVar7 = 11;
			iVar1 = 970;
			break;
		
		case 114:
			StringCopy(&Var2, "FEET_P1_18_12", 16);
			iVar6 = 18;
			iVar7 = 12;
			iVar1 = 990;
			break;
		
		case 115:
			StringCopy(&Var2, "FEET_P1_18_13", 16);
			iVar6 = 18;
			iVar7 = 13;
			iVar1 = 960;
			break;
		
		case 116:
			StringCopy(&Var2, "FEET_P1_18_14", 16);
			iVar6 = 18;
			iVar7 = 14;
			iVar1 = 980;
			break;
		
		case 117:
			StringCopy(&Var2, "FEET_P1_18_15", 16);
			iVar6 = 18;
			iVar7 = 15;
			iVar1 = 950;
			break;
		
		case 118:
			StringCopy(&Var2, "FEET_P1_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 110;
			break;
		
		case 119:
			StringCopy(&Var2, "FEET_P1_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 115;
			break;
		
		case 120:
			StringCopy(&Var2, "FEET_P1_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 120;
			break;
		
		case 121:
			StringCopy(&Var2, "FEET_P1_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 110;
			break;
		
		case 122:
			StringCopy(&Var2, "FEET_P1_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 125;
			break;
		
		case 123:
			StringCopy(&Var2, "FEET_P1_19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 128;
			break;
		
		case 124:
			StringCopy(&Var2, "FEET_P1_19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 135;
			break;
		
		case 125:
			StringCopy(&Var2, "FEET_P1_19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 130;
			break;
		
		case 126:
			StringCopy(&Var2, "FEET_P1_19_8", 16);
			iVar6 = 19;
			iVar7 = 8;
			iVar1 = 145;
			break;
		
		case 127:
			StringCopy(&Var2, "FEET_P1_19_9", 16);
			iVar6 = 19;
			iVar7 = 9;
			iVar1 = 110;
			break;
		
		case 128:
			StringCopy(&Var2, "FEET_P1_19_10", 16);
			iVar6 = 19;
			iVar7 = 10;
			iVar1 = 120;
			break;
		
		case 129:
			StringCopy(&Var2, "FEET_P1_19_11", 16);
			iVar6 = 19;
			iVar7 = 11;
			iVar1 = 150;
			break;
		
		case 130:
			StringCopy(&Var2, "FEET_P1_19_12", 16);
			iVar6 = 19;
			iVar7 = 12;
			iVar1 = 125;
			break;
		
		case 131:
			StringCopy(&Var2, "FEET_P1_19_13", 16);
			iVar6 = 19;
			iVar7 = 13;
			iVar1 = 120;
			break;
		
		case 132:
			StringCopy(&Var2, "FEET_P1_19_14", 16);
			iVar6 = 19;
			iVar7 = 14;
			iVar1 = 130;
			break;
		
		case 133:
			StringCopy(&Var2, "FEET_P1_19_15", 16);
			iVar6 = 19;
			iVar7 = 15;
			iVar1 = 110;
			break;
		
		default:
			func_29(iVar10, iParam0, 134);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_58(int iParam0)//Position - 0xEE9D
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 4;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "LEGS_P1_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "LEGS_P1_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar1 = 32;
			break;
		
		case 2:
			StringCopy(&Var2, "LEGS_P1_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 38;
			break;
		
		case 3:
			StringCopy(&Var2, "LEGS_P1_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 44;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 2;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 3;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 4;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 5;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "LEGS_P1_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "LEGS_P1_6_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 15:
			StringCopy(&Var2, "LEGS_P1_6_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar1 = 690;
			break;
		
		case 16:
			StringCopy(&Var2, "LEGS_P1_6_2", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar1 = 720;
			break;
		
		case 17:
			StringCopy(&Var2, "LEGS_P1_6_3", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar1 = 850;
			break;
		
		case 18:
			StringCopy(&Var2, "LEGS_P1_6_4", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar1 = 850;
			break;
		
		case 19:
			StringCopy(&Var2, "LEGS_P1_6_5", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar1 = 740;
			break;
		
		case 20:
			StringCopy(&Var2, "LEGS_P1_6_6", 16);
			iVar6 = 6;
			iVar7 = 6;
			iVar1 = 750;
			break;
		
		case 21:
			StringCopy(&Var2, "LEGS_P1_6_7", 16);
			iVar6 = 6;
			iVar7 = 7;
			iVar1 = 790;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 24:
			StringCopy(&Var2, "LEGS_P1_8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 25:
			StringCopy(&Var2, "LEGS_P1_8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 145;
			break;
		
		case 26:
			StringCopy(&Var2, "LEGS_P1_8_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 140;
			break;
		
		case 27:
			StringCopy(&Var2, "LEGS_P1_8_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 148;
			break;
		
		case 28:
			StringCopy(&Var2, "LEGS_P1_8_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 150;
			break;
		
		case 29:
			StringCopy(&Var2, "LEGS_P1_8_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 154;
			break;
		
		case 30:
			StringCopy(&Var2, "LEGS_P1_8_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 158;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 33:
			StringCopy(&Var2, "LEGS_P1_11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar1 = 820;
			break;
		
		case 34:
			StringCopy(&Var2, "LEGS_P1_11_1", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar1 = 820;
			break;
		
		case 35:
			StringCopy(&Var2, "LEGS_P1_11_2", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar1 = 850;
			break;
		
		case 36:
			StringCopy(&Var2, "LEGS_P1_11_3", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar1 = 850;
			break;
		
		case 37:
			StringCopy(&Var2, "LEGS_P1_11_4", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar1 = 920;
			break;
		
		case 38:
			StringCopy(&Var2, "LEGS_P1_11_5", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar1 = 950;
			break;
		
		case 39:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			break;
		
		case 40:
			StringCopy(&Var2, "LEGS_P1_13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			break;
		
		case 41:
			StringCopy(&Var2, "LEGS_P1_13_1", 16);
			iVar6 = 13;
			iVar7 = 1;
			iVar1 = 45;
			break;
		
		case 42:
			StringCopy(&Var2, "LEGS_P1_13_2", 16);
			iVar6 = 13;
			iVar7 = 2;
			iVar1 = 48;
			break;
		
		case 43:
			StringCopy(&Var2, "LEGS_P1_13_3", 16);
			iVar6 = 13;
			iVar7 = 3;
			iVar1 = 45;
			break;
		
		case 44:
			StringCopy(&Var2, "LEGS_P1_13_4", 16);
			iVar6 = 13;
			iVar7 = 4;
			iVar1 = 48;
			break;
		
		case 45:
			StringCopy(&Var2, "LEGS_P1_13_5", 16);
			iVar6 = 13;
			iVar7 = 5;
			iVar1 = 52;
			break;
		
		case 46:
			StringCopy(&Var2, "LEGS_P1_13_6", 16);
			iVar6 = 13;
			iVar7 = 6;
			iVar1 = 55;
			break;
		
		case 47:
			StringCopy(&Var2, "LEGS_P1_13_7", 16);
			iVar6 = 13;
			iVar7 = 7;
			iVar1 = 58;
			break;
		
		case 48:
			StringCopy(&Var2, "LEGS_P1_13_8", 16);
			iVar6 = 13;
			iVar7 = 8;
			iVar1 = 60;
			break;
		
		case 49:
			StringCopy(&Var2, "LEGS_P1_13_9", 16);
			iVar6 = 13;
			iVar7 = 9;
			iVar1 = 58;
			break;
		
		case 50:
			StringCopy(&Var2, "LEGS_P1_13_10", 16);
			iVar6 = 13;
			iVar7 = 10;
			iVar1 = 62;
			break;
		
		case 51:
			StringCopy(&Var2, "LEGS_P1_13_11", 16);
			iVar6 = 13;
			iVar7 = 11;
			iVar1 = 65;
			break;
		
		case 52:
			StringCopy(&Var2, "LEGS_P1_14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			break;
		
		case 53:
			StringCopy(&Var2, "LEGS_P1_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			break;
		
		case 54:
			StringCopy(&Var2, "LEGS_P1_15_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			break;
		
		case 55:
			StringCopy(&Var2, "LEGS_P1_15_2", 16);
			iVar6 = 15;
			iVar7 = 2;
			break;
		
		case 56:
			StringCopy(&Var2, "LEGS_P1_15_3", 16);
			iVar6 = 15;
			iVar7 = 3;
			break;
		
		case 57:
			StringCopy(&Var2, "LEGS_P1_15_4", 16);
			iVar6 = 15;
			iVar7 = 4;
			break;
		
		case 58:
			StringCopy(&Var2, "LEGS_P1_15_5", 16);
			iVar6 = 15;
			iVar7 = 5;
			break;
		
		case 59:
			StringCopy(&Var2, "LEGS_P1_15_6", 16);
			iVar6 = 15;
			iVar7 = 6;
			break;
		
		case 60:
			StringCopy(&Var2, "LEGS_P1_15_7", 16);
			iVar6 = 15;
			iVar7 = 7;
			break;
		
		case 61:
			StringCopy(&Var2, "LEGS_P1_15_8", 16);
			iVar6 = 15;
			iVar7 = 8;
			break;
		
		case 62:
			StringCopy(&Var2, "LEGS_P1_15_9", 16);
			iVar6 = 15;
			iVar7 = 9;
			break;
		
		case 63:
			StringCopy(&Var2, "LEGS_P1_15_10", 16);
			iVar6 = 15;
			iVar7 = 10;
			break;
		
		case 64:
			StringCopy(&Var2, "LEGS_P1_15_11", 16);
			iVar6 = 15;
			iVar7 = 11;
			break;
		
		case 65:
			StringCopy(&Var2, "LEGS_P1_15_12", 16);
			iVar6 = 15;
			iVar7 = 12;
			break;
		
		case 66:
			StringCopy(&Var2, "LEGS_P1_15_13", 16);
			iVar6 = 15;
			iVar7 = 13;
			break;
		
		case 67:
			StringCopy(&Var2, "LEGS_P1_15_14", 16);
			iVar6 = 15;
			iVar7 = 14;
			break;
		
		case 68:
			StringCopy(&Var2, "LEGS_P1_15_15", 16);
			iVar6 = 15;
			iVar7 = 15;
			break;
		
		case 69:
			StringCopy(&Var2, "LEGS_P1_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 70:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 71:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 72:
			StringCopy(&Var2, "LEGS_P1_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			break;
		
		case 73:
			StringCopy(&Var2, "LEGS_P1_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 160;
			break;
		
		case 74:
			StringCopy(&Var2, "LEGS_P1_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 180;
			break;
		
		case 75:
			StringCopy(&Var2, "LEGS_P1_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 180;
			break;
		
		case 76:
			StringCopy(&Var2, "LEGS_P1_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			break;
		
		case 77:
			StringCopy(&Var2, "LEGS_P1_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			break;
		
		case 78:
			StringCopy(&Var2, "LEGS_P1_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 79:
			StringCopy(&Var2, "LEGS_P1_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 118;
			break;
		
		case 80:
			StringCopy(&Var2, "LEGS_P1_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 120;
			break;
		
		case 81:
			StringCopy(&Var2, "LEGS_P1_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 128;
			break;
		
		case 82:
			StringCopy(&Var2, "LEGS_P1_20_3", 16);
			iVar6 = 20;
			iVar7 = 3;
			iVar1 = 128;
			break;
		
		case 83:
			StringCopy(&Var2, "LEGS_P1_20_4", 16);
			iVar6 = 20;
			iVar7 = 4;
			iVar1 = 130;
			break;
		
		case 84:
			StringCopy(&Var2, "LEGS_P1_20_5", 16);
			iVar6 = 20;
			iVar7 = 5;
			iVar1 = 145;
			break;
		
		case 85:
			StringCopy(&Var2, "LEGS_P1_20_6", 16);
			iVar6 = 20;
			iVar7 = 6;
			iVar1 = 138;
			break;
		
		case 86:
			StringCopy(&Var2, "LEGS_P1_20_7", 16);
			iVar6 = 20;
			iVar7 = 7;
			iVar1 = 132;
			break;
		
		case 87:
			StringCopy(&Var2, "LEGS_P1_20_8", 16);
			iVar6 = 20;
			iVar7 = 8;
			iVar1 = 148;
			break;
		
		case 88:
			StringCopy(&Var2, "LEGS_P1_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 118;
			break;
		
		case 89:
			StringCopy(&Var2, "LEGS_P1_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 118;
			break;
		
		case 90:
			StringCopy(&Var2, "LEGS_P1_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 118;
			break;
		
		case 91:
			StringCopy(&Var2, "LEGS_P1_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 129;
			break;
		
		case 92:
			StringCopy(&Var2, "LEGS_P1_21_4", 16);
			iVar6 = 21;
			iVar7 = 4;
			iVar1 = 135;
			break;
		
		case 93:
			StringCopy(&Var2, "LEGS_P1_21_5", 16);
			iVar6 = 21;
			iVar7 = 5;
			iVar1 = 135;
			break;
		
		case 94:
			StringCopy(&Var2, "LEGS_P1_21_6", 16);
			iVar6 = 21;
			iVar7 = 6;
			iVar1 = 118;
			break;
		
		case 95:
			StringCopy(&Var2, "LEGS_P1_21_7", 16);
			iVar6 = 21;
			iVar7 = 7;
			iVar1 = 118;
			break;
		
		case 96:
			StringCopy(&Var2, "LEGS_P1_21_8", 16);
			iVar6 = 21;
			iVar7 = 8;
			iVar1 = 118;
			break;
		
		case 97:
			StringCopy(&Var2, "LEGS_P1_22_0", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar1 = 55;
			break;
		
		case 98:
			StringCopy(&Var2, "LEGS_P1_22_1", 16);
			iVar6 = 22;
			iVar7 = 1;
			iVar1 = 55;
			break;
		
		case 99:
			StringCopy(&Var2, "LEGS_P1_22_2", 16);
			iVar6 = 22;
			iVar7 = 2;
			iVar1 = 59;
			break;
		
		case 100:
			StringCopy(&Var2, "LEGS_P1_22_3", 16);
			iVar6 = 22;
			iVar7 = 3;
			iVar1 = 59;
			break;
		
		case 101:
			StringCopy(&Var2, "LEGS_P1_22_4", 16);
			iVar6 = 22;
			iVar7 = 4;
			iVar1 = 65;
			break;
		
		case 102:
			StringCopy(&Var2, "LEGS_P1_22_5", 16);
			iVar6 = 22;
			iVar7 = 5;
			iVar1 = 65;
			break;
		
		case 103:
			StringCopy(&Var2, "LEGS_P1_22_6", 16);
			iVar6 = 22;
			iVar7 = 6;
			iVar1 = 69;
			break;
		
		case 104:
			StringCopy(&Var2, "LEGS_P1_22_7", 16);
			iVar6 = 22;
			iVar7 = 7;
			iVar1 = 69;
			break;
		
		case 105:
			StringCopy(&Var2, "LEGS_P1_22_8", 16);
			iVar6 = 22;
			iVar7 = 8;
			iVar1 = 75;
			break;
		
		case 106:
			StringCopy(&Var2, "LEGS_P1_22_9", 16);
			iVar6 = 22;
			iVar7 = 9;
			iVar1 = 75;
			break;
		
		case 107:
			StringCopy(&Var2, "LEGS_P1_22_10", 16);
			iVar6 = 22;
			iVar7 = 10;
			iVar1 = 65;
			break;
		
		case 108:
			StringCopy(&Var2, "LEGS_P1_22_11", 16);
			iVar6 = 22;
			iVar7 = 11;
			iVar1 = 65;
			break;
		
		case 109:
			StringCopy(&Var2, "LEGS_P1_22_12", 16);
			iVar6 = 22;
			iVar7 = 12;
			iVar1 = 65;
			break;
		
		case 110:
			StringCopy(&Var2, "LEGS_P1_22_13", 16);
			iVar6 = 22;
			iVar7 = 13;
			iVar1 = 65;
			break;
		
		case 111:
			StringCopy(&Var2, "LEGS_P1_23_0", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar1 = 38;
			break;
		
		case 112:
			StringCopy(&Var2, "LEGS_P1_23_1", 16);
			iVar6 = 23;
			iVar7 = 1;
			iVar1 = 38;
			break;
		
		case 113:
			StringCopy(&Var2, "LEGS_P1_23_2", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar1 = 28;
			break;
		
		case 114:
			StringCopy(&Var2, "LEGS_P1_23_3", 16);
			iVar6 = 23;
			iVar7 = 3;
			iVar1 = 34;
			break;
		
		case 115:
			StringCopy(&Var2, "LEGS_P1_23_4", 16);
			iVar6 = 23;
			iVar7 = 4;
			iVar1 = 36;
			break;
		
		case 116:
			StringCopy(&Var2, "LEGS_P1_23_5", 16);
			iVar6 = 23;
			iVar7 = 5;
			iVar1 = 32;
			break;
		
		default:
			func_29(iVar10, iParam0, 117);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_59(int iParam0)//Position - 0xFB59
{
	if (iParam0 < 107)
	{
		func_62(iParam0);
	}
	else if (iParam0 < 227)
	{
		func_61(iParam0);
	}
	else
	{
		func_60(iParam0);
	}
	if (Global_69518[0 /*14*/].f_2 == -1)
	{
		func_29(3, iParam0, 318);
	}
}

void func_60(int iParam0)//Position - 0xFB9E
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 227:
			StringCopy(&Var2, "TORSO_P1_18_0", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar9 = 3;
			break;
		
		case 228:
			StringCopy(&Var2, "TORSO_P1_18_1", 16);
			iVar6 = 23;
			iVar7 = 1;
			iVar9 = 3;
			break;
		
		case 229:
			StringCopy(&Var2, "TORSO_P1_18_2", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar9 = 3;
			break;
		
		case 230:
			StringCopy(&Var2, "TORSO_P1_18_3", 16);
			iVar6 = 23;
			iVar7 = 3;
			iVar9 = 3;
			break;
		
		case 231:
			StringCopy(&Var2, "TORSO_P1_18_4", 16);
			iVar6 = 23;
			iVar7 = 4;
			iVar9 = 3;
			break;
		
		case 232:
			StringCopy(&Var2, "TORSO_P1_18_5", 16);
			iVar6 = 23;
			iVar7 = 5;
			iVar9 = 3;
			break;
		
		case 233:
			StringCopy(&Var2, "TORSO_P1_18_6", 16);
			iVar6 = 23;
			iVar7 = 6;
			iVar9 = 3;
			break;
		
		case 234:
			StringCopy(&Var2, "TORSO_P1_18_7", 16);
			iVar6 = 23;
			iVar7 = 7;
			iVar9 = 3;
			break;
		
		case 235:
			StringCopy(&Var2, "TORSO_P1_18_8", 16);
			iVar6 = 23;
			iVar7 = 8;
			iVar9 = 3;
			break;
		
		case 236:
			StringCopy(&Var2, "TORSO_P1_18_9", 16);
			iVar6 = 23;
			iVar7 = 9;
			iVar9 = 3;
			break;
		
		case 237:
			StringCopy(&Var2, "TORSO_P1_18_10", 16);
			iVar6 = 23;
			iVar7 = 10;
			iVar9 = 3;
			break;
		
		case 238:
			StringCopy(&Var2, "TORSO_P1_18_11", 16);
			iVar6 = 23;
			iVar7 = 11;
			iVar9 = 3;
			break;
		
		case 239:
			StringCopy(&Var2, "TORSO_P1_18_12", 16);
			iVar6 = 23;
			iVar7 = 12;
			iVar9 = 3;
			break;
		
		case 240:
			StringCopy(&Var2, "TORSO_P1_18_13", 16);
			iVar6 = 23;
			iVar7 = 13;
			iVar9 = 3;
			break;
		
		case 241:
			StringCopy(&Var2, "TORSO_P1_18_14", 16);
			iVar6 = 23;
			iVar7 = 14;
			iVar9 = 3;
			break;
		
		case 242:
			StringCopy(&Var2, "TORSO_P1_18_15", 16);
			iVar6 = 23;
			iVar7 = 15;
			iVar9 = 3;
			break;
		
		case 243:
			StringCopy(&Var2, "TORSO_P1_24_0", 16);
			iVar6 = 24;
			iVar7 = 0;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 244:
			StringCopy(&Var2, "TORSO_P1_24_1", 16);
			iVar6 = 24;
			iVar7 = 1;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 245:
			StringCopy(&Var2, "TORSO_P1_24_2", 16);
			iVar6 = 24;
			iVar7 = 2;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 246:
			StringCopy(&Var2, "TORSO_P1_24_3", 16);
			iVar6 = 24;
			iVar7 = 3;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 247:
			StringCopy(&Var2, "TORSO_P1_24_4", 16);
			iVar6 = 24;
			iVar7 = 4;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 248:
			StringCopy(&Var2, "TORSO_P1_24_5", 16);
			iVar6 = 24;
			iVar7 = 5;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 249:
			StringCopy(&Var2, "TORSO_P1_24_6", 16);
			iVar6 = 24;
			iVar7 = 6;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 250:
			StringCopy(&Var2, "TORSO_P1_24_7", 16);
			iVar6 = 24;
			iVar7 = 7;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 251:
			StringCopy(&Var2, "TORSO_P1_24_8", 16);
			iVar6 = 24;
			iVar7 = 8;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 252:
			StringCopy(&Var2, "TORSO_P1_24_9", 16);
			iVar6 = 24;
			iVar7 = 9;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 253:
			StringCopy(&Var2, "TORSO_P1_24_10", 16);
			iVar6 = 24;
			iVar7 = 10;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 254:
			StringCopy(&Var2, "TORSO_P1_24_11", 16);
			iVar6 = 24;
			iVar7 = 11;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 255:
			StringCopy(&Var2, "TORSO_P1_24_12", 16);
			iVar6 = 24;
			iVar7 = 12;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 256:
			StringCopy(&Var2, "TORSO_P1_24_13", 16);
			iVar6 = 24;
			iVar7 = 13;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 257:
			StringCopy(&Var2, "TORSO_P1_24_14", 16);
			iVar6 = 24;
			iVar7 = 14;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 258:
			StringCopy(&Var2, "TORSO_P1_24_15", 16);
			iVar6 = 24;
			iVar7 = 15;
			iVar1 = 2200;
			iVar9 = 3;
			break;
		
		case 259:
			StringCopy(&Var2, "TORSO_P1_25_0", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 3;
			break;
		
		case 260:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 0;
			iVar9 = 1;
			break;
		
		case 261:
			StringCopy(&Var2, "TORSO_P1_27_0", 16);
			iVar6 = 27;
			iVar7 = 0;
			iVar1 = 150;
			break;
		
		case 262:
			StringCopy(&Var2, "TORSO_P1_27_1", 16);
			iVar6 = 27;
			iVar7 = 1;
			iVar1 = 160;
			break;
		
		case 263:
			StringCopy(&Var2, "TORSO_P1_27_2", 16);
			iVar6 = 27;
			iVar7 = 2;
			iVar1 = 150;
			break;
		
		case 264:
			StringCopy(&Var2, "TORSO_P1_27_3", 16);
			iVar6 = 27;
			iVar7 = 3;
			iVar1 = 150;
			break;
		
		case 265:
			StringCopy(&Var2, "TORSO_P1_27_4", 16);
			iVar6 = 27;
			iVar7 = 4;
			iVar1 = 160;
			break;
		
		case 266:
			StringCopy(&Var2, "TORSO_P1_27_5", 16);
			iVar6 = 27;
			iVar7 = 5;
			iVar1 = 160;
			break;
		
		case 267:
			StringCopy(&Var2, "TORSO_P1_28_0", 16);
			iVar6 = 28;
			iVar7 = 0;
			iVar1 = 88;
			break;
		
		case 268:
			StringCopy(&Var2, "TORSO_P1_28_1", 16);
			iVar6 = 28;
			iVar7 = 1;
			iVar1 = 60;
			break;
		
		case 269:
			StringCopy(&Var2, "TORSO_P1_28_2", 16);
			iVar6 = 28;
			iVar7 = 2;
			iVar1 = 70;
			break;
		
		case 270:
			StringCopy(&Var2, "TORSO_P1_28_3", 16);
			iVar6 = 28;
			iVar7 = 3;
			iVar1 = 80;
			break;
		
		case 271:
			StringCopy(&Var2, "TORSO_P1_28_4", 16);
			iVar6 = 28;
			iVar7 = 4;
			iVar1 = 90;
			break;
		
		case 272:
			StringCopy(&Var2, "TORSO_P1_28_5", 16);
			iVar6 = 28;
			iVar7 = 5;
			iVar1 = 80;
			break;
		
		case 273:
			StringCopy(&Var2, "TORSO_P1_28_6", 16);
			iVar6 = 28;
			iVar7 = 6;
			iVar1 = 70;
			break;
		
		case 274:
			StringCopy(&Var2, "TORSO_P1_28_7", 16);
			iVar6 = 28;
			iVar7 = 7;
			iVar1 = 95;
			break;
		
		case 275:
			StringCopy(&Var2, "TORSO_P1_28_8", 16);
			iVar6 = 28;
			iVar7 = 8;
			iVar1 = 105;
			break;
		
		case 276:
			StringCopy(&Var2, "TORSO_P1_28_9", 16);
			iVar6 = 28;
			iVar7 = 9;
			iVar1 = 95;
			break;
		
		case 277:
			StringCopy(&Var2, "TORSO_P1_28_10", 16);
			iVar6 = 28;
			iVar7 = 10;
			iVar1 = 110;
			break;
		
		case 278:
			StringCopy(&Var2, "TORSO_P1_28_11", 16);
			iVar6 = 28;
			iVar7 = 11;
			iVar1 = 98;
			break;
		
		case 279:
			StringCopy(&Var2, "TORSO_P1_28_12", 16);
			iVar6 = 28;
			iVar7 = 12;
			iVar1 = 88;
			break;
		
		case 280:
			StringCopy(&Var2, "TORSO_P1_28_13", 16);
			iVar6 = 28;
			iVar7 = 13;
			iVar1 = 98;
			break;
		
		case 281:
			StringCopy(&Var2, "TORSO_P1_28_14", 16);
			iVar6 = 28;
			iVar7 = 14;
			iVar1 = 110;
			break;
		
		case 282:
			StringCopy(&Var2, "TORSO_P1_28_15", 16);
			iVar6 = 28;
			iVar7 = 15;
			iVar1 = 98;
			break;
		
		case 283:
			StringCopy(&Var2, "TORSO_P1_29_0", 16);
			iVar6 = 29;
			iVar7 = 0;
			iVar1 = 250;
			break;
		
		case 284:
			StringCopy(&Var2, "TORSO_P1_29_1", 16);
			iVar6 = 29;
			iVar7 = 1;
			iVar1 = 270;
			break;
		
		case 285:
			StringCopy(&Var2, "TORSO_P1_29_2", 16);
			iVar6 = 29;
			iVar7 = 2;
			iVar1 = 280;
			break;
		
		case 286:
			StringCopy(&Var2, "TORSO_P1_29_3", 16);
			iVar6 = 29;
			iVar7 = 3;
			iVar1 = 275;
			break;
		
		case 287:
			StringCopy(&Var2, "TORSO_P1_29_4", 16);
			iVar6 = 29;
			iVar7 = 4;
			iVar1 = 290;
			break;
		
		case 288:
			StringCopy(&Var2, "TORSO_P1_29_5", 16);
			iVar6 = 29;
			iVar7 = 5;
			iVar1 = 35;
			break;
		
		case 289:
			StringCopy(&Var2, "TORSO_P1_29_6", 16);
			iVar6 = 29;
			iVar7 = 6;
			iVar1 = 35;
			break;
		
		case 290:
			StringCopy(&Var2, "TORSO_P1_29_7", 16);
			iVar6 = 29;
			iVar7 = 7;
			iVar1 = 35;
			break;
		
		case 291:
			StringCopy(&Var2, "TORSO_P1_29_8", 16);
			iVar6 = 29;
			iVar7 = 8;
			iVar1 = 295;
			break;
		
		case 292:
			StringCopy(&Var2, "TORSO_P1_29_9", 16);
			iVar6 = 29;
			iVar7 = 9;
			iVar1 = 35;
			break;
		
		case 293:
			StringCopy(&Var2, "TORSO_P1_29_10", 16);
			iVar6 = 29;
			iVar7 = 10;
			iVar1 = 35;
			break;
		
		case 294:
			StringCopy(&Var2, "TORSO_P1_29_11", 16);
			iVar6 = 29;
			iVar7 = 11;
			iVar1 = 35;
			break;
		
		case 295:
			StringCopy(&Var2, "TORSO_P1_29_12", 16);
			iVar6 = 29;
			iVar7 = 12;
			break;
		
		case 296:
			StringCopy(&Var2, "TORSO_P1_30_0", 16);
			iVar6 = 30;
			iVar7 = 0;
			iVar1 = 1750;
			break;
		
		case 297:
			StringCopy(&Var2, "TORSO_P1_30_1", 16);
			iVar6 = 30;
			iVar7 = 1;
			iVar1 = 1920;
			break;
		
		case 298:
			StringCopy(&Var2, "TORSO_P1_30_2", 16);
			iVar6 = 30;
			iVar7 = 2;
			iVar1 = 1890;
			break;
		
		case 299:
			StringCopy(&Var2, "TORSO_P1_30_3", 16);
			iVar6 = 30;
			iVar7 = 3;
			iVar1 = 1850;
			break;
		
		case 300:
			StringCopy(&Var2, "TORSO_P1_30_4", 16);
			iVar6 = 30;
			iVar7 = 4;
			iVar1 = 1750;
			break;
		
		case 301:
			StringCopy(&Var2, "TORSO_P1_30_5", 16);
			iVar6 = 30;
			iVar7 = 5;
			iVar1 = 1990;
			break;
		
		case 302:
			StringCopy(&Var2, "TORSO_P1_30_6", 16);
			iVar6 = 30;
			iVar7 = 6;
			iVar1 = 1820;
			break;
		
		case 303:
			StringCopy(&Var2, "TORSO_P1_30_7", 16);
			iVar6 = 30;
			iVar7 = 7;
			iVar1 = 1990;
			break;
		
		case 304:
			StringCopy(&Var2, "TORSO_P1_30_8", 16);
			iVar6 = 30;
			iVar7 = 8;
			iVar1 = 1920;
			break;
		
		case 305:
			StringCopy(&Var2, "TORSO_P1_30_9", 16);
			iVar6 = 30;
			iVar7 = 9;
			iVar1 = 1850;
			break;
		
		case 306:
			StringCopy(&Var2, "TORSO_P1_30_10", 16);
			iVar6 = 30;
			iVar7 = 10;
			iVar1 = 1990;
			break;
		
		case 307:
			StringCopy(&Var2, "TORSO_P1_30_11", 16);
			iVar6 = 30;
			iVar7 = 11;
			iVar1 = 1790;
			break;
		
		case 308:
			StringCopy(&Var2, "TORSO_P1_30_12", 16);
			iVar6 = 30;
			iVar7 = 12;
			iVar1 = 1790;
			break;
		
		case 309:
			StringCopy(&Var2, "TORSO_P1_31_0", 16);
			iVar6 = 31;
			iVar7 = 0;
			iVar1 = 69;
			break;
		
		case 310:
			StringCopy(&Var2, "TORSO_P1_31_1", 16);
			iVar6 = 31;
			iVar7 = 1;
			iVar1 = 75;
			break;
		
		case 311:
			StringCopy(&Var2, "TORSO_P1_31_2", 16);
			iVar6 = 31;
			iVar7 = 2;
			iVar1 = 75;
			break;
		
		case 312:
			StringCopy(&Var2, "TORSO_P1_31_3", 16);
			iVar6 = 31;
			iVar7 = 3;
			iVar1 = 79;
			break;
		
		case 313:
			StringCopy(&Var2, "TORSO_P1_31_4", 16);
			iVar6 = 31;
			iVar7 = 4;
			iVar1 = 79;
			break;
		
		case 314:
			StringCopy(&Var2, "TORSO_P1_31_5", 16);
			iVar6 = 31;
			iVar7 = 5;
			iVar1 = 89;
			break;
		
		case 315:
			StringCopy(&Var2, "TORSO_P1_31_6", 16);
			iVar6 = 31;
			iVar7 = 6;
			iVar1 = 85;
			break;
		
		case 316:
			StringCopy(&Var2, "TORSO_P1_31_7", 16);
			iVar6 = 31;
			iVar7 = 7;
			iVar1 = 85;
			break;
		
		case 317:
			StringCopy(&Var2, "TORSO_P1_31_8", 16);
			iVar6 = 31;
			iVar7 = 8;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_61(int iParam0)//Position - 0x10645
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 107:
			StringCopy(&Var2, "TORSO_P1_12_0", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar1 = 195;
			break;
		
		case 108:
			StringCopy(&Var2, "TORSO_P1_12_1", 16);
			iVar6 = 12;
			iVar7 = 1;
			iVar1 = 420;
			break;
		
		case 109:
			StringCopy(&Var2, "TORSO_P1_12_2", 16);
			iVar6 = 12;
			iVar7 = 2;
			iVar1 = 390;
			break;
		
		case 110:
			StringCopy(&Var2, "TORSO_P1_12_3", 16);
			iVar6 = 12;
			iVar7 = 3;
			iVar1 = 450;
			break;
		
		case 111:
			StringCopy(&Var2, "TORSO_P1_12_4", 16);
			iVar6 = 12;
			iVar7 = 4;
			iVar1 = 400;
			break;
		
		case 112:
			StringCopy(&Var2, "TORSO_P1_12_5", 16);
			iVar6 = 12;
			iVar7 = 5;
			iVar1 = 390;
			break;
		
		case 113:
			StringCopy(&Var2, "TORSO_P1_12_6", 16);
			iVar6 = 12;
			iVar7 = 6;
			iVar1 = 570;
			break;
		
		case 114:
			StringCopy(&Var2, "TORSO_P1_12_7", 16);
			iVar6 = 12;
			iVar7 = 7;
			iVar1 = 390;
			break;
		
		case 115:
			StringCopy(&Var2, "TORSO_P1_12_8", 16);
			iVar6 = 12;
			iVar7 = 8;
			iVar1 = 470;
			break;
		
		case 116:
			StringCopy(&Var2, "TORSO_P1_12_9", 16);
			iVar6 = 12;
			iVar7 = 9;
			iVar1 = 390;
			break;
		
		case 117:
			StringCopy(&Var2, "TORSO_P1_12_10", 16);
			iVar6 = 12;
			iVar7 = 10;
			iVar1 = 520;
			break;
		
		case 118:
			StringCopy(&Var2, "TORSO_P1_12_11", 16);
			iVar6 = 12;
			iVar7 = 11;
			iVar1 = 490;
			break;
		
		case 119:
			StringCopy(&Var2, "TORSO_P1_12_12", 16);
			iVar6 = 12;
			iVar7 = 12;
			iVar1 = 490;
			break;
		
		case 120:
			StringCopy(&Var2, "TORSO_P1_12_13", 16);
			iVar6 = 12;
			iVar7 = 13;
			iVar1 = 590;
			break;
		
		case 121:
			StringCopy(&Var2, "TORSO_P1_12_14", 16);
			iVar6 = 12;
			iVar7 = 14;
			iVar1 = 560;
			break;
		
		case 122:
			StringCopy(&Var2, "TORSO_P1_12_15", 16);
			iVar6 = 12;
			iVar7 = 15;
			iVar1 = 520;
			break;
		
		case 123:
			StringCopy(&Var2, "TORSO_P1_13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			break;
		
		case 124:
			StringCopy(&Var2, "TORSO_P1_13_1", 16);
			iVar6 = 13;
			iVar7 = 1;
			break;
		
		case 125:
			StringCopy(&Var2, "TORSO_P1_13_2", 16);
			iVar6 = 13;
			iVar7 = 2;
			break;
		
		case 126:
			StringCopy(&Var2, "TORSO_P1_13_3", 16);
			iVar6 = 13;
			iVar7 = 3;
			iVar1 = 90;
			break;
		
		case 127:
			StringCopy(&Var2, "TORSO_P1_13_4", 16);
			iVar6 = 13;
			iVar7 = 4;
			iVar1 = 85;
			break;
		
		case 128:
			StringCopy(&Var2, "TORSO_P1_13_5", 16);
			iVar6 = 13;
			iVar7 = 5;
			iVar1 = 45;
			break;
		
		case 129:
			StringCopy(&Var2, "TORSO_P1_13_6", 16);
			iVar6 = 13;
			iVar7 = 6;
			iVar1 = 90;
			break;
		
		case 130:
			StringCopy(&Var2, "TORSO_P1_13_7", 16);
			iVar6 = 13;
			iVar7 = 7;
			iVar1 = 47;
			break;
		
		case 131:
			StringCopy(&Var2, "TORSO_P1_13_8", 16);
			iVar6 = 13;
			iVar7 = 8;
			iVar1 = 45;
			break;
		
		case 132:
			StringCopy(&Var2, "TORSO_P1_13_9", 16);
			iVar6 = 13;
			iVar7 = 9;
			iVar1 = 48;
			break;
		
		case 133:
			StringCopy(&Var2, "TORSO_P1_13_10", 16);
			iVar6 = 13;
			iVar7 = 10;
			iVar1 = 45;
			break;
		
		case 134:
			StringCopy(&Var2, "TORSO_P1_13_11", 16);
			iVar6 = 13;
			iVar7 = 11;
			iVar1 = 85;
			break;
		
		case 135:
			StringCopy(&Var2, "TORSO_P1_13_12", 16);
			iVar6 = 13;
			iVar7 = 12;
			iVar1 = 45;
			break;
		
		case 136:
			StringCopy(&Var2, "TORSO_P1_13_13", 16);
			iVar6 = 13;
			iVar7 = 13;
			iVar1 = 47;
			break;
		
		case 137:
			StringCopy(&Var2, "TORSO_P1_13_14", 16);
			iVar6 = 13;
			iVar7 = 14;
			iVar1 = 45;
			break;
		
		case 138:
			StringCopy(&Var2, "TORSO_P1_13_15", 16);
			iVar6 = 13;
			iVar7 = 15;
			iVar1 = 48;
			break;
		
		case 139:
			StringCopy(&Var2, "TORSO_P1_14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar1 = 290;
			break;
		
		case 140:
			StringCopy(&Var2, "TORSO_P1_14_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 290;
			break;
		
		case 141:
			StringCopy(&Var2, "TORSO_P1_14_2", 16);
			iVar6 = 14;
			iVar7 = 2;
			iVar1 = 290;
			break;
		
		case 142:
			StringCopy(&Var2, "TORSO_P1_14_3", 16);
			iVar6 = 14;
			iVar7 = 3;
			iVar1 = 290;
			break;
		
		case 143:
			StringCopy(&Var2, "TORSO_P1_14_4", 16);
			iVar6 = 14;
			iVar7 = 4;
			iVar1 = 290;
			break;
		
		case 144:
			StringCopy(&Var2, "TORSO_P1_14_5", 16);
			iVar6 = 14;
			iVar7 = 5;
			iVar1 = 290;
			break;
		
		case 145:
			StringCopy(&Var2, "TORSO_P1_14_6", 16);
			iVar6 = 14;
			iVar7 = 6;
			iVar1 = 65;
			break;
		
		case 146:
			StringCopy(&Var2, "TORSO_P1_14_7", 16);
			iVar6 = 14;
			iVar7 = 7;
			iVar1 = 65;
			break;
		
		case 147:
			StringCopy(&Var2, "TORSO_P1_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar1 = 200;
			break;
		
		case 148:
			StringCopy(&Var2, "TORSO_P1_15_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			iVar1 = 220;
			break;
		
		case 149:
			StringCopy(&Var2, "TORSO_P1_15_2", 16);
			iVar6 = 15;
			iVar7 = 2;
			iVar1 = 220;
			break;
		
		case 150:
			StringCopy(&Var2, "TORSO_P1_15_3", 16);
			iVar6 = 15;
			iVar7 = 3;
			iVar1 = 240;
			break;
		
		case 151:
			StringCopy(&Var2, "TORSO_P1_15_4", 16);
			iVar6 = 15;
			iVar7 = 4;
			break;
		
		case 152:
			StringCopy(&Var2, "TORSO_P1_15_5", 16);
			iVar6 = 15;
			iVar7 = 5;
			iVar1 = 250;
			break;
		
		case 153:
			StringCopy(&Var2, "TORSO_P1_15_6", 16);
			iVar6 = 15;
			iVar7 = 6;
			iVar1 = 260;
			break;
		
		case 154:
			StringCopy(&Var2, "TORSO_P1_15_7", 16);
			iVar6 = 15;
			iVar7 = 7;
			iVar1 = 40;
			break;
		
		case 155:
			StringCopy(&Var2, "TORSO_P1_15_8", 16);
			iVar6 = 15;
			iVar7 = 8;
			iVar1 = 50;
			break;
		
		case 156:
			StringCopy(&Var2, "TORSO_P1_15_9", 16);
			iVar6 = 15;
			iVar7 = 9;
			iVar1 = 45;
			break;
		
		case 157:
			StringCopy(&Var2, "TORSO_P1_15_10", 16);
			iVar6 = 15;
			iVar7 = 10;
			iVar1 = 40;
			break;
		
		case 158:
			StringCopy(&Var2, "TORSO_P1_15_11", 16);
			iVar6 = 15;
			iVar7 = 11;
			iVar1 = 55;
			break;
		
		case 159:
			StringCopy(&Var2, "TORSO_P1_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 160:
			StringCopy(&Var2, "TORSO_P1_17_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar1 = 40;
			break;
		
		case 161:
			StringCopy(&Var2, "TORSO_P1_17_1", 16);
			iVar6 = 17;
			iVar7 = 1;
			iVar1 = 50;
			break;
		
		case 162:
			StringCopy(&Var2, "TORSO_P1_17_2", 16);
			iVar6 = 17;
			iVar7 = 2;
			break;
		
		case 163:
			StringCopy(&Var2, "TORSO_P1_17_3", 16);
			iVar6 = 17;
			iVar7 = 3;
			iVar1 = 50;
			break;
		
		case 164:
			StringCopy(&Var2, "TORSO_P1_17_4", 16);
			iVar6 = 17;
			iVar7 = 4;
			iVar1 = 50;
			break;
		
		case 165:
			StringCopy(&Var2, "TORSO_P1_17_5", 16);
			iVar6 = 17;
			iVar7 = 5;
			iVar1 = 50;
			break;
		
		case 166:
			StringCopy(&Var2, "TORSO_P1_17_6", 16);
			iVar6 = 17;
			iVar7 = 6;
			iVar1 = 50;
			break;
		
		case 167:
			StringCopy(&Var2, "TORSO_P1_17_7", 16);
			iVar6 = 17;
			iVar7 = 7;
			iVar1 = 50;
			break;
		
		case 168:
			StringCopy(&Var2, "TORSO_P1_17_8", 16);
			iVar6 = 17;
			iVar7 = 8;
			iVar1 = 50;
			break;
		
		case 169:
			StringCopy(&Var2, "TORSO_P1_17_9", 16);
			iVar6 = 17;
			iVar7 = 9;
			iVar1 = 50;
			break;
		
		case 170:
			StringCopy(&Var2, "TORSO_P1_17_10", 16);
			iVar6 = 17;
			iVar7 = 10;
			iVar1 = 50;
			break;
		
		case 171:
			StringCopy(&Var2, "TORSO_P1_17_11", 16);
			iVar6 = 17;
			iVar7 = 11;
			iVar1 = 50;
			break;
		
		case 172:
			StringCopy(&Var2, "TORSO_P1_17_12", 16);
			iVar6 = 17;
			iVar7 = 12;
			iVar1 = 50;
			break;
		
		case 173:
			StringCopy(&Var2, "TORSO_P1_17_13", 16);
			iVar6 = 17;
			iVar7 = 13;
			iVar1 = 50;
			break;
		
		case 174:
			StringCopy(&Var2, "TORSO_P1_17_14", 16);
			iVar6 = 17;
			iVar7 = 14;
			iVar1 = 50;
			break;
		
		case 175:
			StringCopy(&Var2, "TORSO_P1_17_15", 16);
			iVar6 = 17;
			iVar7 = 15;
			iVar1 = 50;
			break;
		
		case 176:
			StringCopy(&Var2, "TORSO_P1_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar9 = 3;
			break;
		
		case 177:
			StringCopy(&Var2, "TORSO_P1_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar9 = 3;
			break;
		
		case 178:
			StringCopy(&Var2, "TORSO_P1_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar9 = 3;
			break;
		
		case 179:
			StringCopy(&Var2, "TORSO_P1_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar9 = 3;
			break;
		
		case 180:
			StringCopy(&Var2, "TORSO_P1_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar9 = 3;
			break;
		
		case 181:
			StringCopy(&Var2, "TORSO_P1_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar9 = 3;
			break;
		
		case 182:
			StringCopy(&Var2, "TORSO_P1_18_6", 16);
			iVar6 = 18;
			iVar7 = 6;
			iVar9 = 3;
			break;
		
		case 183:
			StringCopy(&Var2, "TORSO_P1_18_7", 16);
			iVar6 = 18;
			iVar7 = 7;
			iVar9 = 3;
			break;
		
		case 184:
			StringCopy(&Var2, "TORSO_P1_18_8", 16);
			iVar6 = 18;
			iVar7 = 8;
			iVar9 = 3;
			break;
		
		case 185:
			StringCopy(&Var2, "TORSO_P1_18_9", 16);
			iVar6 = 18;
			iVar7 = 9;
			iVar9 = 3;
			break;
		
		case 186:
			StringCopy(&Var2, "TORSO_P1_18_10", 16);
			iVar6 = 18;
			iVar7 = 10;
			iVar9 = 3;
			break;
		
		case 187:
			StringCopy(&Var2, "TORSO_P1_18_11", 16);
			iVar6 = 18;
			iVar7 = 11;
			iVar9 = 3;
			break;
		
		case 188:
			StringCopy(&Var2, "TORSO_P1_18_12", 16);
			iVar6 = 18;
			iVar7 = 12;
			iVar9 = 3;
			break;
		
		case 189:
			StringCopy(&Var2, "TORSO_P1_18_13", 16);
			iVar6 = 18;
			iVar7 = 13;
			iVar9 = 3;
			break;
		
		case 190:
			StringCopy(&Var2, "TORSO_P1_18_14", 16);
			iVar6 = 18;
			iVar7 = 14;
			iVar9 = 3;
			break;
		
		case 191:
			StringCopy(&Var2, "TORSO_P1_18_15", 16);
			iVar6 = 18;
			iVar7 = 15;
			iVar9 = 3;
			break;
		
		case 192:
			StringCopy(&Var2, "TORSO_P1_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 193:
			StringCopy(&Var2, "TORSO_P1_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 440;
			iVar9 = 3;
			break;
		
		case 194:
			StringCopy(&Var2, "TORSO_P1_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 440;
			iVar9 = 3;
			break;
		
		case 195:
			StringCopy(&Var2, "TORSO_P1_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 520;
			iVar9 = 3;
			break;
		
		case 196:
			StringCopy(&Var2, "TORSO_P1_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 440;
			iVar9 = 3;
			break;
		
		case 197:
			StringCopy(&Var2, "TORSO_P1_19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 440;
			iVar9 = 3;
			break;
		
		case 198:
			StringCopy(&Var2, "TORSO_P1_19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 199:
			StringCopy(&Var2, "TORSO_P1_19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 200:
			StringCopy(&Var2, "TORSO_P1_19_8", 16);
			iVar6 = 19;
			iVar7 = 8;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 201:
			StringCopy(&Var2, "TORSO_P1_19_9", 16);
			iVar6 = 19;
			iVar7 = 9;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 202:
			StringCopy(&Var2, "TORSO_P1_19_10", 16);
			iVar6 = 19;
			iVar7 = 10;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 203:
			StringCopy(&Var2, "TORSO_P1_19_11", 16);
			iVar6 = 19;
			iVar7 = 11;
			iVar1 = 480;
			iVar9 = 3;
			break;
		
		case 204:
			StringCopy(&Var2, "TORSO_P1_19_12", 16);
			iVar6 = 19;
			iVar7 = 12;
			iVar1 = 520;
			iVar9 = 3;
			break;
		
		case 205:
			StringCopy(&Var2, "TORSO_P1_19_13", 16);
			iVar6 = 19;
			iVar7 = 13;
			iVar1 = 520;
			iVar9 = 3;
			break;
		
		case 206:
			StringCopy(&Var2, "TORSO_P1_19_14", 16);
			iVar6 = 19;
			iVar7 = 14;
			iVar1 = 520;
			iVar9 = 3;
			break;
		
		case 207:
			StringCopy(&Var2, "TORSO_P1_19_15", 16);
			iVar6 = 19;
			iVar7 = 15;
			iVar1 = 440;
			iVar9 = 3;
			break;
		
		case 208:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 209:
			StringCopy(&Var2, "TORSO_P1_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 220;
			break;
		
		case 210:
			StringCopy(&Var2, "TORSO_P1_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 200;
			break;
		
		case 211:
			StringCopy(&Var2, "TORSO_P1_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 240;
			break;
		
		case 212:
			StringCopy(&Var2, "TORSO_P1_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 240;
			break;
		
		case 213:
			StringCopy(&Var2, "TORSO_P1_21_4", 16);
			iVar6 = 21;
			iVar7 = 4;
			iVar1 = 260;
			break;
		
		case 214:
			StringCopy(&Var2, "TORSO_P1_21_5", 16);
			iVar6 = 21;
			iVar7 = 5;
			iVar1 = 275;
			break;
		
		case 215:
			StringCopy(&Var2, "TORSO_P1_21_6", 16);
			iVar6 = 21;
			iVar7 = 6;
			iVar1 = 275;
			break;
		
		case 216:
			StringCopy(&Var2, "TORSO_P1_21_7", 16);
			iVar6 = 21;
			iVar7 = 7;
			iVar1 = 280;
			break;
		
		case 217:
			StringCopy(&Var2, "TORSO_P1_21_8", 16);
			iVar6 = 21;
			iVar7 = 8;
			iVar1 = 280;
			break;
		
		case 218:
			StringCopy(&Var2, "TORSO_P1_21_9", 16);
			iVar6 = 21;
			iVar7 = 9;
			iVar1 = 280;
			break;
		
		case 219:
			StringCopy(&Var2, "TORSO_P1_21_10", 16);
			iVar6 = 21;
			iVar7 = 10;
			iVar1 = 280;
			break;
		
		case 220:
			StringCopy(&Var2, "TORSO_P1_21_11", 16);
			iVar6 = 21;
			iVar7 = 11;
			iVar1 = 280;
			break;
		
		case 221:
			StringCopy(&Var2, "TORSO_P1_21_12", 16);
			iVar6 = 21;
			iVar7 = 12;
			iVar1 = 280;
			break;
		
		case 222:
			StringCopy(&Var2, "TORSO_P1_21_13", 16);
			iVar6 = 21;
			iVar7 = 13;
			iVar1 = 280;
			break;
		
		case 223:
			StringCopy(&Var2, "TORSO_P1_22_0", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar1 = 3100;
			iVar9 = 3;
			break;
		
		case 224:
			StringCopy(&Var2, "TORSO_P1_22_1", 16);
			iVar6 = 22;
			iVar7 = 1;
			iVar1 = 2800;
			iVar9 = 3;
			break;
		
		case 225:
			StringCopy(&Var2, "TORSO_P1_22_2", 16);
			iVar6 = 22;
			iVar7 = 2;
			iVar1 = 2500;
			iVar9 = 3;
			break;
		
		case 226:
			StringCopy(&Var2, "TORSO_P1_22_3", 16);
			iVar6 = 22;
			iVar7 = 3;
			iVar1 = 3000;
			iVar9 = 3;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_62(int iParam0)//Position - 0x11434
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "TORSO_P1_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "TORSO_P1_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "TORSO_P1_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 180;
			break;
		
		case 3:
			StringCopy(&Var2, "TORSO_P1_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 22;
			break;
		
		case 4:
			StringCopy(&Var2, "TORSO_P1_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			iVar1 = 20;
			break;
		
		case 5:
			StringCopy(&Var2, "TORSO_P1_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			iVar1 = 18;
			break;
		
		case 6:
			StringCopy(&Var2, "TORSO_P1_0_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			iVar1 = 19;
			break;
		
		case 7:
			StringCopy(&Var2, "TORSO_P1_0_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			iVar1 = 22;
			break;
		
		case 8:
			StringCopy(&Var2, "TORSO_P1_0_8", 16);
			iVar6 = 0;
			iVar7 = 8;
			iVar1 = 20;
			break;
		
		case 9:
			StringCopy(&Var2, "TORSO_P1_0_9", 16);
			iVar6 = 0;
			iVar7 = 9;
			iVar1 = 19;
			break;
		
		case 10:
			StringCopy(&Var2, "TORSO_P1_0_10", 16);
			iVar6 = 0;
			iVar7 = 10;
			iVar1 = 19;
			break;
		
		case 11:
			StringCopy(&Var2, "TORSO_P1_0_11", 16);
			iVar6 = 0;
			iVar7 = 11;
			iVar1 = 18;
			break;
		
		case 12:
			StringCopy(&Var2, "TORSO_P1_0_12", 16);
			iVar6 = 0;
			iVar7 = 12;
			iVar1 = 20;
			break;
		
		case 13:
			StringCopy(&Var2, "TORSO_P1_0_13", 16);
			iVar6 = 0;
			iVar7 = 13;
			iVar1 = 22;
			break;
		
		case 14:
			StringCopy(&Var2, "TORSO_P1_0_14", 16);
			iVar6 = 0;
			iVar7 = 14;
			iVar1 = 19;
			break;
		
		case 15:
			StringCopy(&Var2, "TORSO_P1_0_15", 16);
			iVar6 = 0;
			iVar7 = 15;
			iVar1 = 22;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 1;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 2;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 3;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 4;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 5;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 22:
			StringCopy(&Var2, "TORSO_P1_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 3;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 1;
			break;
		
		case 24:
			StringCopy(&Var2, "TORSO_P1_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar1 = 20;
			iVar9 = 2;
			break;
		
		case 25:
			StringCopy(&Var2, "TORSO_P1_4_1", 16);
			iVar6 = 4;
			iVar7 = 1;
			iVar1 = 22;
			iVar9 = 2;
			break;
		
		case 26:
			StringCopy(&Var2, "TORSO_P1_4_2", 16);
			iVar6 = 4;
			iVar7 = 2;
			iVar1 = 20;
			iVar9 = 2;
			break;
		
		case 27:
			StringCopy(&Var2, "TORSO_P1_4_3", 16);
			iVar6 = 4;
			iVar7 = 3;
			iVar1 = 25;
			iVar9 = 2;
			break;
		
		case 28:
			StringCopy(&Var2, "TORSO_P1_4_4", 16);
			iVar6 = 4;
			iVar7 = 4;
			iVar1 = 23;
			iVar9 = 2;
			break;
		
		case 29:
			StringCopy(&Var2, "TORSO_P1_4_5", 16);
			iVar6 = 4;
			iVar7 = 5;
			iVar1 = 25;
			iVar9 = 2;
			break;
		
		case 30:
			StringCopy(&Var2, "TORSO_P1_4_6", 16);
			iVar6 = 4;
			iVar7 = 6;
			iVar1 = 28;
			iVar9 = 2;
			break;
		
		case 31:
			StringCopy(&Var2, "TORSO_P1_4_7", 16);
			iVar6 = 4;
			iVar7 = 7;
			iVar1 = 26;
			iVar9 = 2;
			break;
		
		case 32:
			StringCopy(&Var2, "TORSO_P1_4_8", 16);
			iVar6 = 4;
			iVar7 = 8;
			iVar1 = 24;
			iVar9 = 2;
			break;
		
		case 33:
			StringCopy(&Var2, "TORSO_P1_4_9", 16);
			iVar6 = 4;
			iVar7 = 9;
			iVar1 = 27;
			iVar9 = 2;
			break;
		
		case 34:
			StringCopy(&Var2, "TORSO_P1_4_10", 16);
			iVar6 = 4;
			iVar7 = 10;
			iVar1 = 29;
			iVar9 = 2;
			break;
		
		case 35:
			StringCopy(&Var2, "TORSO_P1_4_11", 16);
			iVar6 = 4;
			iVar7 = 11;
			iVar1 = 28;
			iVar9 = 2;
			break;
		
		case 36:
			StringCopy(&Var2, "TORSO_P1_4_12", 16);
			iVar6 = 4;
			iVar7 = 12;
			iVar1 = 25;
			iVar9 = 2;
			break;
		
		case 37:
			StringCopy(&Var2, "TORSO_P1_4_13", 16);
			iVar6 = 4;
			iVar7 = 13;
			iVar1 = 22;
			iVar9 = 2;
			break;
		
		case 38:
			StringCopy(&Var2, "TORSO_P1_4_14", 16);
			iVar6 = 4;
			iVar7 = 14;
			iVar1 = 27;
			iVar9 = 2;
			break;
		
		case 39:
			StringCopy(&Var2, "TORSO_P1_4_15", 16);
			iVar6 = 4;
			iVar7 = 15;
			iVar1 = 29;
			iVar9 = 2;
			break;
		
		case 40:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			iVar9 = 4;
			break;
		
		case 41:
			StringCopy(&Var2, "TORSO_P1_6_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar9 = 3;
			break;
		
		case 42:
			StringCopy(&Var2, "TORSO_P1_6_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar1 = 1270;
			iVar9 = 3;
			break;
		
		case 43:
			StringCopy(&Var2, "TORSO_P1_6_2", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar1 = 1270;
			iVar9 = 3;
			break;
		
		case 44:
			StringCopy(&Var2, "TORSO_P1_6_3", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar1 = 1270;
			iVar9 = 3;
			break;
		
		case 45:
			StringCopy(&Var2, "TORSO_P1_6_4", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar1 = 1090;
			iVar9 = 3;
			break;
		
		case 46:
			StringCopy(&Var2, "TORSO_P1_6_5", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar1 = 1090;
			iVar9 = 3;
			break;
		
		case 47:
			StringCopy(&Var2, "TORSO_P1_6_6", 16);
			iVar6 = 6;
			iVar7 = 6;
			iVar1 = 1120;
			iVar9 = 3;
			break;
		
		case 48:
			StringCopy(&Var2, "TORSO_P1_6_7", 16);
			iVar6 = 6;
			iVar7 = 7;
			iVar1 = 1120;
			iVar9 = 3;
			break;
		
		case 49:
			StringCopy(&Var2, "TORSO_P1_6_8", 16);
			iVar6 = 6;
			iVar7 = 8;
			iVar1 = 1290;
			iVar9 = 3;
			break;
		
		case 50:
			StringCopy(&Var2, "TORSO_P1_6_9", 16);
			iVar6 = 6;
			iVar7 = 9;
			iVar1 = 1290;
			iVar9 = 3;
			break;
		
		case 51:
			StringCopy(&Var2, "TORSO_P1_6_10", 16);
			iVar6 = 6;
			iVar7 = 10;
			iVar1 = 1320;
			iVar9 = 3;
			break;
		
		case 52:
			StringCopy(&Var2, "TORSO_P1_6_11", 16);
			iVar6 = 6;
			iVar7 = 11;
			iVar1 = 1320;
			iVar9 = 3;
			break;
		
		case 53:
			StringCopy(&Var2, "TORSO_P1_6_12", 16);
			iVar6 = 6;
			iVar7 = 12;
			iVar1 = 1590;
			iVar9 = 3;
			break;
		
		case 54:
			StringCopy(&Var2, "TORSO_P1_6_13", 16);
			iVar6 = 6;
			iVar7 = 13;
			iVar1 = 1590;
			iVar9 = 3;
			break;
		
		case 55:
			StringCopy(&Var2, "TORSO_P1_6_14", 16);
			iVar6 = 6;
			iVar7 = 14;
			iVar1 = 1590;
			iVar9 = 3;
			break;
		
		case 56:
			StringCopy(&Var2, "TORSO_P1_6_15", 16);
			iVar6 = 6;
			iVar7 = 15;
			iVar1 = 1320;
			iVar9 = 3;
			break;
		
		case 57:
			StringCopy(&Var2, "TORSO_P1_7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar1 = 98;
			break;
		
		case 58:
			StringCopy(&Var2, "TORSO_P1_7_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar1 = 98;
			break;
		
		case 59:
			StringCopy(&Var2, "TORSO_P1_7_2", 16);
			iVar6 = 7;
			iVar7 = 2;
			iVar1 = 110;
			break;
		
		case 60:
			StringCopy(&Var2, "TORSO_P1_7_3", 16);
			iVar6 = 7;
			iVar7 = 3;
			iVar1 = 110;
			break;
		
		case 61:
			StringCopy(&Var2, "TORSO_P1_7_4", 16);
			iVar6 = 7;
			iVar7 = 4;
			iVar1 = 118;
			break;
		
		case 62:
			StringCopy(&Var2, "TORSO_P1_7_5", 16);
			iVar6 = 7;
			iVar7 = 5;
			iVar1 = 120;
			break;
		
		case 63:
			StringCopy(&Var2, "TORSO_P1_7_6", 16);
			iVar6 = 7;
			iVar7 = 6;
			iVar1 = 120;
			break;
		
		case 64:
			StringCopy(&Var2, "TORSO_P1_7_7", 16);
			iVar6 = 7;
			iVar7 = 7;
			iVar1 = 129;
			break;
		
		case 65:
			StringCopy(&Var2, "TORSO_P1_7_8", 16);
			iVar6 = 7;
			iVar7 = 8;
			iVar1 = 125;
			break;
		
		case 66:
			StringCopy(&Var2, "TORSO_P1_7_9", 16);
			iVar6 = 7;
			iVar7 = 9;
			iVar1 = 125;
			break;
		
		case 67:
			StringCopy(&Var2, "TORSO_P1_7_10", 16);
			iVar6 = 7;
			iVar7 = 10;
			iVar1 = 129;
			break;
		
		case 68:
			StringCopy(&Var2, "TORSO_P1_7_11", 16);
			iVar6 = 7;
			iVar7 = 11;
			iVar1 = 129;
			break;
		
		case 69:
			StringCopy(&Var2, "TORSO_P1_7_12", 16);
			iVar6 = 7;
			iVar7 = 12;
			iVar1 = 135;
			break;
		
		case 70:
			StringCopy(&Var2, "TORSO_P1_7_13", 16);
			iVar6 = 7;
			iVar7 = 13;
			iVar1 = 139;
			break;
		
		case 71:
			StringCopy(&Var2, "TORSO_P1_7_14", 16);
			iVar6 = 7;
			iVar7 = 14;
			iVar1 = 145;
			break;
		
		case 72:
			StringCopy(&Var2, "TORSO_P1_7_15", 16);
			iVar6 = 7;
			iVar7 = 15;
			iVar1 = 145;
			break;
		
		case 73:
			StringCopy(&Var2, "TORSO_P1_8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 74:
			StringCopy(&Var2, "TORSO_P1_8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			break;
		
		case 75:
			StringCopy(&Var2, "TORSO_P1_8_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			break;
		
		case 76:
			StringCopy(&Var2, "TORSO_P1_8_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			break;
		
		case 77:
			StringCopy(&Var2, "TORSO_P1_8_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 30;
			break;
		
		case 78:
			StringCopy(&Var2, "TORSO_P1_8_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 38;
			break;
		
		case 79:
			StringCopy(&Var2, "TORSO_P1_8_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 32;
			break;
		
		case 80:
			StringCopy(&Var2, "TORSO_P1_8_7", 16);
			iVar6 = 8;
			iVar7 = 7;
			iVar1 = 30;
			break;
		
		case 81:
			StringCopy(&Var2, "TORSO_P1_8_8", 16);
			iVar6 = 8;
			iVar7 = 8;
			iVar1 = 33;
			break;
		
		case 82:
			StringCopy(&Var2, "TORSO_P1_8_9", 16);
			iVar6 = 8;
			iVar7 = 9;
			iVar1 = 35;
			break;
		
		case 83:
			StringCopy(&Var2, "TORSO_P1_8_10", 16);
			iVar6 = 8;
			iVar7 = 10;
			iVar1 = 35;
			break;
		
		case 84:
			StringCopy(&Var2, "TORSO_P1_8_11", 16);
			iVar6 = 8;
			iVar7 = 11;
			iVar1 = 38;
			break;
		
		case 85:
			StringCopy(&Var2, "TORSO_P1_8_12", 16);
			iVar6 = 8;
			iVar7 = 12;
			iVar1 = 33;
			break;
		
		case 86:
			StringCopy(&Var2, "TORSO_P1_8_13", 16);
			iVar6 = 8;
			iVar7 = 13;
			iVar1 = 35;
			break;
		
		case 87:
			StringCopy(&Var2, "TORSO_P1_8_14", 16);
			iVar6 = 8;
			iVar7 = 14;
			iVar1 = 38;
			break;
		
		case 88:
			StringCopy(&Var2, "TORSO_P1_8_15", 16);
			iVar6 = 8;
			iVar7 = 15;
			iVar1 = 32;
			break;
		
		case 89:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 90:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 91:
			StringCopy(&Var2, "TORSO_P1_11_0", 16);
			iVar6 = 11;
			iVar7 = 0;
			break;
		
		case 92:
			StringCopy(&Var2, "TORSO_P1_11_1", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar1 = 59;
			break;
		
		case 93:
			StringCopy(&Var2, "TORSO_P1_11_2", 16);
			iVar6 = 11;
			iVar7 = 2;
			break;
		
		case 94:
			StringCopy(&Var2, "TORSO_P1_11_3", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar1 = 25;
			break;
		
		case 95:
			StringCopy(&Var2, "TORSO_P1_11_4", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar1 = 29;
			break;
		
		case 96:
			StringCopy(&Var2, "TORSO_P1_11_5", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar1 = 27;
			break;
		
		case 97:
			StringCopy(&Var2, "TORSO_P1_11_6", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar1 = 25;
			break;
		
		case 98:
			StringCopy(&Var2, "TORSO_P1_11_7", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar1 = 27;
			break;
		
		case 99:
			StringCopy(&Var2, "TORSO_P1_11_8", 16);
			iVar6 = 11;
			iVar7 = 8;
			iVar1 = 28;
			break;
		
		case 100:
			StringCopy(&Var2, "TORSO_P1_11_9", 16);
			iVar6 = 11;
			iVar7 = 9;
			iVar1 = 30;
			break;
		
		case 101:
			StringCopy(&Var2, "TORSO_P1_11_10", 16);
			iVar6 = 11;
			iVar7 = 10;
			iVar1 = 29;
			break;
		
		case 102:
			StringCopy(&Var2, "TORSO_P1_11_11", 16);
			iVar6 = 11;
			iVar7 = 11;
			iVar1 = 27;
			break;
		
		case 103:
			StringCopy(&Var2, "TORSO_P1_11_12", 16);
			iVar6 = 11;
			iVar7 = 12;
			iVar1 = 29;
			break;
		
		case 104:
			StringCopy(&Var2, "TORSO_P1_11_13", 16);
			iVar6 = 11;
			iVar7 = 13;
			iVar1 = 32;
			break;
		
		case 105:
			StringCopy(&Var2, "TORSO_P1_11_14", 16);
			iVar6 = 11;
			iVar7 = 14;
			iVar1 = 30;
			break;
		
		case 106:
			StringCopy(&Var2, "TORSO_P1_11_15", 16);
			iVar6 = 11;
			iVar7 = 15;
			iVar1 = 28;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_63(int iParam0)//Position - 0x1207D
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 2;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "HAIR_P1_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "HAIR_P1_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "HAIR_P1_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "HAIR_P1_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar9 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "HAIR_P1_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			iVar9 = 3;
			break;
		
		case 5:
			StringCopy(&Var2, "HAIR_P1_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			iVar9 = 3;
			break;
		
		case 6:
			StringCopy(&Var2, "HAIR_P1_0_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			iVar9 = 3;
			break;
		
		case 7:
			StringCopy(&Var2, "HAIR_P1_0_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			iVar9 = 3;
			break;
		
		case 8:
			StringCopy(&Var2, "HAIR_P1_0_8", 16);
			iVar6 = 0;
			iVar7 = 8;
			iVar9 = 3;
			break;
		
		case 9:
			StringCopy(&Var2, "HAIR_P1_0_9", 16);
			iVar6 = 0;
			iVar7 = 9;
			iVar9 = 3;
			break;
		
		case 10:
			StringCopy(&Var2, "HAIR_P1_0_10", 16);
			iVar6 = 0;
			iVar7 = 10;
			iVar9 = 3;
			break;
		
		case 11:
			StringCopy(&Var2, "HAIR_P1_0_11", 16);
			iVar6 = 0;
			iVar7 = 11;
			iVar9 = 3;
			break;
		
		case 12:
			StringCopy(&Var2, "HAIR_P1_0_12", 16);
			iVar6 = 0;
			iVar7 = 12;
			iVar9 = 3;
			break;
		
		case 13:
			StringCopy(&Var2, "HAIR_P1_0_13", 16);
			iVar6 = 0;
			iVar7 = 13;
			break;
		
		case 14:
			StringCopy(&Var2, "HAIR_P1_0_14", 16);
			iVar6 = 0;
			iVar7 = 14;
			iVar9 = 3;
			break;
		
		case 15:
			StringCopy(&Var2, "HAIR_P1_0_15", 16);
			iVar6 = 0;
			iVar7 = 15;
			iVar9 = 3;
			break;
		
		case 16:
			StringCopy(&Var2, "HAIR_P1_1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar9 = 3;
			break;
		
		case 17:
			StringCopy(&Var2, "HAIR_P1_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar9 = 3;
			break;
		
		case 18:
			StringCopy(&Var2, "HAIR_P1_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar9 = 3;
			break;
		
		case 19:
			StringCopy(&Var2, "HAIR_P1_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 21);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_64(int iParam0)//Position - 0x122F5
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 0;
	Global_69518[0 /*14*/].f_5 = 1;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 6;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 7;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 8;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 9;
			break;
		
		default:
			func_29(iVar10, iParam0, 10);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_65(int iParam0, int iParam1)//Position - 0x1243A
{
	switch (iParam0)
	{
		case 0:
			func_82(iParam1);
			break;
		
		case 2:
			func_81(iParam1);
			break;
		
		case 3:
			func_78(iParam1);
			break;
		
		case 4:
			func_77(iParam1);
			break;
		
		case 6:
			func_76(iParam1);
			break;
		
		case 5:
			func_75(iParam1);
			break;
		
		case 8:
			func_74(iParam1);
			break;
		
		case 9:
			func_73(iParam1);
			break;
		
		case 10:
			func_72(iParam1);
			break;
		
		case 1:
			func_71(iParam1);
			break;
		
		case 7:
			func_70(iParam1);
			break;
		
		case 11:
			func_69(iParam1);
			break;
		
		case 12:
			func_68(iParam1);
			break;
		
		case 13:
			func_67(iParam1);
			break;
		
		case 14:
			func_66(iParam1);
			break;
	}
}

void func_66(int iParam0)//Position - 0x1252A
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 14;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 6;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 7;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = -1;
			iVar7 = 0;
			iVar1 = 0;
			iVar8 = 8;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "PROPS_P0_H1", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 12:
			StringCopy(&Var2, "PROPS_P0_H2", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar1 = 320;
			iVar8 = 11;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 0;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 26:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 27:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 6;
			iVar8 = 0;
			break;
		
		case 28:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 7;
			iVar8 = 0;
			break;
		
		case 29:
			StringCopy(&Var2, "PROPS_P0_H12", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 31:
			StringCopy(&Var2, "PROPS_P1_H8_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar1 = 270;
			iVar8 = 0;
			break;
		
		case 32:
			StringCopy(&Var2, "PROPS_P1_H8_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 270;
			iVar8 = 0;
			break;
		
		case 33:
			StringCopy(&Var2, "PROPS_P1_H9_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar1 = 200;
			iVar8 = 0;
			break;
		
		case 34:
			StringCopy(&Var2, "PROPS_P1_H9_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			iVar1 = 200;
			iVar8 = 0;
			break;
		
		case 35:
			StringCopy(&Var2, "PROPS_P1_H10_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar1 = 350;
			iVar8 = 0;
			break;
		
		case 36:
			StringCopy(&Var2, "PROPS_P1_H10_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar1 = 350;
			iVar8 = 0;
			break;
		
		case 37:
			StringCopy(&Var2, "PROPS_P1_H11_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar1 = 450;
			iVar8 = 0;
			break;
		
		case 38:
			StringCopy(&Var2, "PROPS_P1_H12_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar1 = 500;
			iVar8 = 0;
			break;
		
		case 39:
			StringCopy(&Var2, "PROPS_P1_H12_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 500;
			iVar8 = 0;
			break;
		
		case 40:
			StringCopy(&Var2, "PROPS_P1_H13_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 50;
			iVar8 = 0;
			break;
		
		case 41:
			StringCopy(&Var2, "PROPS_P1_H13_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 50;
			iVar8 = 0;
			break;
		
		case 42:
			StringCopy(&Var2, "PROPS_P1_H14_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 43:
			StringCopy(&Var2, "PROPS_P1_H14_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 44:
			StringCopy(&Var2, "PROPS_P1_H14_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 99;
			iVar8 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 46:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 47:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 48:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 1;
			iVar8 = 0;
			break;
		
		case 49:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar8 = 0;
			break;
		
		case 50:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 3;
			iVar8 = 0;
			break;
		
		case 51:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 4;
			iVar8 = 0;
			break;
		
		case 52:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 5;
			iVar8 = 0;
			break;
		
		case 53:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 24;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 54:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 55:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 56:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 27;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 57:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 28;
			iVar7 = 0;
			iVar8 = 0;
			break;
		
		case 58:
			StringCopy(&Var2, "PROPS_P0_E0", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 45;
			iVar8 = 10;
			break;
		
		case 59:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 10;
			break;
		
		case 60:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 10;
			break;
		
		case 61:
			StringCopy(&Var2, "PROPS_P0_E3", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar1 = 55;
			iVar8 = 10;
			break;
		
		case 62:
			StringCopy(&Var2, "PROPS_P0_E4", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar1 = 58;
			iVar8 = 10;
			break;
		
		case 63:
			StringCopy(&Var2, "PROPS_P0_E4_1", 16);
			iVar6 = 4;
			iVar7 = 1;
			iVar1 = 56;
			iVar8 = 10;
			break;
		
		case 64:
			StringCopy(&Var2, "PROPS_P0_E4_2", 16);
			iVar6 = 4;
			iVar7 = 2;
			iVar1 = 60;
			iVar8 = 10;
			break;
		
		case 65:
			StringCopy(&Var2, "PROPS_P0_E4_3", 16);
			iVar6 = 4;
			iVar7 = 3;
			iVar1 = 65;
			iVar8 = 10;
			break;
		
		case 66:
			StringCopy(&Var2, "PROPS_P0_E4_4", 16);
			iVar6 = 4;
			iVar7 = 4;
			iVar1 = 62;
			iVar8 = 10;
			break;
		
		case 67:
			StringCopy(&Var2, "PROPS_P0_E4_5", 16);
			iVar6 = 4;
			iVar7 = 5;
			iVar1 = 65;
			iVar8 = 10;
			break;
		
		case 68:
			StringCopy(&Var2, "PROPS_P0_E4_6", 16);
			iVar6 = 4;
			iVar7 = 6;
			iVar1 = 68;
			iVar8 = 10;
			break;
		
		case 69:
			StringCopy(&Var2, "PROPS_P0_E4_7", 16);
			iVar6 = 4;
			iVar7 = 7;
			iVar1 = 68;
			iVar8 = 10;
			break;
		
		case 70:
			StringCopy(&Var2, "PROPS_P0_E5", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar1 = 65;
			iVar8 = 10;
			break;
		
		case 71:
			StringCopy(&Var2, "PROPS_P0_E5_1", 16);
			iVar6 = 5;
			iVar7 = 1;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 72:
			StringCopy(&Var2, "PROPS_P0_E5_2", 16);
			iVar6 = 5;
			iVar7 = 2;
			iVar1 = 72;
			iVar8 = 10;
			break;
		
		case 73:
			StringCopy(&Var2, "PROPS_P0_E5_3", 16);
			iVar6 = 5;
			iVar7 = 3;
			iVar1 = 70;
			iVar8 = 10;
			break;
		
		case 74:
			StringCopy(&Var2, "PROPS_P0_E5_4", 16);
			iVar6 = 5;
			iVar7 = 4;
			iVar1 = 74;
			iVar8 = 10;
			break;
		
		case 75:
			StringCopy(&Var2, "PROPS_P0_E5_5", 16);
			iVar6 = 5;
			iVar7 = 5;
			iVar1 = 78;
			iVar8 = 10;
			break;
		
		case 76:
			StringCopy(&Var2, "PROPS_P0_E5_6", 16);
			iVar6 = 5;
			iVar7 = 6;
			iVar1 = 82;
			iVar8 = 10;
			break;
		
		case 77:
			StringCopy(&Var2, "PROPS_P0_E5_7", 16);
			iVar6 = 5;
			iVar7 = 7;
			iVar1 = 85;
			iVar8 = 10;
			break;
		
		case 78:
			StringCopy(&Var2, "PROPS_P0_E5_8", 16);
			iVar6 = 5;
			iVar7 = 8;
			iVar1 = 85;
			iVar8 = 10;
			break;
		
		case 79:
			StringCopy(&Var2, "PROPS_P0_E5_9", 16);
			iVar6 = 5;
			iVar7 = 9;
			iVar8 = 10;
			break;
		
		case 80:
			StringCopy(&Var2, "PROPS_P0_E6", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 81:
			StringCopy(&Var2, "PROPS_P0_E6_1", 16);
			iVar6 = 6;
			iVar7 = 1;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 82:
			StringCopy(&Var2, "PROPS_P0_E6_2", 16);
			iVar6 = 6;
			iVar7 = 2;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 83:
			StringCopy(&Var2, "PROPS_P0_E6_3", 16);
			iVar6 = 6;
			iVar7 = 3;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 84:
			StringCopy(&Var2, "PROPS_P0_E6_4", 16);
			iVar6 = 6;
			iVar7 = 4;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 85:
			StringCopy(&Var2, "PROPS_P0_E6_5", 16);
			iVar6 = 6;
			iVar7 = 5;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 86:
			StringCopy(&Var2, "PROPS_P0_E6_6", 16);
			iVar6 = 6;
			iVar7 = 6;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 87:
			StringCopy(&Var2, "PROPS_P0_E6_7", 16);
			iVar6 = 6;
			iVar7 = 7;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 88:
			StringCopy(&Var2, "PROPS_P0_E6_8", 16);
			iVar6 = 6;
			iVar7 = 8;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 89:
			StringCopy(&Var2, "PROPS_P0_E6_9", 16);
			iVar6 = 6;
			iVar7 = 9;
			iVar1 = 69;
			iVar8 = 10;
			break;
		
		case 90:
			StringCopy(&Var2, "PROPS_P0_E7", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar8 = 10;
			break;
		
		case 91:
			StringCopy(&Var2, "PROPS_P0_E8", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar1 = 170;
			iVar8 = 10;
			break;
		
		case 92:
			StringCopy(&Var2, "PROPS_P0_E8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 93:
			StringCopy(&Var2, "PROPS_P0_E8_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 180;
			iVar8 = 10;
			break;
		
		case 94:
			StringCopy(&Var2, "PROPS_P0_E8_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 185;
			iVar8 = 10;
			break;
		
		case 95:
			StringCopy(&Var2, "PROPS_P0_E8_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 189;
			iVar8 = 10;
			break;
		
		case 96:
			StringCopy(&Var2, "PROPS_P0_E8_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 195;
			iVar8 = 10;
			break;
		
		case 97:
			StringCopy(&Var2, "PROPS_P0_E8_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 235;
			iVar8 = 10;
			break;
		
		case 98:
			StringCopy(&Var2, "PROPS_P0_E8_7", 16);
			iVar6 = 8;
			iVar7 = 7;
			iVar1 = 245;
			iVar8 = 10;
			break;
		
		case 99:
			StringCopy(&Var2, "PROPS_P0_E8_8", 16);
			iVar6 = 8;
			iVar7 = 8;
			iVar1 = 250;
			iVar8 = 10;
			break;
		
		case 100:
			StringCopy(&Var2, "PROPS_P0_E8_9", 16);
			iVar6 = 8;
			iVar7 = 9;
			iVar1 = 275;
			iVar8 = 10;
			break;
		
		case 101:
			StringCopy(&Var2, "PROPS_P0_E8_10", 16);
			iVar6 = 8;
			iVar7 = 10;
			iVar1 = 280;
			iVar8 = 10;
			break;
		
		case 102:
			StringCopy(&Var2, "PROPS_P0_E8_11", 16);
			iVar6 = 8;
			iVar7 = 11;
			iVar1 = 295;
			iVar8 = 10;
			break;
		
		case 103:
			StringCopy(&Var2, "PROPS_P0_E9", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar1 = 179;
			iVar8 = 10;
			break;
		
		case 104:
			StringCopy(&Var2, "PROPS_P0_E9_1", 16);
			iVar6 = 9;
			iVar7 = 1;
			iVar1 = 159;
			iVar8 = 10;
			break;
		
		case 105:
			StringCopy(&Var2, "PROPS_P0_E9_2", 16);
			iVar6 = 9;
			iVar7 = 2;
			iVar1 = 165;
			iVar8 = 10;
			break;
		
		case 106:
			StringCopy(&Var2, "PROPS_P0_E9_3", 16);
			iVar6 = 9;
			iVar7 = 3;
			iVar1 = 155;
			iVar8 = 10;
			break;
		
		case 107:
			StringCopy(&Var2, "PROPS_P0_E9_4", 16);
			iVar6 = 9;
			iVar7 = 4;
			iVar1 = 175;
			iVar8 = 10;
			break;
		
		case 108:
			StringCopy(&Var2, "PROPS_P0_E9_5", 16);
			iVar6 = 9;
			iVar7 = 5;
			iVar1 = 185;
			iVar8 = 10;
			break;
		
		case 109:
			StringCopy(&Var2, "PROPS_P0_E9_6", 16);
			iVar6 = 9;
			iVar7 = 6;
			iVar1 = 189;
			iVar8 = 10;
			break;
		
		case 110:
			StringCopy(&Var2, "PROPS_P0_E9_7", 16);
			iVar6 = 9;
			iVar7 = 7;
			iVar1 = 225;
			iVar8 = 10;
			break;
		
		case 111:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar1 = 100;
			iVar8 = 10;
			break;
		
		case 112:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			iVar8 = 2;
			break;
		
		default:
			func_29(iVar10, iParam0, 113);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_67(int iParam0)//Position - 0x132B3
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 13;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 10);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_68(int iParam0)//Position - 0x1342C
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 12;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "OUTFIT_P0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 1:
			StringCopy(&Var2, "OUTFIT_P0_1", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "OUTFIT_P0_4", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "OUTFIT_P0_7", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "OUTFIT_P0_8", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "OUTFIT_P0_9", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "OUTFIT_P0_11", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 9:
			StringCopy(&Var2, "OUTFIT_P0_12", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "OUTFIT_P0_14", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 12:
			StringCopy(&Var2, "OUTFIT_P0_17", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 13:
			StringCopy(&Var2, "OUTFIT_P0_18", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 14:
			StringCopy(&Var2, "OUTFIT_P0_19", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 15:
			StringCopy(&Var2, "OUTFIT_P0_20", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "OUTFIT_P0_22", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 10000;
			break;
		
		case 17:
			StringCopy(&Var2, "OUTFIT_P0_23", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 18:
			StringCopy(&Var2, "OUTFIT_P0_24", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "OUTFIT_P0_26", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 20:
			StringCopy(&Var2, "OUTFIT_P0_28", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 21:
			StringCopy(&Var2, "OUTFIT_P0_29", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 22:
			StringCopy(&Var2, "OUTFIT_P0_30", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 105;
			break;
		
		case 23:
			StringCopy(&Var2, "OUTFIT_P0_31", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 24:
			StringCopy(&Var2, "OUTFIT_P0_32", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 25:
			StringCopy(&Var2, "OUTFIT_P0_33", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 26:
			StringCopy(&Var2, "OUTFIT_P0_34", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 27:
			StringCopy(&Var2, "OUTFIT_P0_35", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 28:
			StringCopy(&Var2, "OUTFIT_P0_11", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 29:
			StringCopy(&Var2, "OUTFIT_P0_36", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4900;
			break;
		
		case 30:
			StringCopy(&Var2, "OUTFIT_P0_37", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 840;
			break;
		
		case 31:
			StringCopy(&Var2, "OUTFIT_P0_38", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 32:
			StringCopy(&Var2, "OUTFIT_P0_39", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 33:
			StringCopy(&Var2, "OUTFIT_P0_40", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 34:
			StringCopy(&Var2, "OUTFIT_P0_41", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 35:
			StringCopy(&Var2, "OUTFIT_P0_42", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 36:
			StringCopy(&Var2, "OUTFIT_P0_43", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 37:
			StringCopy(&Var2, "OUTFIT_P0_44", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 3900;
			break;
		
		case 38:
			StringCopy(&Var2, "OUTFIT_P0_45", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4000;
			break;
		
		case 39:
			StringCopy(&Var2, "OUTFIT_P0_46", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 40:
			StringCopy(&Var2, "OUTFIT_P0_47", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4600;
			break;
		
		case 41:
			StringCopy(&Var2, "OUTFIT_P0_48", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5500;
			break;
		
		case 42:
			StringCopy(&Var2, "OUTFIT_P0_49", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4400;
			break;
		
		case 43:
			StringCopy(&Var2, "OUTFIT_P0_50", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4400;
			break;
		
		case 44:
			StringCopy(&Var2, "OUTFIT_P0_51", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4900;
			break;
		
		case 45:
			StringCopy(&Var2, "OUTFIT_P0_52", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5500;
			break;
		
		case 46:
			StringCopy(&Var2, "OUTFIT_P0_53", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 4500;
			break;
		
		case 47:
			StringCopy(&Var2, "OUTFIT_P0_54", 16);
			iVar6 = 0;
			iVar7 = 0;
			iVar1 = 5900;
			break;
		
		case 48:
			StringCopy(&Var2, "OUTFIT_P0_55", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 49:
			StringCopy(&Var2, "OUTFIT_P0_17", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 50:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 51:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 52:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 53);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_69(int iParam0)//Position - 0x139A2
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 11;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "JBIB_P0_02_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "JBIB_P0_02_1", 16);
			iVar6 = 2;
			iVar7 = 1;
			break;
		
		case 4:
			StringCopy(&Var2, "JBIB_P0_02_2", 16);
			iVar6 = 2;
			iVar7 = 2;
			break;
		
		case 5:
			StringCopy(&Var2, "JBIB_P0_02_3", 16);
			iVar6 = 2;
			iVar7 = 3;
			break;
		
		case 6:
			StringCopy(&Var2, "JBIB_P0_02_4", 16);
			iVar6 = 2;
			iVar7 = 4;
			break;
		
		case 7:
			StringCopy(&Var2, "JBIB_P0_02_5", 16);
			iVar6 = 2;
			iVar7 = 5;
			break;
		
		case 8:
			StringCopy(&Var2, "JBIB_P0_03_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar1 = 390;
			break;
		
		case 9:
			StringCopy(&Var2, "JBIB_P0_03_1", 16);
			iVar6 = 3;
			iVar7 = 1;
			iVar1 = 390;
			break;
		
		case 10:
			StringCopy(&Var2, "JBIB_P0_03_2", 16);
			iVar6 = 3;
			iVar7 = 2;
			iVar1 = 420;
			break;
		
		case 11:
			StringCopy(&Var2, "JBIB_P0_03_3", 16);
			iVar6 = 3;
			iVar7 = 3;
			iVar1 = 420;
			break;
		
		case 12:
			StringCopy(&Var2, "JBIB_P0_03_4", 16);
			iVar6 = 3;
			iVar7 = 4;
			iVar1 = 490;
			break;
		
		case 13:
			StringCopy(&Var2, "JBIB_P0_03_5", 16);
			iVar6 = 3;
			iVar7 = 5;
			iVar1 = 490;
			break;
		
		case 14:
			StringCopy(&Var2, "JBIB_P0_03_6", 16);
			iVar6 = 3;
			iVar7 = 6;
			iVar1 = 540;
			break;
		
		case 15:
			StringCopy(&Var2, "JBIB_P0_03_7", 16);
			iVar6 = 3;
			iVar7 = 7;
			iVar1 = 540;
			break;
		
		case 16:
			StringCopy(&Var2, "JBIB_P0_03_8", 16);
			iVar6 = 3;
			iVar7 = 8;
			iVar1 = 550;
			break;
		
		case 17:
			StringCopy(&Var2, "JBIB_P0_03_9", 16);
			iVar6 = 3;
			iVar7 = 9;
			iVar1 = 540;
			break;
		
		case 18:
			StringCopy(&Var2, "JBIB_P0_04_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar1 = 850;
			break;
		
		case 19:
			StringCopy(&Var2, "JBIB_P0_04_1", 16);
			iVar6 = 4;
			iVar7 = 1;
			iVar1 = 850;
			break;
		
		case 20:
			StringCopy(&Var2, "JBIB_P0_04_2", 16);
			iVar6 = 4;
			iVar7 = 2;
			iVar1 = 890;
			break;
		
		case 21:
			StringCopy(&Var2, "JBIB_P0_04_3", 16);
			iVar6 = 4;
			iVar7 = 3;
			iVar1 = 890;
			break;
		
		case 22:
			StringCopy(&Var2, "JBIB_P0_04_4", 16);
			iVar6 = 4;
			iVar7 = 4;
			iVar1 = 920;
			break;
		
		case 23:
			StringCopy(&Var2, "JBIB_P0_04_5", 16);
			iVar6 = 4;
			iVar7 = 5;
			iVar1 = 920;
			break;
		
		case 24:
			StringCopy(&Var2, "JBIB_P0_04_6", 16);
			iVar6 = 4;
			iVar7 = 6;
			iVar1 = 950;
			break;
		
		case 25:
			StringCopy(&Var2, "JBIB_P0_04_7", 16);
			iVar6 = 4;
			iVar7 = 7;
			iVar1 = 980;
			break;
		
		case 26:
			StringCopy(&Var2, "JBIB_P0_04_8", 16);
			iVar6 = 4;
			iVar7 = 8;
			iVar1 = 1050;
			break;
		
		case 27:
			StringCopy(&Var2, "JBIB_P0_04_9", 16);
			iVar6 = 4;
			iVar7 = 9;
			iVar1 = 1100;
			break;
		
		case 28:
			StringCopy(&Var2, "JBIB_P0_05_0", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar1 = 1890;
			break;
		
		case 29:
			StringCopy(&Var2, "JBIB_P0_05_1", 16);
			iVar6 = 5;
			iVar7 = 1;
			iVar1 = 1820;
			break;
		
		case 30:
			StringCopy(&Var2, "JBIB_P0_05_2", 16);
			iVar6 = 5;
			iVar7 = 2;
			iVar1 = 1820;
			break;
		
		case 31:
			StringCopy(&Var2, "JBIB_P0_05_3", 16);
			iVar6 = 5;
			iVar7 = 3;
			iVar1 = 1850;
			break;
		
		case 32:
			StringCopy(&Var2, "JBIB_P0_05_4", 16);
			iVar6 = 5;
			iVar7 = 4;
			iVar1 = 1850;
			break;
		
		case 33:
			StringCopy(&Var2, "JBIB_P0_05_5", 16);
			iVar6 = 5;
			iVar7 = 5;
			iVar1 = 1900;
			break;
		
		case 34:
			StringCopy(&Var2, "JBIB_P0_05_6", 16);
			iVar6 = 5;
			iVar7 = 6;
			iVar1 = 1920;
			break;
		
		case 35:
			StringCopy(&Var2, "JBIB_P0_05_7", 16);
			iVar6 = 5;
			iVar7 = 7;
			iVar1 = 1980;
			break;
		
		case 36:
			StringCopy(&Var2, "JBIB_P0_05_8", 16);
			iVar6 = 5;
			iVar7 = 8;
			iVar1 = 2100;
			break;
		
		case 37:
			StringCopy(&Var2, "JBIB_P0_05_9", 16);
			iVar6 = 5;
			iVar7 = 9;
			iVar1 = 2120;
			break;
		
		case 38:
			StringCopy(&Var2, "JBIB_P0_05_10", 16);
			iVar6 = 5;
			iVar7 = 10;
			iVar1 = 2000;
			break;
		
		case 39:
			StringCopy(&Var2, "JBIB_P0_05_11", 16);
			iVar6 = 5;
			iVar7 = 11;
			iVar1 = 2200;
			break;
		
		case 40:
			StringCopy(&Var2, "JBIB_P0_05_12", 16);
			iVar6 = 5;
			iVar7 = 12;
			iVar1 = 2280;
			break;
		
		case 41:
			StringCopy(&Var2, "JBIB_P0_05_13", 16);
			iVar6 = 5;
			iVar7 = 13;
			iVar1 = 2300;
			break;
		
		case 42:
			StringCopy(&Var2, "JBIB_P0_05_14", 16);
			iVar6 = 5;
			iVar7 = 14;
			iVar1 = 2350;
			break;
		
		case 43:
			StringCopy(&Var2, "JBIB_P0_05_15", 16);
			iVar6 = 5;
			iVar7 = 15;
			iVar1 = 2280;
			break;
		
		case 44:
			StringCopy(&Var2, "JBIB_P0_06_0", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 45);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_70(int iParam0)//Position - 0x13ECB
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 7;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 1);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_71(int iParam0)//Position - 0x13F3E
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 1;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "BERD_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "BERD_P0_1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "BERD_P0_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "BERD_P0_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "BERD_P0_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 5);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_72(int iParam0)//Position - 0x1400E
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 10;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 1;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 2;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 3;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 4;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 5;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 6;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 7;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 1;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 2;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 3;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 4;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 5;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 1;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 2;
			break;
		
		case 24:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 3;
			break;
		
		case 25:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 4;
			break;
		
		case 26:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 5;
			break;
		
		case 27:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 6;
			break;
		
		case 28:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			break;
		
		case 29:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 1;
			break;
		
		case 30:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 2;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 3;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 4;
			break;
		
		case 33:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 5;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 6;
			break;
		
		case 35:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 7;
			break;
		
		case 36:
			StringCopy(&Var2, "DECL_P0_10_8", 16);
			iVar6 = 10;
			iVar7 = 8;
			break;
		
		case 37:
			StringCopy(&Var2, "DECL_P0_10_9", 16);
			iVar6 = 10;
			iVar7 = 9;
			break;
		
		case 38:
			StringCopy(&Var2, "DECL_P0_10_10", 16);
			iVar6 = 10;
			iVar7 = 10;
			break;
		
		case 39:
			StringCopy(&Var2, "DECL_P0_10_11", 16);
			iVar6 = 10;
			iVar7 = 11;
			break;
		
		case 40:
			StringCopy(&Var2, "DECL_P0_10_12", 16);
			iVar6 = 10;
			iVar7 = 12;
			break;
		
		case 41:
			StringCopy(&Var2, "DECL_P0_10_13", 16);
			iVar6 = 10;
			iVar7 = 13;
			break;
		
		case 42:
			StringCopy(&Var2, "DECL_P0_10_14", 16);
			iVar6 = 10;
			iVar7 = 14;
			break;
		
		case 43:
			StringCopy(&Var2, "DECL_P0_10_15", 16);
			iVar6 = 10;
			iVar7 = 15;
			break;
		
		case 44:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 1;
			break;
		
		case 46:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 2;
			break;
		
		case 47:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 3;
			break;
		
		default:
			func_29(iVar10, iParam0, 48);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_73(int iParam0)//Position - 0x144E5
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 9;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 1;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "SPEC2_P0_08_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar1 = 125;
			break;
		
		case 10:
			StringCopy(&Var2, "SPEC2_P0_08_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 150;
			break;
		
		case 11:
			StringCopy(&Var2, "SPEC2_P0_08_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 175;
			break;
		
		case 12:
			StringCopy(&Var2, "SPEC2_P0_08_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 85;
			break;
		
		case 13:
			StringCopy(&Var2, "SPEC2_P0_08_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 150;
			break;
		
		case 14:
			StringCopy(&Var2, "SPEC2_P0_08_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 175;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 20);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_74(int iParam0)//Position - 0x1474D
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 8;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "SPEC_P0_10", 16);
			iVar6 = 10;
			iVar7 = 0;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 16:
			StringCopy(&Var2, "SPEC_P0_16", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 23:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 24);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_75(int iParam0)//Position - 0x14A22
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 5;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 2;
			iVar0 = true;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 3;
			iVar0 = true;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 4;
			iVar0 = true;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		default:
			func_29(iVar10, iParam0, 14);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_76(int iParam0)//Position - 0x14BEA
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 6;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "FEET_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "FEET_P0_0_1", 16);
			iVar6 = 0;
			iVar7 = 1;
			iVar1 = 665;
			break;
		
		case 2:
			StringCopy(&Var2, "FEET_P0_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 620;
			break;
		
		case 3:
			StringCopy(&Var2, "FEET_P0_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			iVar1 = 540;
			break;
		
		case 4:
			StringCopy(&Var2, "FEET_P0_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			iVar1 = 580;
			break;
		
		case 5:
			StringCopy(&Var2, "FEET_P0_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			iVar1 = 650;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 7:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 8:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 9:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 10:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 11:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 12:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 13:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 14:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 15:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 18:
			StringCopy(&Var2, "FEET_P0_13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 20:
			StringCopy(&Var2, "FEET_P0_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			break;
		
		case 21:
			StringCopy(&Var2, "FEET_P0_15_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			iVar1 = 64;
			break;
		
		case 22:
			StringCopy(&Var2, "FEET_P0_15_2", 16);
			iVar6 = 15;
			iVar7 = 2;
			iVar1 = 56;
			break;
		
		case 23:
			StringCopy(&Var2, "FEET_P0_15_3", 16);
			iVar6 = 15;
			iVar7 = 3;
			iVar1 = 69;
			break;
		
		case 24:
			StringCopy(&Var2, "FEET_P0_15_4", 16);
			iVar6 = 15;
			iVar7 = 4;
			iVar1 = 59;
			break;
		
		case 25:
			StringCopy(&Var2, "FEET_P0_15_5", 16);
			iVar6 = 15;
			iVar7 = 5;
			iVar1 = 62;
			break;
		
		case 26:
			StringCopy(&Var2, "FEET_P0_15_6", 16);
			iVar6 = 15;
			iVar7 = 6;
			iVar1 = 74;
			break;
		
		case 27:
			StringCopy(&Var2, "FEET_P0_15_7", 16);
			iVar6 = 15;
			iVar7 = 7;
			iVar1 = 68;
			break;
		
		case 28:
			StringCopy(&Var2, "FEET_P0_15_8", 16);
			iVar6 = 15;
			iVar7 = 8;
			iVar1 = 72;
			break;
		
		case 29:
			StringCopy(&Var2, "FEET_P0_15_9", 16);
			iVar6 = 15;
			iVar7 = 9;
			iVar1 = 70;
			break;
		
		case 30:
			StringCopy(&Var2, "FEET_P0_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			iVar1 = 48;
			break;
		
		case 31:
			StringCopy(&Var2, "FEET_P0_16_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar1 = 48;
			break;
		
		case 32:
			StringCopy(&Var2, "FEET_P0_16_2", 16);
			iVar6 = 16;
			iVar7 = 2;
			iVar1 = 55;
			break;
		
		case 33:
			StringCopy(&Var2, "FEET_P0_16_3", 16);
			iVar6 = 16;
			iVar7 = 3;
			iVar1 = 75;
			break;
		
		case 34:
			StringCopy(&Var2, "FEET_P0_16_4", 16);
			iVar6 = 16;
			iVar7 = 4;
			iVar1 = 65;
			break;
		
		case 35:
			StringCopy(&Var2, "FEET_P0_16_5", 16);
			iVar6 = 16;
			iVar7 = 5;
			iVar1 = 68;
			break;
		
		case 36:
			StringCopy(&Var2, "FEET_P0_16_6", 16);
			iVar6 = 16;
			iVar7 = 6;
			iVar1 = 58;
			break;
		
		case 37:
			StringCopy(&Var2, "FEET_P0_16_7", 16);
			iVar6 = 16;
			iVar7 = 7;
			iVar1 = 68;
			break;
		
		case 38:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 39:
			StringCopy(&Var2, "FEET_P0_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar1 = 790;
			break;
		
		case 40:
			StringCopy(&Var2, "FEET_P0_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 750;
			break;
		
		case 41:
			StringCopy(&Var2, "FEET_P0_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 860;
			break;
		
		case 42:
			StringCopy(&Var2, "FEET_P0_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 750;
			break;
		
		case 43:
			StringCopy(&Var2, "FEET_P0_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar1 = 790;
			break;
		
		case 44:
			StringCopy(&Var2, "FEET_P0_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 45:
			StringCopy(&Var2, "FEET_P0_18_6", 16);
			iVar6 = 18;
			iVar7 = 6;
			iVar1 = 820;
			break;
		
		case 46:
			StringCopy(&Var2, "FEET_P0_18_7", 16);
			iVar6 = 18;
			iVar7 = 7;
			iVar1 = 800;
			break;
		
		case 47:
			StringCopy(&Var2, "FEET_P0_18_8", 16);
			iVar6 = 18;
			iVar7 = 8;
			iVar1 = 850;
			break;
		
		case 48:
			StringCopy(&Var2, "FEET_P0_18_9", 16);
			iVar6 = 18;
			iVar7 = 9;
			iVar1 = 870;
			break;
		
		case 49:
			StringCopy(&Var2, "FEET_P0_18_10", 16);
			iVar6 = 18;
			iVar7 = 10;
			iVar1 = 720;
			break;
		
		case 50:
			StringCopy(&Var2, "FEET_P0_18_11", 16);
			iVar6 = 18;
			iVar7 = 11;
			iVar1 = 740;
			break;
		
		case 51:
			StringCopy(&Var2, "FEET_P0_18_12", 16);
			iVar6 = 18;
			iVar7 = 12;
			iVar1 = 800;
			break;
		
		case 52:
			StringCopy(&Var2, "FEET_P0_18_13", 16);
			iVar6 = 18;
			iVar7 = 13;
			iVar1 = 750;
			break;
		
		case 53:
			StringCopy(&Var2, "FEET_P0_18_14", 16);
			iVar6 = 18;
			iVar7 = 14;
			iVar1 = 770;
			break;
		
		case 54:
			StringCopy(&Var2, "FEET_P0_18_15", 16);
			iVar6 = 18;
			iVar7 = 15;
			iVar1 = 860;
			break;
		
		case 55:
			StringCopy(&Var2, "FEET_P0_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar1 = 850;
			break;
		
		case 56:
			StringCopy(&Var2, "FEET_P0_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 800;
			break;
		
		case 57:
			StringCopy(&Var2, "FEET_P0_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 780;
			break;
		
		case 58:
			StringCopy(&Var2, "FEET_P0_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 890;
			break;
		
		case 59:
			StringCopy(&Var2, "FEET_P0_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 820;
			break;
		
		case 60:
			StringCopy(&Var2, "FEET_P0_19_5", 16);
			iVar6 = 19;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 61:
			StringCopy(&Var2, "FEET_P0_19_6", 16);
			iVar6 = 19;
			iVar7 = 6;
			iVar1 = 870;
			break;
		
		case 62:
			StringCopy(&Var2, "FEET_P0_19_7", 16);
			iVar6 = 19;
			iVar7 = 7;
			iVar1 = 930;
			break;
		
		case 63:
			StringCopy(&Var2, "FEET_P0_19_8", 16);
			iVar6 = 19;
			iVar7 = 8;
			iVar1 = 880;
			break;
		
		case 64:
			StringCopy(&Var2, "FEET_P0_19_9", 16);
			iVar6 = 19;
			iVar7 = 9;
			iVar1 = 900;
			break;
		
		case 65:
			StringCopy(&Var2, "FEET_P0_19_10", 16);
			iVar6 = 19;
			iVar7 = 10;
			iVar1 = 920;
			break;
		
		case 66:
			StringCopy(&Var2, "FEET_P0_19_11", 16);
			iVar6 = 19;
			iVar7 = 11;
			iVar1 = 970;
			break;
		
		case 67:
			StringCopy(&Var2, "FEET_P0_19_12", 16);
			iVar6 = 19;
			iVar7 = 12;
			iVar1 = 990;
			break;
		
		case 68:
			StringCopy(&Var2, "FEET_P0_19_13", 16);
			iVar6 = 19;
			iVar7 = 13;
			iVar1 = 960;
			break;
		
		case 69:
			StringCopy(&Var2, "FEET_P0_19_14", 16);
			iVar6 = 19;
			iVar7 = 14;
			iVar1 = 980;
			break;
		
		case 70:
			StringCopy(&Var2, "FEET_P0_19_15", 16);
			iVar6 = 19;
			iVar7 = 15;
			iVar1 = 950;
			break;
		
		case 71:
			StringCopy(&Var2, "FEET_P0_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			iVar1 = 110;
			break;
		
		case 72:
			StringCopy(&Var2, "FEET_P0_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 115;
			break;
		
		case 73:
			StringCopy(&Var2, "FEET_P0_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 120;
			break;
		
		case 74:
			StringCopy(&Var2, "FEET_P0_20_3", 16);
			iVar6 = 20;
			iVar7 = 3;
			iVar1 = 110;
			break;
		
		case 75:
			StringCopy(&Var2, "FEET_P0_20_4", 16);
			iVar6 = 20;
			iVar7 = 4;
			iVar1 = 125;
			break;
		
		case 76:
			StringCopy(&Var2, "FEET_P0_20_5", 16);
			iVar6 = 20;
			iVar7 = 5;
			iVar1 = 128;
			break;
		
		case 77:
			StringCopy(&Var2, "FEET_P0_20_6", 16);
			iVar6 = 20;
			iVar7 = 6;
			iVar1 = 135;
			break;
		
		case 78:
			StringCopy(&Var2, "FEET_P0_20_7", 16);
			iVar6 = 20;
			iVar7 = 7;
			iVar1 = 130;
			break;
		
		case 79:
			StringCopy(&Var2, "FEET_P0_20_8", 16);
			iVar6 = 20;
			iVar7 = 8;
			iVar1 = 145;
			break;
		
		case 80:
			StringCopy(&Var2, "FEET_P0_20_9", 16);
			iVar6 = 20;
			iVar7 = 9;
			iVar1 = 110;
			break;
		
		case 81:
			StringCopy(&Var2, "FEET_P0_20_10", 16);
			iVar6 = 20;
			iVar7 = 10;
			iVar1 = 120;
			break;
		
		case 82:
			StringCopy(&Var2, "FEET_P0_20_11", 16);
			iVar6 = 20;
			iVar7 = 11;
			iVar1 = 150;
			break;
		
		case 83:
			StringCopy(&Var2, "FEET_P0_20_12", 16);
			iVar6 = 20;
			iVar7 = 12;
			iVar1 = 125;
			break;
		
		case 84:
			StringCopy(&Var2, "FEET_P0_20_13", 16);
			iVar6 = 20;
			iVar7 = 13;
			iVar1 = 120;
			break;
		
		case 85:
			StringCopy(&Var2, "FEET_P0_20_14", 16);
			iVar6 = 20;
			iVar7 = 14;
			iVar1 = 130;
			break;
		
		case 86:
			StringCopy(&Var2, "FEET_P0_20_15", 16);
			iVar6 = 20;
			iVar7 = 15;
			iVar1 = 110;
			break;
		
		case 87:
			StringCopy(&Var2, "FEET_P0_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 720;
			break;
		
		case 88:
			StringCopy(&Var2, "FEET_P0_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 680;
			break;
		
		case 89:
			StringCopy(&Var2, "FEET_P0_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 650;
			break;
		
		case 90:
			StringCopy(&Var2, "FEET_P0_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 670;
			break;
		
		case 91:
			StringCopy(&Var2, "FEET_P0_21_4", 16);
			iVar6 = 21;
			iVar7 = 4;
			iVar1 = 700;
			break;
		
		case 92:
			StringCopy(&Var2, "FEET_P0_21_5", 16);
			iVar6 = 21;
			iVar7 = 5;
			iVar1 = 680;
			break;
		
		case 93:
			StringCopy(&Var2, "FEET_P0_21_6", 16);
			iVar6 = 21;
			iVar7 = 6;
			iVar1 = 720;
			break;
		
		case 94:
			StringCopy(&Var2, "FEET_P0_21_7", 16);
			iVar6 = 21;
			iVar7 = 7;
			iVar1 = 740;
			break;
		
		case 95:
			StringCopy(&Var2, "FEET_P0_21_8", 16);
			iVar6 = 21;
			iVar7 = 8;
			iVar1 = 760;
			break;
		
		case 96:
			StringCopy(&Var2, "FEET_P0_21_9", 16);
			iVar6 = 21;
			iVar7 = 9;
			iVar1 = 780;
			break;
		
		case 97:
			StringCopy(&Var2, "FEET_P0_21_10", 16);
			iVar6 = 21;
			iVar7 = 10;
			iVar1 = 750;
			break;
		
		case 98:
			StringCopy(&Var2, "FEET_P0_21_11", 16);
			iVar6 = 21;
			iVar7 = 11;
			iVar1 = 700;
			break;
		
		default:
			func_29(iVar10, iParam0, 99);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_77(int iParam0)//Position - 0x1573D
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 4;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "LEGS_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "LEGS_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "LEGS_P0_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "LEGS_P0_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "LEGS_P0_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "LEGS_P0_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "LEGS_P0_0_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			break;
		
		case 7:
			StringCopy(&Var2, "LEGS_P0_0_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			break;
		
		case 8:
			StringCopy(&Var2, "LEGS_P0_0_8", 16);
			iVar6 = 0;
			iVar7 = 8;
			break;
		
		case 9:
			StringCopy(&Var2, "LEGS_P0_0_9", 16);
			iVar6 = 0;
			iVar7 = 9;
			break;
		
		case 10:
			StringCopy(&Var2, "LEGS_P0_0_10", 16);
			iVar6 = 0;
			iVar7 = 10;
			break;
		
		case 11:
			StringCopy(&Var2, "LEGS_P0_0_11", 16);
			iVar6 = 0;
			iVar7 = 11;
			break;
		
		case 12:
			StringCopy(&Var2, "LEGS_P0_0_12", 16);
			iVar6 = 0;
			iVar7 = 12;
			break;
		
		case 13:
			StringCopy(&Var2, "LEGS_P0_0_13", 16);
			iVar6 = 0;
			iVar7 = 13;
			break;
		
		case 14:
			StringCopy(&Var2, "LEGS_P0_0_14", 16);
			iVar6 = 0;
			iVar7 = 14;
			break;
		
		case 15:
			StringCopy(&Var2, "LEGS_P0_0_15", 16);
			iVar6 = 0;
			iVar7 = 15;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 21:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 22:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 23:
			StringCopy(&Var2, "LEGS_P0_7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar1 = 115;
			break;
		
		case 24:
			StringCopy(&Var2, "LEGS_P0_7_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar1 = 115;
			break;
		
		case 25:
			StringCopy(&Var2, "LEGS_P0_7_2", 16);
			iVar6 = 7;
			iVar7 = 2;
			iVar1 = 128;
			break;
		
		case 26:
			StringCopy(&Var2, "LEGS_P0_7_3", 16);
			iVar6 = 7;
			iVar7 = 3;
			iVar1 = 118;
			break;
		
		case 27:
			StringCopy(&Var2, "LEGS_P0_7_4", 16);
			iVar6 = 7;
			iVar7 = 4;
			iVar1 = 125;
			break;
		
		case 28:
			StringCopy(&Var2, "LEGS_P0_7_5", 16);
			iVar6 = 7;
			iVar7 = 5;
			iVar1 = 128;
			break;
		
		case 29:
			StringCopy(&Var2, "LEGS_P0_7_6", 16);
			iVar6 = 7;
			iVar7 = 6;
			iVar1 = 128;
			break;
		
		case 30:
			StringCopy(&Var2, "LEGS_P0_7_7", 16);
			iVar6 = 7;
			iVar7 = 7;
			iVar1 = 125;
			break;
		
		case 31:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 8;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 32:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 33:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 35:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 36:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 2;
			iVar0 = true;
			break;
		
		case 37:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 3;
			iVar0 = true;
			break;
		
		case 38:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 4;
			iVar0 = true;
			break;
		
		case 39:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 5;
			iVar0 = true;
			break;
		
		case 40:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 41:
			StringCopy(&Var2, "LEGS_P0_13_0", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar1 = 68;
			break;
		
		case 42:
			StringCopy(&Var2, "LEGS_P0_13_1", 16);
			iVar6 = 13;
			iVar7 = 1;
			iVar1 = 68;
			break;
		
		case 43:
			StringCopy(&Var2, "LEGS_P0_13_2", 16);
			iVar6 = 13;
			iVar7 = 2;
			iVar1 = 68;
			break;
		
		case 44:
			StringCopy(&Var2, "LEGS_P0_13_3", 16);
			iVar6 = 13;
			iVar7 = 3;
			iVar1 = 68;
			break;
		
		case 45:
			StringCopy(&Var2, "LEGS_P0_13_4", 16);
			iVar6 = 13;
			iVar7 = 4;
			iVar1 = 68;
			break;
		
		case 46:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 47:
			StringCopy(&Var2, "LEGS_P0_15_0", 16);
			iVar6 = 15;
			iVar7 = 0;
			break;
		
		case 48:
			StringCopy(&Var2, "LEGS_P0_15_1", 16);
			iVar6 = 15;
			iVar7 = 1;
			iVar1 = 550;
			break;
		
		case 49:
			StringCopy(&Var2, "LEGS_P0_15_2", 16);
			iVar6 = 15;
			iVar7 = 2;
			iVar1 = 650;
			break;
		
		case 50:
			StringCopy(&Var2, "LEGS_P0_15_3", 16);
			iVar6 = 15;
			iVar7 = 3;
			iVar1 = 875;
			break;
		
		case 51:
			StringCopy(&Var2, "LEGS_P0_15_4", 16);
			iVar6 = 15;
			iVar7 = 4;
			iVar1 = 820;
			break;
		
		case 52:
			StringCopy(&Var2, "LEGS_P0_15_5", 16);
			iVar6 = 15;
			iVar7 = 5;
			iVar1 = 720;
			break;
		
		case 53:
			StringCopy(&Var2, "LEGS_P0_15_6", 16);
			iVar6 = 15;
			iVar7 = 6;
			iVar1 = 750;
			break;
		
		case 54:
			StringCopy(&Var2, "LEGS_P0_15_7", 16);
			iVar6 = 15;
			iVar7 = 7;
			iVar1 = 850;
			break;
		
		case 55:
			StringCopy(&Var2, "LEGS_P0_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 56:
			StringCopy(&Var2, "LEGS_P0_16_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar1 = 48;
			break;
		
		case 57:
			StringCopy(&Var2, "LEGS_P0_16_2", 16);
			iVar6 = 16;
			iVar7 = 2;
			iVar1 = 48;
			break;
		
		case 58:
			StringCopy(&Var2, "LEGS_P0_16_3", 16);
			iVar6 = 16;
			iVar7 = 3;
			iVar1 = 38;
			break;
		
		case 59:
			StringCopy(&Var2, "LEGS_P0_16_4", 16);
			iVar6 = 16;
			iVar7 = 4;
			iVar1 = 38;
			break;
		
		case 60:
			StringCopy(&Var2, "LEGS_P0_16_5", 16);
			iVar6 = 16;
			iVar7 = 5;
			iVar1 = 42;
			break;
		
		case 61:
			StringCopy(&Var2, "LEGS_P0_16_6", 16);
			iVar6 = 16;
			iVar7 = 6;
			iVar1 = 58;
			break;
		
		case 62:
			StringCopy(&Var2, "LEGS_P0_16_7", 16);
			iVar6 = 16;
			iVar7 = 7;
			iVar1 = 46;
			break;
		
		case 63:
			StringCopy(&Var2, "LEGS_P0_16_8", 16);
			iVar6 = 16;
			iVar7 = 8;
			iVar1 = 46;
			break;
		
		case 64:
			StringCopy(&Var2, "LEGS_P0_16_9", 16);
			iVar6 = 16;
			iVar7 = 9;
			iVar1 = 46;
			break;
		
		case 65:
			StringCopy(&Var2, "LEGS_P0_16_10", 16);
			iVar6 = 16;
			iVar7 = 10;
			iVar1 = 68;
			break;
		
		case 66:
			StringCopy(&Var2, "LEGS_P0_16_11", 16);
			iVar6 = 16;
			iVar7 = 11;
			iVar1 = 58;
			break;
		
		case 67:
			StringCopy(&Var2, "LEGS_P0_16_12", 16);
			iVar6 = 16;
			iVar7 = 12;
			iVar1 = 50;
			break;
		
		case 68:
			StringCopy(&Var2, "LEGS_P0_16_13", 16);
			iVar6 = 16;
			iVar7 = 13;
			iVar1 = 68;
			break;
		
		case 69:
			StringCopy(&Var2, "LEGS_P0_16_14", 16);
			iVar6 = 16;
			iVar7 = 14;
			iVar1 = 68;
			break;
		
		case 70:
			StringCopy(&Var2, "LEGS_P0_16_15", 16);
			iVar6 = 16;
			iVar7 = 15;
			iVar1 = 42;
			break;
		
		case 71:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 17;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 72:
			StringCopy(&Var2, "LEGS_P0_18_0", 16);
			iVar6 = 18;
			iVar7 = 0;
			break;
		
		case 73:
			StringCopy(&Var2, "LEGS_P0_18_1", 16);
			iVar6 = 18;
			iVar7 = 1;
			iVar1 = 250;
			break;
		
		case 74:
			StringCopy(&Var2, "LEGS_P0_18_2", 16);
			iVar6 = 18;
			iVar7 = 2;
			iVar1 = 250;
			break;
		
		case 75:
			StringCopy(&Var2, "LEGS_P0_18_3", 16);
			iVar6 = 18;
			iVar7 = 3;
			iVar1 = 290;
			break;
		
		case 76:
			StringCopy(&Var2, "LEGS_P0_18_4", 16);
			iVar6 = 18;
			iVar7 = 4;
			iVar1 = 270;
			break;
		
		case 77:
			StringCopy(&Var2, "LEGS_P0_18_5", 16);
			iVar6 = 18;
			iVar7 = 5;
			iVar1 = 270;
			break;
		
		case 78:
			StringCopy(&Var2, "LEGS_P0_18_6", 16);
			iVar6 = 18;
			iVar7 = 6;
			iVar1 = 15;
			break;
		
		case 79:
			StringCopy(&Var2, "LEGS_P0_18_7", 16);
			iVar6 = 18;
			iVar7 = 7;
			iVar1 = 12;
			break;
		
		case 80:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 19;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 81:
			StringCopy(&Var2, "LEGS_P0_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			break;
		
		case 82:
			StringCopy(&Var2, "LEGS_P0_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 118;
			break;
		
		case 83:
			StringCopy(&Var2, "LEGS_P0_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 110;
			break;
		
		case 84:
			StringCopy(&Var2, "LEGS_P0_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 88;
			break;
		
		case 85:
			StringCopy(&Var2, "LEGS_P0_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 95;
			break;
		
		case 86:
			StringCopy(&Var2, "LEGS_P0_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 95;
			break;
		
		case 87:
			StringCopy(&Var2, "LEGS_P0_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 98;
			break;
		
		case 88:
			StringCopy(&Var2, "LEGS_P0_22_0", 16);
			iVar6 = 22;
			iVar7 = 0;
			iVar1 = 140;
			break;
		
		case 89:
			StringCopy(&Var2, "LEGS_P0_23_0", 16);
			iVar6 = 23;
			iVar7 = 0;
			break;
		
		case 90:
			StringCopy(&Var2, "LEGS_P0_23_1", 16);
			iVar6 = 23;
			iVar7 = 1;
			iVar1 = 150;
			break;
		
		case 91:
			StringCopy(&Var2, "LEGS_P0_23_2", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar1 = 130;
			break;
		
		case 92:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 24;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 93:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 94:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 26;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 95:
			StringCopy(&Var2, "LEGS_P0_27_0", 16);
			iVar6 = 27;
			iVar7 = 0;
			break;
		
		case 96:
			StringCopy(&Var2, "LEGS_P0_28_0", 16);
			iVar6 = 28;
			iVar7 = 0;
			iVar1 = 45;
			break;
		
		case 97:
			StringCopy(&Var2, "LEGS_P0_28_1", 16);
			iVar6 = 28;
			iVar7 = 1;
			iVar1 = 48;
			break;
		
		case 98:
			StringCopy(&Var2, "LEGS_P0_28_2", 16);
			iVar6 = 28;
			iVar7 = 2;
			iVar1 = 48;
			break;
		
		case 99:
			StringCopy(&Var2, "LEGS_P0_28_3", 16);
			iVar6 = 28;
			iVar7 = 3;
			iVar1 = 52;
			break;
		
		case 100:
			StringCopy(&Var2, "LEGS_P0_28_4", 16);
			iVar6 = 28;
			iVar7 = 4;
			iVar1 = 52;
			break;
		
		case 101:
			StringCopy(&Var2, "LEGS_P0_28_5", 16);
			iVar6 = 28;
			iVar7 = 5;
			iVar1 = 55;
			break;
		
		case 102:
			StringCopy(&Var2, "LEGS_P0_28_6", 16);
			iVar6 = 28;
			iVar7 = 6;
			iVar1 = 55;
			break;
		
		case 103:
			StringCopy(&Var2, "LEGS_P0_28_7", 16);
			iVar6 = 28;
			iVar7 = 7;
			iVar1 = 55;
			break;
		
		case 104:
			StringCopy(&Var2, "LEGS_P0_28_8", 16);
			iVar6 = 28;
			iVar7 = 8;
			iVar1 = 58;
			break;
		
		case 105:
			StringCopy(&Var2, "LEGS_P0_28_9", 16);
			iVar6 = 28;
			iVar7 = 9;
			iVar1 = 58;
			break;
		
		case 106:
			StringCopy(&Var2, "LEGS_P0_28_10", 16);
			iVar6 = 28;
			iVar7 = 10;
			iVar1 = 60;
			break;
		
		case 107:
			StringCopy(&Var2, "LEGS_P0_28_11", 16);
			iVar6 = 28;
			iVar7 = 11;
			iVar1 = 60;
			break;
		
		case 108:
			StringCopy(&Var2, "LEGS_P0_28_12", 16);
			iVar6 = 28;
			iVar7 = 12;
			iVar1 = 62;
			break;
		
		case 109:
			StringCopy(&Var2, "LEGS_P0_28_13", 16);
			iVar6 = 28;
			iVar7 = 13;
			iVar1 = 62;
			break;
		
		case 110:
			StringCopy(&Var2, "LEGS_P0_28_14", 16);
			iVar6 = 28;
			iVar7 = 14;
			iVar1 = 65;
			break;
		
		case 111:
			StringCopy(&Var2, "LEGS_P0_28_15", 16);
			iVar6 = 28;
			iVar7 = 15;
			iVar1 = 65;
			break;
		
		case 112:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 29;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 113);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_78(int iParam0)//Position - 0x16386
{
	if (iParam0 < 60)
	{
		func_80(iParam0);
	}
	else
	{
		func_79(iParam0);
	}
	if (Global_69518[0 /*14*/].f_2 == -1)
	{
		func_29(3, iParam0, 181);
	}
}

void func_79(int iParam0)//Position - 0x163BA
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 60:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 9;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 61:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 10;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 62:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 11;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 63:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 64:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 65:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 2;
			iVar0 = true;
			break;
		
		case 66:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 3;
			iVar0 = true;
			break;
		
		case 67:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 4;
			iVar0 = true;
			break;
		
		case 68:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 12;
			iVar7 = 5;
			iVar0 = true;
			break;
		
		case 69:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 13;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 70:
			StringCopy(&Var2, "TORSO_P0_14_0", 16);
			iVar6 = 14;
			iVar7 = 0;
			iVar1 = 120;
			break;
		
		case 71:
			StringCopy(&Var2, "TORSO_P0_14_1", 16);
			iVar6 = 14;
			iVar7 = 1;
			iVar1 = 120;
			break;
		
		case 72:
			StringCopy(&Var2, "TORSO_P0_14_2", 16);
			iVar6 = 14;
			iVar7 = 2;
			iVar1 = 120;
			break;
		
		case 73:
			StringCopy(&Var2, "TORSO_P0_14_3", 16);
			iVar6 = 14;
			iVar7 = 3;
			iVar1 = 120;
			break;
		
		case 74:
			StringCopy(&Var2, "TORSO_P0_14_4", 16);
			iVar6 = 14;
			iVar7 = 4;
			iVar1 = 120;
			break;
		
		case 75:
			StringCopy(&Var2, "TORSO_P0_14_5", 16);
			iVar6 = 14;
			iVar7 = 5;
			iVar1 = 120;
			break;
		
		case 76:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 15;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 77:
			StringCopy(&Var2, "TORSO_P0_16_0", 16);
			iVar6 = 16;
			iVar7 = 0;
			break;
		
		case 78:
			StringCopy(&Var2, "TORSO_P0_16_1", 16);
			iVar6 = 16;
			iVar7 = 1;
			iVar1 = 20;
			break;
		
		case 79:
			StringCopy(&Var2, "TORSO_P0_16_2", 16);
			iVar6 = 16;
			iVar7 = 2;
			iVar1 = 24;
			break;
		
		case 80:
			StringCopy(&Var2, "TORSO_P0_16_3", 16);
			iVar6 = 16;
			iVar7 = 3;
			iVar1 = 22;
			break;
		
		case 81:
			StringCopy(&Var2, "TORSO_P0_16_4", 16);
			iVar6 = 16;
			iVar7 = 4;
			iVar1 = 25;
			break;
		
		case 82:
			StringCopy(&Var2, "TORSO_P0_16_5", 16);
			iVar6 = 16;
			iVar7 = 5;
			iVar1 = 25;
			break;
		
		case 83:
			StringCopy(&Var2, "TORSO_P0_16_6", 16);
			iVar6 = 16;
			iVar7 = 6;
			iVar1 = 22;
			break;
		
		case 84:
			StringCopy(&Var2, "TORSO_P0_16_7", 16);
			iVar6 = 16;
			iVar7 = 7;
			iVar1 = 27;
			break;
		
		case 85:
			StringCopy(&Var2, "TORSO_P0_17_0", 16);
			iVar6 = 17;
			iVar7 = 0;
			break;
		
		case 86:
			StringCopy(&Var2, "TORSO_P0_17_1", 16);
			iVar6 = 17;
			iVar7 = 1;
			break;
		
		case 87:
			StringCopy(&Var2, "TORSO_P0_17_2", 16);
			iVar6 = 17;
			iVar7 = 2;
			break;
		
		case 88:
			StringCopy(&Var2, "TORSO_P0_17_3", 16);
			iVar6 = 17;
			iVar7 = 3;
			iVar1 = 48;
			break;
		
		case 89:
			StringCopy(&Var2, "TORSO_P0_17_4", 16);
			iVar6 = 17;
			iVar7 = 4;
			iVar1 = 40;
			break;
		
		case 90:
			StringCopy(&Var2, "TORSO_P0_17_5", 16);
			iVar6 = 17;
			iVar7 = 5;
			iVar1 = 45;
			break;
		
		case 91:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 18;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 92:
			StringCopy(&Var2, "TORSO_P0_19_0", 16);
			iVar6 = 19;
			iVar7 = 0;
			break;
		
		case 93:
			StringCopy(&Var2, "TORSO_P0_19_1", 16);
			iVar6 = 19;
			iVar7 = 1;
			iVar1 = 190;
			break;
		
		case 94:
			StringCopy(&Var2, "TORSO_P0_19_2", 16);
			iVar6 = 19;
			iVar7 = 2;
			iVar1 = 190;
			break;
		
		case 95:
			StringCopy(&Var2, "TORSO_P0_19_3", 16);
			iVar6 = 19;
			iVar7 = 3;
			iVar1 = 190;
			break;
		
		case 96:
			StringCopy(&Var2, "TORSO_P0_19_4", 16);
			iVar6 = 19;
			iVar7 = 4;
			iVar1 = 210;
			break;
		
		case 97:
			StringCopy(&Var2, "TORSO_P0_20_0", 16);
			iVar6 = 20;
			iVar7 = 0;
			break;
		
		case 98:
			StringCopy(&Var2, "TORSO_P0_20_1", 16);
			iVar6 = 20;
			iVar7 = 1;
			iVar1 = 115;
			break;
		
		case 99:
			StringCopy(&Var2, "TORSO_P0_20_2", 16);
			iVar6 = 20;
			iVar7 = 2;
			iVar1 = 55;
			break;
		
		case 100:
			StringCopy(&Var2, "TORSO_P0_20_3", 16);
			iVar6 = 20;
			iVar7 = 3;
			iVar1 = 110;
			break;
		
		case 101:
			StringCopy(&Var2, "TORSO_P0_20_4", 16);
			iVar6 = 20;
			iVar7 = 4;
			iVar1 = 99;
			break;
		
		case 102:
			StringCopy(&Var2, "TORSO_P0_20_5", 16);
			iVar6 = 20;
			iVar7 = 5;
			iVar1 = 49;
			break;
		
		case 103:
			StringCopy(&Var2, "TORSO_P0_20_6", 16);
			iVar6 = 20;
			iVar7 = 6;
			iVar1 = 120;
			break;
		
		case 104:
			StringCopy(&Var2, "TORSO_P0_20_7", 16);
			iVar6 = 20;
			iVar7 = 7;
			iVar1 = 45;
			break;
		
		case 105:
			StringCopy(&Var2, "TORSO_P0_20_8", 16);
			iVar6 = 20;
			iVar7 = 8;
			iVar1 = 115;
			break;
		
		case 106:
			StringCopy(&Var2, "TORSO_P0_20_9", 16);
			iVar6 = 20;
			iVar7 = 9;
			iVar1 = 105;
			break;
		
		case 107:
			StringCopy(&Var2, "TORSO_P0_20_10", 16);
			iVar6 = 20;
			iVar7 = 10;
			iVar1 = 90;
			break;
		
		case 108:
			StringCopy(&Var2, "TORSO_P0_20_11", 16);
			iVar6 = 20;
			iVar7 = 11;
			iVar1 = 95;
			break;
		
		case 109:
			StringCopy(&Var2, "TORSO_P0_20_12", 16);
			iVar6 = 20;
			iVar7 = 12;
			iVar1 = 39;
			break;
		
		case 110:
			StringCopy(&Var2, "TORSO_P0_20_13", 16);
			iVar6 = 20;
			iVar7 = 13;
			iVar1 = 95;
			break;
		
		case 111:
			StringCopy(&Var2, "TORSO_P0_20_14", 16);
			iVar6 = 20;
			iVar7 = 14;
			iVar1 = 35;
			break;
		
		case 112:
			StringCopy(&Var2, "TORSO_P0_20_15", 16);
			iVar6 = 20;
			iVar7 = 15;
			iVar1 = 95;
			break;
		
		case 113:
			StringCopy(&Var2, "TORSO_P0_21_0", 16);
			iVar6 = 21;
			iVar7 = 0;
			iVar1 = 88;
			break;
		
		case 114:
			StringCopy(&Var2, "TORSO_P0_21_1", 16);
			iVar6 = 21;
			iVar7 = 1;
			iVar1 = 60;
			break;
		
		case 115:
			StringCopy(&Var2, "TORSO_P0_21_2", 16);
			iVar6 = 21;
			iVar7 = 2;
			iVar1 = 70;
			break;
		
		case 116:
			StringCopy(&Var2, "TORSO_P0_21_3", 16);
			iVar6 = 21;
			iVar7 = 3;
			iVar1 = 80;
			break;
		
		case 117:
			StringCopy(&Var2, "TORSO_P0_21_4", 16);
			iVar6 = 21;
			iVar7 = 4;
			iVar1 = 90;
			break;
		
		case 118:
			StringCopy(&Var2, "TORSO_P0_21_5", 16);
			iVar6 = 21;
			iVar7 = 5;
			iVar1 = 80;
			break;
		
		case 119:
			StringCopy(&Var2, "TORSO_P0_21_6", 16);
			iVar6 = 21;
			iVar7 = 6;
			iVar1 = 70;
			break;
		
		case 120:
			StringCopy(&Var2, "TORSO_P0_21_7", 16);
			iVar6 = 21;
			iVar7 = 7;
			iVar1 = 95;
			break;
		
		case 121:
			StringCopy(&Var2, "TORSO_P0_21_8", 16);
			iVar6 = 21;
			iVar7 = 8;
			iVar1 = 105;
			break;
		
		case 122:
			StringCopy(&Var2, "TORSO_P0_21_9", 16);
			iVar6 = 21;
			iVar7 = 9;
			iVar1 = 95;
			break;
		
		case 123:
			StringCopy(&Var2, "TORSO_P0_21_10", 16);
			iVar6 = 21;
			iVar7 = 10;
			iVar1 = 110;
			break;
		
		case 124:
			StringCopy(&Var2, "TORSO_P0_21_11", 16);
			iVar6 = 21;
			iVar7 = 11;
			iVar1 = 98;
			break;
		
		case 125:
			StringCopy(&Var2, "TORSO_P0_21_12", 16);
			iVar6 = 21;
			iVar7 = 12;
			iVar1 = 88;
			break;
		
		case 126:
			StringCopy(&Var2, "TORSO_P0_21_13", 16);
			iVar6 = 21;
			iVar7 = 13;
			iVar1 = 98;
			break;
		
		case 127:
			StringCopy(&Var2, "TORSO_P0_21_14", 16);
			iVar6 = 21;
			iVar7 = 14;
			iVar1 = 110;
			break;
		
		case 128:
			StringCopy(&Var2, "TORSO_P0_21_15", 16);
			iVar6 = 21;
			iVar7 = 15;
			iVar1 = 98;
			break;
		
		case 129:
			StringCopy(&Var2, "TORSO_P0_22_0", 16);
			iVar6 = 22;
			iVar7 = 0;
			break;
		
		case 130:
			StringCopy(&Var2, "TORSO_P0_22_1", 16);
			iVar6 = 22;
			iVar7 = 1;
			iVar1 = 4950;
			break;
		
		case 131:
			StringCopy(&Var2, "TORSO_P0_22_2", 16);
			iVar6 = 22;
			iVar7 = 2;
			iVar1 = 4195;
			break;
		
		case 132:
			StringCopy(&Var2, "TORSO_P0_22_3", 16);
			iVar6 = 22;
			iVar7 = 3;
			iVar1 = 3195;
			break;
		
		case 133:
			StringCopy(&Var2, "TORSO_P0_22_4", 16);
			iVar6 = 22;
			iVar7 = 4;
			iVar1 = 2950;
			break;
		
		case 134:
			StringCopy(&Var2, "TORSO_P0_22_5", 16);
			iVar6 = 22;
			iVar7 = 5;
			iVar1 = 3950;
			break;
		
		case 135:
			StringCopy(&Var2, "TORSO_P0_23_0", 16);
			iVar6 = 23;
			iVar7 = 0;
			iVar1 = 3200;
			break;
		
		case 136:
			StringCopy(&Var2, "TORSO_P0_23_1", 16);
			iVar6 = 23;
			iVar7 = 1;
			iVar1 = 3200;
			break;
		
		case 137:
			StringCopy(&Var2, "TORSO_P0_23_2", 16);
			iVar6 = 23;
			iVar7 = 2;
			iVar1 = 3200;
			break;
		
		case 138:
			StringCopy(&Var2, "TORSO_P0_23_3", 16);
			iVar6 = 23;
			iVar7 = 3;
			iVar1 = 3200;
			break;
		
		case 139:
			StringCopy(&Var2, "TORSO_P0_23_4", 16);
			iVar6 = 23;
			iVar7 = 4;
			iVar1 = 3200;
			break;
		
		case 140:
			StringCopy(&Var2, "TORSO_P0_23_5", 16);
			iVar6 = 23;
			iVar7 = 5;
			iVar1 = 3200;
			break;
		
		case 141:
			StringCopy(&Var2, "TORSO_P0_23_6", 16);
			iVar6 = 23;
			iVar7 = 6;
			iVar1 = 3200;
			break;
		
		case 142:
			StringCopy(&Var2, "TORSO_P0_23_7", 16);
			iVar6 = 23;
			iVar7 = 7;
			iVar1 = 3200;
			break;
		
		case 143:
			StringCopy(&Var2, "TORSO_P0_23_8", 16);
			iVar6 = 23;
			iVar7 = 8;
			iVar1 = 3200;
			break;
		
		case 144:
			StringCopy(&Var2, "TORSO_P0_23_9", 16);
			iVar6 = 23;
			iVar7 = 9;
			iVar1 = 3200;
			break;
		
		case 145:
			StringCopy(&Var2, "TORSO_P0_23_10", 16);
			iVar6 = 23;
			iVar7 = 10;
			iVar1 = 3200;
			break;
		
		case 146:
			StringCopy(&Var2, "TORSO_P0_23_11", 16);
			iVar6 = 23;
			iVar7 = 11;
			iVar1 = 3200;
			break;
		
		case 147:
			StringCopy(&Var2, "TORSO_P0_23_12", 16);
			iVar6 = 23;
			iVar7 = 12;
			iVar1 = 3200;
			break;
		
		case 148:
			StringCopy(&Var2, "TORSO_P0_23_13", 16);
			iVar6 = 23;
			iVar7 = 13;
			iVar1 = 3200;
			break;
		
		case 149:
			StringCopy(&Var2, "TORSO_P0_23_14", 16);
			iVar6 = 23;
			iVar7 = 14;
			iVar1 = 3200;
			break;
		
		case 150:
			StringCopy(&Var2, "TORSO_P0_23_15", 16);
			iVar6 = 23;
			iVar7 = 15;
			iVar1 = 3200;
			break;
		
		case 151:
			StringCopy(&Var2, "TORSO_P0_24_0", 16);
			iVar6 = 24;
			iVar7 = 0;
			iVar1 = 1350;
			break;
		
		case 152:
			StringCopy(&Var2, "TORSO_P0_24_1", 16);
			iVar6 = 24;
			iVar7 = 1;
			iVar1 = 1400;
			break;
		
		case 153:
			StringCopy(&Var2, "TORSO_P0_24_2", 16);
			iVar6 = 24;
			iVar7 = 2;
			iVar1 = 1200;
			break;
		
		case 154:
			StringCopy(&Var2, "TORSO_P0_24_3", 16);
			iVar6 = 24;
			iVar7 = 3;
			iVar1 = 1250;
			break;
		
		case 155:
			StringCopy(&Var2, "TORSO_P0_24_4", 16);
			iVar6 = 24;
			iVar7 = 4;
			iVar1 = 1350;
			break;
		
		case 156:
			StringCopy(&Var2, "TORSO_P0_24_5", 16);
			iVar6 = 24;
			iVar7 = 5;
			iVar1 = 1300;
			break;
		
		case 157:
			StringCopy(&Var2, "TORSO_P0_24_6", 16);
			iVar6 = 24;
			iVar7 = 6;
			iVar1 = 1380;
			break;
		
		case 158:
			StringCopy(&Var2, "TORSO_P0_24_7", 16);
			iVar6 = 24;
			iVar7 = 7;
			iVar1 = 1340;
			break;
		
		case 159:
			StringCopy(&Var2, "TORSO_P0_24_8", 16);
			iVar6 = 24;
			iVar7 = 8;
			iVar1 = 1380;
			break;
		
		case 160:
			StringCopy(&Var2, "TORSO_P0_24_9", 16);
			iVar6 = 24;
			iVar7 = 9;
			iVar1 = 1250;
			break;
		
		case 161:
			StringCopy(&Var2, "TORSO_P0_25_0", 16);
			iVar6 = 25;
			iVar7 = 0;
			iVar1 = 840;
			break;
		
		case 162:
			StringCopy(&Var2, "TORSO_P0_25_1", 16);
			iVar6 = 25;
			iVar7 = 1;
			iVar1 = 840;
			break;
		
		case 163:
			StringCopy(&Var2, "TORSO_P0_25_2", 16);
			iVar6 = 25;
			iVar7 = 2;
			iVar1 = 840;
			break;
		
		case 164:
			StringCopy(&Var2, "TORSO_P0_25_3", 16);
			iVar6 = 25;
			iVar7 = 3;
			iVar1 = 840;
			break;
		
		case 165:
			StringCopy(&Var2, "TORSO_P0_25_4", 16);
			iVar6 = 25;
			iVar7 = 4;
			iVar1 = 840;
			break;
		
		case 166:
			StringCopy(&Var2, "TORSO_P0_25_5", 16);
			iVar6 = 25;
			iVar7 = 5;
			iVar1 = 840;
			break;
		
		case 167:
			StringCopy(&Var2, "TORSO_P0_25_6", 16);
			iVar6 = 25;
			iVar7 = 6;
			iVar1 = 840;
			break;
		
		case 168:
			StringCopy(&Var2, "TORSO_P0_25_7", 16);
			iVar6 = 25;
			iVar7 = 7;
			iVar1 = 840;
			break;
		
		case 169:
			StringCopy(&Var2, "TORSO_P0_26_0", 16);
			iVar6 = 26;
			iVar7 = 0;
			break;
		
		case 170:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 27;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 171:
			StringCopy(&Var2, "TORSO_P0_28_0", 16);
			iVar6 = 28;
			iVar7 = 0;
			break;
		
		case 172:
			StringCopy(&Var2, "TORSO_P0_28_1", 16);
			iVar6 = 28;
			iVar7 = 1;
			iVar1 = 130;
			break;
		
		case 173:
			StringCopy(&Var2, "TORSO_P0_28_2", 16);
			iVar6 = 28;
			iVar7 = 2;
			iVar1 = 110;
			break;
		
		case 174:
			StringCopy(&Var2, "TORSO_P0_29_0", 16);
			iVar6 = 29;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 175:
			StringCopy(&Var2, "TORSO_P0_30_0", 16);
			iVar6 = 30;
			iVar7 = 0;
			iVar1 = 290;
			break;
		
		case 176:
			StringCopy(&Var2, "TORSO_P0_30_1", 16);
			iVar6 = 30;
			iVar7 = 1;
			iVar1 = 320;
			break;
		
		case 177:
			StringCopy(&Var2, "TORSO_P0_31_0", 16);
			iVar6 = 31;
			iVar7 = 0;
			iVar1 = 59;
			break;
		
		case 178:
			StringCopy(&Var2, "TORSO_P0_31_1", 16);
			iVar6 = 31;
			iVar7 = 1;
			iVar1 = 55;
			break;
		
		case 179:
			StringCopy(&Var2, "TORSO_P0_31_2", 16);
			iVar6 = 31;
			iVar7 = 2;
			iVar1 = 59;
			break;
		
		case 180:
			StringCopy(&Var2, "TORSO_P0_31_3", 16);
			iVar6 = 31;
			iVar7 = 3;
			iVar1 = 49;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_80(int iParam0)//Position - 0x1715A
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 3;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "TORSO_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "TORSO_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "TORSO_P0_0_2", 16);
			iVar6 = 0;
			iVar7 = 2;
			iVar1 = 3500;
			break;
		
		case 3:
			StringCopy(&Var2, "TORSO_P0_0_3", 16);
			iVar6 = 0;
			iVar7 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "TORSO_P0_0_4", 16);
			iVar6 = 0;
			iVar7 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "TORSO_P0_0_5", 16);
			iVar6 = 0;
			iVar7 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "TORSO_P0_0_6", 16);
			iVar6 = 0;
			iVar7 = 6;
			break;
		
		case 7:
			StringCopy(&Var2, "TORSO_P0_0_7", 16);
			iVar6 = 0;
			iVar7 = 7;
			break;
		
		case 8:
			StringCopy(&Var2, "TORSO_P0_0_8", 16);
			iVar6 = 0;
			iVar7 = 8;
			break;
		
		case 9:
			StringCopy(&Var2, "TORSO_P0_0_9", 16);
			iVar6 = 0;
			iVar7 = 9;
			break;
		
		case 10:
			StringCopy(&Var2, "TORSO_P0_0_10", 16);
			iVar6 = 0;
			iVar7 = 10;
			break;
		
		case 11:
			StringCopy(&Var2, "TORSO_P0_0_11", 16);
			iVar6 = 0;
			iVar7 = 11;
			break;
		
		case 12:
			StringCopy(&Var2, "TORSO_P0_0_12", 16);
			iVar6 = 0;
			iVar7 = 12;
			break;
		
		case 13:
			StringCopy(&Var2, "TORSO_P0_0_13", 16);
			iVar6 = 0;
			iVar7 = 13;
			break;
		
		case 14:
			StringCopy(&Var2, "TORSO_P0_0_14", 16);
			iVar6 = 0;
			iVar7 = 14;
			break;
		
		case 15:
			StringCopy(&Var2, "TORSO_P0_0_15", 16);
			iVar6 = 0;
			iVar7 = 15;
			break;
		
		case 16:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 1;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 17:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 0;
			iVar1 = 20;
			break;
		
		case 18:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 1;
			iVar1 = 18;
			break;
		
		case 19:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 2;
			iVar1 = 22;
			break;
		
		case 20:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 2;
			iVar7 = 3;
			iVar1 = 25;
			break;
		
		case 21:
			StringCopy(&Var2, "TORSO_P0_2_4", 16);
			iVar6 = 2;
			iVar7 = 4;
			iVar1 = 19;
			break;
		
		case 22:
			StringCopy(&Var2, "TORSO_P0_2_5", 16);
			iVar6 = 2;
			iVar7 = 5;
			iVar1 = 20;
			break;
		
		case 23:
			StringCopy(&Var2, "TORSO_P0_2_6", 16);
			iVar6 = 2;
			iVar7 = 6;
			iVar1 = 22;
			break;
		
		case 24:
			StringCopy(&Var2, "TORSO_P0_2_7", 16);
			iVar6 = 2;
			iVar7 = 7;
			iVar1 = 18;
			break;
		
		case 25:
			StringCopy(&Var2, "TORSO_P0_2_8", 16);
			iVar6 = 2;
			iVar7 = 8;
			iVar1 = 39;
			break;
		
		case 26:
			StringCopy(&Var2, "TORSO_P0_2_9", 16);
			iVar6 = 2;
			iVar7 = 9;
			iVar1 = 32;
			break;
		
		case 27:
			StringCopy(&Var2, "TORSO_P0_2_10", 16);
			iVar6 = 2;
			iVar7 = 10;
			iVar1 = 35;
			break;
		
		case 28:
			StringCopy(&Var2, "TORSO_P0_2_11", 16);
			iVar6 = 2;
			iVar7 = 11;
			iVar1 = 35;
			break;
		
		case 29:
			StringCopy(&Var2, "TORSO_P0_2_12", 16);
			iVar6 = 2;
			iVar7 = 12;
			iVar1 = 210;
			break;
		
		case 30:
			StringCopy(&Var2, "TORSO_P0_2_13", 16);
			iVar6 = 2;
			iVar7 = 13;
			iVar1 = 250;
			break;
		
		case 31:
			StringCopy(&Var2, "TORSO_P0_2_14", 16);
			iVar6 = 2;
			iVar7 = 14;
			iVar1 = 290;
			break;
		
		case 32:
			StringCopy(&Var2, "TORSO_P0_2_15", 16);
			iVar6 = 2;
			iVar7 = 15;
			iVar1 = 310;
			break;
		
		case 33:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 34:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 3;
			iVar7 = 1;
			iVar0 = true;
			break;
		
		case 35:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 4;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 36:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 37:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 6;
			iVar7 = 0;
			iVar0 = true;
			break;
		
		case 38:
			StringCopy(&Var2, "TORSO_P0_7_0", 16);
			iVar6 = 7;
			iVar7 = 0;
			iVar1 = 150;
			break;
		
		case 39:
			StringCopy(&Var2, "TORSO_P0_7_1", 16);
			iVar6 = 7;
			iVar7 = 1;
			iVar1 = 160;
			break;
		
		case 40:
			StringCopy(&Var2, "TORSO_P0_7_2", 16);
			iVar6 = 7;
			iVar7 = 2;
			iVar1 = 150;
			break;
		
		case 41:
			StringCopy(&Var2, "TORSO_P0_7_3", 16);
			iVar6 = 7;
			iVar7 = 3;
			iVar1 = 150;
			break;
		
		case 42:
			StringCopy(&Var2, "TORSO_P0_7_4", 16);
			iVar6 = 7;
			iVar7 = 4;
			iVar1 = 160;
			break;
		
		case 43:
			StringCopy(&Var2, "TORSO_P0_7_5", 16);
			iVar6 = 7;
			iVar7 = 5;
			iVar1 = 160;
			break;
		
		case 44:
			StringCopy(&Var2, "TORSO_P0_8_0", 16);
			iVar6 = 8;
			iVar7 = 0;
			break;
		
		case 45:
			StringCopy(&Var2, "TORSO_P0_8_1", 16);
			iVar6 = 8;
			iVar7 = 1;
			iVar1 = 52;
			break;
		
		case 46:
			StringCopy(&Var2, "TORSO_P0_8_2", 16);
			iVar6 = 8;
			iVar7 = 2;
			iVar1 = 52;
			break;
		
		case 47:
			StringCopy(&Var2, "TORSO_P0_8_3", 16);
			iVar6 = 8;
			iVar7 = 3;
			iVar1 = 55;
			break;
		
		case 48:
			StringCopy(&Var2, "TORSO_P0_8_4", 16);
			iVar6 = 8;
			iVar7 = 4;
			iVar1 = 55;
			break;
		
		case 49:
			StringCopy(&Var2, "TORSO_P0_8_5", 16);
			iVar6 = 8;
			iVar7 = 5;
			iVar1 = 58;
			break;
		
		case 50:
			StringCopy(&Var2, "TORSO_P0_8_6", 16);
			iVar6 = 8;
			iVar7 = 6;
			iVar1 = 58;
			break;
		
		case 51:
			StringCopy(&Var2, "TORSO_P0_8_7", 16);
			iVar6 = 8;
			iVar7 = 7;
			iVar1 = 62;
			break;
		
		case 52:
			StringCopy(&Var2, "TORSO_P0_8_8", 16);
			iVar6 = 8;
			iVar7 = 8;
			iVar1 = 65;
			break;
		
		case 53:
			StringCopy(&Var2, "TORSO_P0_8_9", 16);
			iVar6 = 8;
			iVar7 = 9;
			iVar1 = 65;
			break;
		
		case 54:
			StringCopy(&Var2, "TORSO_P0_8_10", 16);
			iVar6 = 8;
			iVar7 = 10;
			iVar1 = 68;
			break;
		
		case 55:
			StringCopy(&Var2, "TORSO_P0_8_11", 16);
			iVar6 = 8;
			iVar7 = 11;
			iVar1 = 68;
			break;
		
		case 56:
			StringCopy(&Var2, "TORSO_P0_8_12", 16);
			iVar6 = 8;
			iVar7 = 12;
			iVar1 = 55;
			break;
		
		case 57:
			StringCopy(&Var2, "TORSO_P0_8_13", 16);
			iVar6 = 8;
			iVar7 = 13;
			iVar1 = 62;
			break;
		
		case 58:
			StringCopy(&Var2, "TORSO_P0_8_14", 16);
			iVar6 = 8;
			iVar7 = 14;
			iVar1 = 58;
			break;
		
		case 59:
			StringCopy(&Var2, "TORSO_P0_8_15", 16);
			iVar6 = 8;
			iVar7 = 15;
			iVar1 = 58;
			break;
		
		default:
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_81(int iParam0)//Position - 0x177E6
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 2;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "HAIR_P0_0_0", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "HAIR_P0_1_0", 16);
			iVar6 = 1;
			iVar7 = 0;
			break;
		
		case 2:
			StringCopy(&Var2, "HAIR_P0_2_0", 16);
			iVar6 = 2;
			iVar7 = 0;
			break;
		
		case 3:
			StringCopy(&Var2, "HAIR_P0_3_0", 16);
			iVar6 = 3;
			iVar7 = 0;
			break;
		
		case 4:
			StringCopy(&Var2, "HAIR_P0_4_0", 16);
			iVar6 = 4;
			iVar7 = 0;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 5;
			iVar7 = 0;
			break;
		
		default:
			func_29(iVar10, iParam0, 6);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_82(int iParam0)//Position - 0x178CC
{
	int iVar0;
	int iVar1;
	struct<2> Var2;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	
	iVar0 = false;
	iVar1 = 10;
	iVar6 = 0;
	iVar7 = 0;
	iVar8 = -1;
	iVar9 = 2;
	iVar10 = 0;
	Global_69518[0 /*14*/].f_5 = 0;
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 0;
			break;
		
		case 1:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 1;
			break;
		
		case 2:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 2;
			break;
		
		case 3:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 3;
			break;
		
		case 4:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 4;
			break;
		
		case 5:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 5;
			break;
		
		case 6:
			StringCopy(&Var2, "NO_LABEL", 16);
			iVar6 = 0;
			iVar7 = 6;
			break;
		
		default:
			func_29(iVar10, iParam0, 7);
			return;
			break;
	}
	func_17(&(Global_69518[0 /*14*/]), iVar10, iParam0, &Var2, iVar6, iVar7, iVar1, iVar0, iVar8, iVar9, 0);
}

void func_83()//Position - 0x179C9
{
	Global_69518[0 /*14*/].f_1 = -1;
	Global_69518[0 /*14*/].f_2 = -1;
	Global_69518[0 /*14*/].f_5 = -1;
	Global_69518[0 /*14*/].f_3 = -1;
	Global_69518[0 /*14*/].f_4 = -1;
	Global_69518[0 /*14*/].f_7 = 0;
	Global_69518[0 /*14*/].f_6 = 0;
	Global_69518[0 /*14*/].f_13 = -1;
	Global_69518[0 /*14*/].f_12 = 0;
	Global_69518[0 /*14*/] = 0;
	StringCopy(&(Global_69518[0 /*14*/].f_8), "NO_LABEL", 16);
}

bool func_84(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x17A42
{
	var uVar0;
	
	*iParam3 = -99;
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 8:
					if (iParam2 == 7 || iParam2 == 23)
					{
						*iParam3 = 1;
					}
					break;
				
				case 9:
					if (iParam2 == 8 || (iParam2 >= 9 && iParam2 <= 14))
					{
						*iParam3 = 1;
					}
					break;
				
				case 10:
					if (iParam2 >= 44 && iParam2 <= 47)
					{
						*iParam3 = 1;
					}
					break;
				
				case 14:
					if ((((((iParam2 >= 31 && iParam2 <= 32) || (iParam2 >= 33 && iParam2 <= 34)) || (iParam2 >= 35 && iParam2 <= 36)) || iParam2 == 37) || (iParam2 >= 40 && iParam2 <= 41)) || iParam2 == 46)
					{
						*iParam3 = 1;
					}
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 2:
					if (iParam2 == 20)
					{
						*iParam3 = 20;
					}
					break;
				
				case 8:
					if (iParam2 == 4)
					{
						*iParam3 = 19;
					}
					break;
				
				case 9:
					if (iParam2 >= 5 && iParam2 <= 10)
					{
						*iParam3 = 19;
					}
					break;
				
				case 10:
					if (iParam2 >= 47 && iParam2 <= 50)
					{
						*iParam3 = 19;
					}
					break;
				
				case 14:
					if (((((iParam2 >= 26 && iParam2 <= 27) || (iParam2 >= 28 && iParam2 <= 29)) || (iParam2 >= 30 && iParam2 <= 31)) || iParam2 == 32) || (iParam2 >= 35 && iParam2 <= 36))
					{
						*iParam3 = 19;
					}
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 8:
					if (iParam2 == 7)
					{
						*iParam3 = 2;
					}
					break;
				
				case 9:
					if ((iParam2 >= 9 && iParam2 <= 14) || (iParam2 >= 15 && iParam2 <= 16))
					{
						*iParam3 = 2;
					}
					break;
				
				case 10:
					if (iParam2 >= 29 && iParam2 <= 32)
					{
						*iParam3 = 2;
					}
					break;
				
				case 14:
					if ((((((iParam2 >= 47 && iParam2 <= 48) || (iParam2 >= 49 && iParam2 <= 50)) || (iParam2 >= 51 && iParam2 <= 52)) || iParam2 == 53) || (iParam2 >= 56 && iParam2 <= 57)) || iParam2 == 62)
					{
						*iParam3 = 2;
					}
					break;
			}
			break;
	}
	if (*iParam3 != -99)
	{
		uVar0 = func_13(iParam0);
		Global_101652.f_2079.f_539[uVar0 /*65*/].f_60 = iParam2;
		Global_101652.f_2079.f_539[uVar0 /*65*/].f_61 = iParam1;
		return true;
	}
	return false;
}

int func_85(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x17D49
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	
	iVar0 = func_9(iParam3);
	iVar1 = ped::get_number_of_ped_drawable_variations(iParam0, iVar0);
	iVar3 = 0;
	while (iVar3 <= (iVar1 - 1))
	{
		iVar5 = ped::get_number_of_ped_texture_variations(iParam0, iVar0, iVar3);
		if (iVar3 != iParam1)
		{
			iVar2 = (iVar2 + iVar5);
		}
		else
		{
			iVar4 = 0;
			while (iVar4 <= (iVar5 - 1))
			{
				if (iVar3 == iParam1 && iVar4 == iParam2)
				{
					return iVar2;
				}
				else
				{
					iVar2++;
				}
				iVar4++;
			}
		}
		iVar3++;
	}
	return -99;
}

int func_86(int iParam0)//Position - 0x17DCD
{
	switch (iParam0)
	{
		case 0:
			return 0;
			break;
		
		case 2:
			return 2;
			break;
		
		case 3:
			return 3;
			break;
		
		case 4:
			return 4;
			break;
		
		case 6:
			return 6;
			break;
		
		case 5:
			return 5;
			break;
		
		case 8:
			return 8;
			break;
		
		case 9:
			return 9;
			break;
		
		case 10:
			return 10;
			break;
		
		case 1:
			return 1;
			break;
		
		case 7:
			return 7;
			break;
		
		case 11:
			return 11;
			break;
	}
	return 0;
}

void func_87(int iParam0, var uParam1, int iParam2)//Position - 0x17E7D
{
	int iVar0;
	int iVar1;
	
	if (!ped::is_ped_injured(iParam0))
	{
		iVar0 = func_92(iParam0);
		iVar1 = 0;
		while (iVar1 < 12)
		{
			func_91(iParam0, iVar1, &(uParam1->f_13[iVar1]), uParam1[iVar1], &(uParam1->f_26[iVar1]), iParam2, 145);
			iVar1++;
		}
		iVar1 = 0;
		while (iVar1 < 9)
		{
			func_90(iParam0, iVar1, &(uParam1->f_39[iVar1]), &(uParam1->f_49[iVar1]), iParam2, 145);
			iVar1++;
		}
		if (func_89(iVar0))
		{
			uParam1->f_59 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_59;
			uParam1->f_60 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_60;
			uParam1->f_61 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_61;
			uParam1->f_62 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_62;
			uParam1->f_63 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_63;
			uParam1->f_64 = Global_101652.f_2079.f_539[iVar0 /*65*/].f_64;
		}
		else if (network::network_is_game_in_progress() && entity::get_entity_model(iParam0) == entity::get_entity_model(player::player_ped_id()))
		{
			if (func_88(161, -1))
			{
				uParam1->f_59 = func_20(2045, Global_69516, 0);
			}
			else
			{
				uParam1->f_59 = func_20(747, Global_69516, 0);
			}
			uParam1->f_60 = func_20(748, Global_69516, 0);
			uParam1->f_61 = func_20(749, Global_69516, 0);
		}
		if (network::network_is_game_in_progress() && iParam0 == player::player_ped_id())
		{
			if (func_88(161, -1))
			{
				uParam1->f_59 = func_20(2045, Global_69516, 0);
			}
			else
			{
				uParam1->f_59 = func_20(747, Global_69516, 0);
			}
		}
	}
}

int func_88(int iParam0, int iParam1)//Position - 0x18029
{
	int iVar0;
	var uVar1;
	
	iVar0 = Global_2522528[iParam0 /*3*/][func_21(iParam1)];
	if (stats::stat_get_bool(iVar0, &uVar1, -1))
	{
		return uVar1;
	}
	return 0;
}

int func_89(int iParam0)//Position - 0x18055
{
	return iParam0 < 3;
}

void func_90(int iParam0, int iParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0x18061
{
	int iVar0;
	
	iVar0 = func_92(iParam0);
	if (iParam0 != 0)
	{
		*uParam2 = ped::get_ped_prop_index(iParam0, iParam1);
		*uParam3 = ped::get_ped_prop_texture_index(iParam0, iParam1);
	}
	else
	{
		iVar0 = iParam5;
	}
	if (iParam4 == 0)
	{
		return;
	}
	if (iParam1 == 0)
	{
		if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
		{
			if (iParam0 != 0)
			{
				if (ped::is_ped_wearing_helmet(iParam0) && ped::_0x451294E859ECC018(iParam0) != -1)
				{
					*uParam2 = ped::_0x451294E859ECC018(iParam0);
					*uParam3 = ped::_0x9D728C1E12BF5518(iParam0);
				}
			}
		}
	}
	switch (iVar0)
	{
		case 0:
			if (iParam1 == 0)
			{
				if (*uParam2 == 7)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 11)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 16 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 23)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 27)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 28)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 >= 14 && *uParam2 <= 20)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			else if (iParam1 == 1)
			{
				if (*uParam2 == 1)
				{
					if (iParam4 & 2 != 0 || iParam4 & 64 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
		
		case 1:
			if (iParam1 == 0)
			{
				if (*uParam2 == 2)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 4)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 16 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 6)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 17)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 20)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 >= 8 && *uParam2 <= 14)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
		
		case 2:
			if (iParam1 == 0)
			{
				if (*uParam2 == 9)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 11)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 12)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 21)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 23)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if (*uParam2 == 27)
				{
					if ((iParam4 & 1 != 0 || iParam4 & 2 != 0) || iParam4 & 8 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
				else if ((*uParam2 >= 14 && *uParam2 <= 20) || *uParam2 == 2)
				{
					if (iParam4 & 2 != 0 || iParam4 & 4 != 0)
					{
						*uParam2 = -1;
						*uParam3 = -1;
					}
				}
			}
			break;
	}
}

void func_91(int iParam0, int iParam1, var uParam2, var uParam3, var uParam4, int iParam5, int iParam6)//Position - 0x185A9
{
	int iVar0;
	
	iVar0 = func_92(iParam0);
	if (iParam0 != 0)
	{
		*uParam2 = ped::get_ped_drawable_variation(iParam0, iParam1);
		*uParam3 = ped::get_ped_texture_variation(iParam0, iParam1);
		*uParam4 = ped::get_ped_palette_variation(iParam0, iParam1);
	}
	else
	{
		iVar0 = iParam6;
	}
	if (iParam5 == 0)
	{
		return;
	}
	switch (iVar0)
	{
		case 0:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 15)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 64 != 0)
				{
					if (*uParam2 == 3 || *uParam2 == 22)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 5)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
				{
					if (*uParam2 == 8)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
		
		case 1:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 1 || *uParam2 == 10)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
				if (iParam5 & 2 != 0 || iParam5 & 64 != 0)
				{
					if (*uParam2 == 19)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
				{
					if (*uParam2 == 5)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
		
		case 2:
			if (iParam1 == 8)
			{
				if ((iParam5 & 1 != 0 || iParam5 & 2 != 0) || iParam5 & 32 != 0)
				{
					if (*uParam2 == 3)
					{
						*uParam2 = 14;
						*uParam3 = 0;
					}
				}
			}
			else if (iParam1 == 9)
			{
				if (*uParam2 >= 5 && *uParam2 <= 7)
				{
					if (iParam5 & 2 != 0 || iParam5 & 4 != 0)
					{
						*uParam2 = 0;
						*uParam3 = 0;
					}
				}
			}
			break;
	}
}

int func_92(int iParam0)//Position - 0x187EA
{
	int iVar0;
	int iVar1;
	
	if (entity::does_entity_exist(iParam0))
	{
		iVar1 = entity::get_entity_model(iParam0);
		iVar0 = 0;
		while (iVar0 <= 2)
		{
			if (func_93(iVar0) == iVar1)
			{
				return iVar0;
			}
			iVar0++;
		}
	}
	return 145;
}

int func_93(int iParam0)//Position - 0x18827
{
	if (func_89(iParam0))
	{
		return Global_101652.f_26993[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

void func_94(char* sParam0, vector3 vParam1, float fParam4, int iParam5)//Position - 0x18851
{
	if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), vParam1, 1) < fParam4 && !*iParam5)
	{
		cutscene::request_cutscene(sParam0, 8);
		*iParam5 = 1;
	}
}

bool func_95(vector3 vParam0, float fParam3)//Position - 0x18886
{
	switch (iLocal_876)
	{
		case 0:
			if (func_97(&iLocal_103, 15, -808.0422f, 168.5755f, 75.7504f, 244.0649f, 1))
			{
				iLocal_876++;
			}
			break;
		
		case 1:
			if (!ped::is_ped_injured(iLocal_103))
			{
				ped::_0x39D55A620FCB6A3A(iLocal_103, 2, 3, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_103, 3, 4, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_103, 4, 4, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_103, 6, 2, 0);
				ped::_is_ped_prop_valid(iLocal_103, 0, 0, 0);
				ped::_is_ped_prop_valid(iLocal_103, 1, 1, 0);
				iLocal_876++;
			}
			break;
		
		case 2:
			if (!ped::is_ped_injured(iLocal_103))
			{
				if (ped::_0x66680A92700F43DF(iLocal_103))
				{
					ped::set_ped_component_variation(iLocal_103, 2, 3, 0, 0);
					ped::set_ped_component_variation(iLocal_103, 3, 4, 0, 0);
					ped::set_ped_component_variation(iLocal_103, 4, 4, 0, 0);
					ped::set_ped_component_variation(iLocal_103, 6, 2, 0, 0);
					ped::set_ped_prop_index(iLocal_103, 0, 0, 0, false);
					ped::set_ped_prop_index(iLocal_103, 1, 1, 0, false);
					entity::set_entity_coords(iLocal_103, vParam0, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_103, fParam3);
					func_96(iLocal_103);
					ped::_0x5AAB586FFEC0FD96(iLocal_103);
					ped::_0xF79F9DEF0AADE61A(iLocal_103);
					iLocal_876 = 0;
					return true;
				}
			}
			break;
	}
	return false;
}

void func_96(int iParam0)//Position - 0x189A7
{
	if (!ped::is_ped_injured(iParam0))
	{
		ped::set_ped_can_be_dragged_out(iParam0, 0);
		ped::set_ped_can_be_targetted(iParam0, false);
		ped::set_ped_get_out_upside_down_vehicle(iParam0, 0);
		ped::set_ped_config_flag(iParam0, 104, true);
		ped::set_ped_can_ragdoll_from_player_impact(iParam0, 0);
		ped::set_ped_never_leaves_group(iParam0, 1);
		ped::set_ped_dies_in_water(iParam0, 0);
		ped::set_blocking_of_non_temporary_events(iParam0, true);
		ped::set_ped_relationship_group_hash(iParam0, iLocal_144);
	}
}

bool func_97(int iParam0, int iParam1, vector3 vParam2, float fParam5, int iParam6)//Position - 0x189FB
{
	int iVar0;
	
	if (!func_89(iParam1))
	{
		iVar0 = func_99(iParam1);
		streaming::request_model(iVar0);
		if (streaming::has_model_loaded(iVar0))
		{
			if (entity::does_entity_exist(*iParam0))
			{
				ped::delete_ped(iParam0);
			}
			*iParam0 = ped::create_ped(26, iVar0, vParam2, fParam5, 0, false);
			ped::set_ped_default_component_variation(*iParam0);
			if (iVar0 == joaat("ig_lamardavis"))
			{
				if (ped::get_ped_drawable_variation(*iParam0, 3) == 0)
				{
					ped::set_ped_component_variation(*iParam0, 5, 2, 0, 0);
				}
			}
			func_98(*iParam0, iParam1);
			if (iParam6)
			{
				streaming::set_model_as_no_longer_needed(iVar0);
			}
			return true;
		}
	}
	return false;
}

bool func_98(var uParam0, int iParam1)//Position - 0x18A89
{
	int iVar0;
	
	iVar0 = 7;
	if (iParam1 == 19)
	{
		iVar0 = 3;
	}
	else if (iParam1 == 14)
	{
		iVar0 = 4;
	}
	else if (iParam1 == 17)
	{
		iVar0 = 5;
	}
	else
	{
		iVar0 = 7;
		return false;
	}
	Global_87653[(iVar0 - 3)] = uParam0;
	return true;
}

int func_99(int iParam0)//Position - 0x18ACF
{
	if (!func_89(iParam0))
	{
		return Global_101652.f_26993[iParam0 /*29*/];
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

void func_100()//Position - 0x18AFA
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	switch (iLocal_879)
	{
		case 0:
			if (iLocal_70 < 3 || (iLocal_70 == 11 && iLocal_83 < 3))
			{
				if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_226) < 40000f)
				{
					iLocal_879++;
				}
			}
			break;
		
		case 1:
			iVar0 = false;
			if ((iLocal_70 > 2 && iLocal_70 != 11) || (iLocal_70 == 11 && iLocal_83 > 2))
			{
				iVar0 = true;
			}
			if (func_140(iVar0))
			{
				fLocal_880 = 0f;
				iLocal_879++;
			}
			break;
		
		case 2:
			if (!iLocal_881)
			{
				if (object::does_object_of_type_exist_at_coords(-1105.241f, -1697.025f, 3.3678f, 2f, -741944541, 0))
				{
					iVar1 = object::get_closest_object_of_type(-1105.241f, -1697.025f, 3.3678f, 2f, -741944541, 1, 0, 1);
					entity::set_entity_proofs(iVar1, true, true, true, true, true, true, 0, false);
					entity::freeze_entity_position(iVar1, true);
					iLocal_881 = 1;
				}
			}
			if (!ped::is_ped_injured(iLocal_105))
			{
				if (!ped::is_ped_fleeing(iLocal_105))
				{
					if (!ped::is_ped_using_scenario(iLocal_105, "PROP_HUMAN_SEAT_CHAIR"))
					{
						entity::set_entity_coords(iLocal_105, vLocal_226, 1, false, 0, 1);
						if (ai::does_scenario_of_type_exist_in_area(vLocal_226, "PROP_HUMAN_SEAT_CHAIR", 2f, 1))
						{
							ai::task_use_nearest_scenario_to_coord_warp(iLocal_105, -1105.241f, -1697.025f, 3.3678f, 2f, 0);
						}
					}
				}
			}
			iVar2 = 0;
			while (iVar2 < iLocal_115)
			{
				if (entity::does_entity_exist(iLocal_115[iVar2]) && vehicle::is_vehicle_driveable(iLocal_115[iVar2], 0))
				{
					if (iLocal_70 <= 2)
					{
						if (system::vdist2(entity::get_entity_coords(iLocal_115[iVar2], 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 9f)
						{
							controls::disable_control_action(0, 263, 1);
							controls::disable_control_action(0, 141, 1);
							controls::disable_control_action(0, 140, 1);
						}
					}
					if (iLocal_70 < 2)
					{
						if (vehicle::get_vehicle_door_lock_status(iLocal_115[iVar2]) != 2)
						{
							vehicle::set_vehicle_doors_locked(iLocal_115[iVar2], 2);
						}
					}
					else if (vehicle::get_vehicle_door_lock_status(iLocal_115[iVar2]) == 2)
					{
						vehicle::set_vehicle_doors_locked(iLocal_115[iVar2], 1);
					}
				}
				iVar2++;
			}
			func_102();
			if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_226) > 44100f)
			{
				func_101();
				iLocal_879 = 0;
			}
			break;
	}
}

void func_101()//Position - 0x18D26
{
	int iVar0;
	
	if (entity::does_entity_exist(iLocal_105))
	{
		ped::delete_ped(&iLocal_105);
	}
	iVar0 = 0;
	while (iVar0 < iLocal_115)
	{
		if (entity::does_entity_exist(iLocal_115[iVar0]))
		{
			vehicle::delete_vehicle(&(iLocal_115[iVar0]));
		}
		iVar0++;
	}
	streaming::set_model_as_no_longer_needed(joaat("tribike"));
	streaming::set_model_as_no_longer_needed(joaat("bmx"));
	streaming::set_model_as_no_longer_needed(joaat("cruiser"));
	streaming::set_model_as_no_longer_needed(joaat("scorcher"));
	streaming::set_model_as_no_longer_needed(joaat("u_m_m_bikehire_01"));
}

void func_102()//Position - 0x18D94
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	
	iVar1 = 0;
	iVar2 = false;
	iVar3 = 0;
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		if (vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 0))
		{
			iVar0 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
		}
	}
	else if (vehicle::is_vehicle_driveable(player::get_players_last_vehicle(), 0))
	{
		iVar0 = player::get_players_last_vehicle();
	}
	if (((((entity::does_entity_exist(iVar0) && vehicle::is_vehicle_driveable(iVar0, 0)) && !vehicle::is_vehicle_model(iVar0, joaat("scorcher"))) && !vehicle::is_vehicle_model(iVar0, joaat("cruiser"))) && !vehicle::is_vehicle_model(iVar0, joaat("tribike"))) && !vehicle::is_vehicle_model(iVar0, joaat("bmx")))
	{
		if (gameplay::absf(entity::get_entity_speed(iVar0)) > 2f)
		{
			if (entity::is_entity_at_coord(iVar0, -1106.309f, -1693.715f, 5.12379f, 6.25f, 7f, 3.25f, false, true, 0))
			{
				iVar4 = 0;
				while (iVar4 < iLocal_115)
				{
					if (vehicle::is_vehicle_driveable(iLocal_115[iVar4], 0))
					{
						if (entity::is_entity_touching_entity(iLocal_115[iVar4], iVar0))
						{
							iVar2 = true;
						}
					}
					iVar4++;
				}
			}
		}
	}
	if (iVar1 || iVar2)
	{
		iVar4 = 0;
		while (iVar4 < iLocal_115)
		{
			if (vehicle::is_vehicle_driveable(iLocal_115[iVar4], 0))
			{
				entity::freeze_entity_position(iLocal_115[iVar4], false);
				entity::apply_force_to_entity(iLocal_115[iVar4], 0, 0f, 0f, -0.001f, 0f, 0f, 0f, 0, 1, 1, 1, 0, 1);
			}
			iVar4++;
		}
		if (!ped::is_ped_injured(iLocal_105))
		{
			if (iVar2)
			{
				func_103("FM2_BIKES");
			}
		}
	}
	iVar5 = false;
	if (!ped::is_ped_injured(iLocal_105))
	{
		if ((((fire::is_explosion_in_sphere(-1, entity::get_entity_coords(iLocal_105, 1), 20f) || gameplay::is_bullet_in_area(entity::get_entity_coords(iLocal_105, 1), 20f, 1)) || gameplay::is_projectile_in_area(entity::get_entity_coords(iLocal_105, 1) + Vector(20f, 20f, 20f), entity::get_entity_coords(iLocal_105, 1) - Vector(20f, 20f, 20f), 0)) || ped::is_ped_fleeing(iLocal_105)) || ((iLocal_70 == 2 && player::get_player_wanted_level(player::player_id()) > 0) && entity::is_entity_at_coord(player::player_ped_id(), vLocal_226, 40f, 40f, 20f, false, true, 0)))
		{
			iVar5 = true;
		}
		if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_105, 1)) < 100f)
		{
			if (ped::_0x6CD5A433374D4CFB(iLocal_105, player::player_ped_id()))
			{
				if (weapon::is_ped_armed(player::player_ped_id(), 6) && player::is_player_free_aiming_at_entity(player::player_id(), iLocal_105))
				{
					fLocal_880 = (fLocal_880 + gameplay::get_frame_time());
					if (fLocal_880 > 0.5f)
					{
						iVar5 = true;
					}
				}
				else if (fLocal_880 > 0f)
				{
					fLocal_880 = (fLocal_880 - (gameplay::get_frame_time() * 2f));
				}
				else if (fLocal_880 != 0f)
				{
					fLocal_880 = 0f;
				}
			}
			if (entity::has_entity_been_damaged_by_entity(iLocal_105, player::player_ped_id(), 1) || ped::is_ped_ragdoll(iLocal_105))
			{
				iVar5 = true;
			}
		}
		if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_105, 1)) < 400f && player::get_player_wanted_level(player::player_id()) > 0)
		{
			iVar3 = 1;
			iVar5 = true;
		}
	}
	if (iVar5)
	{
		iVar4 = 0;
		while (iVar4 < iLocal_115)
		{
			if (entity::does_entity_exist(iLocal_115[iVar4]))
			{
				entity::freeze_entity_position(iLocal_115[iVar4], false);
			}
			iVar4++;
		}
		if ((!ped::is_ped_injured(iLocal_105) && !ped::is_ped_fleeing(iLocal_105)) && ped::is_ped_using_any_scenario(iLocal_105))
		{
			ped::_0xEEED8FAFEC331A70(iLocal_105, entity::get_entity_coords(iLocal_105, 1) + entity::get_entity_forward_vector(iLocal_105));
			ai::task_smart_flee_ped(iLocal_105, player::player_ped_id(), 200f, -1, 0, 0);
		}
		if (vehicle::is_vehicle_driveable(iLocal_113, 0))
		{
			if (vehicle::is_playback_going_on_for_vehicle(iLocal_113))
			{
				vehicle::stop_playback_recorded_vehicle(iLocal_113);
			}
		}
		if (((iLocal_70 == 1 || iLocal_70 == 2) || (iLocal_70 == 3 && entity::is_entity_at_entity(iLocal_104, iLocal_105, 30f, 30f, 30f, 0, 1, 0))) || iLocal_70 == 11)
		{
			if (!ped::is_ped_injured(iLocal_104))
			{
				ped::set_ped_flee_attributes(iLocal_104, 2, false);
				ai::task_smart_flee_ped(iLocal_104, player::player_ped_id(), 200f, 20000, 0, 0);
			}
		}
	}
	if (entity::does_entity_exist(iLocal_105) && (entity::is_entity_dead(iLocal_105, 0) || ped::is_ped_injured(iLocal_105)))
	{
		if ((iLocal_70 < 3 || (iLocal_70 == 3 && entity::is_entity_at_entity(iLocal_104, iLocal_105, 30f, 30f, 30f, 0, 1, 0))) || iLocal_70 == 11)
		{
			func_103("FM2_BGHIT");
		}
	}
	else if ((((!ped::is_ped_injured(iLocal_105) && ped::is_ped_fleeing(iLocal_105)) && iLocal_70 < 3) || fLocal_880 > 0.5f) || iVar3)
	{
		func_103("FM2_BGRUN");
	}
	else if (!ped::is_ped_injured(iLocal_104) && ped::is_ped_fleeing(iLocal_104))
	{
		func_103("FM2_JSPOOK");
	}
	if (entity::does_entity_exist(iVar0))
	{
		iVar0 = 0;
	}
}

void func_103(char* sParam0)//Position - 0x1926B
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	audio::trigger_music_event("FAM2_STOP");
	if (gameplay::are_strings_equal(sParam0, "FM2_JSPOOK"))
	{
		if (fire::is_entity_on_fire(iLocal_104))
		{
			sParam0 = "FM2_JIMHIT";
		}
	}
	func_127(sParam0);
	if (gameplay::are_strings_equal(sParam0, "FM2_TSPOOK") || gameplay::are_strings_equal(sParam0, "FM2_JSPOOK"))
	{
		if (entity::does_entity_exist(iLocal_103))
		{
			if (ped::is_ped_group_member(iLocal_103, player::get_player_group(player::player_id())))
			{
				ped::remove_ped_from_group(iLocal_103);
			}
			ai::task_smart_flee_ped(iLocal_103, player::player_ped_id(), 500f, 60000, 0, 0);
		}
		if (entity::does_entity_exist(iLocal_104))
		{
			if (ped::is_ped_group_member(iLocal_104, player::get_player_group(player::player_id())))
			{
				ped::remove_ped_from_group(iLocal_104);
			}
			ai::task_smart_flee_ped(iLocal_104, player::player_ped_id(), 500f, 60000, 0, 0);
		}
	}
	while (!func_126())
	{
		system::wait(0);
	}
	if (iLocal_70 == 1)
	{
		if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			iVar0 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
		}
		else
		{
			iVar0 = vehicle::_0xB2D06FAEDE65B577();
		}
		iVar1 = false;
		if (entity::does_entity_exist(iVar0) && vehicle::is_vehicle_driveable(iVar0, 0))
		{
			if (func_428(iVar0))
			{
				iVar2 = 0;
				while (iVar2 < 3)
				{
					if (entity::does_entity_exist(Global_89180[iVar2]))
					{
						iVar1 = true;
						iVar2 = 3;
					}
					iVar2++;
				}
			}
			if (!vehicle::is_vehicle_model(iVar0, joaat("taxi")) && !iVar1)
			{
				if (system::vdist(entity::get_entity_coords(iVar0, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 50f)
				{
					if (func_420(iVar0) != 0)
					{
						func_106(iVar0, 0, 145);
					}
				}
			}
		}
	}
	streaming::remove_ipl("smboat");
	iVar3 = 0;
	while (iVar3 <= 1)
	{
		if (ui::does_blip_exist(uLocal_129[iVar3]))
		{
			ui::remove_blip(&(uLocal_129[iVar3]));
		}
		if (entity::does_entity_exist(iLocal_126[iVar3]))
		{
			ped::delete_ped(&(iLocal_126[iVar3]));
		}
		if (entity::does_entity_exist(iLocal_123[iVar3]))
		{
			vehicle::delete_vehicle(&(iLocal_123[iVar3]));
		}
		iVar3++;
	}
	if (iLocal_70 >= 5 && iLocal_70 != 11)
	{
		while (!func_344(1, 1))
		{
			system::wait(0);
		}
		func_104(vLocal_207, fLocal_210);
	}
	if (entity::does_entity_exist(iLocal_104))
	{
		ped::delete_ped(&iLocal_104);
	}
	if (entity::does_entity_exist(iLocal_103))
	{
		ped::delete_ped(&iLocal_103);
	}
	if (vehicle::is_vehicle_driveable(iLocal_112, 0))
	{
		entity::set_vehicle_as_no_longer_needed(&iLocal_112);
	}
	if (vehicle::is_vehicle_driveable(iLocal_113, 0))
	{
		entity::set_vehicle_as_no_longer_needed(&iLocal_113);
	}
	func_530();
}

void func_104(vector3 vParam0, float fParam3)//Position - 0x194B8
{
	if (func_105(Global_69937, 0f, 0f, 0f, 0))
	{
		Global_69937 = { vParam0 };
		Global_69940 = fParam3;
	}
}

int func_105(vector3 vParam0, vector3 vParam3, int iParam6)//Position - 0x194E4
{
	if (iParam6)
	{
		return (vParam0.x == vParam3.x && vParam0.y == vParam3.y);
	}
	return ((vParam0.x == vParam3.x && vParam0.y == vParam3.y) && vParam0.y == vParam3.y);
}

bool func_106(int iParam0, int iParam1, int iParam2)//Position - 0x1952B
{
	var uVar0;
	char* sVar1;
	
	if (iParam1 == 0)
	{
		sVar1 = entity::get_entity_script(iParam0, &uVar0);
		if (!gameplay::is_string_null_or_empty(sVar1))
		{
			if (gameplay::get_hash_key(sVar1) == gameplay::get_hash_key("vehicle_gen_controller"))
			{
				return false;
			}
		}
	}
	func_107(iParam0, iParam2);
	return true;
}

void func_107(int iParam0, int iParam1)//Position - 0x1956B
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (!func_112(iParam0))
	{
		return;
	}
	if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
	{
		iVar0 = vehicle::get_ped_in_vehicle_seat(iParam0, -1, 0);
		if (!entity::does_entity_exist(iVar0))
		{
			iVar0 = vehicle::get_last_ped_in_vehicle_seat(iParam0, -1);
		}
		if (entity::does_entity_exist(iVar0) && !ped::is_ped_injured(iVar0))
		{
			if (entity::get_entity_model(iVar0) == joaat("player_zero"))
			{
				iParam1 = 0;
			}
			else if (entity::get_entity_model(iVar0) == joaat("player_one"))
			{
				iParam1 = 1;
			}
			else if (entity::get_entity_model(iVar0) == joaat("player_two"))
			{
				iParam1 = 2;
			}
		}
		if ((iParam1 != 0 && iParam1 != 1) && iParam1 != 2)
		{
			iParam1 = Global_101652.f_2079.f_539.f_3549;
		}
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		iVar2 = 0;
		while (iVar2 < 2)
		{
			if (entity::get_entity_model(iParam0) == Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66)
			{
				if (!gameplay::is_string_null_or_empty(&(Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
				{
					if (gameplay::are_strings_equal(vehicle::get_vehicle_number_plate_text(iParam0), &(Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_1)))
					{
						Global_101652.f_31373.f_5038[iVar1 /*157*/][iVar2 /*78*/].f_66 = 0;
						Global_101652.f_31373.f_5592[iVar1] = iVar2;
					}
				}
			}
			iVar2++;
		}
		iVar1++;
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		if (entity::get_entity_model(iParam0) == Global_101652.f_31373.f_5600[iVar1 /*78*/].f_66)
		{
			if (!gameplay::is_string_null_or_empty(&(Global_101652.f_31373.f_5600[iVar1 /*78*/].f_1)))
			{
				if (gameplay::are_strings_equal(vehicle::get_vehicle_number_plate_text(iParam0), &(Global_101652.f_31373.f_5600[iVar1 /*78*/].f_1)))
				{
					Global_101652.f_31373.f_5600[iVar1 /*78*/].f_66 = 0;
				}
			}
		}
		iVar1++;
	}
	Global_101652.f_31373.f_5590 = iParam1;
	Global_69431 = iParam0;
	Global_101652.f_31373.f_5588 = 1;
	func_108(iParam0, &(Global_101652.f_31373.f_5510));
}

void func_108(int iParam0, var uParam1)//Position - 0x1976D
{
	int iVar0;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		func_111(uParam1);
		uParam1->f_66 = entity::get_entity_model(iParam0);
		StringCopy(&(uParam1->f_1), vehicle::get_vehicle_number_plate_text(iParam0), 16);
		*uParam1 = vehicle::get_vehicle_number_plate_text_index(iParam0);
		vehicle::get_vehicle_colours(iParam0, &(uParam1->f_5), &(uParam1->f_6));
		vehicle::get_vehicle_extra_colours(iParam0, &(uParam1->f_7), &(uParam1->f_8));
		vehicle::get_vehicle_tyre_smoke_color(iParam0, &(uParam1->f_62), &(uParam1->f_63), &(uParam1->f_64));
		uParam1->f_65 = vehicle::get_vehicle_window_tint(iParam0);
		uParam1->f_67 = vehicle::get_vehicle_livery(iParam0);
		uParam1->f_69 = vehicle::get_vehicle_wheel_type(iParam0);
		uParam1->f_70 = vehicle::get_vehicle_door_lock_status(iParam0);
		vehicle::get_vehicle_custom_secondary_colour(iParam0, &(uParam1->f_71), &(uParam1->f_72), &(uParam1->f_73));
		vehicle::_get_vehicle_neon_lights_colour(iParam0, &(uParam1->f_74), &(uParam1->f_75), &(uParam1->f_76));
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 2))
		{
			gameplay::set_bit(&(uParam1->f_77), 28);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 3))
		{
			gameplay::set_bit(&(uParam1->f_77), 29);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 0))
		{
			gameplay::set_bit(&(uParam1->f_77), 30);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(iParam0, 1))
		{
			gameplay::set_bit(&(uParam1->f_77), 31);
		}
		if (uParam1->f_65 == -1 && uParam1->f_66 != joaat("granger"))
		{
			uParam1->f_65 = 0;
		}
		if (vehicle::is_vehicle_a_convertible(iParam0, 0))
		{
			uParam1->f_68 = vehicle::get_convertible_roof_state(iParam0);
		}
		if (vehicle::is_this_model_a_plane(uParam1->f_66))
		{
			if (vehicle::_0x4198AB0022B15F87(iParam0))
			{
				switch (vehicle::get_landing_gear_state(iParam0))
				{
					case 2:
					case 0:
						gameplay::clear_bit(&(uParam1->f_77), 23);
						gameplay::set_bit(&(uParam1->f_77), 22);
						break;
					
					case 3:
					case 1:
						gameplay::clear_bit(&(uParam1->f_77), 23);
						gameplay::clear_bit(&(uParam1->f_77), 22);
						break;
					
					case 4:
						gameplay::set_bit(&(uParam1->f_77), 23);
						break;
				}
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), 23);
			}
		}
		if (!vehicle::get_vehicle_tyres_can_burst(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 9);
		}
		if (vehicle::is_vehicle_stolen(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 10);
		}
		if (vehicle::get_is_vehicle_primary_colour_custom(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 13);
			vehicle::get_vehicle_custom_primary_colour(iParam0, &(uParam1->f_71), &(uParam1->f_72), &(uParam1->f_73));
		}
		if (vehicle::get_is_vehicle_secondary_colour_custom(iParam0))
		{
			gameplay::set_bit(&(uParam1->f_77), 12);
		}
		func_110(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
		iVar0 = 0;
		while (iVar0 <= 11)
		{
			if (vehicle::is_vehicle_extra_turned_on(iParam0, iVar0 + 1))
			{
				gameplay::set_bit(&(uParam1->f_77), func_109(iVar0 + 1));
			}
			iVar0++;
		}
		if (graphics::_does_vehicle_have_decal(iParam0, 0))
		{
			gameplay::set_bit(&(uParam1->f_77), 11);
		}
		else
		{
			gameplay::clear_bit(&(uParam1->f_77), 11);
		}
		if (decorator::decor_exist_on(iParam0, "IgnoredByQuickSave") && decorator::decor_get_bool(iParam0, "IgnoredByQuickSave"))
		{
			gameplay::set_bit(&(uParam1->f_77), 27);
		}
		else
		{
			gameplay::clear_bit(&(uParam1->f_77), 27);
		}
	}
}

int func_109(int iParam0)//Position - 0x19A19
{
	switch (iParam0)
	{
		case 1:
			return 0;
			break;
		
		case 2:
			return 1;
			break;
		
		case 3:
			return 2;
			break;
		
		case 4:
			return 3;
			break;
		
		case 5:
			return 4;
			break;
		
		case 6:
			return 5;
			break;
		
		case 7:
			return 6;
			break;
		
		case 8:
			return 7;
			break;
		
		case 9:
			return 8;
			break;
		
		case 10:
			return 24;
			break;
		
		case 11:
			return 25;
			break;
		
		case 12:
			return 26;
			break;
	}
	return 0;
}

bool func_110(int iParam0, var uParam1, var uParam2)//Position - 0x19AC9
{
	int iVar0;
	int iVar1;
	
	if (!vehicle::is_vehicle_driveable(*iParam0, 0))
	{
		return false;
	}
	if (vehicle::get_num_mod_kits(*iParam0) == 0)
	{
		return false;
	}
	iVar0 = 0;
	while (iVar0 < *uParam1)
	{
		iVar1 = iVar0;
		if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
		{
			(*uParam1)[iVar0] = 0;
			if (vehicle::is_toggle_mod_on(*iParam0, iVar1))
			{
				(*uParam1)[iVar0] = 1;
			}
		}
		else
		{
			(*uParam1)[iVar0] = vehicle::get_vehicle_mod(*iParam0, iVar0) + 1;
			if (iVar0 == 23)
			{
				(*uParam2)[0] = vehicle::get_vehicle_mod_variation(*iParam0, iVar0);
			}
			else if (iVar0 == 24)
			{
				(*uParam2)[1] = vehicle::get_vehicle_mod_variation(*iParam0, iVar0);
			}
		}
		iVar0++;
	}
	return true;
}

void func_111(var uParam0)//Position - 0x19BA3
{
	int iVar0;
	
	uParam0->f_66 = 0;
	uParam0->f_77 = 0;
	uParam0->f_65 = 0;
	uParam0->f_62 = 0;
	uParam0->f_63 = 0;
	uParam0->f_64 = 0;
	uParam0->f_74 = 0;
	uParam0->f_75 = 0;
	uParam0->f_76 = 0;
	*uParam0 = 0;
	StringCopy(&(uParam0->f_1), "", 16);
	uParam0->f_5 = 0;
	uParam0->f_6 = 0;
	uParam0->f_7 = 0;
	uParam0->f_8 = 0;
	iVar0 = 0;
	while (iVar0 < 49)
	{
		uParam0->f_9[iVar0] = 0;
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 2)
	{
		uParam0->f_59[iVar0] = 0;
		iVar0++;
	}
	uParam0->f_67 = 0;
	uParam0->f_68 = 0;
	uParam0->f_69 = 0;
	uParam0->f_70 = 1;
	uParam0->f_71 = 0;
	uParam0->f_72 = 0;
	uParam0->f_73 = 0;
}

bool func_112(int iParam0)//Position - 0x19C53
{
	if ((((((((((!entity::does_entity_exist(iParam0) || !vehicle::is_vehicle_driveable(iParam0, 0)) || func_422(iParam0, 0, 0)) || func_422(iParam0, 1, 0)) || func_422(iParam0, 2, 0)) || func_420(iParam0) != 145) || func_125(iParam0)) || func_124(iParam0)) || func_428(iParam0)) || func_123(iParam0)) || !func_113(entity::get_entity_model(iParam0)))
	{
		if (func_124(iParam0))
		{
		}
		if (func_124(iParam0))
		{
		}
		if (func_422(iParam0, 0, 0))
		{
		}
		if (func_422(iParam0, 1, 0))
		{
		}
		if (func_422(iParam0, 2, 0))
		{
		}
		if (func_420(iParam0) != 145)
		{
		}
		return false;
	}
	return true;
}

bool func_113(int iParam0)//Position - 0x19D30
{
	if (iParam0 == 0)
	{
		return false;
	}
	if (!func_114(iParam0, 0))
	{
		return false;
	}
	if (((vehicle::is_this_model_a_boat(iParam0) || vehicle::is_this_model_a_plane(iParam0)) || vehicle::is_this_model_a_heli(iParam0)) || vehicle::is_this_model_a_train(iParam0))
	{
		return false;
	}
	switch (iParam0)
	{
		case joaat("bus"):
		case joaat("stretch"):
		case joaat("barracks"):
		case joaat("armytanker"):
		case joaat("rhino"):
		case joaat("armytrailer"):
		case joaat("barracks2"):
		case joaat("flatbed"):
		case joaat("ripley"):
		case joaat("towtruck"):
		case joaat("towtruck2"):
		case joaat("airbus"):
		case joaat("coach"):
		case joaat("rentalbus"):
		case joaat("tourbus"):
		case 1938952078:
		case joaat("pbus"):
		case joaat("trash"):
		case joaat("benson"):
		case joaat("boattrailer"):
		case joaat("biff"):
		case joaat("hauler"):
		case joaat("docktrailer"):
		case joaat("phantom"):
		case joaat("pounder"):
		case joaat("tractor2"):
		case joaat("bulldozer"):
		case joaat("handler"):
		case joaat("tiptruck"):
		case joaat("cutter"):
		case joaat("dump"):
		case joaat("mixer"):
		case joaat("mixer2"):
		case joaat("rubble"):
		case joaat("scrap"):
		case joaat("tiptruck2"):
		case joaat("camper"):
		case joaat("taco"):
		case joaat("boxville"):
		case joaat("boxville2"):
		case joaat("boxville3"):
		case joaat("journey"):
		case joaat("mule"):
		case joaat("mule2"):
		case joaat("police"):
		case joaat("police2"):
		case joaat("police3"):
		case joaat("police4"):
		case joaat("policeb"):
		case joaat("policeold1"):
		case joaat("policeold2"):
		case joaat("policet"):
		case joaat("taxi"):
		case joaat("submersible"):
		case joaat("submersible2"):
		case joaat("monster"):
			return false;
			break;
	}
	return true;
}

bool func_114(int iParam0, int iParam1)//Position - 0x19EE1
{
	int iVar0;
	struct<2> Var1;
	
	if (iParam0 == 0)
	{
		return false;
	}
	if (!streaming::is_model_a_vehicle(iParam0))
	{
		return false;
	}
	if ((((((((((((iParam0 == joaat("dodo") || iParam0 == joaat("dukes")) || iParam0 == joaat("dukes2")) || (iParam0 == joaat("dominator2") && !network::network_is_game_in_progress())) || (iParam0 == joaat("buffalo3") && !network::network_is_game_in_progress())) || (iParam0 == joaat("gauntlet2") && !network::network_is_game_in_progress())) || iParam0 == joaat("blimp2")) || iParam0 == joaat("stalion")) || (iParam0 == joaat("stalion2") && !network::network_is_game_in_progress())) || iParam0 == joaat("submersible2")) || iParam0 == joaat("marshall")) || iParam0 == joaat("blista2")) || iParam0 == joaat("blista3"))
	{
		if (!func_122())
		{
			return false;
		}
	}
	else
	{
		iVar0 = 0;
		while (iVar0 < dlc1::get_num_dlc_vehicles())
		{
			if (dlc1::get_dlc_vehicle_data(iVar0, &Var1))
			{
				if (iParam0 == Var1.f_1)
				{
					if (dlc1::_is_dlc_data_empty(Var1))
					{
						return false;
					}
				}
			}
			iVar0++;
		}
	}
	if (iParam0 == joaat("blimp"))
	{
		if ((((!func_121() && !func_120()) && !func_119()) && !func_118()) && !func_122())
		{
			return false;
		}
	}
	if ((iParam0 == joaat("hotknife") || iParam0 == joaat("carbonrs")) || iParam0 == joaat("khamelion"))
	{
		if ((gameplay::is_durango_version() || gameplay::is_pc_version()) || gameplay::is_orbis_version())
		{
		}
		else if (!func_119())
		{
			return false;
		}
	}
	if (iParam1)
	{
		if (!func_117(iParam0))
		{
			return false;
		}
	}
	if (!func_115(iParam0))
	{
		return false;
	}
	return true;
}

bool func_115(int iParam0)//Position - 0x1A0D1
{
	int iVar0;
	var uVar1;
	char cVar2[64];
	
	if (!func_116())
	{
		return true;
	}
	unk3::_0x897433D292B44130(&iVar0, &uVar1);
	if (iVar0 == 4)
	{
		return true;
	}
	switch (iParam0)
	{
		case joaat("dune4"):
			StringCopy(&cVar2, "VE_DUNE4_t0_v3", 64);
			break;
		
		case joaat("voltic2"):
			StringCopy(&cVar2, "VE_VOLTIC2_t0_v3", 64);
			break;
		
		case joaat("ruiner2"):
			StringCopy(&cVar2, "VE_RUINER2_t0_v3", 64);
			break;
		
		case joaat("phantom2"):
			StringCopy(&cVar2, "VE_PHANTOM2_t0_v3", 64);
			break;
		
		case joaat("technical2"):
			StringCopy(&cVar2, "VE_TECHNICAL2_t0_v3", 64);
			break;
		
		case joaat("boxville5"):
			StringCopy(&cVar2, "VE_BOXVILLE5_t0_v3", 64);
			break;
		
		case joaat("wastelander"):
			StringCopy(&cVar2, "VE_WASTELANDER_t0_v3", 64);
			break;
		
		case joaat("blazer5"):
			StringCopy(&cVar2, "VE_BLAZER5_t0_v3", 64);
			break;
		
		default:
			return true;
			break;
	}
	if (!mobile::_0xBD4D7EAF8A30F637(&cVar2))
	{
		return false;
	}
	return true;
}

bool func_116()//Position - 0x1A19D
{
	if (gameplay::is_pc_version())
	{
		return true;
	}
	return false;
}

int func_117(int iParam0)//Position - 0x1A1B1
{
	int iVar0;
	int iVar1;
	
	if (Global_2482045)
	{
		return 1;
	}
	iVar0 = 1;
	iVar1 = network::_get_posix_time();
	if (iParam0 == joaat("btype3"))
	{
		if ((!Global_262145.f_5431 && !Global_262145.f_11409) && iVar1 < Global_262145.f_11410)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("faction3"))
	{
		if (!Global_262145.f_12221 && iVar1 < Global_262145.f_12233)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("virgo3") || iParam0 == joaat("virgo2"))
	{
		if (!Global_262145.f_12217 && iVar1 < Global_262145.f_12229)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sabregt2"))
	{
		if (!Global_262145.f_12218 && iVar1 < Global_262145.f_12230)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tornado5"))
	{
		if (!Global_262145.f_12219 && iVar1 < Global_262145.f_12231)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("minivan2"))
	{
		if (!Global_262145.f_12220 && iVar1 < Global_262145.f_12232)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("slamvan3"))
	{
		if (!Global_262145.f_12222 && iVar1 < Global_262145.f_12234)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("prototipo"))
	{
		if (!Global_262145.f_12223 && iVar1 < Global_262145.f_12226)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("seven70"))
	{
		if (!Global_262145.f_12224 && iVar1 < Global_262145.f_12227)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("pfister811"))
	{
		if (!Global_262145.f_12225 && iVar1 < Global_262145.f_12228)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("bf400"))
	{
		if (!Global_262145.f_14848 && iVar1 < Global_262145.f_14813)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("brioso"))
	{
		if (!Global_262145.f_14843 && iVar1 < Global_262145.f_14808)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("cliffhanger"))
	{
		if (!Global_262145.f_14847 && iVar1 < Global_262145.f_14812)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("contender"))
	{
		if (!Global_262145.f_14846 && iVar1 < Global_262145.f_14811)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("le7b"))
	{
		if (!Global_262145.f_14840 && iVar1 < Global_262145.f_14805)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("omnis"))
	{
		if (!Global_262145.f_14841 && iVar1 < Global_262145.f_14806)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("trophytruck"))
	{
		if (!Global_262145.f_14844 && iVar1 < Global_262145.f_14809)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("trophytruck2"))
	{
		if (!Global_262145.f_14845 && iVar1 < Global_262145.f_14810)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tropos"))
	{
		if (!Global_262145.f_14842 && iVar1 < Global_262145.f_14807)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("gargoyle"))
	{
		if (!Global_262145.f_14850 && iVar1 < Global_262145.f_14815)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("rallytruck"))
	{
		if (!Global_262145.f_14851 && iVar1 < Global_262145.f_14816)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tampa2"))
	{
		if (!Global_262145.f_14839 && iVar1 < Global_262145.f_14804)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tyrus"))
	{
		if (!Global_262145.f_14838 && iVar1 < Global_262145.f_14803)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sheava"))
	{
		if (!Global_262145.f_14837 && iVar1 < Global_262145.f_14802)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("lynx"))
	{
		if (!Global_262145.f_14849 && iVar1 < Global_262145.f_14814)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("stalion2"))
	{
		if (!Global_262145.f_14852 && iVar1 < Global_262145.f_14817)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("gauntlet2"))
	{
		if (!Global_262145.f_14853 && iVar1 < Global_262145.f_14818)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dominator2"))
	{
		if (!Global_262145.f_14854 && iVar1 < Global_262145.f_14819)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("buffalo3"))
	{
		if (!Global_262145.f_14855 && iVar1 < Global_262145.f_14820)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("defiler"))
	{
		if (!Global_262145.f_15000 && iVar1 < Global_262145.f_15022)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nightblade"))
	{
		if (!Global_262145.f_15001 && iVar1 < Global_262145.f_15023)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("zombiea"))
	{
		if (!Global_262145.f_15002 && iVar1 < Global_262145.f_15024)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("esskey"))
	{
		if (!Global_262145.f_15003 && iVar1 < Global_262145.f_15025)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("avarus"))
	{
		if (!Global_262145.f_15004 && iVar1 < Global_262145.f_15026)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("zombieb"))
	{
		if (!Global_262145.f_15005 && iVar1 < Global_262145.f_15027)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("hakuchou2"))
	{
		if (!Global_262145.f_15007 && iVar1 < Global_262145.f_15028)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("vortex"))
	{
		if (!Global_262145.f_15008 && iVar1 < Global_262145.f_15029)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("shotaro"))
	{
		if (!Global_262145.f_15009 && iVar1 < Global_262145.f_15030)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("chimera"))
	{
		if (!Global_262145.f_15010 && iVar1 < Global_262145.f_15031)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("raptor"))
	{
		if (!Global_262145.f_15011 && iVar1 < Global_262145.f_15032)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("daemon2"))
	{
		if (!Global_262145.f_15012 && iVar1 < Global_262145.f_15033)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("blazer4"))
	{
		if (!Global_262145.f_15013 && iVar1 < Global_262145.f_15034)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tornado6"))
	{
		if (!Global_262145.f_15019 && iVar1 < Global_262145.f_15041)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("youga2"))
	{
		if (!Global_262145.f_15016 && iVar1 < Global_262145.f_15037)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("wolfsbane"))
	{
		if (!Global_262145.f_15017 && iVar1 < Global_262145.f_15038)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("faggio3"))
	{
		if (!Global_262145.f_15018 && iVar1 < Global_262145.f_15039)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("faggio"))
	{
		if (!Global_262145.f_15006 && iVar1 < Global_262145.f_15040)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("bagger"))
	{
		if (!Global_262145.f_15020 && iVar1 < Global_262145.f_15042)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("sanctus"))
	{
		if (!Global_262145.f_15014 && iVar1 < Global_262145.f_15035)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("manchez"))
	{
		if (!Global_262145.f_15015 && iVar1 < Global_262145.f_15036)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("ratbike"))
	{
		if (!Global_262145.f_15021 && iVar1 < Global_262145.f_15043)
		{
			iVar0 = 0;
		}
	}
	if (iParam0 == joaat("voltic2"))
	{
		if (!Global_262145.f_16649 && iVar1 < Global_262145.f_16690)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("ruiner2"))
	{
		if (!Global_262145.f_16650 && iVar1 < Global_262145.f_16691)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dune4"))
	{
		if (!Global_262145.f_16651 && iVar1 < Global_262145.f_16692)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("dune5"))
	{
		if (!Global_262145.f_16652 && iVar1 < Global_262145.f_16693)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("phantom2"))
	{
		if (!Global_262145.f_16653 && iVar1 < Global_262145.f_16694)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("technical2"))
	{
		if (!Global_262145.f_16654 && iVar1 < Global_262145.f_16695)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("boxville5"))
	{
		if (!Global_262145.f_16655 && iVar1 < Global_262145.f_16696)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("wastelander"))
	{
		if (!Global_262145.f_16656 && iVar1 < Global_262145.f_16697)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("blazer5"))
	{
		if (!Global_262145.f_16657 && iVar1 < Global_262145.f_16698)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("comet2"))
	{
		if (!Global_262145.f_16658 && iVar1 < Global_262145.f_16699)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("comet3"))
	{
		if (!Global_262145.f_16659 && iVar1 < Global_262145.f_16700)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("diablous"))
	{
		if (!Global_262145.f_16660 && iVar1 < Global_262145.f_16701)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("diablous2"))
	{
		if (!Global_262145.f_16661 && iVar1 < Global_262145.f_16702)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("elegy"))
	{
		if (!Global_262145.f_16662 && iVar1 < Global_262145.f_16703)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("elegy2"))
	{
		if (!Global_262145.f_16663 && iVar1 < Global_262145.f_16704)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("fcr"))
	{
		if (!Global_262145.f_16664 && iVar1 < Global_262145.f_16705)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("fcr2"))
	{
		if (!Global_262145.f_16665 && iVar1 < Global_262145.f_16706)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("italigtb"))
	{
		if (!Global_262145.f_16666 && iVar1 < Global_262145.f_16707)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("italigtb2"))
	{
		if (!Global_262145.f_16667 && iVar1 < Global_262145.f_16708)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nero"))
	{
		if (!Global_262145.f_16668 && iVar1 < Global_262145.f_16709)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("nero2"))
	{
		if (!Global_262145.f_16669 && iVar1 < Global_262145.f_16710)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("penetrator"))
	{
		if (!Global_262145.f_16670 && iVar1 < Global_262145.f_16711)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("specter"))
	{
		if (!Global_262145.f_16671 && iVar1 < Global_262145.f_16712)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("specter2"))
	{
		if (!Global_262145.f_16672 && iVar1 < Global_262145.f_16713)
		{
			iVar0 = 0;
		}
	}
	else if (iParam0 == joaat("tempesta"))
	{
		if (!Global_262145.f_16673 && iVar1 < Global_262145.f_16714)
		{
			iVar0 = 0;
		}
	}
	return iVar0;
}

bool func_118()//Position - 0x1AE4F
{
	return false;
}

bool func_119()//Position - 0x1AE58
{
	return true;
}

bool func_120()//Position - 0x1AE61
{
	return true;
}

bool func_121()//Position - 0x1AE6A
{
	if (dlc2::is_dlc_present(-1226939934))
	{
		return true;
	}
	return false;
}

bool func_122()//Position - 0x1AE83
{
	int iVar0;
	
	if (network::network_is_signed_in())
	{
		if (network::_network_are_ros_available())
		{
			if (network::_0x593570C289A77688())
			{
				stats::stat_get_int(joaat("sp_unlock_exclus_content"), &iVar0, -1);
				gameplay::set_bit(&iVar0, 2);
				gameplay::set_bit(&iVar0, 4);
				gameplay::set_bit(&iVar0, 6);
				gameplay::set_bit(&Global_25, 2);
				gameplay::set_bit(&Global_25, 4);
				gameplay::set_bit(&Global_25, 6);
				stats::stat_set_int(joaat("sp_unlock_exclus_content"), iVar0, 1);
				if (gameplay::_0x5AA3BEFA29F03AD4())
				{
					iVar0 = gameplay::get_profile_setting(866);
					gameplay::set_bit(&iVar0, 0);
					stats::_0xDAC073C7901F9E15(iVar0);
				}
				return true;
			}
		}
	}
	if (Global_139115 == 2)
	{
		return true;
	}
	else if (Global_139115 == 3)
	{
		return false;
	}
	if (gameplay::_0x5AA3BEFA29F03AD4())
	{
		if (gameplay::is_bit_set(gameplay::get_profile_setting(866), 0))
		{
			return true;
		}
	}
	return false;
}

bool func_123(int iParam0)//Position - 0x1AF3E
{
	int iVar0;
	char* sVar1;
	
	iVar0 = entity::get_entity_model(iParam0);
	sVar1 = vehicle::get_vehicle_number_plate_text(iParam0);
	if (iVar0 == joaat("speedo") && gameplay::are_strings_equal(sVar1, "LAMAR G "))
	{
		return true;
	}
	if (!func_114(iVar0, 0))
	{
		return true;
	}
	return false;
}

bool func_124(int iParam0)//Position - 0x1AF84
{
	int iVar0;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		iVar0 = 0;
		while (iVar0 < 9)
		{
			if (entity::does_entity_exist(Global_89150[iVar0]) && vehicle::is_vehicle_driveable(Global_89150[iVar0], 0))
			{
				if (Global_89150[iVar0] == iParam0 && entity::get_entity_model(Global_89150[iVar0]) == entity::get_entity_model(iParam0))
				{
					return true;
				}
			}
			iVar0++;
		}
	}
	return false;
}

bool func_125(int iParam0)//Position - 0x1B000
{
	int iVar0;
	
	if (entity::does_entity_exist(Global_68526.f_484[24]))
	{
		if (iParam0 == Global_68526.f_484[24])
		{
			return false;
		}
	}
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (entity::does_entity_exist(Global_68526.f_484[iVar0]))
		{
			if ((((((((((((iVar0 != 24 && iVar0 != 21) && iVar0 != 22) && iVar0 != 23) && iVar0 != 27) && iVar0 != 30) && iVar0 != 33) && iVar0 != 28) && iVar0 != 31) && iVar0 != 34) && iVar0 != 26) && iVar0 != 29) && iVar0 != 32)
			{
				if (iParam0 == Global_68526.f_484[iVar0])
				{
					return true;
				}
			}
		}
		iVar0++;
	}
	return false;
}

bool func_126()//Position - 0x1B0E8
{
	if (Global_3)
	{
		return true;
	}
	if (Global_91486 == 7 || Global_91486 == 8)
	{
		return true;
	}
	return false;
}

void func_127(char* sParam0)//Position - 0x1B115
{
	func_139(sParam0);
	func_128(0);
}

void func_128(int iParam0)//Position - 0x1B128
{
	int iVar0;
	
	if (Global_101652.f_8028 || func_138(0))
	{
		iVar0 = func_137();
		if (!func_129(iVar0))
		{
			return;
		}
		gameplay::set_bit(&(Global_82571[iVar0 /*5*/].f_1), 5);
		Global_91522 = iParam0;
	}
}

bool func_129(int iParam0)//Position - 0x1B16D
{
	var uVar0;
	int iVar1;
	
	func_134();
	if (player::is_player_playing(player::player_id()))
	{
		player::start_firing_amnesty(5000);
	}
	uVar0 = Global_82571[iParam0 /*5*/];
	iVar1 = Global_69966.f_109[uVar0 /*4*/];
	func_133(iVar1, 1);
	player::_0xC9A763D8FE87436A(player::player_id());
	player::special_ability_deactivate(player::player_id());
	func_130(&(Global_101652.f_2079.f_539), iVar1);
	if (Global_85994 == Global_91523)
	{
		Global_101652.f_8028.f_330[iVar1 /*6*/].f_1++;
	}
	if (!gameplay::is_bit_set(Global_82607[iVar1 /*34*/].f_15, 1))
	{
		if (!player::is_player_playing(player::player_id()))
		{
			gameplay::set_fade_in_after_death_arrest(0);
		}
	}
	Global_101652.f_8028.f_330[iVar1 /*6*/].f_2++;
	Global_85994 = Global_91523;
	if (iParam0 == -1)
	{
		if (Global_101652.f_8028)
		{
		}
		return false;
	}
	if (gameplay::is_bit_set(Global_82571[iParam0 /*5*/].f_1, 4))
	{
		return false;
	}
	if (gameplay::is_bit_set(Global_82571[iParam0 /*5*/].f_1, 5))
	{
		return false;
	}
	return true;
}

void func_130(var uParam0, int iParam1)//Position - 0x1B284
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	float fVar5;
	
	if (iParam1 == 94)
	{
		return;
	}
	iVar0 = 0;
	while (iVar0 < 3)
	{
		iVar1 = Global_101652.f_17476[iVar0];
		if ((((iVar1 == 8 || iVar1 == 9) || iVar1 == 10) || (((iVar1 == 11 || iVar1 == 34) || iVar1 == 72) || iVar1 == 73)) && !gameplay::is_bit_set(Global_101652.f_8028.f_99.f_219[0], 9))
		{
		}
		else
		{
			vVar2 = { 0f, 0f, 0f };
			fVar5 = 0f;
			if (!func_132(Global_101652.f_17476[iVar0], &vVar2, &fVar5))
			{
				Global_101652.f_17476[iVar0] = 318;
				func_131(&(uParam0->f_1524[iVar0]));
				uParam0->f_1528[iVar0 /*3*/] = { 0f, 0f, 0f };
				uParam0->f_1538[iVar0] = 0f;
				uParam0->f_1542[iVar0] = 0;
				uParam0->f_1546[iVar0 /*3*/] = { 0f, 0f, 0f };
				uParam0->f_1556[iVar0] = 0;
				Global_89209[iVar0 /*29*/] = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_9 = 0f;
				Global_89209[iVar0 /*29*/].f_12 = 0f;
				Global_89209[iVar0 /*29*/].f_3 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_10 = 0f;
				Global_89209[iVar0 /*29*/].f_13 = 0f;
				Global_89209[iVar0 /*29*/].f_6 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_11 = 0f;
				Global_89209[iVar0 /*29*/].f_14 = 0f;
				Global_89209[iVar0 /*29*/].f_17 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_26 = 0f;
				Global_89209[iVar0 /*29*/].f_20 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_27 = 0f;
				Global_89209[iVar0 /*29*/].f_23 = { 0f, 0f, 0f };
				Global_89209[iVar0 /*29*/].f_28 = 0f;
			}
		}
		iVar0++;
	}
}

void func_131(var uParam0)//Position - 0x1B44D
{
	*uParam0 = -15;
}

int func_132(int iParam0, var uParam1, float fParam2)//Position - 0x1B45B
{
	switch (iParam0)
	{
		case 11:
			*uParam1 = { 115.1569f, -1286.684f, 28.2613f };
			*fParam2 = 111f;
			return 1;
			break;
		
		case 8:
			*uParam1 = { -90.0089f, -1324.195f, 28.3203f };
			*fParam2 = 194.1887f;
			return 1;
			break;
		
		case 9:
			return func_132(8, uParam1, fParam2);
			break;
		
		case 10:
			return func_132(8, uParam1, fParam2);
			break;
		
		case 13:
			*uParam1 = { -807.2979f, -48.4004f, 36.8173f };
			*fParam2 = 201.6328f;
			return 1;
			break;
		
		case 14:
			*uParam1 = { 1432.34f, -1887.383f, 70.5768f };
			*fParam2 = 350.0509f;
			return 1;
			break;
		
		case 15:
			*uParam1 = { 1666.204f, 1967.25f, 143.3213f };
			*fParam2 = 0.7896f;
			return 1;
			break;
		
		case 12:
			*uParam1 = { -1440.22f, -127.02f, 50f };
			*fParam2 = 42f;
			return 1;
			break;
		
		case 16:
			*uParam1 = { 135.055f, -1759.64f, 27.8957f };
			*fParam2 = -129f;
			return 1;
			break;
		
		case 17:
			*uParam1 = { 687.6992f, -1744.03f, 28.3624f };
			*fParam2 = 267.1409f;
			return 1;
			break;
		
		case 18:
			*uParam1 = { 56.5117f, -744.6122f, 43.1356f };
			*fParam2 = 340.0526f;
			return 1;
			break;
		
		case 19:
			*uParam1 = { 506.485f, -1884.967f, 24.764f };
			*fParam2 = 22.9566f;
			return 1;
			break;
		
		case 20:
			*uParam1 = { 1555.958f, 953.6136f, 77.2063f };
			*fParam2 = 152.8118f;
			return 1;
			break;
		
		case 21:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 22:
			*uParam1 = { 220.72f, -64.4177f, 68.2922f };
			*fParam2 = (250.4535f - 360f);
			return 1;
			break;
		
		case 74:
			*uParam1 = { 2048.07f, 3840.84f, 34.2238f };
			*fParam2 = 119.603f;
			return 1;
			break;
		
		case 23:
			*uParam1 = { -464.22f, -1592.98f, 38.73f };
			*fParam2 = 168f;
			return 1;
			break;
		
		case 24:
			*uParam1 = { (744.79f + 0.0186f), (-465.86f - 0.0114f), 36.6399f };
			*fParam2 = 51.7279f;
			return 1;
			break;
		
		case 67:
			*uParam1 = { -9f, 508.1f, 173.6278f };
			*fParam2 = 151.2504f;
			return 1;
			break;
		
		case 25:
			*uParam1 = { 72.2278f, -1464.68f, 28.2915f };
			*fParam2 = 156.8827f;
			return 1;
			break;
		
		case 27:
			*uParam1 = { 763f, -906f, 24.2312f };
			*fParam2 = 7.2736f;
			return 1;
			break;
		
		case 26:
			*uParam1 = { 257.9167f, -1120.786f, 28.3684f };
			*fParam2 = 97.2736f;
			return 1;
			break;
		
		case 28:
			*uParam1 = { 422.5858f, -978.6332f, 69.7073f };
			*fParam2 = 4f;
			return 1;
			break;
		
		case 29:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 30:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 31:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 32:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 33:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 34:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 35:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 36:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 37:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 58:
			*uParam1 = { 294.8521f, 882.9366f, 197.8527f };
			*fParam2 = 162.693f;
			return 1;
			break;
		
		case 59:
			*uParam1 = { -1771.802f, 794.4316f, 138.4211f };
			*fParam2 = 128.9946f;
			return 1;
			break;
		
		case 60:
			*uParam1 = { 1495.595f, -1848.821f, 70.2075f };
			*fParam2 = 32.2721f;
			return 1;
			break;
		
		case 38:
			*uParam1 = { 2897.554f, 4032.241f, 50.1419f };
			*fParam2 = 192.8091f;
			return 1;
			break;
		
		case 39:
			*uParam1 = { 1973.355f, 3818.204f, 32.005f };
			*fParam2 = 32f;
			return 1;
			break;
		
		case 40:
			*uParam1 = { 1973.355f, 3818.204f, 32.005f };
			*fParam2 = 32f;
			return 1;
			break;
		
		case 41:
			*uParam1 = { 1397f, 3725.8f, 33.0673f };
			*fParam2 = -3.7534f;
			return 1;
			break;
		
		case 42:
			*uParam1 = { Vector(4.0205f, -2975.341f, 798.4536f) + Vector(1f, 0f, 0f) };
			*fParam2 = 90f;
			return 1;
			break;
		
		case 43:
			*uParam1 = { 709.0244f, -2916.479f, 5.0589f };
			*fParam2 = 355.326f;
			return 1;
			break;
		
		case 44:
			*uParam1 = { 643.5248f, -2917.325f, 5.1337f };
			*fParam2 = 334.1068f;
			return 1;
			break;
		
		case 45:
			*uParam1 = { 595.2742f, -2819.183f, 5.0559f };
			*fParam2 = 46.8853f;
			return 1;
			break;
		
		case 46:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 47:
			*uParam1 = { 314.4171f, 965.207f, 208.4024f };
			*fParam2 = 165.9421f;
			return 1;
			break;
		
		case 49:
			*uParam1 = { 3321.537f, 4975.455f, 25.9097f };
			*fParam2 = 221.228f;
			return 1;
			break;
		
		case 48:
			*uParam1 = { -111.1318f, 6316.479f, 30.4904f };
			*fParam2 = (42f + 180f);
			return 1;
			break;
		
		case 50:
			*uParam1 = { -731.3261f, 106.68f, 54.7169f };
			*fParam2 = 98.9764f;
			return 1;
			break;
		
		case 51:
			*uParam1 = { -1257.5f, -526.9999f, 30.2361f };
			*fParam2 = 220.9554f;
			return 1;
			break;
		
		case 52:
			*uParam1 = { 736.9869f, -2050.678f, 28.2718f };
			*fParam2 = 83.9922f;
			return 1;
			break;
		
		case 66:
			*uParam1 = { 262.5499f, -2540.15f, 4.8433f };
			*fParam2 = -64.1366f;
			return 1;
			break;
		
		case 53:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 55:
			*uParam1 = { -315.7789f, 6201.355f, 30.4322f };
			*fParam2 = 127.7547f;
			return 1;
			break;
		
		case 56:
			*uParam1 = { 118.0988f, -1264.916f, 32.3637f };
			*fParam2 = -63f;
			return 1;
			break;
		
		case 57:
			*uParam1 = { 37.5988f, -1351.52f, 28.2954f };
			*fParam2 = 90.0339f;
			return 1;
			break;
		
		case 61:
			*uParam1 = { -558.2693f, 261.1167f, 82.07f };
			*fParam2 = 84.6231f;
			return 1;
			break;
		
		case 62:
			*uParam1 = { -196.9999f, 507.9999f, 132.477f };
			*fParam2 = 99.6049f;
			return 1;
			break;
		
		case 63:
			*uParam1 = { 1312.01f, -1645.87f, 51.2f };
			*fParam2 = 120f;
			return 1;
			break;
		
		case 68:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 69:
			*uParam1 = { -818.7374f, 6.4824f, 41.2432f };
			*fParam2 = 211.8223f;
			return 1;
			break;
		
		case 64:
			*uParam1 = { 2091.258f, 4714.852f, 40.1936f };
			*fParam2 = 136.0867f;
			return 1;
			break;
		
		case 54:
			*uParam1 = { 1762.59f, 3247.212f, 40.735f };
			*fParam2 = 27.0648f;
			return 1;
			break;
		
		case 65:
			*uParam1 = { 1764.013f, 3252.902f, 40.735f };
			*fParam2 = 27.0648f;
			return 1;
			break;
		
		case 70:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 71:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 72:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		case 73:
			*uParam1 = { 0f, 0f, 0f };
			*fParam2 = 0f;
			return 1;
			break;
		
		default:
			break;
	}
	return 0;
}

void func_133(int iParam0, int iParam1)//Position - 0x1BDCA
{
	if (iParam1)
	{
		if ((iParam0 != 88 && iParam0 != 89) && iParam0 != 92)
		{
			Global_85804[iParam0 /*2*/] = 1;
		}
	}
	else
	{
		Global_85804[iParam0 /*2*/] = 0;
	}
}

void func_134()//Position - 0x1BE08
{
	Global_91521 = 1;
	if (player::is_player_being_arrested(player::player_id(), 1))
	{
		if (gameplay::is_string_null_or_empty(&Global_69929))
		{
			switch (func_135())
			{
				case 0:
					StringCopy(&Global_69929, "CMN_MARRE", 16);
					break;
				
				case 1:
					StringCopy(&Global_69929, "CMN_FARRE", 16);
					break;
				
				case 2:
					StringCopy(&Global_69929, "CMN_TARRE", 16);
					break;
			}
			StringCopy(&Global_69933, "", 16);
		}
		Global_91521 = 0;
	}
	else if (!player::is_player_playing(player::player_id()))
	{
		if (gameplay::is_string_null_or_empty(&Global_69929))
		{
			switch (func_135())
			{
				case 0:
					StringCopy(&Global_69929, "CMN_MDIED", 16);
					break;
				
				case 1:
					StringCopy(&Global_69929, "CMN_FDIED", 16);
					break;
				
				case 2:
					StringCopy(&Global_69929, "CMN_TDIED", 16);
					break;
			}
			StringCopy(&Global_69933, "", 16);
		}
		Global_91521 = 0;
		gameplay::set_bit(&(Global_91486.f_20), 25);
	}
}

var func_135()//Position - 0x1BEF5
{
	func_136();
	return Global_101652.f_2079.f_539.f_3549;
}

void func_136()//Position - 0x1BF0E
{
	int iVar0;
	
	if (entity::does_entity_exist(player::player_ped_id()))
	{
		if (func_93(Global_101652.f_2079.f_539.f_3549) != entity::get_entity_model(player::player_ped_id()))
		{
			iVar0 = func_92(player::player_ped_id());
			if (func_89(iVar0) && (!func_27(14) || Global_100604))
			{
				if (Global_101652.f_2079.f_539.f_3549 != iVar0 && func_89(Global_101652.f_2079.f_539.f_3549))
				{
					Global_101652.f_2079.f_539.f_3550 = Global_101652.f_2079.f_539.f_3549;
				}
				Global_101652.f_2079.f_539.f_3551 = iVar0;
				Global_101652.f_2079.f_539.f_3549 = iVar0;
				return;
			}
		}
		else
		{
			if (Global_101652.f_2079.f_539.f_3549 != 145)
			{
				Global_101652.f_2079.f_539.f_3551 = Global_101652.f_2079.f_539.f_3549;
			}
			return;
		}
	}
	Global_101652.f_2079.f_539.f_3549 = 145;
}

int func_137()//Position - 0x1C00C
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < 7)
	{
		if (gameplay::is_bit_set(Global_82571[iVar0 /*5*/].f_1, 2))
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

int func_138(int iParam0)//Position - 0x1C041
{
	if (!iParam0 && script::_get_number_of_instances_of_streamed_script(joaat("benchmark")) > 0)
	{
		return true;
	}
	return gameplay::is_bit_set(Global_69945, 0);
}

void func_139(char* sParam0)//Position - 0x1C06C
{
	if (!gameplay::is_string_null_or_empty(sParam0))
	{
		if (ui::get_length_of_literal_string(sParam0) <= 16)
		{
			StringCopy(&Global_69929, sParam0, 16);
			StringCopy(&Global_69933, "", 16);
			if (unk1::_is_recording())
			{
				unk1::_stop_recording_and_save_clip();
			}
		}
	}
}

int func_140(int iParam0)//Position - 0x1C0AB
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	streaming::request_model(joaat("u_m_m_bikehire_01"));
	streaming::request_model(joaat("cruiser"));
	streaming::request_model(joaat("bmx"));
	streaming::request_model(joaat("scorcher"));
	streaming::request_model(joaat("tribike"));
	if ((((streaming::has_model_loaded(joaat("u_m_m_bikehire_01")) && streaming::has_model_loaded(joaat("cruiser"))) && streaming::has_model_loaded(joaat("bmx"))) && streaming::has_model_loaded(joaat("scorcher"))) && streaming::has_model_loaded(joaat("tribike")))
	{
		if (iLocal_277 != 0 || !iParam0)
		{
			if (!entity::does_entity_exist(iLocal_115[0]))
			{
				iLocal_115[0] = vehicle::create_vehicle(joaat("scorcher"), -1106.885f, -1692.229f, 4.0189f, 0f, 1, true);
			}
			if (vehicle::is_vehicle_driveable(iLocal_115[0], 0))
			{
				entity::set_entity_coords_no_offset(iLocal_115[0], -1106.885f, -1692.229f, 4.0189f, 0, 0, 1);
				entity::set_entity_quaternion(iLocal_115[0], -0.0504f, -0.0723f, -0.4427f, 0.8923f);
				vehicle::set_vehicle_colour_combination(iLocal_115[0], 2);
			}
		}
		if ((iLocal_276 != 1 && iLocal_277 != 1) || !iParam0)
		{
			if (!entity::does_entity_exist(iLocal_115[1]))
			{
				iLocal_115[1] = vehicle::create_vehicle(joaat("cruiser"), -1108.396f, -1690.399f, 3.9549f, 0f, 1, true);
			}
			if (vehicle::is_vehicle_driveable(iLocal_115[1], 0))
			{
				entity::set_entity_coords_no_offset(iLocal_115[1], -1108.396f, -1690.399f, 3.9549f, 0, 0, 1);
				entity::set_entity_quaternion(iLocal_115[1], -0.0466f, -0.074f, -0.4628f, 0.8822f);
				vehicle::set_vehicle_colour_combination(iLocal_115[1], 1);
			}
		}
		if (iLocal_277 != 2 || !iParam0)
		{
			if (!entity::does_entity_exist(iLocal_115[2]))
			{
				iLocal_115[2] = vehicle::create_vehicle(joaat("bmx"), -1109.405f, -1688.704f, 3.7501f, 0f, 1, true);
			}
			if (vehicle::is_vehicle_driveable(iLocal_115[2], 0))
			{
				entity::set_entity_coords_no_offset(iLocal_115[2], -1109.405f, -1688.704f, 3.7501f, 0, 0, 1);
				entity::set_entity_quaternion(iLocal_115[2], 0.0178f, 0.0525f, -0.4469f, 0.8929f);
			}
		}
		if (iLocal_277 != 3 || !iParam0)
		{
			if (!entity::does_entity_exist(iLocal_115[3]))
			{
				iLocal_115[3] = vehicle::create_vehicle(joaat("tribike"), -1111.001f, -1686.629f, 3.9705f, 0f, 1, true);
			}
			if (vehicle::is_vehicle_driveable(iLocal_115[3], 0))
			{
				entity::set_entity_coords_no_offset(iLocal_115[3], -1111.001f, -1686.629f, 3.9705f, 0, 0, 1);
				entity::set_entity_quaternion(iLocal_115[3], -0.0563f, -0.0702f, -0.5377f, 0.8383f);
			}
		}
		if ((iLocal_276 != 4 && iLocal_277 != 4) || !iParam0)
		{
			if (!entity::does_entity_exist(iLocal_115[4]))
			{
				iLocal_115[4] = vehicle::create_vehicle(joaat("cruiser"), -1105.606f, -1693.98f, 3.9518f, 0f, 1, true);
			}
			if (vehicle::is_vehicle_driveable(iLocal_115[4], 0))
			{
				entity::set_entity_coords_no_offset(iLocal_115[4], -1105.606f, -1693.98f, 3.9518f, 0, 0, 1);
				entity::set_entity_quaternion(iLocal_115[4], -0.0437f, -0.0759f, -0.4104f, 0.9077f);
				vehicle::set_vehicle_colour_combination(iLocal_115[4], 0);
				entity::freeze_entity_position(iLocal_115[4], true);
			}
		}
		if (!entity::does_entity_exist(iLocal_105))
		{
			iLocal_105 = ped::create_ped(26, joaat("u_m_m_bikehire_01"), vLocal_226, fLocal_258, 1, true);
		}
		ai::clear_ped_tasks_immediately(iLocal_105);
		ped::set_ped_combat_attributes(iLocal_105, 17, true);
		ped::set_ped_flee_attributes(iLocal_105, 128, true);
		ped::set_ped_flee_attributes(iLocal_105, 1024, true);
		func_141(&Local_676, 4, iLocal_105, "FAM2BIKEHIRE", 0, 1);
		ped::set_blocking_of_non_temporary_events(iLocal_105, true);
		ped::set_ped_relationship_group_hash(iLocal_105, -2065892691);
		ped::set_ped_can_be_targetted(iLocal_105, false);
		ped::_0x425AECF167663F48(iLocal_105, 1);
		iVar0 = 0;
		while (iVar0 < iLocal_115)
		{
			if (entity::does_entity_exist(iLocal_115[iVar0]))
			{
				entity::set_entity_proofs(iLocal_115[iVar0], true, true, true, true, true, false, 0, false);
			}
			iVar0++;
		}
	}
	if (iParam0)
	{
		iVar2 = 1;
		iVar3 = 0;
		while (iVar3 < iLocal_115)
		{
			if (iVar3 != iLocal_277 && iVar3 != iLocal_276)
			{
				if (!entity::does_entity_exist(iLocal_115[iVar3]))
				{
					iVar2 = 0;
				}
			}
			iVar3++;
		}
		iVar1 = iVar2;
	}
	else
	{
		iVar1 = (((((entity::does_entity_exist(iLocal_115[0]) && entity::does_entity_exist(iLocal_115[1])) && entity::does_entity_exist(iLocal_115[2])) && entity::does_entity_exist(iLocal_115[3])) && entity::does_entity_exist(iLocal_115[4])) && entity::does_entity_exist(iLocal_105));
	}
	return iVar1;
}

void func_141(var uParam0, int iParam1, int iParam2, char* sParam3, int iParam4, int iParam5)//Position - 0x1C52A
{
	if ((uParam0[iParam1 /*10*/])->f_7 == 1)
	{
	}
	(*uParam0)[iParam1 /*10*/] = iParam2;
	StringCopy(&((uParam0[iParam1 /*10*/])->f_1), sParam3, 24);
	(uParam0[iParam1 /*10*/])->f_7 = 1;
	(uParam0[iParam1 /*10*/])->f_8 = iParam4;
	(uParam0[iParam1 /*10*/])->f_9 = iParam5;
	if (!Global_69697)
	{
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_8 == 0)
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_play_ambient_anims(iParam2, 1);
			}
		}
		if (!ped::is_ped_injured(iParam2))
		{
			if ((uParam0[iParam1 /*10*/])->f_9 == 0)
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 0);
			}
			else
			{
				ped::set_ped_can_use_auto_conversation_lookat(iParam2, 1);
			}
		}
	}
}

void func_142(int iParam0)//Position - 0x1C5C5
{
	if (!iLocal_663 && !iParam0)
	{
		if (iLocal_70 < 5)
		{
			iLocal_662 = ped::add_scenario_blocking_area(-1120.292f, -1681.018f, 13.274f, -1081.289f, -1706.522f, 1.5344f, 0, 1, 1, 1);
			pathfind::set_roads_in_angled_area(-1082.088f, -1714.033f, 3.285254f, -1107.201f, -1681.87f, 14.29007f, 37.5f, 0, false, 1);
			vehicle::set_all_vehicle_generators_active_in_area(Vector(5.919011f, -1697.383f, -1112.611f) - Vector(2.75f, 30f, 42.688f), Vector(5.919011f, -1697.383f, -1112.611f) + Vector(2.75f, 30f, 42.688f), false, 1);
			iLocal_874 = pathfind::add_navmesh_blocking_object(-1107.517f, -1692.887f, 4.374f, 4.161f, 13.858f, 4.5f, func_143(36.0244f), 0, 1);
			iLocal_663 = 1;
		}
	}
	else if (iLocal_70 >= 5 || iParam0)
	{
		ped::remove_scenario_blocking_area(iLocal_662, 0);
		pathfind::set_roads_back_to_original_in_angled_area(-1082.088f, -1714.033f, 3.285254f, -1107.201f, -1681.87f, 14.29007f, 37.5f, 1);
		vehicle::set_all_vehicle_generators_active_in_area(Vector(5.919011f, -1697.383f, -1112.611f) - Vector(2.75f, 30f, 42.688f), Vector(5.919011f, -1697.383f, -1112.611f) + Vector(2.75f, 30f, 42.688f), true, 1);
		if (pathfind::_0x0EAEB0DB4B132399(iLocal_874))
		{
			pathfind::remove_navmesh_blocking_object(iLocal_874);
		}
		iLocal_663 = 0;
	}
}

float func_143(float fParam0)//Position - 0x1C748
{
	return (fParam0 * 0.01745329f);
}

void func_144()//Position - 0x1C758
{
	int iVar0;
	int iVar1;
	
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
	{
		iVar0 = ped::set_exclusive_phone_relationships(player::player_ped_id());
		if (vehicle::is_vehicle_driveable(iVar0, 0))
		{
			iVar1 = vehicle::get_ped_in_vehicle_seat(iVar0, 0, 0);
			if (!ped::is_ped_injured(iVar1))
			{
				if (iVar1 != player::player_ped_id())
				{
					if (entity::is_entity_a_mission_entity(iVar1))
					{
						if (!ped::is_ped_headtracking_entity(iVar1, player::player_ped_id()))
						{
							ai::task_look_at_entity(iVar1, player::player_ped_id(), 2000, 2048, 2);
						}
					}
				}
			}
		}
	}
}

void func_145()//Position - 0x1C7C5
{
	if (iLocal_70 != 11)
	{
		iLocal_83 = iLocal_70;
		iLocal_70 = 11;
		if (ui::does_blip_exist(iLocal_132))
		{
			ui::remove_blip(&iLocal_132);
		}
		if (ui::does_blip_exist(iLocal_133))
		{
			ui::remove_blip(&iLocal_133);
		}
		if (ui::does_blip_exist(iLocal_134))
		{
			ui::remove_blip(&iLocal_134);
		}
		if (ui::does_blip_exist(iLocal_135))
		{
			ui::remove_blip(&iLocal_135);
		}
		if (func_170())
		{
			if (!iLocal_842)
			{
				Local_843 = { func_169() };
				func_167();
				iLocal_842 = 1;
				iLocal_909 = 0;
				iLocal_911 = 0;
				iLocal_910 = gameplay::get_game_timer();
			}
		}
	}
	if (iLocal_83 == 1)
	{
		func_102();
		if (!ped::is_ped_injured(iLocal_104))
		{
			if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 625f)
			{
				if ((!iLocal_909 && !ui::is_message_being_displayed()) && !func_170())
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_WANTED", 8, 0, 0, 0))
					{
						iLocal_910 = gameplay::get_game_timer();
						iLocal_909 = 1;
					}
				}
				else if ((gameplay::get_game_timer() - iLocal_910) > 15000 && !func_170())
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_LOSE", 8, 0, 0, 0))
					{
						iLocal_910 = gameplay::get_game_timer();
					}
				}
			}
			if (func_155(iLocal_104))
			{
				if (ui::does_blip_exist(iLocal_134))
				{
					ui::remove_blip(&iLocal_134);
				}
			}
			else if (!ui::does_blip_exist(iLocal_134))
			{
				func_153();
				iLocal_134 = func_150(iLocal_104, 0, 145);
			}
			else
			{
				if (!iLocal_287 && !ui::is_message_being_displayed())
				{
					func_149("FM2_JIMGB", 7500, 1);
					iLocal_287 = true;
				}
				if (func_148(iLocal_104, 300f))
				{
					func_103("FM2_JIMAB");
				}
			}
		}
	}
	else if (iLocal_83 == 8)
	{
		if (!ped::is_ped_injured(iLocal_103))
		{
			if (func_155(iLocal_103))
			{
				if (ui::does_blip_exist(iLocal_134))
				{
					ui::remove_blip(&iLocal_134);
				}
			}
			else if (!ui::does_blip_exist(iLocal_134))
			{
				func_153();
				iLocal_134 = func_150(iLocal_103, 0, 145);
			}
			else
			{
				if (!iLocal_288 && !ui::is_message_being_displayed())
				{
					func_149("FM2_TRAGB", 7500, 1);
					iLocal_288 = true;
				}
				if (func_148(iLocal_103, 300f))
				{
					func_103("FM2_TRAAB");
				}
			}
		}
		if (!iLocal_911)
		{
			iLocal_911 = 1;
		}
	}
	else if (!iLocal_911)
	{
		iLocal_911 = 1;
	}
	if (!func_170())
	{
		func_146(&Local_672);
	}
	if (player::get_player_wanted_level(player::player_id()) == 0)
	{
		if (!iLocal_911)
		{
			if (iLocal_83 == 1)
			{
				if (!ped::is_ped_injured(iLocal_104))
				{
					if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 625f)
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_LOSTCOP", 8, 0, 0, 0))
						{
							iLocal_911 = 1;
						}
					}
				}
			}
		}
		else
		{
			iLocal_70 = iLocal_83;
			Local_672.f_1 = 0;
			ui::clear_prints();
		}
	}
}

void func_146(var uParam0)//Position - 0x1CA6F
{
	if (!uParam0->f_1)
	{
		if (!gameplay::is_string_null(*uParam0))
		{
			func_147(*uParam0, 7500, 1);
			uParam0->f_1 = 1;
		}
	}
}

void func_147(char* sParam0, int iParam1, int iParam2)//Position - 0x1CA9A
{
	iParam2 = iParam2;
	ui::_set_text_entry_2(sParam0);
	ui::_draw_subtitle_timed(iParam1, 1);
}

bool func_148(int iParam0, float fParam1)//Position - 0x1CAB3
{
	if (entity::does_entity_exist(iParam0))
	{
		if (entity::is_entity_a_ped(iParam0))
		{
			if (!ped::is_ped_injured(iParam0))
			{
				if (gameplay::get_distance_between_coords(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iParam0, 1), 1) > fParam1)
				{
					return true;
				}
			}
		}
	}
	return false;
}

void func_149(char* sParam0, int iParam1, int iParam2)//Position - 0x1CAF7
{
	iParam2 = iParam2;
	ui::_set_text_entry_2(sParam0);
	ui::_draw_subtitle_timed(iParam1, 0);
}

int func_150(int iParam0, int iParam1, int iParam2)//Position - 0x1CB10
{
	int iVar0;
	
	iVar0 = func_151(iParam0, !iParam1, 0);
	if ((iParam2 != 145 && ui::does_blip_exist(iVar0)) && ui::does_text_label_exist(&(Global_101652.f_26993[iParam2 /*29*/].f_3)))
	{
		ui::set_blip_name_from_text_file(iVar0, &(Global_101652.f_26993[iParam2 /*29*/].f_3));
	}
	return iVar0;
}

int func_151(int iParam0, int iParam1, int iParam2)//Position - 0x1CB62
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return 0;
	}
	iVar0 = ui::add_blip_for_entity(iParam0);
	if (entity::is_entity_a_vehicle(iParam0))
	{
		ui::set_blip_scale(iVar0, func_152(network::network_is_game_in_progress(), 1f, 1f));
		if (!iParam2)
		{
			ui::set_blip_as_friendly(iVar0, iParam1);
		}
		else
		{
			ui::set_blip_colour(iVar0, 2);
		}
	}
	else if (entity::is_entity_a_ped(iParam0))
	{
		ui::set_blip_scale(iVar0, func_152(network::network_is_game_in_progress(), 0.7f, 0.7f));
		ui::set_blip_as_friendly(iVar0, iParam1);
	}
	else if (entity::is_entity_an_object(iParam0))
	{
		ui::set_blip_scale(iVar0, func_152(network::network_is_game_in_progress(), 0.7f, 0.7f));
	}
	return iVar0;
}

float func_152(int iParam0, float fParam1, float fParam2)//Position - 0x1CC06
{
	if (iParam0)
	{
		return fParam1;
	}
	return fParam2;
}

void func_153()//Position - 0x1CC1D
{
	Global_14611 = 0;
	func_154();
}

void func_154()//Position - 0x1CC2D
{
	audio::restart_scripted_conversation();
	Global_16756 = 0;
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::stop_scripted_conversation(false);
		Global_15745 = 6;
	}
}

bool func_155(int iParam0)//Position - 0x1CC4E
{
	if (ped::is_ped_group_member(iParam0, player::get_player_group(player::player_id())))
	{
		if (!entity::is_entity_at_entity(player::player_ped_id(), iParam0, 50f, 50f, 50f, 0, 1, 0))
		{
			if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) || ped::_0x03EA03AF85A85CB7(iLocal_104, 0, 1, 0, 0, 0, 0, 1, -1))
			{
				ped::remove_ped_from_group(iParam0);
			}
		}
		return true;
	}
	else if (entity::is_entity_at_entity(player::player_ped_id(), iParam0, Global_19, 0, 1, 0))
	{
		ped::set_ped_as_group_member(iParam0, player::get_player_group(player::player_id()));
	}
	if (ped::_0x03EA03AF85A85CB7(iParam0, 0, 1, 0, 0, 0, 0, 1, -1))
	{
	}
	if (ped::_0x03EA03AF85A85CB7(iParam0, 0, 1, 0, 0, 0, 0, 0, -1))
	{
	}
	return false;
}

int func_156(var uParam0, char* sParam1, char* sParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x1CCFA
{
	func_166(uParam0, 145, sParam1, iParam4, iParam5, iParam6);
	if (iParam3 > 7)
	{
		if (iParam3 < 12)
		{
			iParam3 = 7;
		}
	}
	Global_15752 = 0;
	Global_15754 = 0;
	Global_15759 = 0;
	Global_16736 = 0;
	Global_16738 = 0;
	Global_16742 = 0;
	Global_2621441 = 0;
	return func_157(sParam2, iParam3, 0);
}

bool func_157(char* sParam0, int iParam1, int iParam2)//Position - 0x1CD48
{
	Global_15746 = 0;
	if (Global_15745 == 0 || Global_15747 == 2)
	{
		if (Global_15745 != 0)
		{
			if (iParam1 > Global_15747)
			{
				if (Global_15752 == 0)
				{
					audio::stop_scripted_conversation(false);
					Global_14443.f_1 = 3;
					Global_15745 = 0;
					Global_15746 = 1;
					Global_15798 = 0;
					Global_15741 = 0;
					Global_15742 = 0;
					Global_15756 = 0;
					Global_15755 = 0;
					Global_14442 = 0;
				}
				else
				{
					func_165();
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		if (audio::is_scripted_conversation_ongoing())
		{
			return false;
		}
		if (func_164(8, -1))
		{
			return false;
		}
		Global_15821 = { Global_15815 };
		func_163();
		Global_15034 = { Global_15199 };
		Global_15751 = Global_15752;
		Global_15758 = Global_15759;
		Global_2621442 = Global_2621441;
		Global_15760 = { Global_15776 };
		Global_15753 = Global_15754;
		Global_16735 = Global_16736;
		Global_16743 = { Global_16749 };
		Global_16737 = Global_16738;
		Global_16739 = Global_16740;
		Global_16741 = Global_16742;
		Global_15364.f_370 = Global_16734;
		Global_15364.f_368 = Global_16732;
		Global_15364.f_369 = Global_16733;
		Global_15741 = Global_15742;
		if (Global_15751)
		{
			gameplay::clear_bit(&Global_2313, 20);
			gameplay::clear_bit(&Global_2314, 17);
			gameplay::clear_bit(&Global_2315, 0);
			if (iParam2)
			{
				func_162();
				if (Global_3118[Global_14443 /*2811*/][0 /*281*/].f_259 == 2)
				{
					if (iParam1 == 13)
					{
					}
					else
					{
						return false;
					}
				}
				if (Global_14443.f_1 > 3)
				{
					return false;
				}
			}
			if (Global_14409 == 1)
			{
				return false;
			}
			if (player::is_player_playing(player::player_id()))
			{
				if (ped::is_ped_in_melee_combat(player::player_ped_id()))
				{
					return false;
				}
				if (func_161())
				{
					return false;
				}
				if (ai::is_ped_sprinting(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_ragdoll(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_in_parachute_free_fall(player::player_ped_id()))
				{
					return false;
				}
				if (weapon::get_is_ped_gadget_equipped(player::player_ped_id(), joaat("gadget_parachute")))
				{
					return false;
				}
				if (!Global_69697)
				{
					if (entity::is_entity_in_water(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_player_climbing(player::player_id()))
					{
						return false;
					}
					if (ped::is_ped_planting_bomb(player::player_ped_id()))
					{
						return false;
					}
					if (player::is_special_ability_active(player::player_id()))
					{
						return false;
					}
				}
			}
			if (func_160())
			{
				return false;
			}
			else
			{
				switch (Global_14443.f_1)
				{
					case 7:
						return false;
						break;
					
					case 8:
						return false;
						break;
					
					case 9:
						break;
					
					case 10:
						break;
					
					default:
						break;
				}
				if (gameplay::is_bit_set(Global_2313, 9))
				{
					return false;
				}
			}
			func_159();
			Global_15755 = iParam2;
		}
		Global_15747 = iParam1;
		StringCopy(&Global_15364, sParam0, 24);
		Global_14611 = 0;
		func_158();
		return true;
	}
	if (Global_15745 == 5)
	{
		return false;
	}
	if (iParam1 < Global_15747 || iParam1 == Global_15747)
	{
		return false;
	}
	if (iParam1 == 2)
	{
	}
	else
	{
		func_165();
	}
	return false;
}

void func_158()//Position - 0x1D014
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 69)
	{
		StringCopy(&(Global_14613[iVar0 /*6*/]), "", 24);
		iVar0++;
	}
	audio::stop_scripted_conversation(false);
	Global_15745 = 1;
}

void func_159()//Position - 0x1D045
{
	Global_15798 = Global_15797;
	Global_15792 = Global_15793;
	Global_15839 = { Global_15827 };
	Global_15845 = { Global_15833 };
	Global_15800 = Global_15799;
	Global_15869 = { Global_15851 };
	Global_15875 = { Global_15857 };
	Global_15881 = { Global_15863 };
	Global_15887 = { Global_15893 };
	Global_1628 = Global_1629;
	Global_1630 = Global_1631;
	Global_15756 = Global_15757;
	Global_15758 = Global_15759;
	Global_15760 = { Global_15776 };
	Global_15749 = Global_15750;
	Global_16761 = 0;
	Global_15794 = 0;
	Global_15795 = 0;
	gameplay::clear_bit(&Global_2314, 16);
}

bool func_160()//Position - 0x1D0DA
{
	if (Global_14443.f_1 == 1 || Global_14443.f_1 == 0)
	{
		return true;
	}
	return false;
}

bool func_161()//Position - 0x1D101
{
	int iVar0;
	int iVar1;
	
	if (Global_69697)
	{
		iVar0 = 0;
		weapon::get_current_ped_weapon(player::player_ped_id(), &iVar1, 1);
		if (player::is_player_playing(player::player_id()))
		{
			if ((iVar1 == joaat("weapon_sniperrifle") || iVar1 == joaat("weapon_heavysniper")) || iVar1 == joaat("weapon_remotesniper"))
			{
				iVar0 = 1;
			}
		}
		if (cam::is_aim_cam_active() && iVar0 == 1)
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	if (player::is_player_playing(player::player_id()))
	{
		if (ped::get_ped_config_flag(player::player_ped_id(), 78, 1))
		{
			return true;
		}
		else
		{
			return false;
		}
	}
	return true;
}

void func_162()//Position - 0x1D19A
{
	if (func_27(14))
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			if (entity::get_entity_model(player::player_ped_id()) == Global_101652.f_26993[0 /*29*/])
			{
				Global_14443 = 0;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101652.f_26993[1 /*29*/])
			{
				Global_14443 = 1;
			}
			else if (entity::get_entity_model(player::player_ped_id()) == Global_101652.f_26993[2 /*29*/])
			{
				Global_14443 = 2;
			}
			else
			{
				Global_14443 = 0;
			}
		}
	}
	else
	{
		Global_14443 = func_135();
		if (Global_14443 == 145)
		{
			Global_14443 = 3;
		}
		if (Global_69697)
		{
			Global_14443 = 3;
		}
		if (Global_14443 > 3)
		{
			Global_14443 = 3;
		}
	}
}

void func_163()//Position - 0x1D23C
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 15)
	{
		Global_15034[iVar0 /*10*/] = 0;
		StringCopy(&(Global_15034[iVar0 /*10*/].f_1), "", 24);
		Global_15034[iVar0 /*10*/].f_7 = 0;
		Global_15034[iVar0 /*10*/].f_8 = 0;
		iVar0++;
	}
	Global_15034.f_161 = -99;
	Global_15034.f_162 = { 0f, 0f, 0f };
}

int func_164(int iParam0, int iParam1)//Position - 0x1D293
{
	switch (iParam0)
	{
		case 5:
			if (iParam1 > -1)
			{
				return Global_1352862.f_203[iParam1];
			}
			break;
	}
	return gameplay::is_bit_set(Global_1352862.f_1015, iParam0);
}

void func_165()//Position - 0x1D2CE
{
	audio::restart_scripted_conversation();
	Global_16756 = 0;
	if ((audio::is_mobile_phone_call_ongoing() || Global_14443.f_1 == 9) || Global_14442 == 1)
	{
		audio::stop_scripted_conversation(false);
		Global_15745 = 6;
		Global_14443.f_1 = 3;
		return;
	}
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::stop_scripted_conversation(true);
		Global_15745 = 6;
		return;
	}
}

void func_166(var uParam0, int iParam1, char* sParam2, int iParam3, int iParam4, int iParam5)//Position - 0x1D325
{
	Global_15199 = { *uParam0 };
	Global_1629 = iParam1;
	StringCopy(&Global_15815, sParam2, 24);
	Global_16734 = iParam5;
	if (iParam3 == 0)
	{
		Global_16732 = 1;
		Global_16730 = 0;
	}
	else
	{
		Global_16732 = 0;
		Global_16730 = 1;
	}
	if (iParam4 == 0)
	{
		Global_16733 = 1;
		Global_16731 = 0;
	}
	else
	{
		Global_16733 = 0;
		Global_16731 = 1;
	}
}

void func_167()//Position - 0x1D37B
{
	Global_14611 = 0;
	func_168();
}

void func_168()//Position - 0x1D38B
{
	if (audio::is_scripted_conversation_ongoing())
	{
		audio::restart_scripted_conversation();
		Global_16756 = 0;
		audio::stop_scripted_conversation(true);
		Global_15745 = 6;
		return;
	}
}

struct<6> func_169()//Position - 0x1D3AF
{
	struct<6> Var0;
	int iVar6;
	int iVar7;
	int iVar8;
	
	StringCopy(&Var0, "NULL", 24);
	if (Global_15745 == 4)
	{
		iVar6 = audio::get_current_scripted_conversation_line();
		iVar6 = (iVar6 + Global_16755);
		iVar7 = iVar6 + 1;
		if (iVar7 > -1 && iVar6 > -1)
		{
			if (ui::does_text_label_exist(&(Global_14613[iVar7 /*6*/])))
			{
				return Global_14613[iVar7 /*6*/];
			}
			else
			{
				iVar8 = iVar7;
				while (iVar8 < 70)
				{
					if (ui::does_text_label_exist(&(Global_14613[iVar8 /*6*/])))
					{
						return Global_14613[iVar8 /*6*/];
						iVar8 = 70;
					}
					iVar8++;
				}
				return Var0;
			}
			return Global_14613[iVar6 /*6*/];
		}
		else
		{
			return Var0;
		}
	}
	return Var0;
}

bool func_170()//Position - 0x1D45B
{
	if (Global_15745 != 0 || audio::is_scripted_conversation_ongoing())
	{
		return true;
	}
	return false;
}

void func_171()//Position - 0x1D47D
{
	if (cam::is_screen_faded_out())
	{
		controls::disable_control_action(0, 199, 1);
	}
	switch (iLocal_270)
	{
		case 0:
			audio::set_audio_flag("HoldMissionCompleteWhenPrepared", 1);
			streaming::request_ptfx_asset();
			streaming::request_anim_dict("missfam2_pier");
			streaming::request_model(joaat("prop_cigar_01"));
			streaming::request_model(joaat("cruiser"));
			if (!cutscene::is_cutscene_active())
			{
				if (iLocal_285)
				{
					cutscene::request_cutscene("family_2_mcs_4", 8);
				}
				else
				{
					cutscene::_request_cutscene_2("family_2_mcs_4", 2, 8);
				}
				iLocal_270++;
			}
			else
			{
				iLocal_270 += 2;
			}
			break;
		
		case 1:
			if (cutscene::_0xB56BBBCC2955D9CB())
			{
				func_2("Michael", player::player_ped_id(), 0, 2);
				cutscene::_0x2A56C06EBEF2B0D9("Tracy", iLocal_103, 0);
				cutscene::set_cutscene_ped_prop_variation("Tracy", 1, 1, 0, 0);
				cutscene::set_cutscene_ped_prop_variation("Tracy", 0, 0, 0, 0);
				if (audio::is_audio_scene_active("FAMILY_2_JETSKI_GO_TO_BEACH"))
				{
					audio::stop_audio_scene("FAMILY_2_JETSKI_GO_TO_BEACH");
				}
				iLocal_270++;
			}
			break;
		
		case 2:
			func_2("Michael", player::player_ped_id(), 0, 2);
			cutscene::_0x2A56C06EBEF2B0D9("Tracy", iLocal_103, 0);
			cutscene::set_cutscene_ped_prop_variation("Tracy", 1, 1, 0, 0);
			cutscene::set_cutscene_ped_prop_variation("Tracy", 0, 0, 0, 0);
			if (func_192())
			{
				func_153();
				func_184(1, 1, 1, 0);
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					vehicle::set_vehicle_engine_on(iLocal_111, false, 1, 0);
					cutscene::register_entity_for_cutscene(iLocal_111, "Michaels_seashark", 0, 0, 0);
				}
				if (!ped::is_ped_injured(iLocal_103))
				{
					cutscene::register_entity_for_cutscene(iLocal_103, "Tracy", 0, 0, 0);
				}
				if (!ped::is_ped_injured(iLocal_104))
				{
					cutscene::register_entity_for_cutscene(iLocal_104, "Jimmy", 0, 0, 0);
				}
				ui::clear_prints();
				ui::clear_help(1);
				func_153();
				audio::trigger_music_event("FAM2_COMPLETE");
				cutscene::start_cutscene(0);
				unk1::_0x48621C9FCA3EBD28(4);
				streaming::request_anim_dict("missfam2_pier");
				streaming::request_model(joaat("prop_cigar_01"));
				streaming::request_model(joaat("cruiser"));
				func_183();
				iLocal_270++;
			}
			break;
		
		case 3:
			if (!cam::is_screen_faded_in() && !cam::is_screen_fading_in())
			{
				cam::do_screen_fade_in(500);
			}
			graphics::remove_decals_in_range(entity::get_entity_coords(player::player_ped_id(), 1), 100f);
			func_182(1, 1);
			audio::set_audio_flag("AvoidMissionCompleteDelay", 0);
			iLocal_270++;
			break;
		
		case 4:
			if (cutscene::can_set_exit_state_for_registered_entity("MICHAEL", 0))
			{
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					vehicle::set_vehicle_on_ground_properly(iLocal_111, 1084227584);
					entity::apply_force_to_entity(iLocal_111, 0, 0f, 0f, 0.1f, 0f, 0f, 0f, 0, 1, 1, 0, 0, 1);
				}
				if (entity::does_entity_exist(iLocal_104))
				{
					ped::delete_ped(&iLocal_104);
				}
				if (entity::does_entity_exist(iLocal_103))
				{
					ped::delete_ped(&iLocal_103);
				}
				entity::set_entity_coords(player::player_ped_id(), -1607.251f, -1138.103f, 1.1443f, 1, false, 0, 1);
				entity::set_entity_heading(player::player_ped_id(), 262.2968f);
			}
			streaming::_0xA76359FC80B2438E(1.5f);
			if (cam::is_screen_faded_out() && cutscene::was_cutscene_skipped())
			{
				system::settimera(0);
				cam::do_screen_fade_out(0);
			}
			if (cutscene::is_cutscene_active())
			{
				if (cutscene::get_cutscene_time() > 31400)
				{
					if (!cam::is_screen_fading_out() && !cam::is_screen_faded_out())
					{
						cam::do_screen_fade_out(1500);
					}
					controls::disable_control_action(0, 18, 1);
				}
			}
			if (!cutscene::is_cutscene_active())
			{
				cam::set_gameplay_cam_relative_heading(0f);
				cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
				func_184(0, 1, 1, 0);
				func_181();
				if (!cam::is_screen_fading_out() && !cam::is_screen_faded_out())
				{
					cam::do_screen_fade_out(500);
				}
				unk1::_0x81CBAE94390F9F89();
				iLocal_270++;
			}
			break;
		
		case 5:
			if (cam::is_screen_faded_out() && !cam::is_screen_fading_out())
			{
				audio::trigger_music_event("FAM2_STOP");
				if (entity::does_entity_exist(iLocal_114))
				{
					func_409(iLocal_114, -1060.518f, -1691.88f, 3.5097f, 185.4265f, 24, 0);
				}
				ped::clear_ped_blood_damage_by_zone(player::player_ped_id(), 0);
				ped::clear_ped_blood_damage_by_zone(player::player_ped_id(), 3);
				ped::clear_ped_blood_damage_by_zone(player::player_ped_id(), 2);
				while (!func_344(0, 1))
				{
					system::wait(0);
					controls::disable_control_action(0, 199, 1);
				}
				system::settimera(0);
				streaming::remove_ipl("smboat");
				iLocal_270 = 100;
			}
			break;
		
		case 100:
			streaming::request_ptfx_asset();
			func_179(-1850.139f, -1250.253f, 8.59f, -120.1799f, 1);
			streaming::request_anim_dict("missfam2_pier");
			streaming::request_model(joaat("prop_cigar_01"));
			streaming::request_model(joaat("cruiser"));
			while ((!streaming::has_anim_dict_loaded("missfam2_pier") || !streaming::has_model_loaded(joaat("prop_cigar_01"))) || !streaming::has_model_loaded(joaat("cruiser")))
			{
				system::wait(0);
				controls::disable_control_action(0, 199, 1);
			}
			audio::set_audio_flag("HoldMissionCompleteWhenPrepared", 0);
			entity::set_entity_coords(player::player_ped_id(), -1850.139f, -1250.253f, 8.59f, 1, false, 0, 1);
			entity::set_entity_heading(player::player_ped_id(), 134.28f);
			iLocal_319 = vehicle::create_vehicle(joaat("cruiser"), -1846.573f, -1214.731f, 12.5755f, 0f, 1, true);
			entity::set_entity_quaternion(iLocal_319, -0.0155f, -0.0834f, -0.306f, 0.9483f);
			vehicle::set_vehicle_on_ground_properly(iLocal_319, 1084227584);
			ped::clear_ped_wetness(player::player_ped_id());
			iLocal_318 = object::create_object(joaat("prop_cigar_01"), -1850.139f, -1250.253f, 8.59f, 1, true, false);
			entity::attach_entity_to_entity(iLocal_318, player::player_ped_id(), ped::get_ped_bone_index(player::player_ped_id(), 28422), 0f, 0f, 0f, 0f, 0f, 180f, 0, 0, 0, 0, 2, 1);
			graphics::start_particle_fx_looped_on_entity("cs_cig_smoke", iLocal_318, 0.05f, 0f, 0f, 0f, 0f, 90f, 1065353216, 0, 0, 0);
			iLocal_317 = cam::create_camera(26379945, 1);
			cam::set_cam_params(iLocal_317, -1852.002f, -1250.224f, 8.9706f, -3.6975f, 0f, -120.1799f, 45f, 0, 1, 1, 2);
			cam::set_cam_params(iLocal_317, -1852.087f, -1250.395f, 8.9706f, -1.3266f, 0f, -102.4498f, 45f, 10000, 1, 1, 2);
			cam::set_widescreen_borders(true, 0);
			if (script::_get_number_of_instances_of_streamed_script(gameplay::get_hash_key("mission_stat_watcher")) > 0)
			{
				func_182(1, 1);
				while (!Global_69957)
				{
					system::wait(0);
					controls::disable_control_action(0, 199, 1);
				}
				while (Global_69957)
				{
					system::wait(0);
					controls::disable_control_action(0, 199, 1);
				}
			}
			else
			{
				system::wait(3000);
			}
			gameplay::clear_area_of_peds(-1850.15f, -1250.253f, 8.625f, 5f, 0);
			iLocal_316 = ped::create_synchronized_scene(-1850.15f, -1250.253f, 8.625f, 0f, 0f, 134.28f, 2);
			ai::task_synchronized_scene(player::player_ped_id(), iLocal_316, "missfam2_pier", "pier_lean_toss_cigarette", 1000f, -4f, 0, 0, 1148846080, 0);
			cam::render_script_cams(true, false, 3000, 1, 0, 0);
			system::settimera(0);
			weapon::set_current_ped_weapon(player::player_ped_id(), joaat("weapon_unarmed"), true);
			if (cam::_0xEE778F8C7E1142E2(cam::_0x19CAFA3C87F7C2FF()) == 4)
			{
				player::set_player_control(player::player_id(), false, 0);
			}
			if (!cam::is_screen_faded_in() && !cam::is_screen_fading_in())
			{
				cam::do_screen_fade_in(1500);
			}
			iLocal_270++;
			break;
		
		case 101:
			if (ped::is_synchronized_scene_running(iLocal_316) && ped::get_synchronized_scene_phase(iLocal_316) > 0.227f)
			{
				graphics::start_particle_fx_non_looped_on_ped_bone("cs_cig_exhale_nose", player::player_ped_id(), -0.025f, 0.12f, 0f, 0f, 90f, 0f, 31086, 1065353216, 0, 0, 0);
				iLocal_270++;
			}
			break;
		
		case 102:
			if (ped::is_synchronized_scene_running(iLocal_316) && ped::get_synchronized_scene_phase(iLocal_316) > 0.563f)
			{
				cam::set_cam_params(iLocal_317, cam::get_cam_coord(iLocal_317), cam::get_cam_rot(iLocal_317, 2), cam::get_cam_fov(iLocal_317), 0, 1, 1, 2);
				if (cam::_0xEE778F8C7E1142E2(cam::_0x19CAFA3C87F7C2FF()) != 4)
				{
					cam::set_cam_params(iLocal_317, -1852.922f, -1252.698f, 9.3524f, -2.9046f, 0f, -46.5763f, 50f, 4000, 1, 1, 2);
				}
				else
				{
					cam::set_cam_params(iLocal_317, -1851.685f, -1251.438f, 9.3524f, -0.0547f, 0.0543f, -38.2308f, 50f, 4000, 1, 1, 2);
				}
				iLocal_270++;
			}
			break;
		
		case 103:
			if (entity::does_entity_exist(iLocal_318) && entity::is_entity_attached(iLocal_318))
			{
				if (ped::get_synchronized_scene_phase(iLocal_316) > 0.711f)
				{
					entity::detach_entity(iLocal_318, 1, true);
					entity::set_entity_velocity(iLocal_318, Vector(8.3737f, -1250.913f, -1852.43f) - Vector(9.2628f, -1250.44f, -1850.899f));
				}
			}
			if (ped::is_synchronized_scene_running(iLocal_316) && ped::get_synchronized_scene_phase(iLocal_316) > 0.768f)
			{
				graphics::start_particle_fx_non_looped_on_ped_bone("cs_cig_exhale_mouth", player::player_ped_id(), -0.025f, 0.13f, 0f, 0f, 0f, 0f, 31086, 1065353216, 0, 0, 0);
				iLocal_270++;
			}
			break;
		
		case 104:
			if (ped::is_synchronized_scene_running(iLocal_316) && ped::get_synchronized_scene_phase(iLocal_316) > 0.7116f)
			{
				graphics::start_particle_fx_non_looped_on_ped_bone("cs_cig_exhale_mouth", player::player_ped_id(), -0.025f, 0.13f, 0f, 0f, 0f, 0f, 31086, 1065353216, 0, 0, 0);
				func_178(&uLocal_644, player::player_ped_id(), 0, 1069547520, 1000, 1000, 700, 0, 1045220557);
				iLocal_270++;
			}
			break;
		
		case 105:
			if (ped::is_synchronized_scene_running(iLocal_316))
			{
				if (cam::_0xEE778F8C7E1142E2(cam::_0x19CAFA3C87F7C2FF()) == 4)
				{
					if (cam::does_cam_exist(iLocal_317))
					{
						if (ped::get_synchronized_scene_phase(iLocal_316) > 0.85f && func_174(&uLocal_644, 0, 1, 1, 0, 0, 0))
						{
							player::set_player_control(player::player_id(), true, 0);
							if (cam::does_cam_exist(iLocal_317))
							{
								cam::set_gameplay_cam_relative_heading(0f);
								cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
								cam::render_script_cams(false, true, 1000, 1, 0, 0);
								cam::destroy_cam(iLocal_317, 0);
							}
						}
					}
				}
				if (ped::get_synchronized_scene_phase(iLocal_316) > 0.98f)
				{
					if (cam::does_cam_exist(iLocal_317))
					{
						cam::set_gameplay_cam_relative_heading(0f);
						cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
						cam::render_script_cams(false, true, 1000, 1, 0, 0);
						cam::destroy_cam(iLocal_317, 0);
					}
					ped::set_ped_stealth_movement(player::player_ped_id(), 0, 0);
					ai::clear_ped_tasks(player::player_ped_id());
					cam::set_widescreen_borders(false, 100);
					if (entity::does_entity_exist(iLocal_318))
					{
						object::delete_object(&iLocal_318);
					}
					system::settimera(0);
					iLocal_270++;
				}
			}
			break;
		
		case 106:
			if (system::timera() > 100)
			{
				player::set_player_control(player::player_id(), true, 0);
				func_172(0, 0);
				func_530();
			}
			break;
	}
}

void func_172(int iParam0, int iParam1)//Position - 0x1DE4D
{
	int iVar0;
	var uVar1;
	var uVar2;
	
	if (!Global_55820)
	{
		Global_55820 = iParam1;
	}
	if (iParam0)
	{
		if ((func_138(0) && Global_69943.f_1 == 1) && func_173(Global_69943))
		{
		}
		else
		{
			Global_55818 = 1;
		}
	}
	if (Global_101652.f_8028 || func_138(0))
	{
		iVar0 = func_137();
		uVar1 = Global_82571[iVar0 /*5*/];
		uVar2 = Global_69966.f_109[uVar1 /*4*/];
		if (iVar0 == -1)
		{
			if (Global_101652.f_8028)
			{
			}
			return;
		}
		if (gameplay::is_bit_set(Global_82571[iVar0 /*5*/].f_1, 4))
		{
			return;
		}
		if (gameplay::is_bit_set(Global_82571[iVar0 /*5*/].f_1, 5))
		{
			return;
		}
		gameplay::set_bit(&(Global_82571[iVar0 /*5*/].f_1), 4);
		gameplay::set_bit(&Global_69945, 1);
		Global_69961 = uVar2;
		Global_69962 = gameplay::get_game_timer();
	}
}

bool func_173(int iParam0)//Position - 0x1DF23
{
	switch (iParam0)
	{
		case 71:
			return true;
			break;
		
		case 86:
			return true;
			break;
		
		case 91:
			return true;
			break;
		
		default:
			return false;
			break;
	}
	return false;
}

bool func_174(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x1DF61
{
	vector3 vVar0;
	vector3 vVar3;
	vector3 vVar6;
	vector3 vVar9;
	vector3 vVar12;
	vector3 vVar15;
	vector3 vVar18;
	float fVar21;
	
	switch (*uParam0)
	{
		case 0:
			func_176();
			if (!entity::is_entity_dead(uParam0->f_5, 0))
			{
				func_175(uParam0);
				vVar0 = { cam::_get_gameplay_cam_coords() };
				if (iParam1)
				{
					vVar0 = { vVar0 + entity::get_entity_velocity(uParam0->f_5) * FtoV(gameplay::get_frame_time()) };
				}
				vVar3 = { entity::get_offset_from_entity_given_world_coords(uParam0->f_5, vVar0) };
				vVar6 = { cam::_get_gameplay_cam_rot(2) };
				vVar9 = { vVar6 + uParam0->f_9 };
				vVar12 = { vVar9 - entity::get_entity_rotation(uParam0->f_5, 2) };
				vVar15 = { (-system::sin(vVar9.y) * system::cos(vVar9.x)), (system::cos(vVar9.y) * system::cos(vVar9.x)), system::sin(vVar9.x) };
				vVar18 = { (-system::sin(vVar12.y) * system::cos(vVar12.x)), (system::cos(vVar12.y) * system::cos(vVar12.x)), system::sin(vVar12.x) };
				fVar21 = cam::_0x80EC114669DAEFF4();
				if (uParam0->f_17 > 0 || iParam6 != 0)
				{
					uParam0->f_3 = cam::create_camera(1775630800, 0);
				}
				uParam0->f_1 = cam::create_camera(26379945, 1);
				if (iParam1)
				{
					cam::attach_cam_to_entity(uParam0->f_1, uParam0->f_5, vVar3, 1);
				}
				else
				{
					cam::set_cam_coord(uParam0->f_1, vVar0);
				}
				cam::set_cam_rot(uParam0->f_1, vVar6, 2);
				cam::set_cam_fov(uParam0->f_1, fVar21);
				uParam0->f_2 = cam::create_camera(26379945, 1);
				if (iParam1 && !iParam4)
				{
					cam::attach_cam_to_entity(uParam0->f_2, uParam0->f_5, vVar3 + vVar18 * Vector(uParam0->f_12, uParam0->f_12, uParam0->f_12), 1);
				}
				else
				{
					cam::set_cam_coord(uParam0->f_2, vVar0 + vVar15 * Vector(uParam0->f_12, uParam0->f_12, uParam0->f_12));
				}
				cam::set_cam_rot(uParam0->f_2, vVar6, 2);
				cam::set_cam_fov(uParam0->f_2, fVar21);
				if (uParam0->f_17 > 0 && iParam6 == 0)
				{
					uParam0->f_4 = cam::create_camera(26379945, 1);
					if (iParam1 && !iParam4)
					{
						cam::attach_cam_to_entity(uParam0->f_4, uParam0->f_5, vVar3 + vVar18 * Vector(uParam0->f_12, uParam0->f_12, uParam0->f_12) * Vector(uParam0->f_13, uParam0->f_13, uParam0->f_13), 1);
					}
					else
					{
						cam::set_cam_coord(uParam0->f_4, vVar0 + vVar15 * Vector(uParam0->f_12, uParam0->f_12, uParam0->f_12) * Vector(uParam0->f_13, uParam0->f_13, uParam0->f_13));
					}
					cam::set_cam_rot(uParam0->f_4, vVar6, 2);
					cam::set_cam_fov(uParam0->f_4, fVar21);
				}
				if (uParam0->f_17 > 0 || iParam6 != 0)
				{
					cam::_0x0FB82563989CF4FB(uParam0->f_3, uParam0->f_1, 0, 2);
					if (iParam6 == 0)
					{
						cam::_0x0FB82563989CF4FB(uParam0->f_3, uParam0->f_4, uParam0->f_17, 2);
					}
					cam::_0x0FB82563989CF4FB(uParam0->f_3, uParam0->f_2, (uParam0->f_14 - uParam0->f_17), 2);
					cam::_0xD1B0F412F109EA5D(uParam0->f_3, iParam6);
					cam::set_cam_active(uParam0->f_3, true);
				}
				else
				{
					cam::set_cam_active_with_interp(uParam0->f_2, uParam0->f_1, uParam0->f_14, 2, 2);
				}
				cam::render_script_cams(true, false, 3000, 1, 0, 0);
				uParam0->f_7 = gameplay::get_game_timer();
				uParam0->f_8 = 0;
				*uParam0 = 1;
			}
			else
			{
				return true;
			}
			break;
		
		case 1:
			func_176();
			if (iParam3)
			{
				if (!uParam0->f_8)
				{
					if (gameplay::get_game_timer() >= (uParam0->f_7 + uParam0->f_16))
					{
						if (iParam5)
						{
							switch (uParam0->f_6)
							{
								case 1:
									graphics::_start_screen_effect("CamPushInFranklin", 0, 0);
									break;
								
								case 0:
									graphics::_start_screen_effect("CamPushInMichael", 0, 0);
									break;
								
								case 2:
									graphics::_start_screen_effect("CamPushInTrevor", 0, 0);
									break;
							}
						}
						else
						{
							graphics::_start_screen_effect("CamPushInNeutral", 0, 0);
						}
						audio::play_sound_frontend(-1, "1st_Person_Transition", "PLAYER_SWITCH_CUSTOM_SOUNDSET", 1);
						uParam0->f_8 = 1;
					}
				}
			}
			if (gameplay::get_game_timer() >= (uParam0->f_7 + uParam0->f_15))
			{
				if (iParam2)
				{
					func_175(uParam0);
					cam::render_script_cams(false, false, 3000, 1, 0, 0);
				}
				return true;
			}
			break;
		
		case 2:
			return true;
			break;
	}
	return false;
}

void func_175(var uParam0)//Position - 0x1E304
{
	if (cam::does_cam_exist(uParam0->f_1))
	{
		cam::destroy_cam(uParam0->f_1, 0);
	}
	if (cam::does_cam_exist(uParam0->f_2))
	{
		cam::destroy_cam(uParam0->f_2, 0);
	}
	if (cam::does_cam_exist(uParam0->f_3))
	{
		cam::destroy_cam(uParam0->f_3, 0);
	}
	if (cam::does_cam_exist(uParam0->f_4))
	{
		cam::destroy_cam(uParam0->f_4, 0);
	}
}

void func_176()//Position - 0x1E35C
{
	unk1::_0xEB2D525B57F42B40();
	func_177();
}

void func_177()//Position - 0x1E36C
{
	Global_17151.f_134 = 1;
}

void func_178(var uParam0, int iParam1, int iParam2, float fParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8)//Position - 0x1E37A
{
	uParam0->f_5 = iParam1;
	uParam0->f_6 = iParam2;
	uParam0->f_12 = fParam3;
	uParam0->f_14 = iParam4;
	uParam0->f_15 = iParam5;
	uParam0->f_16 = iParam6;
	uParam0->f_17 = iParam7;
	uParam0->f_13 = iParam8;
}

void func_179(vector3 vParam0, float fParam3, int iParam4)//Position - 0x1E3B2
{
	int iVar0;
	
	if (!func_180())
	{
		streaming::_set_focus_area(vParam0, 0f, 0f, 0f);
		streaming::new_load_scene_start(vParam0, system::cos((fParam3 + 90f)), system::sin((fParam3 + 90f)), 0f, 25f, 0);
		system::settimera(0);
		iVar0 = gameplay::get_game_timer();
		while (!streaming::is_new_load_scene_loaded() && (gameplay::get_game_timer() - iVar0) < 12000)
		{
			system::wait(0);
		}
		if (iParam4)
		{
			entity::set_entity_coords(player::player_ped_id(), vParam0, 1, false, 0, 1);
			entity::set_entity_heading(player::player_ped_id(), fParam3);
		}
		streaming::clear_focus();
		streaming::new_load_scene_stop();
	}
}

int func_180()//Position - 0x1E447
{
	return gameplay::is_bit_set(Global_91486.f_20, 13);
}

void func_181()//Position - 0x1E45B
{
	Global_55824 = 0;
}

void func_182(int iParam0, int iParam1)//Position - 0x1E467
{
	Global_69965 = iParam1;
	if (Global_55812)
	{
		return;
	}
	if (Global_55839)
	{
		Global_55839 = 0;
		return;
	}
	if (script::_get_number_of_instances_of_streamed_script(joaat("mission_stat_watcher")) > 0)
	{
		if (Global_55812)
		{
		}
		Global_55838 = iParam0;
		Global_55812 = 1;
		Global_55823 = 1;
	}
}

void func_183()//Position - 0x1E4B1
{
	Global_55824 = 1;
}

void func_184(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x1E4BD
{
	if (iParam0)
	{
		player::special_ability_deactivate_fast(player::player_id());
		player::set_all_random_peds_flee(player::player_id(), 1);
		player::set_police_ignore_player(player::player_id(), 1);
		func_191(1);
		ui::_0xA8FDB297A8D25FBA();
		ui::_0xFDB423997FA30340();
		if (Global_14443.f_1 > 3)
		{
			if (audio::is_mobile_phone_call_ongoing())
			{
				audio::stop_scripted_conversation(false);
			}
			if (!func_160())
			{
				Global_14443.f_1 = 3;
			}
			Global_15745 = 5;
		}
		func_190(1, iParam3, iParam2, 0);
		Global_55824 = 1;
		Global_68130 = 1;
		Global_69695 = 1;
	}
	else
	{
		func_191(0);
		ui::_0xE1CD1E48E025E661();
		Global_55824 = 0;
		if (iParam1)
		{
			graphics::_0x03FC694AE06C5A20();
		}
		player::set_all_random_peds_flee(player::player_id(), 0);
		player::set_police_ignore_player(player::player_id(), 0);
		func_190(0, iParam3, iParam2, 0);
		if (network::network_is_game_in_progress())
		{
			if (((!ped::is_ped_injured(player::player_ped_id()) && !func_188(player::player_id())) && !func_186(player::player_id(), 0)) && !func_185())
			{
				entity::set_entity_invincible(player::player_ped_id(), false);
			}
		}
		else if (!ped::is_ped_injured(player::player_ped_id()) && !func_188(player::player_id()))
		{
			entity::set_entity_invincible(player::player_ped_id(), false);
		}
		Global_69695 = 0;
	}
}

int func_185()//Position - 0x1E5D6
{
	return gameplay::is_bit_set(Global_1589933[player::player_id() /*601*/].f_39.f_18, 14);
}

int func_186(int iParam0, int iParam1)//Position - 0x1E5F3
{
	int iVar0;
	
	if (iParam0 == player::player_id())
	{
		iVar0 = func_187(-1, 0) == 8;
	}
	else
	{
		iVar0 = Global_1589933[iParam0 /*601*/].f_202 == 8;
	}
	if (iParam1 == 1)
	{
		if (network::network_is_player_active(iParam0))
		{
			iVar0 = player::get_player_team(iParam0) == 8;
		}
	}
	return iVar0;
}

int func_187(int iParam0, int iParam1)//Position - 0x1E63E
{
	int iVar0;
	int iVar1;
	
	iVar1 = iParam0;
	if (iVar1 == -1)
	{
		iVar1 = func_22();
	}
	if (Global_1315209[iVar1] == 1)
	{
		if (iParam1)
		{
		}
		iVar0 = 8;
	}
	else
	{
		iVar0 = Global_1312725[iVar1];
		if (iParam1)
		{
		}
	}
	return iVar0;
}

bool func_188(int iParam0)//Position - 0x1E67F
{
	if (func_186(iParam0, 0))
	{
		return true;
	}
	if (func_189())
	{
		if (iParam0 == player::player_id())
		{
			return true;
		}
	}
	if (gameplay::is_bit_set(Global_2421621[iParam0 /*358*/].f_198, 2))
	{
		return true;
	}
	return false;
}

int func_189()//Position - 0x1E6C1
{
	return gameplay::is_bit_set(Global_2359301, 3);
}

int func_190(int iParam0, int iParam1, var uParam2, int iParam3)//Position - 0x1E6D2
{
	int iVar0;
	
	iVar0 = 0;
	if (gameplay::is_pc_version())
	{
		if (cutscene::_0xA0FE76168A189DDB() != iParam0 && uParam2)
		{
			cutscene::_0x20746F7B1032A3C7(iParam0, iParam1, 1, iParam3);
			iVar0 = 1;
		}
	}
	return iVar0;
}

void func_191(int iParam0)//Position - 0x1E705
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&Global_2313, 13);
	}
	else
	{
		gameplay::clear_bit(&Global_2313, 13);
	}
}

int func_192()//Position - 0x1E728
{
	int iVar0;
	
	iVar0 = cutscene::has_cutscene_loaded();
	if (!Global_69696)
	{
		if (!iVar0)
		{
			Global_69696 = 1;
		}
	}
	return iVar0;
}

void func_193()//Position - 0x1E74B
{
	int iVar0;
	int iVar1;
	
	player::set_all_random_peds_flee_this_frame(player::player_id());
	if (!ped::is_ped_injured(iLocal_103))
	{
		if (system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_320) < 10f)
		{
			controls::disable_control_action(0, 22, 1);
		}
		if (iLocal_270 < 100)
		{
			if (func_210(&iLocal_111, &uLocal_262, &iLocal_263) || !vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				iLocal_270 = 100;
			}
		}
		if (!audio::is_audio_scene_active("FAMILY_2_JETSKI_GO_TO_BEACH"))
		{
			audio::start_audio_scene("FAMILY_2_JETSKI_GO_TO_BEACH");
		}
		switch (iLocal_270)
		{
			case 0:
				if ((!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
				{
					if (!cam::is_screen_faded_in() && !cam::is_screen_fading_in())
					{
						cam::do_screen_fade_in(500);
					}
					if (!audio::is_audio_scene_active("FAMILY_2_JETSKI_GO_TO_BEACH"))
					{
						audio::start_audio_scene("FAMILY_2_JETSKI_GO_TO_BEACH");
					}
					Local_670.f_1 = 0;
					iLocal_979 = 0;
					fLocal_980 = 0f;
					iLocal_281 = 0;
					iLocal_289 = 0;
					iLocal_270++;
					if (iLocal_266)
					{
						iLocal_270 = -1;
					}
				}
				break;
			
			case -1:
				streaming::request_ipl("smboat");
				while (!streaming::is_ipl_active("smBoat"))
				{
					unk1::_0x208784099002BC30("M_DaddysLittleGirl", 0);
					system::wait(0);
				}
				iLocal_270 = 1;
				break;
			
			case 1:
				func_207(&iLocal_111, &iLocal_135, vLocal_196, &iLocal_132, &Local_670);
				if (!func_170() && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
				{
					unk1::_0x293220DA1B46CEBC(5f, 5f, 4);
					ai::task_clear_look_at(iLocal_103);
					entity::set_entity_proofs(iLocal_111, false, false, false, false, false, false, 0, false);
					player::set_wanted_level_multiplier(0.2f);
					if (!iLocal_266)
					{
						func_147("FM2_DRIVE", 5000, 1);
					}
					system::settimera(0);
					if (iLocal_266)
					{
						iLocal_270 = -2;
					}
					else
					{
						iLocal_270++;
					}
				}
				break;
			
			case -2:
				func_207(&iLocal_111, &iLocal_135, vLocal_196, &iLocal_132, &Local_670);
				if (func_156(&Local_676, cLocal_313, "FAM2_TALK1", 8, 0, 0, 0))
				{
					iLocal_266 = 0;
					iLocal_270 = -3;
				}
				break;
			
			case -3:
				func_207(&iLocal_111, &iLocal_135, vLocal_196, &iLocal_132, &Local_670);
				if (!func_170())
				{
					system::settimera(0);
					func_147("FM2_DRIVE", 5000, 1);
					iLocal_270 = 2;
				}
				break;
			
			case 2:
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					if (system::timera() > 5000 || (system::timera() > 2000 && gameplay::get_profile_setting(203) == 0))
					{
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0) && !func_170())
						{
							if (!ped::is_ped_headtracking_ped(iLocal_103, player::player_ped_id()))
							{
								ai::task_look_at_entity(iLocal_103, player::player_ped_id(), -1, 16, 2);
							}
							iLocal_297 = gameplay::get_game_timer();
							iLocal_641 = 0;
							iLocal_642 = 0;
							iLocal_841 = 0;
							iLocal_842 = 0;
							iLocal_270++;
						}
					}
					func_207(&iLocal_111, &iLocal_135, vLocal_196, &iLocal_132, &Local_670);
				}
				break;
			
			case 3:
				iVar0 = ((vehicle::is_vehicle_driveable(iLocal_111, 0) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0)) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0));
				switch (iLocal_979)
				{
					case 0:
						if (!iLocal_302 && !iLocal_304)
						{
							if (func_206())
							{
								func_204("FAM2_TALK2", iVar0);
							}
							else
							{
								func_204("FAM2_TALK2b", iVar0);
							}
						}
						else
						{
							func_204("FAM2_KILTALK", iVar0);
						}
						if ((!func_170() && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)) && !iLocal_842)
						{
							iLocal_841 = 0;
							iLocal_842 = 0;
							ai::task_clear_look_at(iLocal_103);
							iLocal_979++;
						}
						break;
					
					case 1:
						if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_193) > 10000f)
						{
							if (((vehicle::is_vehicle_driveable(iLocal_111, 0) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0)) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)) && entity::get_entity_speed(iLocal_111) < 5f)
							{
								fLocal_980 = (fLocal_980 + gameplay::get_frame_time());
							}
							else if (fLocal_980 > 0f)
							{
								fLocal_980 = (fLocal_980 - (gameplay::get_frame_time() * 5f));
							}
						}
						if (fLocal_980 > 10f)
						{
							if (func_156(&Local_676, cLocal_313, "FAM2_GOBACK", 8, 0, 0, 0))
							{
								fLocal_980 = 0f;
							}
						}
						if (!iLocal_302 && !iLocal_304)
						{
						}
						break;
				}
				func_203();
				if (!ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
				{
					if (ai::get_script_task_status(iLocal_103, -1794415470) != 1)
					{
						ai::task_enter_vehicle(iLocal_103, iLocal_111, 20000, 0, 2f, 1, 0);
					}
				}
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
				{
					if (!ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
					{
						if (!ui::does_blip_exist(iLocal_134))
						{
							ui::clear_prints();
							func_153();
							if (!iLocal_288)
							{
								func_149("FM2_WAIT2", 7500, 1);
								iLocal_288 = true;
							}
							iLocal_134 = func_150(iLocal_103, 0, 145);
						}
						if (ui::does_blip_exist(iLocal_132))
						{
							ui::remove_blip(&iLocal_132);
						}
					}
					else if (ui::does_blip_exist(iLocal_134))
					{
						ui::remove_blip(&iLocal_134);
					}
					if (func_210(&iLocal_111, &uLocal_262, &iLocal_263))
					{
						if (system::vdist(entity::get_entity_coords(iLocal_111, 1), vLocal_196) < 50f)
						{
							iVar1 = true;
						}
					}
					if ((entity::is_entity_in_angled_area(player::player_ped_id(), vLocal_241, vLocal_244, fLocal_247, 0, true, 0) || entity::is_entity_at_coord(player::player_ped_id(), vLocal_196 + Vector(0.3f, 0f, 0f), 1f, 1f, 2.5f, true, true, 0)) && ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_111))
					{
						iVar1 = true;
					}
					if (iVar1)
					{
						ui::remove_blip(&iLocal_132);
						iLocal_285 = true;
						iLocal_270++;
					}
				}
				if (!iVar1)
				{
					if (func_210(&iLocal_111, &uLocal_262, &iLocal_263) || !vehicle::is_vehicle_driveable(iLocal_111, 0))
					{
						iLocal_270 = 100;
					}
					else if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_193) < 10000f)
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
						{
							if (entity::get_entity_height_above_ground(iLocal_103) < 2f)
							{
								iLocal_270 = 100;
							}
						}
					}
				}
				if (iLocal_270 < 100)
				{
					func_207(&iLocal_111, &iLocal_135, vLocal_196, &iLocal_132, &Local_670);
				}
				break;
			
			case 4:
				func_167();
				if (func_201(iLocal_111, 5f, 1, 1056964608, 0, 1, 0) || !ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_111))
				{
					func_167();
					player::set_player_control(player::player_id(), false, 256);
					iLocal_270++;
				}
				break;
			
			case 5:
				if (!func_170())
				{
					unk1::_0x293220DA1B46CEBC(4f, 3f, 4);
					func_200(9);
				}
				break;
			
			case 100:
				if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_193) < system::pow(100f, 2f))
				{
					if (!ped::is_ped_injured(iLocal_104))
					{
						ui::clear_help(1);
						Local_843 = { func_169() };
						func_153();
						iLocal_842 = 1;
						ui::remove_blip(&iLocal_132);
						sLocal_312 = "family_2_mcs_4p2";
						iLocal_289 = 0;
						iLocal_642 = 0;
						cutscene::remove_cutscene();
						cutscene::_request_cutscene_2("family_2_mcs_4", 2, 8);
						system::settimera(0);
						if (ui::does_blip_exist(iLocal_135))
						{
							ui::remove_blip(&iLocal_135);
						}
						iLocal_132 = func_150(iLocal_104, 0, 145);
						func_147("FM2_ONFOOT", 7500, 1);
						if (!ped::is_ped_group_member(iLocal_103, player::get_player_group(player::player_id())))
						{
							ped::set_ped_as_group_member(iLocal_103, player::get_player_group(player::player_id()));
							ped::set_ped_group_member_passenger_index(iLocal_103, 0);
						}
						iLocal_288 = false;
						iLocal_270++;
					}
				}
				else if (entity::is_entity_dead(iLocal_111, 0))
				{
					func_103("FM2_SKIDED");
				}
				else
				{
					func_103("FM2_SKIGRN");
				}
				break;
			
			case 101:
				if (!ped::is_ped_injured(iLocal_104))
				{
					if (func_155(iLocal_103))
					{
						if (!ui::does_blip_exist(iLocal_132))
						{
							iLocal_132 = func_150(iLocal_104, 0, 145);
						}
						if (ui::does_blip_exist(iLocal_134))
						{
							ui::remove_blip(&iLocal_134);
						}
						if (system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_104, 1)) < 30f)
						{
							system::settimera(0);
							iLocal_270++;
						}
					}
					else
					{
						if (ui::does_blip_exist(iLocal_132))
						{
							ui::remove_blip(&iLocal_132);
						}
						if (!ui::does_blip_exist(iLocal_134))
						{
							if (!iLocal_288)
							{
								func_149("FM2_TRAGB", 7500, 1);
							}
							iLocal_134 = func_150(iLocal_103, 0, 145);
						}
					}
				}
				if (!iLocal_302 && !iLocal_304)
				{
					iVar0 = false;
					if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
					{
						if (!ped::is_ped_in_any_vehicle(iLocal_103, 0) && system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_103, 1)) < 400f)
						{
							iVar0 = true;
						}
					}
					else if (ped::is_ped_in_any_vehicle(iLocal_103, 0) && ped::get_vehicle_ped_is_in(iLocal_103, 0) == ped::get_vehicle_ped_is_in(player::player_ped_id(), 0))
					{
						iVar0 = true;
					}
				}
				break;
			
			case 102:
				if (system::timera() > 1000)
				{
					iLocal_285 = false;
					iLocal_270++;
				}
				break;
			
			case 103:
				func_167();
				if (!func_170())
				{
					func_200(9);
				}
				break;
		}
		if (iLocal_270 > 0)
		{
			func_197(9);
		}
		func_94(sLocal_312, vLocal_193, 100f, &iLocal_289);
		if (iLocal_289)
		{
			if (!iLocal_642)
			{
				if (cutscene::_0xB56BBBCC2955D9CB())
				{
					func_2("Michael", player::player_ped_id(), 0, 2);
					cutscene::_0x2A56C06EBEF2B0D9("Tracy", iLocal_103, 0);
					cutscene::set_cutscene_ped_prop_variation("Tracy", 1, 1, 0, 0);
					cutscene::set_cutscene_ped_prop_variation("Tracy", 0, 0, 0, 0);
					iLocal_642 = 1;
				}
			}
		}
		if (ped::is_ped_in_melee_combat(player::player_ped_id()))
		{
			if (!func_170() && (gameplay::get_game_timer() - iLocal_280) > 7500)
			{
				func_195(iLocal_103, "GENERIC_SHOCKED_MED", "Tracey", 3);
				iLocal_280 = gameplay::get_game_timer();
			}
		}
		if (!ped::is_ped_injured(iLocal_104))
		{
			if (!iLocal_641)
			{
				if (!ped::is_ped_injured(iLocal_103))
				{
					if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 5625f && system::vdist2(entity::get_entity_coords(iLocal_103, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 225f)
					{
						func_167();
						if (!func_170())
						{
							if (func_156(&Local_676, cLocal_313, "FAM2_SEES", 8, 0, 0, 0))
							{
								iLocal_641 = 1;
							}
						}
					}
				}
			}
		}
		switch (iLocal_281)
		{
			case 0:
				if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_193) < 90000f)
				{
					if (!cam::is_sphere_visible(vLocal_193, 5f))
					{
						gameplay::clear_area(vLocal_193, 4f, 1, 0, 0, false);
						if (!entity::does_entity_exist(iLocal_104))
						{
							func_194(&iLocal_104, 14, vLocal_193, fLocal_259);
						}
						iLocal_281 = 2;
					}
					else
					{
						if (!entity::does_entity_exist(iLocal_104))
						{
							func_194(&iLocal_104, 14, -1611.595f, -1121.009f, 1.544f, 42.8275f);
						}
						iLocal_281++;
					}
				}
				break;
			
			case 1:
				if (!ped::is_ped_injured(iLocal_104))
				{
					ped::set_blocking_of_non_temporary_events(iLocal_104, true);
					ai::task_follow_nav_mesh_to_coord(iLocal_104, vLocal_193, 1f, -1, 0.25f, 512, fLocal_259);
					iLocal_281++;
				}
				break;
			
			case 2:
				if (!ped::is_ped_injured(iLocal_104) && entity::is_entity_at_coord(iLocal_104, vLocal_193, Global_22, false, true, 0))
				{
					if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < system::pow(200f, 2f))
					{
						if (!ped::is_ped_facing_ped(iLocal_104, player::player_ped_id(), 60f))
						{
							if (ai::get_script_task_status(iLocal_104, 242628503) != 1)
							{
								ai::clear_ped_tasks(iLocal_104);
								ai::task_look_at_entity(iLocal_104, player::player_ped_id(), -1, 16, 2);
								ai::open_sequence_task(&iLocal_643);
								ai::task_turn_ped_to_face_entity(0, player::player_ped_id(), 0);
								ai::task_look_at_entity(0, player::player_ped_id(), -1, 16, 2);
								ai::close_sequence_task(iLocal_643);
								ai::task_perform_sequence(iLocal_104, iLocal_643);
								ai::clear_sequence_task(&iLocal_643);
							}
						}
						else if (ai::get_script_task_status(iLocal_104, 242628503) != 1)
						{
							if (!ped::is_ped_injured(iLocal_104))
							{
								ai::task_look_at_entity(iLocal_104, player::player_ped_id(), -1, 16, 2);
							}
						}
					}
				}
				break;
		}
		if (iLocal_70 != 8)
		{
			if (audio::is_audio_scene_active("FAMILY_2_JETSKI_GO_TO_BEACH"))
			{
				audio::stop_audio_scene("FAMILY_2_JETSKI_GO_TO_BEACH");
			}
		}
		if (player::get_player_wanted_level(player::player_id()) > 0)
		{
			func_145();
		}
	}
}

void func_194(int iParam0, int iParam1, vector3 vParam2, float fParam5)//Position - 0x1F2C4
{
	if (!entity::does_entity_exist(*iParam0))
	{
		if (iParam1 == 15)
		{
			while (!func_95(vParam2, fParam5))
			{
				system::wait(0);
			}
		}
		else
		{
			while (!func_432(vParam2, fParam5))
			{
				system::wait(0);
			}
		}
		if (!ped::is_ped_injured(*iParam0))
		{
			ai::clear_ped_tasks(*iParam0);
		}
	}
	else if (!ped::is_ped_injured(*iParam0))
	{
		entity::set_entity_coords(*iParam0, vParam2, 1, false, 0, 1);
		entity::set_entity_heading(*iParam0, fParam5);
	}
}

void func_195(int iParam0, char* sParam1, char* sParam2, int iParam3)//Position - 0x1F345
{
	audio::_play_ambient_speech_with_voice(iParam0, sParam1, sParam2, func_196(iParam3), 0);
}

int func_196(int iParam0)//Position - 0x1F35E
{
	int iVar0;
	
	switch (iParam0)
	{
		case 0:
			return "SPEECH_PARAMS_STANDARD";
		
		case 1:
			return "SPEECH_PARAMS_ALLOW_REPEAT";
		
		case 2:
			return "SPEECH_PARAMS_BEAT";
		
		case 3:
			return "SPEECH_PARAMS_FORCE";
		
		case 4:
			return "SPEECH_PARAMS_FORCE_FRONTEND";
		
		case 5:
			return "SPEECH_PARAMS_FORCE_NO_REPEAT_FRONTEND";
		
		case 6:
			return "SPEECH_PARAMS_FORCE_NORMAL";
		
		case 7:
			return "SPEECH_PARAMS_FORCE_NORMAL_CLEAR";
		
		case 8:
			return "SPEECH_PARAMS_FORCE_NORMAL_CRITICAL";
		
		case 9:
			return "SPEECH_PARAMS_FORCE_SHOUTED";
		
		case 10:
			return "SPEECH_PARAMS_FORCE_SHOUTED_CLEAR";
		
		case 11:
			return "SPEECH_PARAMS_FORCE_SHOUTED_CRITICAL";
		
		case 12:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY";
		
		case 13:
			return "SPEECH_PARAMS_MEGAPHONE";
		
		case 14:
			return "SPEECH_PARAMS_HELI";
		
		case 15:
			return "SPEECH_PARAMS_FORCE_MEGAPHONE";
		
		case 16:
			return "SPEECH_PARAMS_FORCE_HELI";
		
		case 17:
			return "SPEECH_PARAMS_INTERRUPT";
		
		case 18:
			return "SPEECH_PARAMS_INTERRUPT_SHOUTED";
		
		case 19:
			return "SPEECH_PARAMS_INTERRUPT_SHOUTED_CLEAR";
		
		case 20:
			return "SPEECH_PARAMS_INTERRUPT_SHOUTED_CRITICAL";
		
		case 21:
			return "SPEECH_PARAMS_INTERRUPT_NO_FORCE";
		
		case 22:
			return "SPEECH_PARAMS_INTERRUPT_FRONTEND";
		
		case 23:
			return "SPEECH_PARAMS_INTERRUPT_NO_FORCE_FRONTEND";
		
		case 24:
			return "SPEECH_PARAMS_ADD_BLIP";
		
		case 25:
			return "SPEECH_PARAMS_ADD_BLIP_ALLOW_REPEAT";
		
		case 26:
			return "SPEECH_PARAMS_ADD_BLIP_FORCE";
		
		case 27:
			return "SPEECH_PARAMS_ADD_BLIP_SHOUTED";
		
		case 28:
			return "SPEECH_PARAMS_ADD_BLIP_SHOUTED_FORCE";
		
		case 29:
			return "SPEECH_PARAMS_ADD_BLIP_INTERRUPT";
		
		case 30:
			return "SPEECH_PARAMS_ADD_BLIP_INTERRUPT_FORCE";
		
		case 31:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED";
		
		case 32:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CLEAR";
		
		case 33:
			return "SPEECH_PARAMS_FORCE_PRELOAD_ONLY_SHOUTED_CRITICAL";
		
		case 34:
			return "SPEECH_PARAMS_SHOUTED";
		
		case 35:
			return "SPEECH_PARAMS_SHOUTED_CLEAR";
		
		case 36:
			return "SPEECH_PARAMS_SHOUTED_CRITICAL";
		
		default:
	}
	iVar0 = 0;
	return iVar0;
}

int func_197(int iParam0)//Position - 0x1F553
{
	int iVar0;
	int iVar1[10];
	int iVar12[3];
	int iVar16;
	
	iVar0 = 0;
	while (iVar0 < iVar1)
	{
		iVar1[iVar0] = 0;
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < iVar12)
	{
		iVar12[iVar0] = 0;
		iVar0++;
	}
	switch (iParam0)
	{
		case 0:
			break;
		
		case 1:
			iVar1[0] = joaat("ig_jimmydisanto");
			iVar1[1] = joaat("tailgater");
			iVar1[2] = joaat("cruiser");
			iVar1[3] = func_198(15, 1);
			break;
		
		case 2:
			iVar1[0] = joaat("ig_jimmydisanto");
			iVar1[1] = joaat("tailgater");
			iVar1[2] = joaat("u_m_m_bikehire_01");
			iVar1[3] = joaat("cruiser");
			iVar12[0] = iLocal_269;
			iVar12[1] = 1;
			break;
		
		case 3:
			iVar1[0] = joaat("ig_jimmydisanto");
			iVar1[1] = joaat("tailgater");
			iVar1[2] = joaat("u_m_m_bikehire_01");
			iVar1[3] = joaat("cruiser");
			iVar12[0] = iLocal_269;
			iVar12[1] = 1;
			break;
		
		case 4:
			iVar1[0] = joaat("ig_jimmydisanto");
			iVar1[1] = joaat("cruiser");
			break;
		
		case 5:
			iVar1[0] = joaat("ig_jimmydisanto");
			iVar1[1] = joaat("cruiser");
			iVar1[2] = joaat("seashark");
			iVar1[3] = joaat("a_m_y_musclbeac_01");
			break;
		
		case 6:
			iVar1[0] = joaat("seashark");
			iVar1[1] = joaat("ig_tracydisanto");
			break;
		
		case 7:
			iVar1[0] = joaat("seashark");
			iVar1[1] = joaat("ig_tracydisanto");
			iVar1[2] = joaat("csb_porndudes");
			iVar1[3] = joaat("ig_jimmydisanto");
			break;
		
		case 8:
			iVar1[0] = joaat("seashark");
			iVar1[1] = joaat("ig_tracydisanto");
			iVar1[2] = joaat("ig_jimmydisanto");
			break;
		
		case 9:
			iVar1[0] = joaat("seashark");
			iVar1[1] = joaat("ig_tracydisanto");
			iVar1[2] = joaat("ig_jimmydisanto");
			break;
	}
	iVar16 = 1;
	iVar0 = 0;
	while (iVar0 < iVar1)
	{
		if (iVar1[iVar0] != 0)
		{
			streaming::request_model(iVar1[iVar0]);
			if (!streaming::has_model_loaded(iVar1[iVar0]))
			{
				iVar16 = 0;
			}
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < iVar12)
	{
		if (iVar12[iVar0] != 0)
		{
			vehicle::request_vehicle_recording(iVar12[iVar0], "fam2");
			if (!vehicle::has_vehicle_recording_been_loaded(iVar12[iVar0], "fam2"))
			{
				iVar16 = 0;
			}
		}
		iVar0++;
	}
	return iVar16;
}

int func_198(int iParam0, int iParam1)//Position - 0x1F7BE
{
	struct<82> Var0;
	
	if (!func_89(iParam0))
	{
		Var0.f_11 = 12;
		Var0.f_31 = 49;
		Var0.f_81 = 2;
		func_199(iParam0, &Var0, iParam1);
		return Var0;
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

void func_199(int iParam0, var uParam1, int iParam2)//Position - 0x1F801
{
	int iVar0;
	struct<98> Var1;
	
	Var1.f_11 = 12;
	Var1.f_31 = 49;
	Var1.f_81 = 2;
	Var1.f_88 = 1;
	Var1.f_84 = 255;
	Var1.f_85 = 255;
	Var1.f_86 = 255;
	Var1.f_3 = 1000;
	Var1.f_1 = 0;
	switch (iParam0)
	{
		case 14:
			if (iParam2 == 1)
			{
				iVar0 = joaat("issi2");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("tribike");
			}
			else
			{
				iVar0 = joaat("tribike");
			}
			switch (iVar0)
			{
				case joaat("issi2"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_5 = 88;
					Var1.f_6 = 7;
					Var1.f_9 = 0;
					StringCopy(&(Var1.f_27), "P3RSEUS", 16);
					break;
				
				case joaat("tribike"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_4 = 0;
					Var1.f_9 = 1;
					break;
			}
			break;
		
		case 15:
			if (iParam2 == 1)
			{
				iVar0 = joaat("issi2");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("sanchez");
			}
			else
			{
				iVar0 = joaat("issi2");
			}
			switch (iVar0)
			{
				case joaat("issi2"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_5 = 88;
					Var1.f_6 = 7;
					Var1.f_9 = 0;
					StringCopy(&(Var1.f_27), "P3RSEUS", 16);
					break;
				
				case joaat("sanchez"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_4 = 0;
					Var1.f_9 = 1;
					break;
			}
			break;
		
		case 17:
			if (iParam2 == 1)
			{
				iVar0 = joaat("sentinel2");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("faggio2");
			}
			else
			{
				iVar0 = joaat("sentinel2");
			}
			switch (iVar0)
			{
				case joaat("sentinel2"):
					Var1 = iVar0;
					Var1.f_5 = 28;
					Var1.f_6 = 28;
					Var1.f_9 = 0;
					StringCopy(&(Var1.f_27), "KRYST4L", 16);
					break;
				
				case joaat("faggio2"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_4 = 0;
					Var1.f_9 = 1;
					break;
			}
			break;
		
		case 19:
			if (iParam2 == 1)
			{
				iVar0 = joaat("speedo");
			}
			else if (iParam2 == 3)
			{
				iVar0 = joaat("emperor");
			}
			else
			{
				iVar0 = joaat("speedo");
			}
			switch (iVar0)
			{
				case joaat("speedo"):
					Var1 = iVar0;
					Var1.f_4 = 5;
					Var1.f_2 = 10f;
					Var1.f_9 = 1;
					StringCopy(&(Var1.f_27), "LAMAR G", 16);
					break;
				
				case joaat("emperor"):
					Var1 = iVar0;
					Var1.f_2 = 8f;
					Var1.f_5 = 62;
					Var1.f_6 = 21;
					Var1.f_7 = 0;
					Var1.f_8 = 156;
					Var1.f_10 = 1;
					StringCopy(&(Var1.f_27), "07KZF345", 16);
					break;
			}
			break;
		
		case 29:
			Var1 = joaat("adder");
			Var1.f_5 = 62;
			Var1.f_6 = 4;
			Var1.f_7 = 68;
			Var1.f_8 = 156;
			Var1.f_10 = 1;
			Var1.f_9 = 0;
			StringCopy(&(Var1.f_27), "N4M4ST3", 16);
			break;
		
		case 30:
			Var1 = joaat("oracle2");
			Var1.f_9 = 1;
			Var1.f_4 = 7;
			StringCopy(&(Var1.f_27), "81TDS937", 16);
			break;
		
		case 18:
		case 20:
		case 21:
		case 23:
		case 24:
		case 25:
		case 26:
		case 27:
		case 28:
		case 31:
		case 32:
		case 49:
		case 50:
		case 51:
		case 52:
		case 53:
		case 54:
		case 55:
		case 56:
		case 57:
		case 58:
		case 59:
		case 60:
		case 61:
		case 62:
		case 63:
		case 64:
		case 39:
		case 40:
		case 46:
		case 47:
		case 65:
			if (iParam2 == 1)
			{
				iVar0 = joaat("asterope");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("sanchez");
			}
			else
			{
				iVar0 = joaat("asterope");
			}
			switch (iVar0)
			{
				case joaat("asterope"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_4 = 0;
					Var1.f_9 = 1;
					break;
				
				case joaat("sanchez"):
					Var1 = iVar0;
					Var1.f_2 = 0f;
					Var1.f_4 = 0;
					Var1.f_9 = 1;
					break;
			}
			break;
		
		default:
			break;
	}
	*uParam1 = { Var1 };
}

void func_200(int iParam0)//Position - 0x1FBF5
{
	iLocal_283 = 0;
	iLocal_70 = iParam0;
}

bool func_201(int iParam0, float fParam1, int iParam2, float fParam3, int iParam4, int iParam5, int iParam6)//Position - 0x1FC05
{
	controls::disable_control_action(0, 71, 1);
	controls::disable_control_action(0, 72, 1);
	controls::disable_control_action(0, 76, 1);
	controls::disable_control_action(0, 73, 1);
	controls::disable_control_action(0, 59, 1);
	controls::disable_control_action(0, 60, 1);
	if (iParam5)
	{
		controls::disable_control_action(0, 75, 1);
	}
	controls::disable_control_action(0, 80, 1);
	if (!iParam6)
	{
		controls::disable_control_action(0, 69, 1);
		controls::disable_control_action(0, 70, 1);
		controls::disable_control_action(0, 68, 1);
	}
	controls::disable_control_action(0, 74, 1);
	controls::disable_control_action(0, 86, 1);
	controls::disable_control_action(0, 81, 1);
	controls::disable_control_action(0, 82, 1);
	controls::disable_control_action(0, 138, 1);
	controls::disable_control_action(0, 136, 1);
	controls::disable_control_action(0, 114, 1);
	controls::disable_control_action(0, 107, 1);
	controls::disable_control_action(0, 110, 1);
	controls::disable_control_action(0, 89, 1);
	controls::disable_control_action(0, 89, 1);
	controls::disable_control_action(0, 87, 1);
	controls::disable_control_action(0, 88, 1);
	controls::disable_control_action(0, 113, 1);
	controls::disable_control_action(0, 115, 1);
	controls::disable_control_action(0, 116, 1);
	controls::disable_control_action(0, 117, 1);
	controls::disable_control_action(0, 118, 1);
	controls::disable_control_action(0, 119, 1);
	controls::disable_control_action(0, 131, 1);
	controls::disable_control_action(0, 132, 1);
	controls::disable_control_action(0, 123, 1);
	controls::disable_control_action(0, 126, 1);
	controls::disable_control_action(0, 129, 1);
	controls::disable_control_action(0, 130, 1);
	controls::disable_control_action(0, 133, 1);
	controls::disable_control_action(0, 134, 1);
	cam::_0x17FCA7199A530203();
	func_202(iParam0);
	if ((gameplay::get_game_timer() - Global_29) > 500)
	{
		vehicle::_set_vehicle_halt(iParam0, fParam1, iParam2, iParam4);
	}
	Global_29 = gameplay::get_game_timer();
	if (!entity::is_entity_dead(iParam0, 0))
	{
		if (gameplay::absf(entity::get_entity_speed(iParam0)) <= fParam3)
		{
			return true;
		}
	}
	return false;
}

void func_202(int iParam0)//Position - 0x1FD94
{
	if (unk_0x36D782F68B309BDA(iParam0))
	{
		if (unk_0x3D34E80EED4AE3BE(iParam0))
		{
			unk_0x81E1552E35DC3839(iParam0, 0);
		}
	}
}

void func_203()//Position - 0x1FDB5
{
	if ((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && (gameplay::get_game_timer() - iLocal_278) > 5000)
	{
		if ((((((((vehicle::is_vehicle_driveable(iLocal_111, 0) && !ped::is_ped_injured(iLocal_103)) && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0)) && entity::is_entity_in_water(iLocal_111)) && ped::set_exclusive_phone_relationships(player::player_ped_id()) != iLocal_111) && system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_103, 1)) < 35f) && !ped::is_ped_swimming_under_water(player::player_ped_id())) && Local_670.f_1)
		{
			if ((gameplay::get_game_timer() - iLocal_297) > 6000)
			{
				if (func_156(&Local_676, cLocal_313, "FAM2_GETOFF", 8, 0, 0, 0))
				{
					iLocal_297 = gameplay::get_game_timer();
				}
			}
		}
	}
}

void func_204(char* sParam0, int iParam1)//Position - 0x1FEA0
{
	if (iParam1)
	{
		if (!iLocal_841)
		{
			if (func_156(&Local_676, cLocal_675, sParam0, 8, 0, 0, 0))
			{
				iLocal_842 = 0;
				iLocal_841 = 1;
			}
		}
		if (iLocal_842)
		{
			if (func_205(&Local_676, cLocal_675, sParam0, &Local_843, 8, 0, 0))
			{
				iLocal_842 = 0;
			}
		}
	}
	if (!iParam1)
	{
		if (!iLocal_842)
		{
			Local_843 = { func_169() };
			func_167();
			iLocal_842 = 1;
		}
	}
}

int func_205(var uParam0, char* sParam1, char* sParam2, char* sParam3, int iParam4, int iParam5, int iParam6)//Position - 0x1FF0E
{
	func_166(uParam0, 145, sParam1, iParam5, iParam6, 0);
	if (iParam4 > 7)
	{
		if (iParam4 < 12)
		{
			iParam4 = 7;
		}
	}
	Global_15752 = 0;
	Global_15759 = 0;
	Global_15754 = 0;
	Global_16736 = 0;
	Global_16738 = 0;
	Global_16742 = 1;
	StringCopy(&Global_16749, sParam3, 24);
	Global_2621441 = 0;
	return func_157(sParam2, iParam4, 0);
}

bool func_206()//Position - 0x1FF62
{
	if (Global_91486 == 10 || Global_91486 == 9)
	{
		return true;
	}
	return false;
}

void func_207(int iParam0, int iParam1, vector3 vParam2, int iParam5, var uParam6)//Position - 0x1FF86
{
	if (vehicle::is_vehicle_driveable(*iParam0, 0) && entity::does_entity_exist(*iParam0))
	{
		if (!ped::is_ped_in_vehicle(player::player_ped_id(), *iParam0, 0))
		{
			if (!ui::does_blip_exist(*iParam1))
			{
				ui::clear_prints();
				if (!uParam6->f_1)
				{
					iLocal_278 = gameplay::get_game_timer();
					func_146(uParam6);
				}
				*iParam1 = func_209(*iParam0, 0, 0);
			}
			if (ui::does_blip_exist(*iParam5))
			{
				ui::remove_blip(iParam5);
			}
		}
		else
		{
			if (!ui::does_blip_exist(*iParam5))
			{
				*iParam5 = func_208(vParam2, 1);
			}
			if (ui::does_blip_exist(*iParam1))
			{
				ui::clear_prints();
				ui::remove_blip(iParam1);
			}
		}
	}
}

int func_208(vector3 vParam0, int iParam3)//Position - 0x20023
{
	int iVar0;
	
	iVar0 = ui::add_blip_for_coord(vParam0);
	ui::set_blip_scale(iVar0, func_152(network::network_is_game_in_progress(), 1f, 1f));
	ui::set_blip_route(iVar0, iParam3);
	return iVar0;
}

int func_209(int iParam0, int iParam1, int iParam2)//Position - 0x2004F
{
	return func_151(iParam0, !iParam1, iParam2);
}

int func_210(int iParam0, var uParam1, var uParam2)//Position - 0x20062
{
	*uParam2 = 1;
	if (!entity::is_entity_dead(*iParam0, 0))
	{
		if (!entity::is_entity_in_water(*iParam0) && entity::get_entity_speed(*iParam0) < 2f)
		{
			*uParam1 = (*uParam1 + gameplay::get_frame_time());
			return *uParam1 > 3f;
		}
		else
		{
			*uParam1 = 0f;
		}
	}
	return false;
}

void func_211()//Position - 0x200AE
{
	int iVar0;
	vector3 vVar1;
	
	iVar0 = 0;
	while (iVar0 < Local_882)
	{
		switch (Local_882[iVar0 /*8*/].f_2)
		{
			case 0:
				if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), Local_882[iVar0 /*8*/].f_4) < 2500f)
				{
					vVar1 = { func_213(iVar0) };
					if (entity::is_entity_at_coord(player::player_ped_id(), Local_882[iVar0 /*8*/].f_4, vVar1.f_3, false, true, 0))
					{
						if (func_212(iVar0, joaat("squalo"), vVar1))
						{
							unk1::_0x293220DA1B46CEBC(2f, 8f, 3);
							Local_882[iVar0 /*8*/].f_2++;
						}
					}
				}
				break;
			
			case 1:
				if (!ped::is_ped_injured(Local_882[iVar0 /*8*/].f_1) && vehicle::is_vehicle_driveable(Local_882[iVar0 /*8*/], 0))
				{
					if (vehicle::is_playback_going_on_for_vehicle(Local_882[iVar0 /*8*/]) && !vehicle::is_playback_using_ai_going_on_for_vehicle(Local_882[iVar0 /*8*/]))
					{
						if ((entity::is_entity_at_entity(player::player_ped_id(), Local_882[iVar0 /*8*/], 5f, 5f, 5f, 0, 1, 0) || (vehicle::is_vehicle_driveable(iLocal_123[0], 0) && entity::is_entity_at_entity(iLocal_123[0], Local_882[iVar0 /*8*/], 5f, 5f, 5f, 0, 1, 0))) || (vehicle::is_vehicle_driveable(iLocal_123[1], 0) && entity::is_entity_at_entity(iLocal_123[1], Local_882[iVar0 /*8*/], 5f, 5f, 5f, 0, 1, 0)))
						{
							vehicle::set_playback_to_use_ai_try_to_revert_back_later(Local_882[iVar0 /*8*/], 5000, 786469, 1);
						}
					}
				}
				if ((entity::does_entity_exist(Local_882[iVar0 /*8*/]) && entity::does_entity_exist(Local_882[iVar0 /*8*/].f_1)) && (((!ped::is_ped_injured(Local_882[iVar0 /*8*/].f_1) && !vehicle::is_playback_going_on_for_vehicle(Local_882[iVar0 /*8*/])) || ped::is_ped_injured(Local_882[iVar0 /*8*/].f_1)) || !vehicle::is_vehicle_driveable(Local_882[iVar0 /*8*/], 0)))
				{
					if (system::vdist2(entity::get_entity_coords(Local_882[iVar0 /*8*/].f_1, 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 10000f && system::vdist2(entity::get_entity_coords(Local_882[iVar0 /*8*/], 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 10000f)
					{
						entity::set_ped_as_no_longer_needed(&(Local_882[iVar0 /*8*/].f_1));
						entity::set_vehicle_as_no_longer_needed(&(Local_882[iVar0 /*8*/]));
					}
				}
				break;
		}
		iVar0++;
	}
}

bool func_212(int iParam0, int iParam1, vector3 vParam2)//Position - 0x202F2
{
	streaming::request_model(iParam1);
	streaming::request_model(joaat("a_m_y_genstreet_01"));
	vehicle::request_vehicle_recording(iParam0 + 1, "fam2amb");
	if ((streaming::has_model_loaded(iParam1) && streaming::has_model_loaded(joaat("a_m_y_genstreet_01"))) && vehicle::has_vehicle_recording_been_loaded(iParam0 + 1, "fam2amb"))
	{
		Local_882[iParam0 /*8*/] = vehicle::create_vehicle(iParam1, vParam2, 0f, 1, true);
		Local_882[iParam0 /*8*/].f_1 = ped::create_ped_inside_vehicle(Local_882[iParam0 /*8*/], 26, joaat("a_m_y_genstreet_01"), -1, 1, true);
		ped::set_blocking_of_non_temporary_events(Local_882[iParam0 /*8*/].f_1, true);
		vehicle::start_playback_recorded_vehicle(Local_882[iParam0 /*8*/], iParam0 + 1, "fam2amb", 1);
		vehicle::set_vehicle_doors_locked(Local_882[iParam0 /*8*/], 2);
		streaming::set_model_as_no_longer_needed(iParam1);
		streaming::set_model_as_no_longer_needed(joaat("a_m_y_genstreet_01"));
		return true;
	}
	return false;
}

struct<10> func_213(int iParam0)//Position - 0x203B1
{
	struct<10> Var0;
	
	switch (iParam0)
	{
		case 0:
			Var0 = { -935.5378f, -1633.737f, 0.3306f };
			Var0.f_3 = { 62.75f, 48.75f, 11f };
			Var0.f_6 = { -997.8688f, -1383.004f, 0.406f };
			Var0.f_9 = 314.1291f;
			break;
		
		case 1:
			Var0 = { -928.3334f, -1359.194f, 0.3531f };
			Var0.f_3 = { 28.25f, 34.75f, 11f };
			Var0.f_6 = { -723.3589f, -1350.093f, 0.3208f };
			Var0.f_9 = 294.1011f;
			break;
	}
	return Var0;
}

void func_214()//Position - 0x20463
{
	int iVar0;
	int iVar1;
	int iVar2;
	vector3 vVar3;
	vector3 vVar6;
	float fVar9;
	char* sVar10;
	char* sVar11;
	int iVar12;
	
	if (vehicle::is_vehicle_driveable(iLocal_111, 0))
	{
		if ((!iLocal_1414 && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)) && system::vmag2(entity::get_entity_velocity(iLocal_111)) > 324f)
		{
			iLocal_1414 = 1;
		}
		if ((iLocal_1414 && ped::is_ped_in_any_vehicle(player::player_ped_id(), 0)) && system::vmag2(entity::get_entity_velocity(iLocal_111)) < 225f)
		{
			iLocal_1414 = 0;
		}
		if (!iLocal_1415)
		{
			if (!ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_111))
			{
				iLocal_1415 = 1;
			}
		}
		else
		{
			iLocal_1415 = 0;
		}
		if ((iLocal_1415 && iLocal_1414) && ped::is_ped_ragdoll(player::player_ped_id()))
		{
			entity::set_entity_health(player::player_ped_id(), 0);
		}
	}
	iLocal_84 = func_249();
	if (iLocal_84 < 7 && iLocal_84 > iLocal_86)
	{
		iLocal_86 = iLocal_84;
	}
	if (iLocal_84 != iLocal_85)
	{
		if (!gameplay::is_bit_set(iLocal_87, iLocal_84))
		{
			gameplay::set_bit(&iLocal_87, iLocal_84);
		}
		if (entity::does_entity_exist(iLocal_123[0]))
		{
			if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[0]))
			{
				vehicle::stop_playback_recorded_vehicle(iLocal_123[0]);
			}
		}
		if (entity::does_entity_exist(iLocal_123[1]))
		{
			if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[1]))
			{
				vehicle::stop_playback_recorded_vehicle(iLocal_123[1]);
			}
		}
	}
	if (vehicle::is_playback_using_ai_going_on_for_vehicle(iLocal_111) && system::timera() > 500)
	{
		vehicle::stop_playback_recorded_vehicle(iLocal_111);
	}
	iLocal_85 = iLocal_84;
	if (!entity::does_entity_exist(iLocal_137))
	{
		streaming::request_model(joaat("prop_ld_test_01"));
		if (streaming::has_model_loaded(joaat("prop_ld_test_01")))
		{
			iLocal_137 = object::create_object(joaat("prop_ld_test_01"), vLocal_193, 1, true, false);
			entity::set_entity_collision(iLocal_137, false, 0);
			entity::set_entity_visible(iLocal_137, false, 0);
			entity::freeze_entity_position(iLocal_137, true);
		}
	}
	switch (iLocal_270)
	{
		case 0:
			player::set_max_wanted_level(0);
			if ((((func_248() && func_247(0, 0)) && func_247(1, 0)) && func_246()) && func_245())
			{
				if (!ped::is_ped_injured(iLocal_106[0]))
				{
					ai::task_smart_flee_ped(iLocal_106[0], player::player_ped_id(), 300f, -1, 0, 0);
					ped::set_ped_relationship_group_hash(iLocal_106[0], iLocal_90);
				}
				if (!ped::is_ped_injured(iLocal_103))
				{
					streaming::request_anim_dict("missfam2_tracy_jetski");
					vehicle::set_vehicle_engine_health(iLocal_111, 1000f);
					entity::set_entity_proofs(iLocal_111, true, false, false, true, false, false, 0, false);
					ped::set_ped_suffers_critical_hits(iLocal_103, 0);
					entity::set_entity_health(iLocal_103, 5000);
					ped::set_ped_combat_attributes(iLocal_103, 20, false);
					ped::set_ped_combat_attributes(iLocal_103, 2, false);
					ped::set_blocking_of_non_temporary_events(iLocal_103, true);
					player::set_all_random_peds_flee(player::player_id(), 1);
					entity::set_entity_invincible(iLocal_103, true);
				}
				ped::set_relationship_between_groups(5, iLocal_90, 1862763509);
				func_244(&Local_676, 2);
				func_141(&Local_676, 2, iLocal_103, "TRACEY", 0, 1);
				func_243(1);
				func_242();
				func_241();
				iLocal_301 = 0;
				fLocal_1404 = 0f;
				fLocal_1408 = 0f;
				iLocal_1391 = 0;
				iLocal_1392 = false;
				iLocal_1388[0] = 0;
				iLocal_1388[1] = 0;
				iLocal_302 = false;
				iLocal_303 = 0;
				iLocal_305 = 0;
				iLocal_306 = 0;
				iLocal_304 = false;
				iLocal_1393 = 0;
				iLocal_1413 = false;
				iLocal_88 = 0;
				iLocal_89 = 6;
				iLocal_86 = 0;
				audio::trigger_music_event("FAM2_ON_JETSKI");
				entity::_0x694E00132F2823ED(iLocal_123[0], 1);
				entity::_0x694E00132F2823ED(iLocal_123[1], 1);
				vehicle::start_playback_recorded_vehicle_using_ai(iLocal_123[0], 101, "famtwo", 15f, 262144);
				vehicle::start_playback_recorded_vehicle_using_ai(iLocal_123[1], 102, "famtwo", 15f, 262144);
				vehicle::start_playback_recorded_vehicle_using_ai(iLocal_111, 1, "famtwoplayer", 24f, 262144);
				audio::_0x153973AB99FE8980(iLocal_123[0], "FAMILY_2_ENEMY_JETSKI_Group", 0f);
				audio::_0x153973AB99FE8980(iLocal_123[1], "FAMILY_2_ENEMY_JETSKI_Group", 0f);
				ped::set_ped_can_be_knocked_off_vehicle(player::player_ped_id(), 3);
				if (entity::does_entity_exist(iLocal_111) && vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					audio::set_initial_player_station("OFF");
					audio::set_veh_radio_station(iLocal_111, "OFF");
					entity::_0x694E00132F2823ED(iLocal_111, 1);
				}
				if (!audio::is_audio_scene_active("FAMILY_2_JETSKI_CHASE"))
				{
					audio::start_audio_scene("FAMILY_2_JETSKI_CHASE");
				}
				vehicle::set_vehicle_engine_on(iLocal_111, true, 1, 0);
				gameplay::_set_unk_map_flag(2);
				system::settimerb(0);
				unk1::_0x293220DA1B46CEBC(0f, 8f, 4);
				func_240(0, 4f);
				iLocal_87 = 0;
				iLocal_270++;
				if (iLocal_266)
				{
					iLocal_270 = -1;
				}
			}
			break;
		
		case -1:
			streaming::request_ipl("smboat");
			while (!streaming::is_ipl_active("smBoat"))
			{
				system::wait(0);
			}
			iLocal_270 = 1;
			iLocal_266 = 0;
			break;
		
		case 1:
			if (!cam::is_screen_faded_in() && !cam::is_screen_fading_in())
			{
				cam::do_screen_fade_in(500);
			}
			if (cam::does_cam_exist(iLocal_142))
			{
				if (system::timerb() > 1000)
				{
					cam::destroy_cam(iLocal_142, 0);
				}
			}
			if (!entity::does_entity_exist(Local_676[7 /*10*/]) || ped::is_ped_injured(Local_676[7 /*10*/]))
			{
				if (!ped::is_ped_injured(iLocal_126[0]))
				{
					func_141(&Local_676, 7, iLocal_126[0], "FAM2MAN2", 0, 1);
				}
				else if (!ped::is_ped_injured(iLocal_126[1]))
				{
					func_141(&Local_676, 7, iLocal_126[1], "FAM2MAN2", 0, 1);
				}
			}
			if (!iLocal_1405)
			{
				if (iLocal_1407)
				{
					iVar0 = 0;
					while (iVar0 <= 1)
					{
						if (!ped::is_ped_injured(iLocal_126[iVar0]))
						{
							ped::set_ped_combat_ability(iLocal_126[iVar0], 0);
							ped::set_ped_combat_range(iLocal_126[iVar0], 2);
							ped::set_ped_accuracy(iLocal_126[iVar0], 0);
							ped::set_ped_firing_pattern(iLocal_126[iVar0], 2055493265);
							ped::set_ped_shoot_rate(iLocal_126[iVar0], 50);
						}
						iVar0++;
					}
					iLocal_1407 = false;
				}
				if ((((((iLocal_84 == 7 && iLocal_301 < 100) || iLocal_1385[0]) || iLocal_1385[1]) || iLocal_84 < iLocal_86) || iLocal_1406) || (vehicle::is_vehicle_driveable(iLocal_111, 0) && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)))
				{
					if (!ped::is_ped_swimming_under_water(player::player_ped_id()))
					{
						iLocal_868[0] = gameplay::get_game_timer();
						iLocal_868[1] = (gameplay::get_game_timer() - 1500);
						iLocal_1405 = 1;
					}
				}
			}
			else
			{
				if (fLocal_1408 > 10f && fLocal_1408 < 12f)
				{
				}
				else if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					if ((!ped::is_ped_injured(iLocal_126[0]) && system::vdist2(entity::get_entity_coords(iLocal_126[0], 1), entity::get_entity_coords(iLocal_111, 1)) < 225f) || (!ped::is_ped_injured(iLocal_126[1]) && system::vdist2(entity::get_entity_coords(iLocal_126[1], 1), entity::get_entity_coords(iLocal_111, 1)) < 225f))
					{
						fLocal_1408 = (fLocal_1408 + gameplay::get_frame_time());
					}
				}
				if (!iLocal_1407)
				{
					iVar1 = 0;
					while (iVar1 <= 1)
					{
						if (entity::does_entity_exist(iLocal_126[iVar1]) && !ped::is_ped_injured(iLocal_126[iVar1]))
						{
							ped::set_ped_combat_ability(iLocal_126[iVar1], 1);
							ped::set_ped_combat_range(iLocal_126[iVar1], 2);
							ped::set_ped_accuracy(iLocal_126[iVar1], 20);
							ped::set_ped_firing_pattern(iLocal_126[iVar1], 1566631136);
							ped::set_ped_shoot_rate(iLocal_126[iVar1], 40);
							if (entity::does_entity_exist(iLocal_123[iVar1]))
							{
								if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[iVar1]))
								{
									vehicle::stop_playback_recorded_vehicle(iLocal_123[iVar1]);
								}
							}
						}
						iVar1++;
					}
					iLocal_1407 = true;
				}
				else if ((iLocal_84 != 2 || (iLocal_84 == 2 && iLocal_88 == 0)) && !iLocal_1391)
				{
					func_238();
				}
				if (((((!iLocal_1385[0] && !iLocal_1385[1]) && iLocal_84 != 7) && iLocal_84 >= iLocal_86) && !iLocal_1406) && (vehicle::is_vehicle_driveable(iLocal_111, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)))
				{
					iLocal_1405 = 0;
				}
				if (ped::is_ped_swimming_under_water(player::player_ped_id()))
				{
					iLocal_1405 = 0;
				}
			}
			if (!ped::is_ped_injured(iLocal_106[0]))
			{
				if (system::vdist2(entity::get_entity_coords(iLocal_106[0], 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 10000f)
				{
					entity::set_ped_as_no_longer_needed(&(iLocal_106[0]));
				}
			}
			func_235();
			func_222();
			if (iLocal_301 < 100)
			{
				if (!iLocal_305)
				{
					if (weapon::is_ped_armed(player::player_ped_id(), 4) && ped::is_ped_shooting(player::player_ped_id()))
					{
						iLocal_305 = 1;
					}
				}
				else if (!iLocal_306)
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_SHOOT", 8, 0, 0, 0))
					{
						iLocal_306 = 1;
					}
				}
				if (!iLocal_302 || !iLocal_304)
				{
					iLocal_304 = true;
					iVar2 = 0;
					while (iVar2 < iLocal_126)
					{
						if (entity::does_entity_exist(iLocal_126[iVar2]))
						{
							if (ped::is_ped_injured(iLocal_126[iVar2]) || entity::is_entity_dead(iLocal_126[iVar2], 0))
							{
								iLocal_302 = true;
							}
							else
							{
								iLocal_304 = false;
							}
						}
						iVar2++;
					}
				}
				if ((iLocal_302 && !iLocal_303) && !iLocal_304)
				{
					if (vehicle::is_vehicle_driveable(iLocal_111, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
					{
						func_153();
						if (iLocal_301 < 50 || iLocal_301 >= 100)
						{
							iLocal_274 = iLocal_301;
						}
						if (ui::does_blip_exist(iLocal_135))
						{
							ui::remove_blip(&iLocal_135);
						}
						iLocal_301 = 50;
						iLocal_303 = 1;
					}
				}
				if (iLocal_84 == 1)
				{
					if (ui::does_blip_exist(iLocal_132))
					{
						ui::remove_blip(&iLocal_132);
						if (ui::is_message_being_displayed() && !func_170())
						{
							ui::clear_prints();
						}
					}
				}
				if (iLocal_301 < 5)
				{
					if (iLocal_84 == 1)
					{
						iLocal_301 = 5;
					}
				}
				func_220();
			}
			if (iLocal_301 != 60 && iLocal_301 != 61)
			{
				if (vehicle::is_vehicle_driveable(iLocal_111, 0) && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
				{
					if (iLocal_301 < 50 || iLocal_301 >= 100)
					{
						iLocal_274 = iLocal_301;
					}
					iLocal_301 = 60;
				}
			}
			if (ui::does_blip_exist(iLocal_132) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
			{
				if (iLocal_84 == 1)
				{
					ui::remove_blip(&iLocal_132);
				}
			}
			switch (iLocal_301)
			{
				case 0:
					if (streaming::has_anim_dict_loaded("missfam2_tracy_jetski"))
					{
						if (!ped::is_ped_injured(iLocal_103))
						{
							if (!entity::is_entity_playing_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_a", 3))
							{
								if (func_219(0))
								{
									ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_a", 8f, -8f, -1, 0, 0f, 0, 0, 0);
								}
								else if (func_156(&Local_676, cLocal_313, "FAM2_COMING", 8, 0, 0, 0))
								{
									audio::trigger_music_event("FAM2_COMING");
									ai::task_look_at_entity(iLocal_103, iLocal_126[0], -1, 0, 2);
									iLocal_301++;
									system::settimera(0);
								}
							}
							else if (entity::get_entity_anim_current_time(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_a") > 0.12f)
							{
								if (func_156(&Local_676, cLocal_313, "FAM2_COMING", 8, 0, 0, 0))
								{
									audio::trigger_music_event("FAM2_COMING");
									iLocal_301++;
									system::settimera(0);
								}
							}
						}
					}
					break;
				
				case 1:
					if (system::timera() > 1000)
					{
						vVar3 = { vLocal_323 - entity::get_entity_coords(iLocal_111, 1) };
						vVar6 = { entity::get_entity_forward_vector(iLocal_111) };
						fVar9 = gameplay::get_angle_between_2d_vectors(vVar6.x, vVar6.y, vVar3.x, vVar3.y);
						if (fVar9 > 180f)
						{
							fVar9 = (fVar9 - 360f);
						}
						if (fVar9 < -180f)
						{
							fVar9 = (fVar9 + 360f);
						}
						if (fVar9 < 0f)
						{
							if (fVar9 > -90f)
							{
								if (!ped::is_ped_injured(iLocal_103))
								{
									ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_point_right", 4f, -8f, -1, 0, 0f, 0, 0, 0);
								}
							}
						}
						else if (fVar9 < 90f)
						{
							if (!ped::is_ped_injured(iLocal_103))
							{
								ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_point_left", 4f, -8f, -1, 0, 0f, 0, 0, 0);
							}
						}
					}
					if ((((!func_170() || system::timera() > 3000) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0)) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0)) && !ui::does_blip_exist(iLocal_132))
					{
						iLocal_132 = func_208(vLocal_323, 0);
						iLocal_301++;
					}
					break;
				
				case 2:
					if (func_156(&Local_676, cLocal_313, "FAM2_MRESP", 8, 0, 0, 0))
					{
						ai::task_look_at_coord(player::player_ped_id(), vLocal_323, 7500, 1, 2);
						system::settimera(0);
						iLocal_301++;
					}
					break;
				
				case 3:
					if (!func_170())
					{
						func_149("FM2_CHASE1", 7500, 1);
						system::settimera(0);
						iLocal_301++;
					}
					break;
				
				case 4:
					if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_323) > 900f)
					{
						func_218("FAM2_OLREM", "", 9000);
					}
					break;
				
				case 5:
					if (((entity::does_entity_exist(iLocal_126[0]) && !ped::is_ped_injured(iLocal_126[0])) && ped::is_ped_shooting(iLocal_126[0])) || ((entity::does_entity_exist(iLocal_126[1]) && !ped::is_ped_injured(iLocal_126[1])) && ped::is_ped_shooting(iLocal_126[1])))
					{
						iLocal_301++;
					}
					break;
				
				case 6:
					if (!func_170())
					{
						if (!ped::is_ped_injured(iLocal_103))
						{
							if (!entity::is_entity_playing_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_c", 3))
							{
								if (func_219(0))
								{
									ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_c", 8f, -8f, -1, 0, 0f, 0, 0, 0);
								}
								else if (func_156(&Local_676, cLocal_313, "FAM2_HESHOOT", 8, 0, 0, 0))
								{
									audio::trigger_music_event("FAM2_SHOOTING");
									ai::task_look_at_entity(iLocal_103, iLocal_126[0], -1, 0, 2);
									iLocal_301++;
									system::settimera(0);
								}
							}
							else if (entity::get_entity_anim_current_time(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_c") > 0.12f)
							{
								if (func_156(&Local_676, cLocal_313, "FAM2_HESHOOT", 8, 0, 0, 0))
								{
									audio::trigger_music_event("FAM2_SHOOTING");
									iLocal_301++;
									system::settimera(0);
								}
							}
						}
					}
					break;
				
				case 7:
					if (!func_170())
					{
						func_149("FM2_CHASE3", 7500, 1);
						system::settimerb(0);
						iLocal_301++;
					}
					break;
				
				case 8:
					if (system::timerb() > 5000)
					{
						if (!func_170())
						{
							if (func_156(&Local_676, cLocal_313, "FAM2_LOSEM", 8, 0, 0, 0))
							{
								iLocal_301++;
							}
						}
					}
					break;
				
				case 9:
					if (!func_170())
					{
						if (func_215(&Local_676, cLocal_313, "FAM2_WHO", "FAM2_WHO_3", "FAM2_WHO", "FAM2_WHO_5", "FAM2_WHO", "FAM2_WHO_7", "FAM2_WHO", "FAM2_WHO_9", 8, 0, 0))
						{
							iLocal_301++;
						}
					}
					break;
				
				case 10:
					func_218("FAM2_TSHOUT", "FAM2_MSHOUT", 8000);
					if (iLocal_84 == 2)
					{
						iLocal_301++;
					}
					break;
				
				case 11:
					if (func_156(&Local_676, cLocal_313, "FAM2_LOSET", 8, 0, 0, 0))
					{
						iLocal_301++;
					}
					break;
				
				case 12:
					func_218("FAM2_TSHOUT", "FAM2_MSHOUT", 8000);
					break;
				
				case 50:
					func_167();
					if (func_156(&Local_676, cLocal_313, "FAM2_KILLONE", 8, 0, 0, 0))
					{
						iLocal_301++;
					}
					break;
				
				case 51:
					if (func_156(&Local_676, cLocal_313, "FAM2_KILLER", 8, 0, 0, 0))
					{
						iLocal_301 = iLocal_274;
					}
					break;
				
				case 60:
					func_153();
					if (vehicle::is_vehicle_driveable(iLocal_111, 0))
					{
						if (!ui::does_blip_exist(iLocal_135))
						{
							iLocal_135 = func_209(iLocal_111, 0, 0);
							func_146(&Local_670);
						}
						if (ui::does_blip_exist(iLocal_132))
						{
							ui::remove_blip(&iLocal_132);
						}
						iLocal_1398 = gameplay::get_game_timer();
						iLocal_301++;
					}
					break;
				
				case 61:
					if (vehicle::is_vehicle_driveable(iLocal_111, 0))
					{
						if (!ui::is_message_being_displayed())
						{
							if ((((!ped::is_ped_injured(iLocal_103) && entity::is_entity_at_entity(player::player_ped_id(), iLocal_103, 20f, 20f, 20f, 0, 1, 0)) && entity::is_entity_in_water(player::player_ped_id())) && !ped::is_ped_swimming_under_water(player::player_ped_id())) && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 1))
							{
								if ((gameplay::get_game_timer() - iLocal_1398) > 6000)
								{
									if (func_156(&Local_676, cLocal_313, "FAM2_FALL", 8, 0, 0, 0))
									{
										iLocal_1398 = gameplay::get_game_timer();
									}
								}
							}
						}
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
						{
							func_153();
							if (((iLocal_84 == 0 || iLocal_84 == 7) && !ui::does_blip_exist(iLocal_132)) && iLocal_274 < 5)
							{
								iLocal_132 = func_208(vLocal_323, 0);
							}
							if (ui::does_blip_exist(iLocal_135))
							{
								ui::remove_blip(&iLocal_135);
							}
							ui::clear_prints();
							iLocal_301 = iLocal_274;
						}
					}
					break;
				
				case 100:
					if (ui::does_blip_exist(uLocal_129[0]))
					{
						ui::remove_blip(&(uLocal_129[0]));
					}
					if (ui::does_blip_exist(uLocal_129[1]))
					{
						ui::remove_blip(&(uLocal_129[1]));
					}
					if (ui::does_blip_exist(iLocal_132))
					{
						ui::remove_blip(&iLocal_132);
					}
					func_167();
					if (!func_170())
					{
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
						{
							if (!ped::is_ped_injured(iLocal_103))
							{
								if (!entity::is_entity_playing_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_d", 3))
								{
									ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_d", 8f, -8f, -1, 0, 0f, 0, 0, 0);
								}
								else if (entity::get_entity_anim_current_time(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_d") > 0.25f)
								{
									if (audio::is_audio_scene_active("FAMILY_2_JETSKI_CHASE"))
									{
										audio::stop_audio_scene("FAMILY_2_JETSKI_CHASE");
									}
									ai::task_clear_look_at(iLocal_103);
									iLocal_301++;
								}
							}
						}
					}
					break;
				
				case 101:
					if (iLocal_304)
					{
						sVar10 = "FAM2_KILLTWO";
					}
					else if (iLocal_302)
					{
						sVar10 = "FAM2_ESCAPE";
					}
					else
					{
						sVar10 = "FAM2_LOST";
					}
					if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
					{
						iLocal_1413 = true;
					}
					func_204(sVar10, iLocal_1413);
					if ((iLocal_841 && !func_170()) && !iLocal_842)
					{
						unk1::_0x293220DA1B46CEBC(5f, 5f, 3);
						iLocal_841 = 0;
						iLocal_301++;
					}
					break;
				
				case 102:
					if (iLocal_304 || iLocal_302)
					{
						sVar11 = "FAM2_KILLER2";
					}
					else
					{
						sVar11 = "FAM2_TALK1";
					}
					if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0) && ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
					{
						iLocal_1413 = true;
					}
					func_204(sVar11, iLocal_1413);
					if ((iLocal_841 && !func_170()) && !iLocal_842)
					{
						streaming::remove_anim_dict("missfam2_tracy_jetski");
						ped::set_ped_can_be_knocked_off_vehicle(player::player_ped_id(), 0);
						iLocal_841 = 0;
						func_200(8);
					}
					break;
			}
			if ((((!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0) && !entity::is_entity_in_water(player::player_ped_id())) && !entity::is_entity_in_air(player::player_ped_id())) && !ped::is_ped_ragdoll(player::player_ped_id())) && system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_103, 1)) > 30f)
			{
				iLocal_270 = 2;
			}
			if (!ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
			{
				iLocal_270 = 3;
			}
			if (!vehicle::is_vehicle_driveable(iLocal_111, 0) || func_210(&iLocal_111, &uLocal_262, &iLocal_263))
			{
				iLocal_270 = 4;
			}
			if ((((iLocal_301 < 100 && ((ped::is_ped_injured(iLocal_126[0]) || entity::is_entity_dead(iLocal_126[0], 0)) || iLocal_1388[0])) && ((ped::is_ped_injured(iLocal_126[1]) || entity::is_entity_dead(iLocal_126[1], 0)) || iLocal_1388[1])) && iLocal_301 != 60) && iLocal_301 != 61)
			{
				gameplay::_set_unk_map_flag(0);
				audio::trigger_music_event("FAM2_LOST_HIM");
				iLocal_301 = 100;
			}
			if (iLocal_270 > 1)
			{
				ui::clear_prints();
				func_167();
				iVar12 = 0;
				while (iVar12 < iLocal_126)
				{
					if (((!ped::is_ped_injured(iLocal_126[iVar12]) && entity::does_entity_exist(iLocal_123[iVar12])) && vehicle::is_vehicle_driveable(iLocal_123[iVar12], 0)) && ped::is_ped_in_vehicle(iLocal_126[iVar12], iLocal_123[iVar12], 0))
					{
						ai::clear_ped_tasks(iLocal_126[iVar12]);
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[iVar12]))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_123[iVar12]);
						}
					}
					iVar12++;
				}
				if (ui::does_blip_exist(iLocal_132))
				{
					ui::remove_blip(&iLocal_132);
				}
				system::settimera(0);
			}
			break;
		
		case 2:
			if (system::timera() > 2000)
			{
				func_103("FM2_TRAAB");
			}
			break;
		
		case 3:
			if (system::timera() > 2000)
			{
				func_103("FM2_TRAFELL");
			}
			break;
		
		case 4:
			if (system::timera() > 1000)
			{
				ped::set_ped_can_be_knocked_off_vehicle(player::player_ped_id(), 3);
				if (entity::is_entity_dead(iLocal_111, 0))
				{
					func_103("FM2_SKIDED");
				}
				else
				{
					func_103("FM2_SKIGRN");
				}
			}
			break;
	}
}

int func_215(var uParam0, char* sParam1, char* sParam2, char* sParam3, char* sParam4, char* sParam5, char* sParam6, char* sParam7, char* sParam8, char* sParam9, int iParam10, int iParam11, int iParam12)//Position - 0x2184F
{
	var uVar0;
	var uVar11;
	
	func_166(uParam0, 145, sParam1, iParam11, iParam12, 0);
	if (iParam10 > 7)
	{
		if (iParam10 < 12)
		{
			iParam10 = 7;
		}
	}
	uVar0 = 10;
	uVar11 = 10;
	func_217(4, &uVar0, &uVar11, sParam2, sParam3, sParam4, sParam5, sParam6, sParam7, sParam8, sParam9, 0, 0, 0, 0, 0, 0);
	return func_216(&uVar0, &uVar11, iParam10, 0);
}

bool func_216(var uParam0, var uParam1, int iParam2, int iParam3)//Position - 0x218AC
{
	int iVar0;
	
	Global_15746 = 0;
	if (Global_15745 == 0 || Global_15747 == 2)
	{
		if (Global_15745 != 0)
		{
			if (iParam2 > Global_15747)
			{
				if (iParam3 == 0)
				{
					audio::stop_scripted_conversation(false);
					Global_14443.f_1 = 3;
					Global_15745 = 0;
					Global_15746 = 1;
					Global_15798 = 0;
					Global_15741 = 0;
					Global_15742 = 0;
				}
				else
				{
					func_165();
					return false;
				}
			}
			else
			{
				return false;
			}
		}
		if (audio::is_scripted_conversation_ongoing())
		{
			return false;
		}
		if (func_164(8, -1))
		{
			return false;
		}
		Global_15821 = { Global_15815 };
		func_163();
		Global_15034 = { Global_15199 };
		Global_15751 = Global_15752;
		Global_15758 = Global_15759;
		Global_2621442 = Global_2621441;
		Global_15760 = { Global_15776 };
		Global_15753 = Global_15754;
		Global_16735 = Global_16736;
		Global_16743 = { Global_16749 };
		Global_16741 = Global_16742;
		Global_16737 = Global_16738;
		Global_16739 = Global_16740;
		Global_15364.f_368 = Global_16732;
		Global_15364.f_369 = Global_16733;
		Global_15364.f_370 = Global_16734;
		Global_15741 = Global_15742;
		Global_15743 = Global_15744;
		if (Global_16003 == 0)
		{
			Global_15899[0 /*6*/] = { Global_15925[0 /*6*/] };
			Global_15899[1 /*6*/] = { Global_15925[1 /*6*/] };
			Global_15951[0 /*6*/] = { Global_15977[0 /*6*/] };
			Global_15951[1 /*6*/] = { Global_15977[1 /*6*/] };
			Global_15912[0 /*6*/] = { Global_15938[0 /*6*/] };
			Global_15912[1 /*6*/] = { Global_15938[1 /*6*/] };
			Global_15964[0 /*6*/] = { Global_15990[0 /*6*/] };
			Global_15964[1 /*6*/] = { Global_15990[1 /*6*/] };
		}
		if (Global_15751)
		{
			gameplay::clear_bit(&Global_2313, 20);
			gameplay::clear_bit(&Global_2314, 17);
			gameplay::clear_bit(&Global_2315, 0);
			if (iParam3)
			{
				func_162();
				if (Global_3118[Global_14443 /*2811*/][0 /*281*/].f_259 == 2)
				{
					if (iParam2 == 13)
					{
					}
					else
					{
						return false;
					}
				}
				if (Global_14443.f_1 > 3)
				{
					return false;
				}
			}
			if (Global_14409 == 1)
			{
				return false;
			}
			if (player::is_player_playing(player::player_id()))
			{
				if (ped::is_ped_in_melee_combat(player::player_ped_id()))
				{
					return false;
				}
				if (func_161())
				{
					return false;
				}
				if (ped::is_ped_ragdoll(player::player_ped_id()))
				{
					return false;
				}
				if (ped::is_ped_in_parachute_free_fall(player::player_ped_id()))
				{
					return false;
				}
				if (weapon::get_is_ped_gadget_equipped(player::player_ped_id(), joaat("gadget_parachute")))
				{
					return false;
				}
				if (!Global_69697)
				{
					if (Global_16003 == 0)
					{
						if (entity::is_entity_in_water(player::player_ped_id()))
						{
							return false;
						}
						if (player::is_player_climbing(player::player_id()))
						{
							return false;
						}
						if (ped::is_ped_planting_bomb(player::player_ped_id()))
						{
							return false;
						}
						if (player::is_special_ability_active(player::player_id()))
						{
							return false;
						}
					}
				}
			}
			if (func_160())
			{
				return false;
			}
			else
			{
				switch (Global_14443.f_1)
				{
					case 7:
						return false;
						break;
					
					case 8:
						return false;
						break;
					
					case 9:
						break;
					
					case 10:
						break;
					
					default:
						break;
					}
			}
			func_159();
			Global_15755 = iParam3;
		}
		Global_15747 = iParam2;
		if (Global_15741 > 0)
		{
			iVar0 = 0;
			while (iVar0 < Global_15741)
			{
				StringCopy(&(Global_15364.f_6[iVar0 /*6*/]), (*uParam0)[iVar0], 24);
				StringCopy(&(Global_15364.f_187[iVar0 /*6*/]), (*uParam1)[iVar0], 24);
				iVar0++;
			}
		}
		Global_14611 = 0;
		func_158();
		return true;
	}
	if (Global_15745 == 5)
	{
		return false;
	}
	if (iParam2 < Global_15747 || iParam2 == Global_15747)
	{
		return false;
	}
	if (iParam2 == 2)
	{
	}
	else
	{
		func_165();
	}
	return false;
}

void func_217(int iParam0, var uParam1, var uParam2, var uParam3, var uParam4, var uParam5, var uParam6, var uParam7, var uParam8, var uParam9, var uParam10, int iParam11, int iParam12, int iParam13, int iParam14, int iParam15, int iParam16)//Position - 0x21C16
{
	Global_15742 = iParam0;
	Global_15752 = 0;
	Global_15759 = 0;
	Global_15754 = 0;
	Global_16736 = 0;
	Global_16742 = 0;
	Global_2621441 = 0;
	(*uParam1)[0] = uParam3;
	(*uParam2)[0] = uParam4;
	(*uParam1)[1] = uParam5;
	(*uParam2)[1] = uParam6;
	(*uParam1)[2] = uParam7;
	(*uParam2)[2] = uParam8;
	(*uParam1)[3] = uParam9;
	(*uParam2)[3] = uParam10;
	(*uParam1)[4] = iParam11;
	(*uParam2)[4] = iParam12;
	(*uParam1)[5] = iParam13;
	(*uParam2)[5] = iParam14;
	(*uParam1)[6] = iParam15;
	(*uParam2)[6] = iParam16;
}

void func_218(char* sParam0, char* sParam1, int iParam2)//Position - 0x21C9E
{
	int iVar0;
	int iVar1;
	
	if (iLocal_1409 > iLocal_1398)
	{
		iParam2 = 3000;
	}
	if (((gameplay::get_game_timer() - iLocal_1398) > iParam2 && !func_170()) && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0))
	{
		iVar0 = gameplay::get_random_int_in_range(1, 3);
		if (((!ped::is_ped_injured(iLocal_126[0]) && vehicle::is_vehicle_driveable(iLocal_123[0], 0)) && entity::is_entity_at_entity(iLocal_123[0], iLocal_111, 20f, 20f, 5f, 0, 1, 0)) && iLocal_1409 < iLocal_1398)
		{
			iVar0 = gameplay::get_random_int_in_range(1, 6);
		}
		if (iVar0 == 1 && iLocal_302)
		{
			iVar0 = 2;
		}
		if (iVar0 == 1 && !gameplay::is_string_null_or_empty(sParam1))
		{
			if (func_156(&Local_676, cLocal_313, sParam1, 8, 0, 0, 0))
			{
				iLocal_1398 = gameplay::get_game_timer();
			}
		}
		else if (iVar0 == 2)
		{
			if (gameplay::are_strings_equal(sParam0, "FAM2_TSHOUT"))
			{
				if (func_219(0))
				{
					iVar1 = gameplay::get_random_int_in_range(0, 4);
					switch (iVar1)
					{
						case 0:
							ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_e", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							break;
						
						case 1:
							ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_f", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							break;
						
						case 2:
							ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_g", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							break;
						
						case 3:
							ai::task_play_anim(iLocal_103, "missfam2_tracy_jetski", "tracy_jetski_h", 4f, -4f, -1, 0, 0f, 0, 0, 0);
							break;
						}
					}
			}
			if (iLocal_302)
			{
				if (!gameplay::are_strings_equal(sParam0, "FAM2_ONE"))
				{
					sParam0 = "FAM2_ONE";
				}
			}
			if (func_156(&Local_676, cLocal_313, sParam0, 8, 0, 0, 0))
			{
				iLocal_1398 = gameplay::get_game_timer();
			}
		}
		else if (iVar0 >= 3)
		{
			if (entity::does_entity_exist(Local_676[7 /*10*/]) && !ped::is_ped_injured(Local_676[7 /*10*/]))
			{
				if (func_156(&Local_676, cLocal_313, "FAM2_BGUY2", 8, 0, 0, 0))
				{
					iLocal_1409 = gameplay::get_game_timer();
				}
			}
		}
	}
}

bool func_219(int iParam0)//Position - 0x21EAB
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (!ped::is_ped_injured(iLocal_126[iParam0]) && !ped::is_ped_injured(iLocal_103))
	{
		vVar0 = { entity::get_entity_coords(iLocal_126[iParam0], 1) - entity::get_entity_coords(iLocal_103, 1) };
		vVar3 = { entity::get_entity_forward_vector(iLocal_103) };
		if (gameplay::absf(gameplay::get_angle_between_2d_vectors(vVar3.x, vVar3.y, vVar0.x, vVar0.y)) >= 60f)
		{
			return true;
		}
	}
	return false;
}

void func_220()//Position - 0x21F10
{
	int iVar0;
	float fVar1;
	float fVar2;
	
	if (iLocal_1392)
	{
		if (iLocal_1391)
		{
			fVar1 = 3f;
			fVar2 = 50f;
		}
		else if (iLocal_84 == 7)
		{
			fVar1 = 5f;
			fVar2 = 250f;
		}
		else
		{
			fVar1 = 5f;
			fVar2 = 100f;
		}
		iVar0 = 0;
		while (iVar0 < iLocal_126)
		{
			if (func_221(iVar0, fVar2, fVar1))
			{
				iLocal_1388[iVar0] = 1;
				ped::delete_ped(&(iLocal_126[iVar0]));
				vehicle::delete_vehicle(&(iLocal_123[iVar0]));
				if (ui::does_blip_exist(uLocal_129[iVar0]))
				{
					ui::remove_blip(&(uLocal_129[iVar0]));
				}
			}
			iVar0++;
		}
	}
	else if (iLocal_1391)
	{
		iLocal_1391 = 0;
	}
	if (!iLocal_1388[0] || !iLocal_1388[1])
	{
		iVar0 = 0;
		while (iVar0 < iLocal_126)
		{
			if (!iLocal_1388[iVar0])
			{
				if ((entity::does_entity_exist(iLocal_126[iVar0]) && (ped::is_ped_injured(iLocal_126[iVar0]) || entity::is_entity_dead(iLocal_126[iVar0], 0))) || !entity::does_entity_exist(iLocal_126[iVar0]))
				{
					iLocal_1388[iVar0] = 1;
				}
			}
			iVar0++;
		}
	}
}

bool func_221(int iParam0, float fParam1, float fParam2)//Position - 0x22029
{
	float fVar0;
	
	if (!ped::is_ped_injured(iLocal_126[iParam0]))
	{
		if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
		{
			fVar0 = system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_126[iParam0], 1));
			if ((fVar0 > (fParam1 * fParam1) && entity::is_entity_occluded(iLocal_126[iParam0])) || fVar0 > 90000f)
			{
				if (fVar0 > 90000f)
				{
					fLocal_1410[iParam0] = (fLocal_1410[iParam0] + (gameplay::get_frame_time() * 10f));
				}
				fLocal_1410[iParam0] = (fLocal_1410[iParam0] + gameplay::get_frame_time());
			}
			else if (fLocal_1410[iParam0] > 0f)
			{
				fLocal_1410[iParam0] = (fLocal_1410[iParam0] - (gameplay::get_frame_time() * 3f));
			}
			else
			{
				fLocal_1410[iParam0] = 0f;
			}
		}
		if (fLocal_1410[iParam0] > fParam2)
		{
			return true;
		}
	}
	return false;
}

void func_222()//Position - 0x22107
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4;
	vector3 vVar7;
	int iVar10;
	
	iVar0 = 0;
	while (iVar0 < 2)
	{
		if (!ped::is_ped_injured(iLocal_126[iVar0]))
		{
			if ((!ped::is_ped_in_any_vehicle(iLocal_126[iVar0], 0) && entity::is_entity_in_water(iLocal_126[iVar0])) && system::vdist2(entity::get_entity_coords(iLocal_126[iVar0], 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 100f)
			{
				ped::explode_ped_head(iLocal_126[iVar0], joaat("weapon_sniperrifle"));
			}
		}
		iVar0++;
	}
	switch (iLocal_84)
	{
		case 0:
			if (system::timerb() > 5000)
			{
				func_233(0, &uLocal_1099, 101, "famtwo", 1, 0);
				func_233(1, &uLocal_1112, 102, "famtwo", 1, 0);
			}
			if (system::timerb() < 2000)
			{
				controls::disable_control_action(0, 76, 1);
				controls::disable_control_action(0, 72, 1);
				controls::disable_control_action(0, 69, 1);
				controls::disable_control_action(0, 23, 1);
				controls::disable_control_action(0, 27, 1);
				controls::disable_control_action(0, 31, 1);
				controls::disable_control_action(0, 30, 1);
				controls::disable_control_action(0, 26, 1);
			}
			if (fLocal_1404 < 1f)
			{
				fLocal_1404 = (fLocal_1404 + 0.01f);
			}
			else
			{
				fLocal_1404 = 1f;
			}
			break;
		
		case 1:
			func_233(0, &uLocal_1125, 201, "famtwo", 0, 0);
			func_233(1, &uLocal_1171, 202, "famtwo", 0, 0);
			break;
		
		case 2:
			iLocal_88 = func_232();
			if (iLocal_88 != 6)
			{
				if (iLocal_88 != iLocal_89)
				{
					func_230(&(Local_1267[0 /*25*/]), 1, func_231(iLocal_88));
					func_230(&(Local_1267[1 /*25*/]), 2, func_231(iLocal_88));
					if (entity::does_entity_exist(iLocal_123[0]))
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[0]))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_123[0]);
						}
					}
					if (entity::does_entity_exist(iLocal_123[1]))
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[1]))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_123[1]);
						}
					}
				}
				iLocal_89 = iLocal_88;
			}
			func_227(0);
			if (!iLocal_1406)
			{
				if (!entity::is_entity_dead(iLocal_123[0], 0))
				{
					if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_123[0], 1)) < 100f && entity::get_entity_speed(iLocal_111) < 7f)
					{
						iLocal_1406 = 1;
					}
				}
				if (!entity::is_entity_dead(iLocal_123[1], 0))
				{
					if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_123[1], 1)) < 100f && entity::get_entity_speed(iLocal_111) < 7f)
					{
						iLocal_1406 = 1;
					}
				}
			}
			else if (entity::get_entity_speed(iLocal_111) > 10f)
			{
				iLocal_1406 = 0;
			}
			if (iLocal_88 == 0)
			{
				if (!entity::is_entity_dead(iLocal_123[1], 0))
				{
					if (func_225(entity::get_entity_coords(iLocal_123[1], 1), 1, "famtwoCanalsAlt", &uLocal_1318, 0) > func_225(entity::get_entity_coords(player::player_ped_id(), 1), 1, "famtwoCanalsAlt", &uLocal_1318, 0))
					{
						iLocal_1385[1] = 1;
					}
				}
				if (!entity::is_entity_dead(iLocal_123[0], 0))
				{
					if (func_225(entity::get_entity_coords(iLocal_123[0], 1), 1, "famtwoCanalsAlt", &uLocal_1318, 0) > func_225(entity::get_entity_coords(player::player_ped_id(), 1), 1, "famtwoCanalsAlt", &uLocal_1318, 0))
					{
						iLocal_1385[0] = 1;
					}
				}
				func_233(1, &uLocal_1318, 1, "famtwoCanalsAlt", 0, 0);
			}
			else if (!ped::is_ped_injured(iLocal_126[1]))
			{
				if (entity::is_entity_in_angled_area(player::player_ped_id(), -1061.247f, -1027.52f, -1.839872f, -1158.562f, -864.5836f, 17.98512f, 250f, 0, true, 0))
				{
					vVar1 = { -1191.48f, -1002.427f, 0f };
				}
				else if (entity::is_entity_in_angled_area(player::player_ped_id(), -1061.247f, -1027.52f, -1.839872f, -1006.939f, -1120.256f, 6.144058f, 250f, 0, true, 0))
				{
					vVar1 = { -1137.652f, -1097.164f, 0f };
				}
				else if (entity::is_entity_in_angled_area(player::player_ped_id(), -900.0117f, -1305.718f, 15.90007f, -1006.939f, -1120.256f, -8.855943f, 250f, 0, true, 0))
				{
					vVar1 = { -1083.993f, -1189.703f, 0f };
				}
				if (!func_224(vVar1))
				{
					if (!entity::is_entity_at_coord(iLocal_123[1], vVar1, 2.5f, 2.5f, 2f, false, true, 0))
					{
						vVar4 = { Vector(-1.599754f, -1082.671f, -1114.952f) + Vector(17.75f, 133.25f, 81.25f) };
						vVar7 = { Vector(-1.599754f, -1082.671f, -1114.952f) - Vector(17.75f, 133.25f, 81.25f) };
						if (pathfind::_0x07FB139B592FA687(vVar7.x, vVar7.y, vVar4.x, vVar4.y))
						{
							if (ai::get_script_task_status(iLocal_126[1], -1817882002) != 1)
							{
								ai::task_vehicle_drive_to_coord(iLocal_126[1], iLocal_123[1], vVar1, 10f, 0, joaat("seashark"), 262144, 1f, 3f);
							}
						}
						if (!cam::is_sphere_visible(entity::get_entity_coords(iLocal_123[1], 1), 2f) && !cam::is_sphere_visible(vVar1, 2f))
						{
							entity::set_entity_coords(iLocal_123[1], vVar1, 1, false, 0, 1);
							entity::set_entity_heading(iLocal_123[1], 214f);
						}
					}
				}
			}
			break;
		
		case 3:
			if ((((!ped::is_ped_injured(iLocal_126[1]) && !entity::is_entity_dead(iLocal_126[1], 0)) && vehicle::is_vehicle_driveable(iLocal_123[1], 0)) && ped::is_ped_in_vehicle(iLocal_126[1], iLocal_123[1], 0)) && vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
				{
					if (ai::get_script_task_status(iLocal_126[1], 579380604) != 1 && ai::get_script_task_status(iLocal_126[1], 579380604) != 2)
					{
						ai::task_vehicle_chase(iLocal_126[1], player::player_ped_id());
					}
				}
				if (entity::is_entity_at_entity(iLocal_126[1], player::player_ped_id(), 10f, 10f, 5f, 0, 1, 0))
				{
					iLocal_1393 = 1;
				}
			}
			break;
		
		case 4:
			iLocal_88 = func_232();
			if (iLocal_88 != 6)
			{
				if (iLocal_88 != iLocal_89)
				{
					func_230(&(Local_1267[0 /*25*/]), 1, func_231(iLocal_88));
					func_230(&(Local_1267[1 /*25*/]), 2, func_231(iLocal_88));
					if (entity::does_entity_exist(iLocal_123[1]))
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[1]))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_123[1]);
						}
					}
				}
				iLocal_89 = iLocal_88;
			}
			func_227(1);
			if (!iLocal_1406)
			{
				if ((system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_123[0], 1)) < 100f || system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_123[1], 1)) < 100f) && entity::get_entity_speed(iLocal_111) < 7f)
				{
					iLocal_1406 = 1;
				}
			}
			else if (entity::get_entity_speed(iLocal_111) > 10f)
			{
				iLocal_1406 = 0;
			}
			break;
		
		case 5:
			func_233(0, &uLocal_1217, 301, "famtwo", 0, 0);
			func_233(1, &uLocal_1242, 302, "famtwo", 0, 0);
			break;
		
		case 6:
			if (!iLocal_1391)
			{
				func_233(0, &uLocal_1343, 401, "famtwo", 1, 0);
				func_233(1, &uLocal_1362, 402, "famtwo", 1, 0);
				if (!iLocal_1407)
				{
					if (fLocal_1404 > 0.1f)
					{
						fLocal_1404 = (fLocal_1404 - 0.01f);
					}
					else
					{
						fLocal_1404 = 0.1f;
					}
				}
				if (entity::is_entity_in_angled_area(player::player_ped_id(), vLocal_248, vLocal_251, fLocal_254, 0, true, 0))
				{
					iVar10 = 0;
					while (iVar10 < iLocal_126)
					{
						if (!ped::is_ped_injured(iLocal_126[iVar10]))
						{
							ai::clear_ped_tasks(iLocal_126[iVar10]);
							ai::task_vehicle_mission_coors_target(iLocal_126[iVar10], iLocal_123[iVar10], -901.3011f, -1359.937f, 0f, 14, 20f, 262144, 3f, 3f, 1);
						}
						iVar10++;
					}
					iLocal_1391 = 1;
				}
			}
			break;
	}
	func_223(0);
	func_223(1);
	if ((iLocal_84 == 6 || iLocal_84 == 7) || iLocal_1391)
	{
		if (!iLocal_1392)
		{
			iLocal_1392 = true;
		}
	}
	else if (iLocal_1392)
	{
		iLocal_1392 = false;
	}
}

void func_223(int iParam0)//Position - 0x228A2
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (vehicle::is_vehicle_driveable(iLocal_111, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
	{
		if (!ui::does_blip_exist(uLocal_129[iParam0]))
		{
			if (!ped::is_ped_injured(iLocal_126[iParam0]))
			{
				if (vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0) && ped::is_ped_in_vehicle(iLocal_126[iParam0], iLocal_123[iParam0], 0))
				{
					uLocal_129[iParam0] = func_208(entity::get_entity_coords(iLocal_123[iParam0], 1), 0);
					ui::set_blip_name_from_text_file(uLocal_129[iParam0], "FM2_PURSUER");
					ui::set_blip_colour(uLocal_129[iParam0], 1);
					ui::set_blip_priority(uLocal_129[iParam0], 9);
					iLocal_1395[iParam0] = 1;
				}
				else
				{
					uLocal_129[iParam0] = func_150(iLocal_126[iParam0], 1, 145);
					iLocal_1395[iParam0] = 0;
				}
			}
		}
		else if (!ped::is_ped_injured(iLocal_126[iParam0]))
		{
			if (vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0) && ped::is_ped_in_vehicle(iLocal_126[iParam0], iLocal_123[iParam0], 0))
			{
				if (iLocal_1395[iParam0])
				{
					vVar0 = { ui::get_blip_coords(uLocal_129[iParam0]) };
					vVar3 = { entity::get_entity_coords(iLocal_123[iParam0], 1) };
					vVar0.x = (vVar0.x + ((vVar3.x - vVar0.x) / 25f));
					vVar0.y = (vVar0.y + ((vVar3.y - vVar0.y) / 25f));
					vVar0.z = (vVar0.y + ((vVar3.y - vVar0.y) / 25f));
					ui::set_blip_coords(uLocal_129[iParam0], vVar0);
				}
				else
				{
					ui::remove_blip(&(uLocal_129[iParam0]));
				}
			}
			else if (iLocal_1395[iParam0])
			{
				ui::remove_blip(&(uLocal_129[iParam0]));
			}
		}
		else if (ui::does_blip_exist(uLocal_129[iParam0]))
		{
			ui::remove_blip(&(uLocal_129[iParam0]));
		}
	}
	else if (ui::does_blip_exist(uLocal_129[iParam0]))
	{
		ui::remove_blip(&(uLocal_129[iParam0]));
	}
}

bool func_224(vector3 vParam0)//Position - 0x22A67
{
	if ((vParam0.x == 0f && vParam0.y == 0f) && vParam0.y == 0f)
	{
		return true;
	}
	return false;
}

float func_225(vector3 vParam0, int iParam3, char* sParam4, var uParam5, int iParam6)//Position - 0x22A91
{
	int iVar0;
	float fVar1;
	float fVar2;
	
	iVar0 = func_226(vParam0, uParam5);
	fVar1 = (vehicle::get_total_duration_of_vehicle_recording(iParam3, sParam4) / IntToFloat((*uParam5 - 1)));
	fVar2 = (gameplay::_0x7F8F6405F4777AF6(vParam0, *(uParam5[iVar0 /*3*/]), *(uParam5[iVar0 + 1 /*3*/]), 1) * fVar1);
	if (iParam6)
	{
	}
	return ((fVar2 + (IntToFloat(iVar0) * fVar1)) - 0.1f);
}

int func_226(vector3 vParam0, var uParam3)//Position - 0x22AEA
{
	int iVar0;
	int iVar1;
	float fVar2;
	
	fVar2 = 999999f;
	iVar0 = 0;
	while (iVar0 < (*uParam3 - 1))
	{
		if (system::vdist2(gameplay::_0x21C235BC64831E5A(vParam0, *(uParam3[iVar0 /*3*/]), *(uParam3[iVar0 + 1 /*3*/]), 1), vParam0) < fVar2)
		{
			iVar1 = iVar0;
			fVar2 = system::vdist2(gameplay::_0x21C235BC64831E5A(vParam0, *(uParam3[iVar0 /*3*/]), *(uParam3[iVar0 + 1 /*3*/]), 1), vParam0);
		}
		iVar0++;
	}
	return iVar1;
}

void func_227(int iParam0)//Position - 0x22B63
{
	if (iLocal_1384)
	{
		func_233(iParam0, &(Local_1267[0 /*25*/]), 1, func_231(iLocal_89), 0, 1);
	}
	else
	{
		func_233(iParam0, &(Local_1267[1 /*25*/]), 2, func_231(iLocal_89), 0, 1);
	}
	if ((gameplay::get_game_timer() - iLocal_1394) > 500)
	{
		iLocal_1384 = func_228(iLocal_89);
		iLocal_1394 = gameplay::get_game_timer();
	}
}

int func_228(int iParam0)//Position - 0x22BBC
{
	vector3 vVar0;
	vector3 vVar3;
	
	vVar0 = { entity::get_entity_forward_vector(player::player_ped_id()) };
	vVar3 = { func_229(vLocal_1077[iParam0 /*3*/] - vLocal_1061[iParam0 /*3*/]) };
	return gameplay::absf(gameplay::get_angle_between_2d_vectors(vVar3.x, vVar3.y, vVar0.x, vVar0.y)) < 90f;
}

Vector3 func_229(vector3 vParam0)//Position - 0x22C05
{
	float fVar0;
	float fVar1;
	
	fVar0 = system::vmag(vParam0);
	if (fVar0 != 0f)
	{
		fVar1 = (1f / fVar0);
		vParam0 = { vParam0 * Vector(fVar1, fVar1, fVar1) };
	}
	else
	{
		vParam0.x = 0f;
		vParam0.y = 0f;
		vParam0.z = 0f;
	}
	return vParam0;
}

void func_230(var uParam0, int iParam1, char* sParam2)//Position - 0x22C44
{
	float fVar0;
	float fVar1;
	int iVar2;
	
	vehicle::request_vehicle_recording(iParam1, sParam2);
	if (vehicle::has_vehicle_recording_been_loaded(iParam1, sParam2))
	{
		fVar0 = vehicle::get_total_duration_of_vehicle_recording(iParam1, sParam2);
		fVar1 = (fVar0 / IntToFloat((*uParam0 - 1)));
		iVar2 = 0;
		while (iVar2 < *uParam0)
		{
			*(uParam0[iVar2 /*3*/]) = { vehicle::get_position_of_vehicle_recording_at_time(iParam1, (fVar1 * IntToFloat(iVar2)), sParam2) };
			iVar2++;
		}
	}
}

char* func_231(int iParam0)//Position - 0x22C9E
{
	switch (iParam0)
	{
		case 0:
			return "famtwoCanalsbottom";
			break;
		
		case 1:
			return "famtwoCanalstop";
			break;
		
		case 2:
			return "famtwoCanalsLeft";
			break;
		
		case 3:
			return "famtwoCanalsMiddle";
			break;
		
		case 4:
			return "famtwoCanalsRight";
			break;
	}
	return "famtwoCanalsbottom";
}

int func_232()//Position - 0x22D01
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 5)
	{
		if (entity::is_entity_in_angled_area(player::player_ped_id(), vLocal_1061[iVar0 /*3*/], vLocal_1077[iVar0 /*3*/], fLocal_1093[iVar0], 0, true, 0))
		{
			return iVar0;
		}
		iVar0++;
	}
	return 6;
}

void func_233(int iParam0, var uParam1, int iParam2, char* sParam3, int iParam4, int iParam5)//Position - 0x22D48
{
	float fVar0;
	float fVar1;
	vector3 vVar2;
	vector3 vVar5;
	float fVar8;
	float fVar9;
	float fVar10;
	float fVar11;
	
	if ((((((!ped::is_ped_injured(iLocal_126[iParam0]) && !entity::is_entity_dead(iLocal_126[iParam0], 0)) && entity::does_entity_exist(iLocal_123[iParam0])) && vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0)) && ped::is_ped_in_vehicle(iLocal_126[iParam0], iLocal_123[iParam0], 0)) && vehicle::is_vehicle_driveable(iLocal_111, 0)) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
	{
		fVar0 = func_225(entity::get_entity_coords(iLocal_123[iParam0], 1), iParam2, sParam3, uParam1, 0);
		fVar1 = func_225(entity::get_entity_coords(player::player_ped_id(), 1), iParam2, sParam3, uParam1, 0);
		vVar2 = { vehicle::get_position_of_vehicle_recording_at_time(iParam2, fVar0, sParam3) };
		vVar5 = { vehicle::get_position_of_vehicle_recording_at_time(iParam2, fVar1, sParam3) };
		if (!iLocal_1381[iParam0])
		{
			if (!iLocal_1407)
			{
				if (((fVar0 < fVar1 && !cam::is_sphere_visible(entity::get_entity_coords(iLocal_123[iParam0], 1), 3f)) && !cam::is_sphere_visible(vVar2, 3f)) && system::vdist2(vVar5, entity::get_entity_coords(iLocal_123[iParam0], 1)) > 25f)
				{
					unk1::_0xAF66DCEE6609B148();
					vehicle::stop_playback_recorded_vehicle(iLocal_123[iParam0]);
					vehicle::start_playback_recorded_vehicle(iLocal_123[iParam0], iParam2, sParam3, 1);
					vehicle::_0x796A877E459B99EA(iLocal_123[iParam0], 0f, 0f, 0.1f);
					vehicle::skip_time_in_playback_recorded_vehicle(iLocal_123[iParam0], func_234((fVar0 + (IntToFloat(iParam0) * 0.5f)), 0f, 999999f));
					iLocal_1381[iParam0] = 1;
				}
			}
			if (iLocal_84 != 2)
			{
				iLocal_1385[iParam0] = fVar0 > fVar1;
			}
			else
			{
				iLocal_1385[iParam0] = 0;
			}
		}
		else
		{
			fVar8 = system::vdist2(vVar5, vVar2);
			fVar9 = 999999f;
			if (!entity::is_entity_dead(iLocal_123[0], 0) && !entity::is_entity_dead(iLocal_123[1], 0))
			{
				fVar9 = system::vdist2(entity::get_entity_coords(iLocal_123[0], 1), entity::get_entity_coords(iLocal_123[1], 1));
			}
			if (((((cam::is_sphere_visible(entity::get_entity_coords(iLocal_123[iParam0], 1), 3f) && (fVar8 < 25f || iParam4)) || fVar8 < 9f) || fVar0 > fVar1) || !vehicle::is_playback_going_on_for_vehicle(iLocal_123[iParam0])) || fVar9 < (1.5f * 1.5f))
			{
				if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[iParam0]))
				{
					vehicle::set_playback_to_use_ai(iLocal_123[iParam0], 262144);
				}
				else
				{
					vehicle::start_playback_recorded_vehicle_using_ai(iLocal_123[iParam0], iParam2, sParam3, 20f, 262144);
				}
				if (iParam5 && (fVar0 > 0.85f || fVar0 < 0.15f))
				{
				}
				ai::task_vehicle_chase(iLocal_126[iParam0], player::player_ped_id());
				iLocal_1381[iParam0] = 0;
			}
			else
			{
				fVar10 = 40f;
				if (iParam5 && (fVar0 > 0.8f || fVar0 < 0.2f))
				{
					fVar11 = 1f;
					vehicle::set_playback_speed(iLocal_123[iParam0], func_234(((system::vdist(entity::get_entity_coords(iLocal_123[iParam0], 1), entity::get_entity_coords(player::player_ped_id(), 1)) * (fVar11 / fVar10)) * fLocal_1404), 0.2f, fVar11));
				}
				else
				{
					fVar11 = 1.3f;
					vehicle::set_playback_speed(iLocal_123[iParam0], func_234(((system::vdist(entity::get_entity_coords(iLocal_123[iParam0], 1), entity::get_entity_coords(player::player_ped_id(), 1)) * (fVar11 / fVar10)) * fLocal_1404), 0.8f, fVar11));
				}
			}
		}
	}
	else if (entity::does_entity_exist(iLocal_123[iParam0]))
	{
		if (vehicle::is_playback_going_on_for_vehicle(iLocal_123[iParam0]))
		{
			vehicle::stop_playback_recorded_vehicle(iLocal_123[iParam0]);
		}
	}
}

float func_234(float fParam0, float fParam1, float fParam2)//Position - 0x230C7
{
	if (fParam0 > fParam2)
	{
		return fParam2;
	}
	else if (fParam0 < fParam1)
	{
		return fParam1;
	}
	return fParam0;
}

void func_235()//Position - 0x230EE
{
	if (vehicle::is_vehicle_driveable(iLocal_111, 0))
	{
		switch (iLocal_1399)
		{
			case 0:
				if (!iLocal_1401)
				{
					func_237("FM2_JSHLP1", 12000);
					iLocal_1400 = gameplay::get_game_timer();
					iLocal_1401 = 1;
				}
				if (controls::is_control_pressed(0, 71))
				{
					fLocal_1403 = (fLocal_1403 + gameplay::get_frame_time());
				}
				if (fLocal_1403 > 3f || (gameplay::get_game_timer() - iLocal_1400) > 10000)
				{
					fLocal_1403 = 0f;
					iLocal_1399++;
				}
				break;
			
			case 1:
				if (func_236("FM2_JSHLP1"))
				{
					if (!iLocal_1402)
					{
						ui::clear_help(0);
						iLocal_1402 = 1;
					}
				}
				else
				{
					iLocal_1400 = gameplay::get_game_timer();
					iLocal_1399++;
				}
				break;
			
			case 2:
				if ((gameplay::get_game_timer() - iLocal_1400) > 2000)
				{
					iLocal_1401 = 0;
					iLocal_1402 = 0;
					iLocal_1399++;
				}
				break;
			
			case 3:
				if (!iLocal_1401)
				{
					func_237("FM2_JSHLP2", 12000);
					iLocal_1400 = gameplay::get_game_timer();
					iLocal_1401 = 1;
				}
				if (controls::is_control_pressed(0, 72))
				{
					fLocal_1403 = (fLocal_1403 + gameplay::get_frame_time());
				}
				if (fLocal_1403 > 1f || (gameplay::get_game_timer() - iLocal_1400) > 10000)
				{
					iLocal_1399++;
				}
				break;
			
			case 4:
				if (func_236("FM2_JSHLP2"))
				{
					if (!iLocal_1402)
					{
						iLocal_1402 = 1;
						ui::clear_help(0);
					}
				}
				else
				{
					iLocal_1399++;
				}
				break;
			
			case 5:
				if ((gameplay::get_game_timer() - iLocal_1400) > 2000)
				{
					iLocal_1401 = 0;
					iLocal_1402 = 0;
					iLocal_1399++;
				}
				break;
			
			case 6:
				if (!iLocal_1401)
				{
					func_237("FM2_JSHLP3", 12000);
					iLocal_1400 = gameplay::get_game_timer();
					iLocal_1401 = 1;
				}
				if (controls::is_control_pressed(0, 76))
				{
					fLocal_1403 = (fLocal_1403 + gameplay::get_frame_time());
				}
				if (fLocal_1403 > 2f || (gameplay::get_game_timer() - iLocal_1400) > 7500)
				{
					fLocal_1403 = 0f;
					iLocal_1399++;
				}
				break;
			
			case 7:
				if (func_236("FM2_JSHLP3"))
				{
					if (!iLocal_1402)
					{
						ui::clear_help(0);
						iLocal_1402 = 1;
					}
				}
				else
				{
					iLocal_1400 = gameplay::get_game_timer();
					iLocal_1399++;
				}
				break;
		}
	}
	else if ((func_236("FM2_JSHLP1") || func_236("FM2_JSHLP2")) || func_236("FM2_JSHLP3"))
	{
		ui::clear_help(1);
	}
}

int func_236(char* sParam0)//Position - 0x2333F
{
	ui::_0x0A24DA3A41B718F5(sParam0);
	return ui::_0x10BDDBFC529428DD(0);
}

void func_237(char* sParam0, int iParam1)//Position - 0x23352
{
	ui::_set_text_component_format(sParam0);
	ui::_display_help_text_from_string_label(0, 0, true, iParam1);
}

void func_238()//Position - 0x23369
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4;
	float fVar7;
	int iVar8;
	
	if (vehicle::is_vehicle_driveable(iLocal_111, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
	{
		iVar0 = 0;
		while (iVar0 <= 1)
		{
			if ((vehicle::is_vehicle_driveable(iLocal_123[iVar0], 0) && !ped::is_ped_injured(iLocal_126[iVar0])) && ped::is_ped_sitting_in_vehicle(iLocal_126[iVar0], iLocal_123[iVar0]))
			{
				vVar1 = { entity::get_entity_coords(iLocal_123[iVar0], 1) };
				vVar4 = { entity::get_entity_coords(iLocal_111, 1) };
				if (system::vdist2(vVar4, Local_853[0 /*7*/]) > 100f && system::vdist2(vVar4, Local_853[1 /*7*/]) > 100f)
				{
					if (system::vdist2(vVar4, Local_853[iVar0 /*7*/]) > 400f)
					{
						if (func_239(iLocal_123[iVar0], iLocal_111, iLocal_137, vVar4, entity::get_entity_rotation(iLocal_111, 2)))
						{
							Local_853[iVar0 /*7*/] = { vVar4 };
							Local_853[iVar0 /*7*/].f_3 = { entity::get_entity_rotation(iLocal_111, 2) };
							Local_853[iVar0 /*7*/].f_6 = system::vmag(entity::get_entity_velocity(iLocal_123[iVar0]));
						}
					}
				}
				if (!func_224(Local_853[iVar0 /*7*/]) && Local_853[iVar0 /*7*/].f_2 < 1f)
				{
					if (!entity::is_entity_occluded(iLocal_123[iVar0]))
					{
						iLocal_871[iVar0] = gameplay::get_game_timer();
					}
					else if ((gameplay::get_game_timer() - iLocal_871[iVar0]) > 1000 && (gameplay::get_game_timer() - iLocal_868[iVar0]) > 2000)
					{
						if (!cam::is_sphere_visible(Local_853[iVar0 /*7*/], 3f) && !cam::is_sphere_visible(vVar1, 3f))
						{
							fVar7 = 99f;
							iVar8 = 0;
							if (iVar0 == 0)
							{
								iVar8 = 1;
							}
							if (vehicle::is_vehicle_driveable(iLocal_123[iVar8], 0))
							{
								fVar7 = system::vdist(entity::get_entity_coords(iLocal_123[iVar8], 1), Local_853[iVar0 /*7*/]);
							}
							if ((((system::vdist2(vVar1, vVar4) > 225f && system::vdist2(vVar1, Local_853[iVar0 /*7*/]) < system::vdist2(vVar1, vVar4)) && system::vdist2(vVar4, Local_853[iVar0 /*7*/]) > 225f) && fVar7 > 5f) && func_239(iLocal_123[iVar0], iLocal_111, iLocal_137, Local_853[iVar0 /*7*/], Local_853[iVar0 /*7*/].f_3))
							{
								gameplay::clear_area_of_peds(Local_853[iVar0 /*7*/], 3f, 0);
								gameplay::clear_area_of_vehicles(Local_853[iVar0 /*7*/], 3f, 0, 0, 0, 0, false);
								entity::set_entity_coords(iLocal_123[iVar0], Local_853[iVar0 /*7*/], 1, false, 0, 1);
								entity::set_entity_rotation(iLocal_123[iVar0], Local_853[iVar0 /*7*/].f_3, 2, 1);
								vehicle::set_vehicle_forward_speed(iLocal_123[iVar0], (Local_853[iVar0 /*7*/].f_6 + 5f));
								ai::task_vehicle_chase(iLocal_126[iVar0], player::player_ped_id());
								vehicle::set_vehicle_engine_on(iLocal_123[iVar0], true, 1, 0);
								iLocal_868[iVar0] = gameplay::get_game_timer();
							}
						}
					}
				}
			}
			iVar0++;
		}
	}
}

int func_239(int iParam0, int iParam1, int iParam2, vector3 vParam3, vector3 vParam6)//Position - 0x2365A
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4;
	vector3 vVar7;
	vector3 vVar10;
	vector3 vVar13;
	var uVar16;
	float fVar19;
	float fVar20;
	float fVar21;
	float fVar22;
	float fVar23;
	vector3 vVar24;
	int iVar27;
	var uVar28;
	var uVar31;
	var uVar34;
	int iVar35;
	
	if (entity::does_entity_exist(iParam2))
	{
		gameplay::get_model_dimensions(entity::get_entity_model(iParam0), &vVar7, &vVar10);
		gameplay::get_model_dimensions(entity::get_entity_model(iParam1), &vVar13, &uVar16);
		fVar19 = gameplay::absf((vVar10.y - vVar7.y));
		fVar20 = gameplay::absf((vVar10.x - vVar7.x));
		fVar21 = gameplay::absf((vVar10.y - vVar7.y));
		if (fVar20 > fVar19)
		{
			fVar22 = (fVar20 / 2f);
			fVar23 = (fVar22 - gameplay::absf(vVar7.y));
		}
		else
		{
			fVar22 = (fVar21 / 2f);
			fVar23 = (fVar22 - gameplay::absf(vVar7.x));
		}
		vVar24.z = (vVar24.y + (vVar13.y - vVar7.y));
		entity::set_entity_coords(iParam2, vParam3, 1, false, 0, 1);
		entity::set_entity_rotation(iParam2, vParam6, 2, 1);
		vVar1 = { entity::get_offset_from_entity_in_world_coords(iParam2, Vector((fVar23 * 1.25f), ((fVar21 / 2f) - (fVar22 * 0.75f)), 0f) + vVar24) };
		vVar4 = { entity::get_offset_from_entity_in_world_coords(iParam2, Vector((fVar23 * 1.25f), ((-fVar21 / 2f) + (fVar22 * 0.75f)), 0f) + vVar24) };
		iVar35 = worldprobe::_cast_3d_ray_point_to_point(vVar4, vVar1, fVar22, 19, player::player_ped_id(), 4);
		if (worldprobe::_get_raycast_result(iVar35, &iVar27, &uVar28, &uVar31, &uVar34) != 2)
		{
		}
		if (iVar27 != 0)
		{
			iVar0 = 0;
		}
		else
		{
			iVar0 = 1;
		}
	}
	return iVar0;
}

void func_240(int iParam0, float fParam1)//Position - 0x23790
{
	if (iParam0)
	{
		gameplay::_0xA8434F1DFF41D6E7(fParam1);
		gameplay::_0x31727907B2C43C55(0.35f);
		gameplay::_0x405591EC8FD9096D(0.3f);
		gameplay::_0xF751B16FB32ABC1D(0.25f);
		gameplay::_0xB3E6360DDE733E82(0.35f);
		gameplay::_0xB8F87EAD7533B176(0.4f);
		gameplay::_0xC3EAD29AB273ECE8(0.25f);
		gameplay::_0xA7A1127490312C36(0.55f);
		gameplay::_0x7C9C0B1EEB1F9072(0.45f);
		gameplay::_0xB9854DFDE0D833D6(0.5f);
		gameplay::_0x9F5E6BB6B34540DA(0.6f);
		gameplay::_0x6216B116083A7CB4(0.25f);
		gameplay::_0xC54A08C85AE4D410(0.75f);
	}
	else
	{
		gameplay::_0xC3C221ADDDE31A11(fParam1);
	}
}

void func_241()//Position - 0x23818
{
	vLocal_1061[0 /*3*/] = { -1237.274f, -923.97f, 5.135533f };
	vLocal_1077[0 /*3*/] = { -985.1348f, -1359.68f, -7.479084f };
	fLocal_1093[0] = 23f;
	vLocal_1061[1 /*3*/] = { -1003.908f, -914.4536f, -1.611186f };
	vLocal_1077[1 /*3*/] = { -880.5477f, -1124.602f, 6.150022f };
	fLocal_1093[1] = 29f;
	vLocal_1061[2 /*3*/] = { -1169.471f, -1027.087f, 5.78508f };
	vLocal_1077[2 /*3*/] = { -1003.961f, -932.3284f, -2.993861f };
	fLocal_1093[2] = 29f;
	vLocal_1061[3 /*3*/] = { -1116.554f, -1119.791f, 5.784778f };
	vLocal_1077[3 /*3*/] = { -950.7761f, -1023.823f, -1.496439f };
	fLocal_1093[3] = 29f;
	vLocal_1061[4 /*3*/] = { -1062.391f, -1213.474f, -2.315868f };
	vLocal_1077[4 /*3*/] = { -897.3085f, -1116.901f, 4.92553f };
	fLocal_1093[4] = 29f;
}

void func_242()//Position - 0x2393D
{
	vLocal_981[0 /*3*/] = { -2033.74f, -1004.776f, 1f };
	vLocal_981[1 /*3*/] = { -1801.432f, -975.5541f, 1f };
	vLocal_981[2 /*3*/] = { -1796.255f, -988.166f, 1f };
	vLocal_981[3 /*3*/] = { -2012.245f, -1073.776f, 1f };
	vLocal_994[5 /*3*/] = { -1241.138f, -933.0004f, 1f };
	vLocal_994[4 /*3*/] = { -1227.203f, -924.2169f, 1f };
	vLocal_994[3 /*3*/] = { -1240.015f, -751.6861f, 1f };
	vLocal_994[2 /*3*/] = { -1431.875f, -747.558f, 1f };
	vLocal_994[1 /*3*/] = { vLocal_981[1 /*3*/] };
	vLocal_994[0 /*3*/] = { vLocal_981[2 /*3*/] };
	vLocal_1013[0 /*3*/] = { -988.3516f, -908.0377f, 1f };
	vLocal_1013[1 /*3*/] = { -866.9206f, -1116.04f, 1f };
	vLocal_1013[2 /*3*/] = { -978.9424f, -1351.054f, 1f };
	vLocal_1013[3 /*3*/] = { -1007.62f, -1362.316f, 1f };
	vLocal_1013[4 /*3*/] = { vLocal_994[5 /*3*/] };
	vLocal_1013[5 /*3*/] = { vLocal_994[4 /*3*/] };
	vLocal_1032[0 /*3*/] = { vLocal_1013[3 /*3*/] };
	vLocal_1032[1 /*3*/] = { vLocal_1013[2 /*3*/] };
	vLocal_1032[2 /*3*/] = { -844.5858f, -1302.006f, 4.1001f };
	vLocal_1032[3 /*3*/] = { -768.9856f, -1524.338f, 4.98f };
	vLocal_1032[4 /*3*/] = { -1052.374f, -1553.313f, 13.0317f };
	vLocal_1048[0 /*3*/] = { vLocal_1032[4 /*3*/] };
	vLocal_1048[1 /*3*/] = { vLocal_1032[3 /*3*/] };
	vLocal_1048[2 /*3*/] = { -1165.894f, -1923.179f, 2.5698f };
	vLocal_1048[3 /*3*/] = { -1226.947f, -1873.531f, 4.8338f };
}

void func_243(int iParam0)//Position - 0x23B1C
{
	if (iParam0)
	{
		Global_15801 = 1;
	}
	else
	{
		Global_15801 = 0;
	}
}

void func_244(var uParam0, int iParam1)//Position - 0x23B34
{
	if ((uParam0[iParam1 /*10*/])->f_7 == 1)
	{
		(uParam0[iParam1 /*10*/])->f_7 = 0;
	}
}

int func_245()//Position - 0x23B51
{
	int iVar0;
	
	if (!entity::does_entity_exist(iLocal_106[0]))
	{
		streaming::request_model(joaat("csb_porndudes"));
		if (streaming::has_model_loaded(joaat("csb_porndudes")))
		{
			iLocal_106[0] = ped::create_ped(26, joaat("csb_porndudes"), -2028.336f, -1026.387f, 0.0897f, 222.4424f, 1, true);
			if (iLocal_145)
			{
				iVar0 = 0;
				while (iVar0 < 12)
				{
					ped::set_ped_component_variation(iLocal_106[0], iVar0, vLocal_146[iVar0 /*3*/][0], vLocal_146[iVar0 /*3*/][1], 0);
					iVar0++;
				}
			}
			ped::set_ped_dies_in_water(iLocal_106[0], 0);
			ped::set_ped_combat_attributes(iLocal_106[0], 17, true);
			ped::set_ped_lod_multiplier(iLocal_106[0], 1.75f);
			ped::set_blocking_of_non_temporary_events(iLocal_106[0], true);
			ai::task_look_at_entity(iLocal_106[0], player::player_ped_id(), -1, 4, 3);
		}
	}
	return entity::does_entity_exist(iLocal_106[0]);
}

int func_246()//Position - 0x23C1E
{
	int iVar0;
	int iVar1;
	
	iVar0 = 1;
	iVar1 = 0;
	while (iVar1 < 5)
	{
		vehicle::request_vehicle_recording(1, func_231(iVar1));
		vehicle::request_vehicle_recording(2, func_231(iVar1));
		if (!vehicle::has_vehicle_recording_been_loaded(1, func_231(iVar1)) || !vehicle::has_vehicle_recording_been_loaded(2, func_231(iVar1)))
		{
			iVar0 = 0;
		}
		iVar1++;
	}
	return iVar0;
}

bool func_247(int iParam0, int iParam1)//Position - 0x23C77
{
	vector3 vVar0;
	float fVar3;
	var uVar4;
	
	streaming::request_model(joaat("seashark"));
	streaming::request_model(joaat("csb_porndudes"));
	if (streaming::has_model_loaded(joaat("seashark")) && streaming::has_model_loaded(joaat("csb_porndudes")))
	{
		if (!entity::does_entity_exist(iLocal_123[iParam0]))
		{
			if (iParam0 == 0)
			{
				if (iParam1)
				{
					vVar0 = { -2023.64f, -1047.04f, 0.6916f };
					fVar3 = -108f;
				}
				else
				{
					vVar0 = { -2024.716f, -1046.387f, 0f };
					fVar3 = -108.9627f;
				}
			}
			else if (iParam1)
			{
				vVar0 = { -2027.4f, -1045.88f, 0.6916f };
				fVar3 = -108f;
			}
			else
			{
				vVar0 = { -2021.2f, -1046.926f, 0f };
				fVar3 = -84.578f;
			}
			if (water::get_water_height(vVar0, &uVar4))
			{
				vVar0.z = uVar4;
				iLocal_123[iParam0] = vehicle::create_vehicle(joaat("seashark"), vVar0, fVar3, 1, true);
				if (iParam0 == 0)
				{
					vehicle::set_vehicle_colour_combination(iLocal_123[iParam0], 3);
				}
				else
				{
					vehicle::set_vehicle_colour_combination(iLocal_123[iParam0], 1);
				}
				vehicle::_0xE842A9398079BD82(iLocal_123[iParam0], 100f);
				vehicle::set_boat_anchor(iLocal_123[iParam0], iParam1);
			}
		}
		if (entity::does_entity_exist(iLocal_123[iParam0]) && vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0))
		{
			entity::_0x3910051CCECDB00C(iLocal_123[iParam0], true);
			entity::set_entity_proofs(iLocal_123[iParam0], false, false, false, true, true, false, 0, false);
			vehicle::set_vehicle_doors_locked(iLocal_123[iParam0], 3);
			if (iParam1)
			{
				vehicle::set_vehicle_engine_on(iLocal_123[iParam0], false, 1, 0);
			}
			else
			{
				vehicle::set_vehicle_engine_on(iLocal_123[iParam0], true, 1, 0);
			}
			entity::_0xA80AE305E0A3044F(iLocal_123[iParam0], 0);
		}
		if (!entity::does_entity_exist(iLocal_126[iParam0]) && vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0))
		{
			if (!iParam1)
			{
				iLocal_126[iParam0] = ped::create_ped_inside_vehicle(iLocal_123[iParam0], 26, joaat("csb_porndudes"), -1, 1, true);
			}
			else
			{
				iLocal_126[iParam0] = ped::create_ped(26, joaat("csb_porndudes"), Vector(10.9101f, -1024.399f, -2068.027f) + Vector(0f, 0f, IntToFloat(iParam0)), 0f, 1, true);
			}
		}
		if (((entity::does_entity_exist(iLocal_126[iParam0]) && !ped::is_ped_injured(iLocal_126[iParam0])) && entity::does_entity_exist(iLocal_123[iParam0])) && vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0))
		{
			if (!iParam1)
			{
				entity::freeze_entity_position(iLocal_126[iParam0], false);
				if (!ped::is_ped_in_vehicle(iLocal_126[iParam0], iLocal_123[iParam0], 0))
				{
					ped::set_ped_into_vehicle(iLocal_126[iParam0], iLocal_123[iParam0], -1);
				}
			}
			else
			{
				entity::freeze_entity_position(iLocal_126[iParam0], true);
			}
			ped::_set_ped_ragdoll_flag(iLocal_126[iParam0], 1);
			entity::set_entity_proofs(iLocal_126[iParam0], false, false, false, true, true, false, 0, false);
			weapon::give_weapon_to_ped(iLocal_126[iParam0], joaat("weapon_pistol"), -1, false, true);
			ped::set_ped_combat_attributes(iLocal_126[iParam0], 3, false);
			ped::set_ped_combat_attributes(iLocal_126[iParam0], 1, true);
			ped::set_ped_combat_ability(iLocal_126[iParam0], 0);
			ped::set_ped_combat_range(iLocal_126[iParam0], 2);
			ped::set_ped_accuracy(iLocal_126[iParam0], 0);
			ped::set_ped_shoot_rate(iLocal_126[iParam0], 15);
			entity::set_entity_load_collision_flag(iLocal_126[iParam0], true);
			entity::_0x3910051CCECDB00C(iLocal_126[iParam0], true);
			ped::set_ped_can_be_dragged_out(iLocal_126[iParam0], 0);
			ped::set_ped_can_be_shot_in_vehicle(iLocal_126[iParam0], 1);
			ped::set_ped_relationship_group_hash(iLocal_126[iParam0], iLocal_90);
			ped::set_ped_get_out_upside_down_vehicle(iLocal_126[iParam0], 0);
			if (iParam0 == 0)
			{
				ped::set_ped_component_variation(iLocal_126[iParam0], 0, 2, 0, 0);
				ped::set_ped_component_variation(iLocal_126[iParam0], 3, 2, 0, 0);
				ped::set_ped_component_variation(iLocal_126[iParam0], 4, 2, 0, 0);
				ped::set_ped_prop_index(iLocal_126[iParam0], 0, 0, 0, false);
			}
			else
			{
				ped::set_ped_component_variation(iLocal_126[iParam0], 0, 1, 0, 0);
				ped::set_ped_component_variation(iLocal_126[iParam0], 3, 1, 0, 0);
				ped::set_ped_component_variation(iLocal_126[iParam0], 4, 1, 0, 0);
				ped::set_ped_prop_index(iLocal_126[iParam0], 1, 1, 0, false);
			}
		}
	}
	if ((((entity::does_entity_exist(iLocal_126[iParam0]) && entity::does_entity_exist(iLocal_123[iParam0])) && !ped::is_ped_injured(iLocal_126[iParam0])) && vehicle::is_vehicle_driveable(iLocal_123[iParam0], 0)) && (ped::is_ped_in_vehicle(iLocal_126[iParam0], iLocal_123[iParam0], 0) || iParam1))
	{
		return true;
	}
	return false;
}

bool func_248()//Position - 0x24083
{
	vehicle::request_vehicle_recording(101, "famtwo");
	vehicle::request_vehicle_recording(102, "famtwo");
	vehicle::request_vehicle_recording(201, "famtwo");
	vehicle::request_vehicle_recording(202, "famtwo");
	vehicle::request_vehicle_recording(301, "famtwo");
	vehicle::request_vehicle_recording(302, "famtwo");
	vehicle::request_vehicle_recording(1, "famtwoCanalsAlt");
	vehicle::request_vehicle_recording(1, "famtwoplayer");
	if ((((((vehicle::has_vehicle_recording_been_loaded(101, "famtwo") && vehicle::has_vehicle_recording_been_loaded(102, "famtwo")) && vehicle::has_vehicle_recording_been_loaded(201, "famtwo")) && vehicle::has_vehicle_recording_been_loaded(202, "famtwo")) && vehicle::has_vehicle_recording_been_loaded(301, "famtwo")) && vehicle::has_vehicle_recording_been_loaded(302, "famtwo")) && vehicle::has_vehicle_recording_been_loaded(1, "famtwoCanalsAlt"))
	{
		func_230(&uLocal_1099, 101, "famtwo");
		func_230(&uLocal_1112, 102, "famtwo");
		func_230(&uLocal_1125, 201, "famtwo");
		func_230(&uLocal_1171, 202, "famtwo");
		func_230(&uLocal_1217, 301, "famtwo");
		func_230(&uLocal_1242, 302, "famtwo");
		func_230(&uLocal_1343, 401, "famtwo");
		func_230(&uLocal_1362, 402, "famtwo");
		func_230(&uLocal_1318, 1, "famtwoCanalsAlt");
		return true;
	}
	return false;
}

int func_249()//Position - 0x241C0
{
	if (func_250(entity::get_entity_coords(player::player_ped_id(), 1), &vLocal_981, 0))
	{
		return 0;
	}
	if (func_250(entity::get_entity_coords(player::player_ped_id(), 1), &vLocal_994, 0))
	{
		return 1;
	}
	if (func_250(entity::get_entity_coords(player::player_ped_id(), 1), &vLocal_1013, 0))
	{
		if (!ped::is_ped_injured(iLocal_126[0]) && !entity::is_entity_dead(iLocal_126[0], 0))
		{
			return 2;
		}
		else if (iLocal_1393)
		{
			return 4;
		}
		else
		{
			return 3;
		}
	}
	if (func_250(entity::get_entity_coords(player::player_ped_id(), 1), &vLocal_1032, 0))
	{
		return 5;
	}
	if (func_250(entity::get_entity_coords(player::player_ped_id(), 1), &vLocal_1048, 0))
	{
		return 6;
	}
	return 7;
}

int func_250(vector3 vParam0, var uParam3, int iParam4)//Position - 0x24272
{
	int iVar0;
	int iVar1;
	
	if (*uParam3 < 3)
	{
	}
	iVar0 = 1;
	if (!func_251(vParam0, *(uParam3[0 /*3*/]), *(uParam3[(*uParam3 - 1) /*3*/])))
	{
		if (iParam4)
		{
		}
		iVar0 = 0;
	}
	iVar1 = 0;
	while (iVar1 < (*uParam3 - 1))
	{
		if (!func_251(vParam0, *(uParam3[iVar1 + 1 /*3*/]), *(uParam3[iVar1 /*3*/])))
		{
			if (iParam4)
			{
			}
			iVar0 = 0;
		}
		iVar1++;
	}
	return iVar0;
}

int func_251(struct<2> Param0, var uParam2, struct<2> Param3, var uParam5, struct<2> Param6, var uParam8)//Position - 0x242E8
{
	return (((Param6 - Param3) * (Param0.f_1 - Param3.f_1)) - ((Param6.f_1 - Param3.f_1) * (Param0 - Param3))) >= 0f;
}

void func_252()//Position - 0x24311
{
	int iVar0;
	int iVar1;
	vector3 vVar2;
	float fVar5;
	int iVar6;
	
	switch (iLocal_270)
	{
		case 0:
			iLocal_1421 = false;
			vehicle::request_vehicle_recording(1, "famtwoplayer");
			vehicle::request_vehicle_recording(101, "famtwo");
			vehicle::request_vehicle_recording(102, "famtwo");
			streaming::request_anim_dict("missfam2_tracy_jetski");
			if (!cutscene::is_cutscene_active())
			{
				cutscene::request_cutscene("family_2_mcs_3", 8);
				iLocal_270++;
			}
			else
			{
				iLocal_270 += 2;
			}
			iLocal_1420 = 0;
			break;
		
		case -1:
			streaming::request_ipl("smboat");
			while (!streaming::is_ipl_active("smBoat"))
			{
				system::wait(0);
			}
			iLocal_270 = 3;
			iLocal_266 = 0;
			break;
		
		case 1:
			if (cutscene::_0xB56BBBCC2955D9CB())
			{
				func_2("Michael", player::player_ped_id(), 0, 2);
				if (entity::does_entity_exist(iLocal_106[0]) && !ped::is_ped_injured(iLocal_106[0]))
				{
					cutscene::_0x2A56C06EBEF2B0D9("Guy_on_sofa", iLocal_106[0], 0);
				}
				if (entity::does_entity_exist(iLocal_106[1]) && !ped::is_ped_injured(iLocal_106[1]))
				{
					cutscene::_0x2A56C06EBEF2B0D9("Man_getting_wood", iLocal_106[1], 0);
				}
				if (entity::does_entity_exist(iLocal_106[2]) && !ped::is_ped_injured(iLocal_106[2]))
				{
					func_2("Girl_on_sofa", iLocal_106[2], 0, 2);
				}
				if (entity::does_entity_exist(iLocal_106[3]) && !ped::is_ped_injured(iLocal_106[3]))
				{
					func_2("Girl_being_chatted_up", iLocal_106[3], 0, 2);
				}
				if (entity::does_entity_exist(iLocal_103) && !ped::is_ped_injured(iLocal_103))
				{
					func_2("Tracy", iLocal_103, 0, 2);
				}
				iLocal_270++;
			}
			break;
		
		case 2:
			iVar0 = 0;
			if (func_247(0, 1) && func_247(1, 1))
			{
				iVar0 = 1;
			}
			if (iVar0 && vehicle::has_vehicle_recording_been_loaded(1, "famtwoplayer"))
			{
				iLocal_270++;
				if (iLocal_266)
				{
					iLocal_270 = -1;
				}
			}
			break;
		
		case 3:
			if (func_192())
			{
				iLocal_145 = false;
				func_184(1, 1, 1, 0);
				if (!ped::is_ped_injured(iLocal_103))
				{
					cutscene::register_entity_for_cutscene(iLocal_103, "Tracy", 0, 0, 0);
				}
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					vehicle::set_boat_anchor(iLocal_111, false);
					cutscene::register_entity_for_cutscene(iLocal_111, "Michaels_seashark", 0, 0, 0);
					vehicle::set_vehicle_engine_on(iLocal_111, false, 1, 0);
				}
				if (entity::does_entity_exist(iLocal_136))
				{
					cutscene::register_entity_for_cutscene(iLocal_136, "Prop_MP3_Dock", 0, 0, 0);
				}
				if (!ped::is_ped_injured(iLocal_126[0]))
				{
					entity::freeze_entity_position(iLocal_126[0], false);
					ped::set_ped_can_ragdoll(iLocal_126[0], 1);
					cutscene::register_entity_for_cutscene(iLocal_126[0], "Porn_Dude", 0, 0, 0);
				}
				if (!ped::is_ped_injured(iLocal_126[1]))
				{
					entity::freeze_entity_position(iLocal_126[1], false);
					ped::set_ped_can_ragdoll(iLocal_126[1], 1);
					cutscene::register_entity_for_cutscene(iLocal_126[1], "Porn_Dude^1", 0, 0, 0);
				}
				if (vehicle::is_vehicle_driveable(iLocal_123[0], 0))
				{
					cutscene::register_entity_for_cutscene(iLocal_123[0], "Porn_Dude_seashark", 0, 0, 0);
				}
				if (vehicle::is_vehicle_driveable(iLocal_123[1], 0))
				{
					cutscene::register_entity_for_cutscene(iLocal_123[1], "Porn_Dude_^1_seashark", 0, 0, 0);
				}
				if (entity::does_entity_exist(iLocal_106[0]) && !ped::is_ped_injured(iLocal_106[0]))
				{
					ped::set_ped_dies_in_water(iLocal_106[0], 0);
					ped::set_ped_combat_attributes(iLocal_106[0], 17, true);
					ped::set_ped_lod_multiplier(iLocal_106[0], 1.75f);
					ped::set_blocking_of_non_temporary_events(iLocal_106[0], true);
					ai::task_look_at_entity(iLocal_106[0], player::player_ped_id(), -1, 4, 3);
					iLocal_145 = true;
					cutscene::register_entity_for_cutscene(iLocal_106[0], "Guy_on_sofa", 0, 0, 0);
				}
				if (entity::does_entity_exist(iLocal_106[1]) && !ped::is_ped_injured(iLocal_106[1]))
				{
					cutscene::register_entity_for_cutscene(iLocal_106[1], "Man_getting_wood", 0, 0, 0);
				}
				if (entity::does_entity_exist(iLocal_106[2]) && !ped::is_ped_injured(iLocal_106[2]))
				{
					cutscene::register_entity_for_cutscene(iLocal_106[2], "Girl_on_sofa", 0, 0, 0);
				}
				if (entity::does_entity_exist(iLocal_106[3]) && !ped::is_ped_injured(iLocal_106[3]))
				{
					cutscene::register_entity_for_cutscene(iLocal_106[3], "Girl_being_chatted_up", 0, 0, 0);
				}
				cutscene::start_cutscene(2048);
				ui::clear_prints();
				ui::clear_help(1);
				unk1::_0x48621C9FCA3EBD28(4);
				func_153();
				func_197(7);
				func_183();
				audio::prepare_music_event("FAM2_NECK_GRAB");
				iLocal_1418 = false;
				iLocal_1419 = 0;
				iLocal_270++;
			}
			break;
		
		case 4:
			if (!cam::is_screen_faded_in() && !cam::is_screen_fading_in())
			{
				cam::do_screen_fade_in(500);
			}
			gameplay::clear_area(-2006.247f, -1043.832f, -1.481001f, 200f, 1, 0, 0, false);
			iLocal_270++;
			break;
		
		case 5:
			if (vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				if (cutscene::can_set_exit_state_for_registered_entity("Tracy", 0))
				{
					if (!ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
					{
						ped::set_ped_into_vehicle(iLocal_103, iLocal_111, 0);
						entity::set_entity_invincible(iLocal_103, true);
						ped::_0x2208438012482A1A(iLocal_103, 0, 0);
					}
				}
				if (cutscene::can_set_exit_state_for_camera(0))
				{
				}
				if (cutscene::can_set_exit_state_for_registered_entity("Porn_Dude", 0))
				{
				}
				if (cutscene::can_set_exit_state_for_registered_entity("Porn_Dude^1", 0))
				{
				}
				if (cutscene::can_set_exit_state_for_registered_entity("Porn_Dude_seashark", 0))
				{
				}
				if (cutscene::can_set_exit_state_for_registered_entity("Porn_Dude^1_seashark", 0))
				{
				}
				if (cutscene::can_set_exit_state_for_registered_entity("Michaels_seashark", 0))
				{
					if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
					{
						ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_111, -1);
					}
					func_240(1, 0f);
					vehicle::start_playback_recorded_vehicle(iLocal_111, 1, "famtwoplayer", 1);
					vehicle::set_playback_speed(iLocal_111, 0.66f);
					cam::set_gameplay_cam_relative_heading(0f);
					cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
					entity::set_entity_coords(iLocal_111, vLocal_218, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_111, fLocal_221);
					vehicle::set_vehicle_engine_on(iLocal_111, true, 1, 0);
					vehicle::set_vehicle_forward_speed(iLocal_111, 15f);
					vehicle::stop_playback_recorded_vehicle(iLocal_111);
					water::get_water_height(vLocal_218, &fLocal_1422);
					if (vehicle::is_vehicle_driveable(iLocal_111, 0))
					{
						entity::set_entity_coords(iLocal_111, vLocal_218.x, vLocal_218.y, fLocal_1422, 1, false, 0, 1);
						entity::set_entity_heading(iLocal_111, fLocal_221);
						vehicle::set_vehicle_engine_on(iLocal_111, true, 1, 0);
						vehicle::set_vehicle_forward_speed(iLocal_111, 17f);
						cam::set_gameplay_cam_relative_heading(0f);
						cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
					}
					iVar1 = 0;
					while (iVar1 < iLocal_123)
					{
						if (((entity::does_entity_exist(iLocal_123[iVar1]) && vehicle::is_vehicle_driveable(iLocal_123[iVar1], 0)) && entity::does_entity_exist(iLocal_126[iVar1])) && !ped::is_ped_injured(iLocal_126[iVar1]))
						{
							entity::freeze_entity_position(iLocal_126[iVar1], false);
							ped::set_ped_can_ragdoll(iLocal_126[iVar1], 1);
							vehicle::set_boat_anchor(iLocal_123[iVar1], false);
							if (!ped::is_ped_in_vehicle(iLocal_126[iVar1], iLocal_123[iVar1], 0))
							{
								ped::set_ped_into_vehicle(iLocal_126[iVar1], iLocal_123[iVar1], -1);
							}
							vVar2 = { entity::get_entity_coords(iLocal_123[iVar1], 1) };
							water::get_water_height(vVar2, &fVar5);
							entity::set_entity_coords(iLocal_123[iVar1], vVar2.x, vVar2.y, fVar5, 1, false, 0, 1);
							vehicle::set_vehicle_forward_speed(iLocal_123[iVar1], (10f + (2f * system::to_float(iVar1))));
						}
						iVar1++;
					}
					if (!cutscene::was_cutscene_skipped())
					{
						cam::destroy_all_cams(0);
						iLocal_142 = cam::create_cam("DEFAULT_SPLINE_CAMERA", false);
						cam::_0xD1B0F412F109EA5D(iLocal_142, 1);
						cam::_0x0FB82563989CF4FB(iLocal_142, cam::create_cam_with_params("DEFAULT_SCRIPTED_CAMERA", -2023.174f, -1052.98f, 1.529f, 2.1162f, 0f, -39.8484f, 50f, 1, 2), 0, 3);
						cam::_0x0FB82563989CF4FB(iLocal_142, cam::create_cam_with_params("DEFAULT_SCRIPTED_CAMERA", -2008.224f, -1037.217f, 1.8555f, -2.0921f, 0.0684f, -60.6791f, 50f, 1, 2), 1400, 1);
						cam::_0x0FB82563989CF4FB(iLocal_142, cam::create_cam_with_params("DEFAULT_SCRIPTED_CAMERA", -1985.437f, -1024.533f, 2.0868f, -3.9139f, 0f, -78.7979f, 50f, 1, 2), 1850, 3);
						cam::set_cam_active(iLocal_142, true);
						cam::point_cam_at_entity(iLocal_142, player::player_ped_id(), 0f, 0f, 0.3f, 1);
						cam::render_script_cams(true, false, 3000, 1, 0, 0);
						func_178(&uLocal_644, player::player_ped_id(), 0, 20f, 1000, 1000, 500, 0, 1045220557);
						system::settimerb(0);
					}
					else
					{
						iLocal_1421 = true;
						vehicle::stop_playback_recorded_vehicle(iLocal_111);
						func_240(1, 0.1f);
						water::get_water_height(vLocal_218, &fLocal_1422);
						if (vehicle::is_vehicle_driveable(iLocal_111, 0))
						{
							entity::set_entity_coords(iLocal_111, vLocal_218.x, vLocal_218.y, fLocal_1422, 1, false, 0, 1);
							entity::set_entity_heading(iLocal_111, fLocal_221);
							vehicle::set_vehicle_engine_on(iLocal_111, true, 1, 0);
							vehicle::set_vehicle_forward_speed(iLocal_111, 18f);
							cam::set_gameplay_cam_relative_heading(0f);
							cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
						}
					}
				}
			}
			if (!iLocal_1418)
			{
				if (audio::prepare_music_event("FAM2_NECK_GRAB") && cutscene::get_cutscene_time() > 31250)
				{
					audio::trigger_music_event("FAM2_NECK_GRAB");
					iLocal_1418 = true;
				}
			}
			if (!iLocal_1419)
			{
				if (cutscene::get_cutscene_time() > 9700)
				{
					audio::set_static_emitter_enabled("SE_FAMILY_2_BOAT_RADIO", false);
					iLocal_1419 = 1;
				}
			}
			if (cutscene::get_cutscene_time() > 37500)
			{
				if (!iLocal_1423)
				{
					func_240(1, 1065353216);
					iLocal_1423 = 1;
				}
			}
			if (!iLocal_1420)
			{
				if (cutscene::get_cutscene_time() > 45000)
				{
					if (!ped::is_ped_injured(iLocal_106[0]))
					{
						ai::task_go_straight_to_coord(iLocal_106[0], -2097.867f, -973.0261f, -1f, 2f, -1, 1193033728, 1056964608);
						iLocal_1420 = 1;
					}
				}
			}
			if (!iLocal_145)
			{
				if (entity::does_entity_exist(cutscene::get_entity_index_of_cutscene_entity("Guy_on_sofa", 0)) && !ped::is_ped_injured(entity::get_ped_index_from_entity_index(cutscene::get_entity_index_of_cutscene_entity("Guy_on_sofa", 0))))
				{
					iVar6 = 0;
					while (iVar6 < 12)
					{
						vLocal_146[iVar6 /*3*/][0] = ped::get_ped_drawable_variation(entity::get_ped_index_from_entity_index(cutscene::get_entity_index_of_cutscene_entity("Guy_on_sofa", 0)), iVar6);
						vLocal_146[iVar6 /*3*/][1] = ped::get_ped_texture_variation(entity::get_ped_index_from_entity_index(cutscene::get_entity_index_of_cutscene_entity("Guy_on_sofa", 0)), iVar6);
						iVar6++;
					}
					iLocal_145 = true;
				}
			}
			else if (!entity::does_entity_exist(iLocal_106[0]))
			{
				func_245();
			}
			if (cutscene::can_set_exit_state_for_camera(0))
			{
			}
			if (!cutscene::is_cutscene_active())
			{
				unk1::_0x81CBAE94390F9F89();
				ped::set_ped_stealth_movement(player::player_ped_id(), 0, 0);
				if (entity::does_entity_exist(iLocal_136))
				{
					object::delete_object(&iLocal_136);
					streaming::set_model_as_no_longer_needed(joaat("prop_mp3_dock"));
				}
				if (!iLocal_1418)
				{
					audio::trigger_music_event("FAM2_CS_SKIP");
				}
				func_184(0, 1, 1, 0);
				func_181();
				player::special_ability_charge_large(player::player_id(), 1, 0);
				if (!iLocal_1418)
				{
					audio::cancel_music_event("FAM2_GRAB_NECK");
				}
				system::settimera(0);
				if (!iLocal_1421)
				{
					iLocal_270++;
				}
				else
				{
					if (vehicle::is_vehicle_driveable(iLocal_111, 0) && vehicle::is_playback_going_on_for_vehicle(iLocal_111))
					{
						vehicle::stop_playback_recorded_vehicle(iLocal_111);
					}
					func_200(7);
				}
			}
			break;
		
		case 6:
			if (cam::get_follow_vehicle_cam_view_mode() != 4 && cam::get_follow_ped_cam_view_mode() != 4)
			{
				if (system::timerb() > 2350)
				{
					cam::render_script_cams(false, true, 1500, 0, 0, 0);
				}
				if (system::timerb() > 2500)
				{
					if (vehicle::is_vehicle_driveable(iLocal_111, 0))
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_111))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_111);
						}
						func_200(7);
					}
				}
			}
			else if (system::timerb() > 2350)
			{
				if (func_174(&uLocal_644, 1, 1, 1, 0, 1, 0))
				{
					cam::render_script_cams(false, true, 1500, 0, 0, 0);
					if (vehicle::is_playback_going_on_for_vehicle(iLocal_111))
					{
						vehicle::stop_playback_recorded_vehicle(iLocal_111);
					}
					func_253(&uLocal_644);
					func_200(7);
				}
			}
			break;
	}
}

void func_253(var uParam0)//Position - 0x24D78
{
	func_175(uParam0);
	*uParam0 = 0;
	uParam0->f_9 = { 0f, 0f, 0f };
}

void func_254()//Position - 0x24D93
{
	int iVar0;
	int iVar1;
	float fVar2;
	vector3 vVar3;
	vector3 vVar6;
	float fVar9;
	
	func_263();
	if (((entity::does_entity_exist(iLocal_111) && !vehicle::is_vehicle_driveable(iLocal_111, 0)) || (entity::does_entity_exist(iLocal_123[0]) && !vehicle::is_vehicle_driveable(iLocal_123[0], 0))) || (entity::does_entity_exist(iLocal_123[1]) && !vehicle::is_vehicle_driveable(iLocal_123[1], 0)))
	{
		func_103("FM2_TSPOOK");
	}
	if (!entity::does_entity_exist(iLocal_136))
	{
		func_262();
	}
	iVar0 = 0;
	while (iVar0 < iLocal_123)
	{
		if (!entity::does_entity_exist(iLocal_123[iVar0]))
		{
			func_247(iVar0, 1);
		}
		iVar0++;
	}
	iVar1 = false;
	iVar0 = 0;
	while (iVar0 < iLocal_106)
	{
		if (entity::does_entity_exist(iLocal_106[iVar0]))
		{
			if (ped::is_ped_injured(iLocal_106[iVar0]) || entity::is_entity_dead(iLocal_106[iVar0], 0))
			{
				func_103("FM2_TSPOOK");
			}
			iVar1 = true;
		}
		iVar0++;
	}
	if (iVar1)
	{
		if (((((((((((((((((gameplay::is_bullet_in_area(-2033.821f, -1031.864f, 4.89f, 5f, 1) || fire::is_explosion_in_sphere(4, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(0, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(1, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(20, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(19, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(3, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(15, -2033.821f, -1031.864f, 4.89f, 10f)) || fire::is_explosion_in_sphere(2, -2033.821f, -1031.864f, 4.89f, 10f)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_smokegrenade"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_rpg"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_grenade"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_grenadelauncher"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_grenadelauncher_smoke"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_smokegrenade"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_bzgas"), 5f, 1)) || gameplay::_0x34318593248C8FB2(-2033.821f, -1031.864f, 4.89f, joaat("weapon_molotov"), 5f, 1)) || (ped::is_ped_shooting_in_area(player::player_ped_id(), Vector(4.89f, -1031.864f, -2033.821f) - Vector(30f, 30f, 30f), Vector(4.89f, -1031.864f, -2033.821f) + Vector(30f, 30f, 30f), 0, 1) && !weapon::is_ped_current_weapon_silenced(player::player_ped_id())))
		{
			func_103("FM2_TSPOOK");
		}
	}
	if (!ui::does_blip_exist(iLocal_132))
	{
		iLocal_132 = func_208(-2034.37f, -1032.23f, 4.88f, 0);
		ui::set_blip_colour(iLocal_132, 3);
		ui::set_blip_scale(iLocal_132, 1f);
		ui::set_blip_name_from_text_file(iLocal_132, "FM2_YACHTL");
	}
	switch (iLocal_270)
	{
		case 0:
			if (!func_236("FM2_DIVOFF"))
			{
				func_237("FM2_DIVOFF", -1);
			}
			unk1::_0x293220DA1B46CEBC(0f, 10f, 4);
			func_156(&Local_676, cLocal_313, "FAM2_STOP", 8, 0, 0, 0);
			func_261(207, 0);
			func_197(6);
			system::settimera(0);
			if (controls::_is_input_disabled(0))
			{
				sLocal_950[2] = "FM2_USWIM1_KM";
				sLocal_950[0] = "FM2_SWIM_KM";
			}
			else if (cam::_0xEE778F8C7E1142E2(0) == 4)
			{
				sLocal_950[2] = "FM2_SWIM_FP";
				sLocal_950[0] = "FM2_SWIM_FP";
			}
			else
			{
				sLocal_950[2] = "FM2_USWIM1";
				sLocal_950[0] = "FM2_SWIM";
			}
			sLocal_950[3] = "FM2_USWIM2";
			sLocal_950[1] = "FM2_DIVE";
			sLocal_950[4] = "FM2_STAT1";
			sLocal_950[5] = "FM2_DROWN";
			iLocal_960[0] = "shouting_jimmy_idle_a";
			iLocal_960[1] = "shouting_jimmy_idle_b";
			iLocal_960[2] = "shouting_jimmy_idle_c";
			iLocal_964 = 0;
			iLocal_270++;
			iLocal_279 = -1;
			iLocal_967 = -1;
			iLocal_957 = -1;
			iLocal_965 = 0;
			iLocal_969 = false;
			iLocal_968 = 0;
			iLocal_289 = 0;
			streaming::request_anim_dict("missfam2ig_3");
			player::set_wanted_level_multiplier(0.1f);
			if (iLocal_266)
			{
				iLocal_270 = -1;
			}
			iLocal_966 = 1;
			break;
		
		case -1:
			streaming::request_ipl("smboat");
			while (!streaming::is_ipl_active("smBoat"))
			{
				system::wait(0);
			}
			if (cam::is_screen_faded_out())
			{
				ped::force_ped_motion_state(player::player_ped_id(), -1115154469, false, 0, 0);
				player::simulate_player_input_gait(player::player_id(), 3f, iLocal_282, 0, 1, 0);
			}
			iLocal_270 = 1;
			iLocal_266 = 0;
			break;
		
		case 1:
			if (cam::is_screen_faded_out() && !cam::is_screen_fading_in())
			{
				cam::do_screen_fade_in(500);
			}
			if (iLocal_966)
			{
				ped::set_ped_min_move_blend_ratio(player::player_ped_id(), 3f);
				if (system::timera() < 1000 || entity::is_entity_at_coord(player::player_ped_id(), -1871.083f, -1203.116f, 13.01658f, 2.5f, 2.5f, 3f, false, true, 0))
				{
					iLocal_966 = 0;
				}
			}
			if (iLocal_967 == -1 && (!func_170() || gameplay::get_profile_setting(203) == 0))
			{
				func_149("FM2_YACHT", 7500, 1);
				iLocal_967 = gameplay::get_game_timer();
			}
			fVar2 = system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_104, 1));
			if (streaming::has_anim_dict_loaded("missfam2ig_3"))
			{
				if (system::vdist(entity::get_entity_coords(iLocal_104, 1), -1859.264f, -1216.776f, 13.0174f) > 3f)
				{
					if (ai::get_script_task_status(iLocal_104, 713668775) != 1)
					{
						ai::clear_ped_tasks(iLocal_104);
						iLocal_957 = 0;
						ai::task_follow_nav_mesh_to_coord(iLocal_104, -1859.264f, -1216.776f, 13.0174f, 1f, -1, 0.25f, 0, 1193033728);
					}
				}
				else if (fVar2 < 900f)
				{
					if (!ped::is_ped_facing_ped(iLocal_104, player::player_ped_id(), 10f))
					{
						if (ai::get_script_task_status(iLocal_104, -875674219) != 1 && entity::is_entity_playing_anim(iLocal_104, "missfam2ig_3", "shouting_jimmy_base", 3))
						{
							ai::clear_ped_tasks(iLocal_104);
							ai::task_turn_ped_to_face_entity(iLocal_104, player::player_ped_id(), 0);
							ai::task_look_at_entity(iLocal_104, player::player_ped_id(), -1, 0, 2);
							iLocal_957 = 0;
						}
					}
					else
					{
						switch (iLocal_957)
						{
							case -1:
								streaming::request_anim_dict("missfam2ig_3");
								if (streaming::has_anim_dict_loaded("missfam2ig_3"))
								{
									iLocal_957 = 0;
								}
								break;
							
							case 0:
								if ((gameplay::get_game_timer() - iLocal_959) > 1000)
								{
									if (!entity::is_entity_playing_anim(iLocal_104, "missfam2ig_3", "shouting_jimmy_base", 3))
									{
										ai::task_play_anim(iLocal_104, "missfam2ig_3", "shouting_jimmy_base", 4f, -4f, -1, 49, 0f, 0, 0, 0);
									}
									else
									{
										iLocal_957++;
									}
									iLocal_959 = gameplay::get_game_timer();
								}
								break;
							
							case 1:
								if ((((gameplay::get_game_timer() - iLocal_967) > 5000 || gameplay::get_profile_setting(203) == 0) && fVar2 < 900f) && (iLocal_279 == -1 || (gameplay::get_game_timer() - iLocal_279) > 10000))
								{
									ai::clear_ped_tasks(iLocal_104);
									if (func_156(&Local_676, cLocal_313, "FAM2_STOP", 8, 0, 0, 0))
									{
										ai::task_play_anim(iLocal_104, "missfam2ig_3", iLocal_960[iLocal_958], 4f, -4f, -1, 48, 0f, 0, 0, 0);
										iLocal_279 = gameplay::get_game_timer();
										iLocal_957++;
									}
								}
								break;
							
							case 2:
								if ((gameplay::get_game_timer() - iLocal_279) > 1000)
								{
									if (!entity::is_entity_playing_anim(iLocal_104, "missfam2ig_3", iLocal_960[iLocal_958], 3))
									{
										ai::clear_ped_tasks(iLocal_104);
										iLocal_958++;
										if (iLocal_958 >= iLocal_960)
										{
											iLocal_958 = 0;
										}
										iLocal_957 = 0;
									}
								}
								break;
							}
						}
					}
			}
			if (!audio::is_audio_scene_active("FAMILY_2_DIVE_INTO_WATER"))
			{
				if (ped::is_ped_diving(player::player_ped_id()))
				{
					audio::start_audio_scene("FAMILY_2_DIVE_INTO_WATER");
				}
			}
			if (entity::is_entity_in_water(player::player_ped_id()) || system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_320) < 100f)
			{
				vVar3 = { entity::get_entity_coords(player::player_ped_id(), 1) };
				if (vVar3.y < 2f)
				{
					if (entity::does_entity_exist(iLocal_104))
					{
						entity::set_ped_as_no_longer_needed(&iLocal_104);
					}
					if (entity::does_entity_exist(iLocal_112))
					{
						entity::set_vehicle_as_no_longer_needed(&iLocal_112);
					}
					if (entity::does_entity_exist(iLocal_113))
					{
						entity::set_vehicle_as_no_longer_needed(&iLocal_113);
					}
				}
				if (audio::is_audio_scene_active("FAMILY_2_DIVE_INTO_WATER"))
				{
					audio::stop_audio_scene("FAMILY_2_DIVE_INTO_WATER");
				}
				iLocal_270++;
				system::settimera(0);
				if (func_236("FM2_DIVOFF"))
				{
					ui::clear_help(0);
				}
				streaming::remove_anim_dict("missfam2ig_3");
				audio::trigger_music_event("FAM2_SPLASH");
			}
			break;
		
		case 2:
			if (!func_236("FM2_DIVOFF") && system::timera() > 3000)
			{
				audio::set_audio_flag("DisableReplayScriptStreamRecording", 1);
				unk1::_0x293220DA1B46CEBC(3f, 10f, 4);
				iLocal_270++;
			}
			break;
		
		case 3:
			if (!iLocal_965)
			{
				if (audio::load_stream("FAM2_BOAT_PARTY_MASTER", 0))
				{
					audio::special_frontend_equal(-2032.599f, -1032.639f, 4.8831f);
					iLocal_965 = 1;
				}
			}
			func_256();
			if (ped::is_ped_swimming(player::player_ped_id()))
			{
				if (ped::is_ped_swimming_under_water(player::player_ped_id()))
				{
					if (!iLocal_969)
					{
						iLocal_969 = true;
					}
				}
				else if (iLocal_969)
				{
					if (!audio::is_audio_scene_active("FAMILY_2_SWIM_TO_YACHT"))
					{
						audio::start_audio_scene("FAMILY_2_SWIM_TO_YACHT");
					}
				}
			}
			if (((entity::is_entity_in_angled_area(player::player_ped_id(), -2033.124f, -1042.981f, 0f, -2028.863f, -1028.328f, 8.97435f, 18.25f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -2017.999f, -1035.053f, 5.946373f, -2023.154f, -1033.719f, 1.287564f, 3.25f, 0, true, 0)) && !ped::is_ped_in_any_vehicle(player::player_ped_id(), 0)) && !entity::is_entity_in_water(player::player_ped_id()))
			{
				audio::stop_stream();
				if (audio::is_audio_scene_active("FAMILY_2_SWIM_TO_YACHT"))
				{
					audio::stop_audio_scene("FAMILY_2_SWIM_TO_YACHT");
				}
				unk1::_0x293220DA1B46CEBC(5f, 4f, 3);
				func_200(6);
			}
			if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && entity::is_entity_in_angled_area(player::player_ped_id(), -2030.86f, -1035.417f, 7.882243f, -2006.247f, -1043.832f, -1.481001f, 21.25f, 0, true, 0))
			{
				audio::trigger_music_event("FAM2_NEAR_YACHT");
				iLocal_964 = 1;
				iLocal_270++;
			}
			if (!iLocal_964)
			{
				if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), -2017.155f, -1040.214f, 1.4499f) < 400f && !ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
				{
					audio::trigger_music_event("FAM2_NEAR_YACHT");
					iLocal_964 = 1;
				}
			}
			break;
		
		case 4:
			if (vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 0))
			{
				if (func_201(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 1093140480, 1, 1056964608, 0, 1, 0))
				{
					audio::set_audio_flag("DisableReplayScriptStreamRecording", 0);
					audio::stop_stream();
					if (audio::is_audio_scene_active("FAMILY_2_SWIM_TO_YACHT"))
					{
						audio::stop_audio_scene("FAMILY_2_SWIM_TO_YACHT");
					}
					unk1::_0x293220DA1B46CEBC(0f, 8f, 3);
					func_200(6);
				}
			}
			break;
	}
	if (func_255(&uLocal_944, &iLocal_942, &uLocal_943))
	{
		func_103("FM2_JSPOOK");
	}
	if (player::get_player_wanted_level(player::player_id()) > 0)
	{
		if (entity::does_entity_exist(iLocal_104) && system::vdist(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 30f)
		{
			func_103("FM2_JSPOOK");
		}
		else
		{
			func_145();
		}
	}
	if (!iLocal_968)
	{
		if (vehicle::is_vehicle_driveable(iLocal_111, 0))
		{
			vehicle::set_vehicle_doors_locked(iLocal_111, 3);
			iLocal_968 = 1;
		}
	}
	if (entity::is_entity_in_water(player::player_ped_id()))
	{
		controls::disable_control_action(0, 23, 1);
	}
	if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_320) > 250000f)
	{
		func_103("FM2_TRAAB");
	}
	if (!ped::is_ped_injured(iLocal_104))
	{
		vVar6 = { entity::get_entity_coords(iLocal_104, 1) };
		fVar9 = vVar6.y;
		if (fVar9 < 10f)
		{
			func_103("FM2_JIMHIT");
		}
	}
}

bool func_255(var uParam0, int iParam1, var uParam2)//Position - 0x259A7
{
	int iVar0;
	
	if (entity::does_entity_exist(iLocal_104))
	{
		if (!*uParam0)
		{
			if (ped::is_ped_shooting(player::player_ped_id()) || gameplay::is_bullet_in_area(entity::get_entity_coords(iLocal_104, 1), 10f, 1))
			{
				*uParam0 = 1;
			}
		}
		else if ((gameplay::get_game_timer() - *uParam2) > 200)
		{
			*iParam1++;
			*uParam2 = gameplay::get_game_timer();
			*uParam0 = 0;
		}
		if ((*iParam1 > 0 && !*uParam0) && (gameplay::get_game_timer() - *uParam2) > 1000)
		{
			*iParam1 = (*iParam1 - 1);
		}
		weapon::get_current_ped_weapon(player::player_ped_id(), &iVar0, 1);
		if (!func_170() && (gameplay::get_game_timer() - iLocal_280) > 7500)
		{
			func_195(iLocal_104, "GENERIC_SHOCKED_MED", "Jimmy", 3);
			iLocal_280 = gameplay::get_game_timer();
		}
		if ((((((((*iParam1 > 5 || gameplay::is_projectile_type_in_area(entity::get_entity_coords(iLocal_104, 1) + Vector(5f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(5f, 10f, 10f), joaat("weapon_grenade"), 0)) || gameplay::is_projectile_type_in_area(entity::get_entity_coords(iLocal_104, 1) + Vector(5f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(5f, 10f, 10f), joaat("weapon_grenadelauncher"), 0)) || gameplay::is_projectile_type_in_area(entity::get_entity_coords(iLocal_104, 1) + Vector(5f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(5f, 10f, 10f), joaat("weapon_grenadelauncher_smoke"), 0)) || gameplay::is_projectile_type_in_area(entity::get_entity_coords(iLocal_104, 1) + Vector(5f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(5f, 10f, 10f), joaat("weapon_rpg"), 0)) || gameplay::is_projectile_type_in_area(entity::get_entity_coords(iLocal_104, 1) + Vector(5f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(5f, 10f, 10f), joaat("weapon_molotov"), 0)) || gameplay::is_projectile_type_in_area(entity::get_entity_coords(iLocal_104, 1) + Vector(5f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(5f, 10f, 10f), joaat("weapon_bzgas"), 0)) || fire::is_explosion_in_area(2, entity::get_entity_coords(iLocal_104, 1) + Vector(2f, 10f, 10f), entity::get_entity_coords(iLocal_104, 1) - Vector(2f, 10f, 10f))) || (weapon::is_ped_armed(player::player_ped_id(), 4) && weapon::has_entity_been_damaged_by_weapon(iLocal_113, iVar0, 0)))
		{
			return true;
		}
	}
	return false;
}

void func_256()//Position - 0x25C0C
{
	iLocal_971 = iLocal_970;
	if (ped::is_ped_swimming(player::player_ped_id()))
	{
		if (ped::is_ped_swimming_under_water(player::player_ped_id()))
		{
			if (!gameplay::is_bit_set(iLocal_976, 5) && player::get_player_underwater_time_remaining(player::player_id()) <= 5f)
			{
				if (iLocal_970 != 5)
				{
					iLocal_970 = 5;
				}
			}
			else if (!ui::is_help_message_being_displayed())
			{
				if (!gameplay::is_bit_set(iLocal_976, 2))
				{
					if (iLocal_970 != 2)
					{
						iLocal_970 = 2;
					}
				}
				else if (!gameplay::is_bit_set(iLocal_976, 3))
				{
					if (iLocal_970 != 3)
					{
						iLocal_970 = 3;
					}
				}
				else if (!gameplay::is_bit_set(iLocal_976, 4))
				{
					if (iLocal_970 != 4)
					{
						iLocal_970 = 4;
					}
				}
			}
		}
		else if (!ui::is_help_message_being_displayed())
		{
			if (!gameplay::is_bit_set(iLocal_976, 0))
			{
				if (iLocal_970 != 0)
				{
					iLocal_970 = 0;
				}
			}
			else if (!gameplay::is_bit_set(iLocal_976, 1))
			{
				if (iLocal_970 != 1)
				{
					iLocal_970 = 1;
				}
			}
			else if (!gameplay::is_bit_set(iLocal_976, 4))
			{
				if (iLocal_970 != 4)
				{
					iLocal_970 = 4;
				}
			}
		}
	}
	if (iLocal_970 != iLocal_971)
	{
		iLocal_973 = 0;
		iLocal_972 = 0;
		iLocal_974 = 0;
		fLocal_975 = 0f;
	}
	if (!iLocal_972)
	{
		if ((iLocal_970 != 1 && iLocal_970 != 2) && iLocal_970 != 3)
		{
			if (func_259(sLocal_950[iLocal_970], 0))
			{
				iLocal_972 = 1;
			}
		}
		else if (cam::_0xEE778F8C7E1142E2(0) != 4)
		{
			if (func_259(sLocal_950[iLocal_970], 0))
			{
				iLocal_972 = 1;
			}
		}
		else
		{
			iLocal_972 = 1;
		}
	}
	else if (func_236(sLocal_950[iLocal_970]))
	{
		fLocal_975 = (fLocal_975 + gameplay::get_frame_time());
		if (fLocal_975 > 2f || !func_258(iLocal_970))
		{
			if (!gameplay::is_bit_set(iLocal_976, iLocal_970))
			{
				gameplay::set_bit(&iLocal_976, iLocal_970);
			}
			if (!iLocal_973 && func_258(iLocal_970))
			{
				if (func_257(iLocal_970))
				{
					iLocal_973 = 1;
				}
			}
			else if (!iLocal_974)
			{
				ui::clear_help(0);
				iLocal_974 = 1;
			}
		}
	}
}

bool func_257(int iParam0)//Position - 0x25DF8
{
	switch (iParam0)
	{
		case 2:
		case 0:
			if (controls::is_control_just_pressed(0, 21) && entity::get_entity_speed(player::player_ped_id()) > 4f)
			{
				return true;
			}
			break;
		
		case 1:
			if (ped::is_ped_swimming_under_water(player::player_ped_id()))
			{
				return true;
			}
			break;
		
		case 3:
			if (controls::is_control_just_pressed(0, 30) || controls::is_control_just_pressed(0, 31))
			{
				return true;
			}
			break;
		
		case 5:
			if (!ped::is_ped_swimming_under_water(player::player_ped_id()))
			{
				return true;
			}
			break;
	}
	return false;
}

bool func_258(int iParam0)//Position - 0x25E89
{
	if (ped::is_ped_swimming(player::player_ped_id()))
	{
		if (ped::is_ped_swimming_under_water(player::player_ped_id()))
		{
			if (((iParam0 == 5 || iParam0 == 3) || iParam0 == 2) || iParam0 == 4)
			{
				return true;
			}
		}
		else if ((iParam0 == 1 || iParam0 == 0) || iParam0 == 4)
		{
			return true;
		}
	}
	else
	{
		return false;
	}
	return false;
}

bool func_259(char* sParam0, int iParam1)//Position - 0x25EFA
{
	if (ui::is_help_message_being_displayed() && !func_236(sParam0))
	{
		ui::clear_help(1);
	}
	else if (iParam1)
	{
		func_260(sParam0);
	}
	else
	{
		func_237(sParam0, -1);
	}
	if (func_236(sParam0))
	{
		return true;
	}
	return false;
}

void func_260(char* sParam0)//Position - 0x25F40
{
	ui::_set_text_component_format(sParam0);
	ui::_display_help_text_from_string_label(0, 1, true, -1);
}

void func_261(int iParam0, int iParam1)//Position - 0x25F56
{
	int iVar0;
	
	Global_55828 = iParam0;
	if (!Global_55826)
	{
		Global_55826 = 1;
	}
	if (iParam1)
	{
		iVar0 = 0;
		while (iVar0 < Global_67913)
		{
			if (Global_67914[iVar0 /*9*/] == iParam0)
			{
				Global_67914[iVar0 /*9*/].f_1 = 0;
			}
			iVar0++;
		}
	}
}

int func_262()//Position - 0x25FA0
{
	if (!entity::does_entity_exist(iLocal_136))
	{
		streaming::request_model(joaat("prop_mp3_dock"));
		if (streaming::has_model_loaded(joaat("prop_mp3_dock")))
		{
			iLocal_136 = object::create_object(joaat("prop_mp3_dock"), -2032.539f, -1032.35f, 5.421927f, 1, true, false);
		}
	}
	if (entity::does_entity_exist(iLocal_136))
	{
		entity::set_entity_coords(iLocal_136, -2032.539f, -1032.35f, 5.421927f, 1, false, 0, 1);
		entity::set_entity_rotation(iLocal_136, 0f, 0f, 66.5523f, 2, 1);
	}
	return entity::does_entity_exist(iLocal_136);
}

void func_263()//Position - 0x2601B
{
	vector3 vVar0;
	
	switch (iLocal_977)
	{
		case 0:
			streaming::request_model(-1589092019);
			iLocal_977++;
			break;
		
		case 1:
			if (streaming::has_model_loaded(-1589092019))
			{
				iLocal_977++;
			}
			break;
		
		case 2:
			vVar0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
			if (vVar0.y < 1f)
			{
				iLocal_978 = ped::create_ped(26, -1589092019, -1885.497f, -1189.883f, -8.2945f, -136.1128f, 1, true);
				ai::task_go_straight_to_coord(iLocal_978, entity::get_entity_coords(player::player_ped_id(), 1), 1f, 20000, 1193033728, 1056964608);
				iLocal_977++;
			}
			break;
		
		case 3:
			if (func_264(iLocal_978, player::player_ped_id(), 1) > 20f || ai::get_script_task_status(iLocal_978, 2106541073) == 7)
			{
				streaming::set_model_as_no_longer_needed(-1589092019);
				entity::set_ped_as_no_longer_needed(&iLocal_978);
				iLocal_977++;
			}
			break;
	}
}

float func_264(int iParam0, int iParam1, int iParam2)//Position - 0x26115
{
	vector3 vVar0;
	vector3 vVar3;
	
	if (!entity::is_entity_dead(iParam0, 0))
	{
		vVar0 = { entity::get_entity_coords(iParam0, 1) };
	}
	else
	{
		vVar0 = { entity::get_entity_coords(iParam0, 0) };
	}
	if (!entity::is_entity_dead(iParam1, 0))
	{
		vVar3 = { entity::get_entity_coords(iParam1, 1) };
	}
	else
	{
		vVar3 = { entity::get_entity_coords(iParam1, 0) };
	}
	return gameplay::get_distance_between_coords(vVar0, vVar3, iParam2);
}

void func_265()//Position - 0x26173
{
	switch (iLocal_270)
	{
		case 0:
			if (!cutscene::is_cutscene_active())
			{
				cutscene::_request_cutscene_2("family_2_mcs_2", 6, 8);
				iLocal_270++;
			}
			else
			{
				iLocal_270 += 2;
			}
			break;
		
		case 1:
			if (cutscene::_0xB56BBBCC2955D9CB())
			{
				func_2("Michael", player::player_ped_id(), 0, 2);
				iLocal_270++;
			}
			break;
		
		case 2:
			func_153();
			if (func_192())
			{
				if (func_266("family_2_mcs_2"))
				{
					player::set_player_wanted_level(player::player_id(), 0, 0);
					player::set_player_wanted_level_now(player::player_id(), 0);
					func_184(1, 1, 1, 0);
					if (!ped::is_ped_injured(iLocal_104))
					{
						ped::set_ped_sweat(iLocal_104, 100f);
						cutscene::register_entity_for_cutscene(iLocal_104, "Jimmy", 0, 0, 0);
					}
					if (vehicle::is_vehicle_driveable(iLocal_112, 0))
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_112))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_112);
						}
					}
					if (vehicle::is_vehicle_driveable(iLocal_113, 0))
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_113))
						{
							entity::freeze_entity_position(iLocal_113, false);
							vehicle::stop_playback_recorded_vehicle(iLocal_113);
						}
						cutscene::register_entity_for_cutscene(iLocal_113, "FAM_2_Jimmys_bike", 0, 0, 0);
					}
					unk1::_0x48621C9FCA3EBD28(4);
					cutscene::start_cutscene(0);
					ui::clear_prints();
					ui::clear_help(1);
					func_183();
					ped::_0x39D55A620FCB6A3A(player::player_ped_id(), 3, 26, 0);
					ped::_0x39D55A620FCB6A3A(player::player_ped_id(), 4, 27, 0);
					if (audio::is_audio_scene_active("FAMILY_2_BIKE_RACE_JIMMY"))
					{
						audio::stop_audio_scene("FAMILY_2_BIKE_RACE_JIMMY");
					}
					audio::_0x149AEE66F0CB3A99(0f, 0f);
					iLocal_270++;
				}
				else
				{
					cutscene::remove_cutscene();
					cutscene::_request_cutscene_2("family_2_mcs_2", 5, 8);
				}
			}
			break;
		
		case 3:
			if (vehicle::is_vehicle_driveable(iLocal_112, 0))
			{
				if (iLocal_291)
				{
					entity::set_entity_coords(iLocal_112, -1848.195f, -1218.706f, 12.58357f, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_112, 129.3527f);
				}
				else
				{
					entity::set_entity_coords(iLocal_112, -1867.383f, -1212.198f, 12.57401f, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_112, -0.030485f);
				}
				vehicle::set_vehicle_on_ground_properly(iLocal_112, 1084227584);
				rope::activate_physics(iLocal_112);
			}
			gameplay::clear_area(-1859.045f, -1215.503f, 12.0665f, 2f, 1, 0, 0, false);
			if (!cam::is_screen_faded_in() && !cam::is_screen_fading_in())
			{
				cam::do_screen_fade_in(500);
			}
			ped::remove_ped_helmet(player::player_ped_id(), 1);
			iLocal_270++;
			break;
		
		case 4:
			if (cutscene::is_cutscene_active() && cutscene::is_cutscene_playing())
			{
				streaming::_0xA76359FC80B2438E(1.5f);
				if (cutscene::get_cutscene_time() > 90500)
				{
					controls::disable_control_action(2, 18, 1);
				}
			}
			if (cutscene::can_set_exit_state_for_registered_entity("Michael", 0))
			{
				unk1::_0x81CBAE94390F9F89();
				func_344(1, 0);
				cam::set_gameplay_cam_relative_heading(0f);
				cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
				ped::force_ped_motion_state(player::player_ped_id(), -1115154469, false, 1, 0);
				player::simulate_player_input_gait(player::player_id(), 3f, iLocal_282, 0, 1, 0);
				func_237("FM2_DIVOFF", -1);
			}
			if (!cutscene::is_cutscene_active())
			{
				ped::set_ped_stealth_movement(player::player_ped_id(), 0, 0);
				if (vehicle::is_vehicle_driveable(iLocal_113, 0))
				{
					entity::set_entity_coords_no_offset(iLocal_113, -1858.612f, -1214.563f, 12.307f, 0, 0, 1);
					entity::set_entity_quaternion(iLocal_113, 0.388f, -0.438f, 0.4777f, 0.6553f);
					entity::apply_force_to_entity(iLocal_113, 0, 0f, 0f, -0.01f, 0f, 0f, 0f, 0, 1, 1, 0, 0, 1);
				}
				ped::_0x5AAB586FFEC0FD96(player::player_ped_id());
				func_184(0, 1, 1, 0);
				func_181();
				func_200(5);
			}
			break;
	}
}

int func_266(char* sParam0)//Position - 0x26498
{
	int iVar0;
	
	iVar0 = cutscene::has_this_cutscene_loaded(sParam0);
	if (!Global_69696)
	{
		if (!iVar0)
		{
			Global_69696 = 1;
		}
	}
	return iVar0;
}

void func_267()//Position - 0x264BD
{
	int iVar0;
	float fVar1;
	float fVar2;
	
	player::set_all_random_peds_flee_this_frame(player::player_id());
	ped::set_ped_density_multiplier_this_frame(0.7f);
	if ((!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0) && ped::is_ped_in_any_vehicle(player::player_ped_id(), 0)) && vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 0))
	{
		if (((((vehicle::is_vehicle_model(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), joaat("cruiser")) || vehicle::is_vehicle_model(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), joaat("scorcher"))) || vehicle::is_vehicle_model(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), joaat("tribike"))) || vehicle::is_vehicle_model(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), joaat("tribike2"))) || vehicle::is_vehicle_model(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), joaat("tribike3"))) || vehicle::is_vehicle_model(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), joaat("bmx")))
		{
			entity::set_vehicle_as_no_longer_needed(&iLocal_112);
			iLocal_112 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
			iVar0 = 0;
			while (iVar0 < iLocal_115)
			{
				if (iLocal_115[iVar0] == ped::get_vehicle_ped_is_in(player::player_ped_id(), 0))
				{
					iLocal_115[iVar0] = 0;
				}
				iVar0++;
			}
			entity::set_entity_as_mission_entity(iLocal_112, true, 0);
		}
	}
	if (entity::does_entity_exist(iLocal_114) && vehicle::is_vehicle_driveable(iLocal_114, 0))
	{
		if ((system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_114, 1)) > 1000f && entity::is_entity_occluded(iLocal_114)) && !cam::is_sphere_visible(vLocal_222, 5f))
		{
			if (system::vdist2(vLocal_222, entity::get_entity_coords(iLocal_114, 1)) < 625f)
			{
				func_409(iLocal_114, vLocal_222 + Vector(1f, 0f, 0f), fLocal_225, 24, 0);
				func_408(24);
			}
			vehicle::delete_vehicle(&iLocal_114);
		}
	}
	if ((!ped::is_ped_injured(iLocal_104) && vehicle::is_vehicle_driveable(iLocal_113, 0)) && vehicle::is_vehicle_driveable(iLocal_112, 0))
	{
		if ((((entity::is_entity_in_angled_area(player::player_ped_id(), -1308.715f, -1310.135f, -22.62013f, -1171.372f, -1261.148f, 47.98976f, 250f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -1348.925f, -1155.041f, -20.53191f, -1163.36f, -1143.443f, 34.68446f, 142.25f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1386.385f, -1054.306f, -16.12128f, -1245.289f, -965.9915f, 32.39125f, 142.25f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1462.164f, -972.0999f, -20.40302f, -1332.72f, -833.9435f, 45.98875f, 227.25f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1178.163f, -1629.206f, 1.873874f, -1315.888f, -1365.294f, 25.02553f, 173.75f, 0, true, 0))
		{
			pathfind::set_ignore_no_gps_flag(1);
		}
		else
		{
			pathfind::set_ignore_no_gps_flag(0);
		}
		if ((entity::does_entity_exist(iLocal_112) && vehicle::is_vehicle_driveable(iLocal_112, 0)) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
		{
			if (!audio::is_audio_scene_active("FAMILY_2_BIKE_RACE_JIMMY"))
			{
				audio::start_audio_scene("FAMILY_2_BIKE_RACE_JIMMY");
			}
		}
		switch (iLocal_270)
		{
			case 0:
				fLocal_926 = 0f;
				ped::set_ped_can_be_knocked_off_vehicle(iLocal_104, 1);
				if (vehicle::is_playback_going_on_for_vehicle(iLocal_113))
				{
					vehicle::stop_playback_recorded_vehicle(iLocal_113);
				}
				iLocal_134 = func_209(iLocal_113, 0, 0);
				ui::set_blip_name_from_text_file(iLocal_134, "BLIP_280");
				ai::task_look_at_entity(iLocal_104, player::player_ped_id(), -1, 0, 2);
				iLocal_296 = 0;
				iLocal_295 = 0;
				iLocal_291 = false;
				iLocal_292 = 0;
				iLocal_927 = 0;
				iLocal_928 = (vLocal_929.x - 1);
				iLocal_942 = 0;
				iLocal_945 = false;
				vLocal_929[0 /*3*/] = { -1266.288f, -1689.561f, 3.4691f };
				vLocal_929[1 /*3*/] = { -1345.057f, -1263.89f, 3.8977f };
				vLocal_929[2 /*3*/] = { -1564.547f, -928.2069f, 12.0173f };
				vLocal_929[3 /*3*/] = { vLocal_255 };
				pathfind::set_ped_paths_in_area(Vector(5.75302f, -1325.827f, -1329.113f) + Vector(2.5f, 44f, 13.25f), Vector(5.75302f, -1325.827f, -1329.113f) - Vector(2.5f, 44f, 13.25f), false, 0);
				ped::set_scenario_peds_spawn_in_sphere_area(-1361.568f, -1207.053f, 3.4492f, 10f, 0);
				ped::set_scenario_peds_spawn_in_sphere_area(-1396.34f, -1059.049f, 3.2013f, 15f, 0);
				entity::set_entity_load_collision_flag(iLocal_104, true);
				entity::_0x3910051CCECDB00C(iLocal_104, true);
				entity::set_entity_load_collision_flag(iLocal_113, true);
				entity::_0x3910051CCECDB00C(iLocal_113, true);
				func_230(&uLocal_330, iLocal_269, sLocal_267);
				iLocal_270++;
				audio::_0x149AEE66F0CB3A99(0.5f, 0.5f);
				func_275(500);
				gameplay::_0xDC0F817884CDD856(1, false);
				gameplay::_0xDC0F817884CDD856(7, false);
				gameplay::_0xDC0F817884CDD856(2, false);
				gameplay::_0xDC0F817884CDD856(4, false);
				gameplay::_0xDC0F817884CDD856(10, false);
				gameplay::_0xDC0F817884CDD856(9, false);
				gameplay::_0xDC0F817884CDD856(8, false);
				streaming::request_ipl("smboat");
				break;
			
			case 1:
				if (ped::is_ped_in_vehicle(iLocal_104, iLocal_113, 0))
				{
					ai::task_vehicle_drive_to_coord(iLocal_104, iLocal_113, -1092.392f, -1708.092f, 3.2771f, 7f, 0, joaat("cruiser"), 786471, 3f, 4f);
					iLocal_270++;
				}
				else if (ai::get_script_task_status(iLocal_104, -1794415470) != 1)
				{
					ai::task_enter_vehicle(iLocal_104, iLocal_113, -1, -1, 3f, 1, 0);
				}
				break;
			
			case 2:
				if (entity::is_entity_at_coord(iLocal_113, -1092.392f, -1708.092f, 3.2771f, 4f, 4f, 4f, false, true, 0))
				{
					ai::clear_ped_tasks(iLocal_104);
					vehicle::start_playback_recorded_vehicle_using_ai(iLocal_113, iLocal_269, sLocal_267, 15f, 786549);
					iLocal_270++;
				}
				break;
			
			case 3:
				fLocal_949 = func_273(entity::get_entity_coords(player::player_ped_id(), 1), iLocal_269, sLocal_267, &uLocal_330);
				vLocal_946 = { vehicle::get_position_of_vehicle_recording_at_time(iLocal_269, fLocal_949, sLocal_267) };
				fLocal_926 = system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_946);
				if (iLocal_945)
				{
					if (fLocal_926 < 75f)
					{
						ui::remove_blip(&iLocal_132);
						iLocal_945 = false;
					}
					if (!iLocal_314)
					{
						func_147("FM2_RIDEBK", 7500, 1);
						iLocal_315 = gameplay::get_game_timer();
						iLocal_314 = 1;
					}
					if (fLocal_926 > 300f)
					{
						func_103("FM2_RACEFAIL");
					}
				}
				else
				{
					if ((gameplay::get_game_timer() - iLocal_315) > 20000)
					{
						iLocal_314 = 0;
					}
					if (ui::does_blip_exist(iLocal_135))
					{
						if (ui::does_blip_exist(iLocal_134))
						{
							ui::remove_blip(&iLocal_134);
						}
						if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_112, 1)) > 22500f)
						{
							func_103("FM2_BIKLOST");
						}
					}
					else if (!iLocal_291)
					{
						if (!ui::does_blip_exist(iLocal_134))
						{
							iLocal_134 = func_209(iLocal_113, 0, 0);
							ui::set_blip_name_from_text_file(iLocal_134, "BLIP_280");
						}
					}
					if (fLocal_926 > 150f)
					{
						ui::remove_blip(&iLocal_132);
						ui::remove_blip(&iLocal_134);
						ui::_0x67EEDEA1B9BAFD94();
						iLocal_928 = (vLocal_929.x - 1);
						iLocal_945 = true;
					}
				}
				if (entity::is_entity_at_entity(player::player_ped_id(), iLocal_104, 15f, 15f, 10f, 0, 1, 0) && !func_170())
				{
					if (gameplay::get_game_timer() - iLocal_927) > gameplay::get_random_int_in_range(1200, 1400)
					{
						func_195(iLocal_104, "BREATHING", "JIMMY_NORMAL", 24);
						iLocal_927 = gameplay::get_game_timer();
					}
				}
				if ((((((fire::is_explosion_in_area(2, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f)) || fire::is_explosion_in_area(0, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f))) || fire::is_explosion_in_area(1, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f))) || fire::is_explosion_in_area(4, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f))) || fire::is_explosion_in_area(7, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f))) || fire::is_explosion_in_area(10, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f))) || fire::is_explosion_in_area(25, entity::get_entity_coords(iLocal_104, 1) + Vector(3f, 3f, 3f), entity::get_entity_coords(iLocal_104, 1) - Vector(3f, 3f, 3f)))
				{
					ped::set_ped_can_be_knocked_off_vehicle(iLocal_104, 2);
				}
				if (iLocal_291)
				{
					if (!iLocal_289)
					{
						cutscene::_request_cutscene_2("family_2_mcs_2", 5, 8);
						iLocal_290 = 0;
						iLocal_289 = 1;
					}
					if (iLocal_289 && !iLocal_290)
					{
						if (cutscene::_0xB56BBBCC2955D9CB())
						{
							func_2("Michael", player::player_ped_id(), 0, 2);
							iLocal_290 = 1;
						}
					}
					if ((entity::is_entity_in_angled_area(player::player_ped_id(), -1811.906f, -1195.154f, 11.7672f, -1846.906f, -1237.279f, 19.5172f, 21.25f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -1816.365f, -1234.039f, 7.017199f, -1859.197f, -1241.141f, 22.87097f, 57.75f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -1856.623f, -1201.832f, 7.017204f, -1859.197f, -1241.141f, 22.87097f, 57.75f, 0, true, 0))
					{
						if (iLocal_290)
						{
							ui::remove_blip(&iLocal_132);
							ui::remove_blip(&iLocal_134);
							unk1::_0x293220DA1B46CEBC(12f, 5f, 4);
							func_200(4);
						}
					}
				}
				else
				{
					func_272();
					if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_207) < 10000f)
					{
						if (!iLocal_289)
						{
							cutscene::_request_cutscene_2("family_2_mcs_2", 6, 8);
							iLocal_289 = 1;
						}
						else if (!iLocal_290 && cutscene::_0xB56BBBCC2955D9CB())
						{
							func_2("Michael", player::player_ped_id(), 0, 2);
							iLocal_290 = 1;
						}
					}
					if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
					{
						if (entity::is_entity_at_coord(player::player_ped_id(), vLocal_255, Global_19, true, true, 0))
						{
							ui::remove_blip(&iLocal_132);
							ui::remove_blip(&iLocal_134);
							iLocal_270++;
						}
					}
				}
				break;
			
			case 4:
				if (func_201(iLocal_112, 30f, 1, 1056964608, 0, 1, 0))
				{
					player::set_player_control(player::player_id(), false, 256);
					ai::task_look_at_coord(player::player_ped_id(), -1823.195f, -1213.526f, 12.152f, -1, 0, 3);
					ai::task_leave_vehicle(player::player_ped_id(), iLocal_112, 0);
					iLocal_270++;
				}
				break;
			
			case 5:
				if (vehicle::is_vehicle_driveable(iLocal_112, 0) && !ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_112))
				{
					system::settimera(0);
					iLocal_270++;
				}
				break;
			
			case 6:
				if (system::timera() > 800)
				{
					unk1::_0x293220DA1B46CEBC(12f, 5f, 4);
					func_200(4);
				}
				break;
		}
		if (!ped::is_ped_injured(iLocal_104) && vehicle::is_vehicle_driveable(iLocal_113, 0))
		{
			if (func_255(&uLocal_944, &iLocal_942, &uLocal_943))
			{
				func_103("FM2_JSPOOK");
			}
			if (!iLocal_292)
			{
				if (iLocal_270 < 4)
				{
					fLocal_924 = func_273(entity::get_entity_coords(player::player_ped_id(), 1), iLocal_269, sLocal_267, &uLocal_330);
					fLocal_925 = func_273(entity::get_entity_coords(iLocal_104, 1), iLocal_269, sLocal_267, &uLocal_330);
					fVar1 = (fLocal_925 - fLocal_924);
					func_271(fVar1, fLocal_926, fLocal_924 > fLocal_925);
					if (entity::is_entity_at_coord(iLocal_104, vLocal_255, Global_19, false, true, 0))
					{
						entity::set_entity_collision(iLocal_113, true, 0);
						entity::_0x3910051CCECDB00C(iLocal_104, true);
						entity::_0x3910051CCECDB00C(iLocal_113, true);
						if (!iLocal_291)
						{
							cutscene::remove_cutscene();
							iLocal_289 = 0;
							iLocal_291 = true;
						}
						iLocal_292 = 1;
					}
				}
				else if ((!iLocal_291 && entity::is_entity_in_angled_area(iLocal_104, -1806.987f, -1191.762f, -42.98238f, -1854.44f, -1247.811f, 30.4819f, 90f, 0, true, 0)) && system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 36f)
				{
					ui::remove_blip(&iLocal_132);
					ui::remove_blip(&iLocal_134);
					func_200(4);
				}
			}
			if (iLocal_292 || (iLocal_270 >= 4 && !vehicle::is_playback_going_on_for_vehicle(iLocal_113)))
			{
				if (ped::is_ped_in_vehicle(iLocal_104, iLocal_113, 0))
				{
					if (!entity::is_entity_occluded(iLocal_104) && system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 2500f)
					{
						if (vehicle::is_playback_going_on_for_vehicle(iLocal_113))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_113);
						}
					}
					else
					{
						vehicle::stop_playback_recorded_vehicle(iLocal_113);
						entity::freeze_entity_position(iLocal_113, true);
					}
				}
			}
		}
		if (iLocal_270 < 4 && iLocal_270 > 0)
		{
			if (vehicle::is_vehicle_driveable(iLocal_112, 0) && entity::does_entity_exist(iLocal_112))
			{
				if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
				{
					if (!ui::does_blip_exist(iLocal_135))
					{
						ui::clear_prints();
						if (iLocal_674)
						{
							func_146(&Local_668);
						}
						iLocal_135 = func_209(iLocal_112, 0, 0);
					}
					if (ui::does_blip_exist(iLocal_132))
					{
						ui::remove_blip(&iLocal_132);
						iLocal_928 = (vLocal_929.x - 1);
						ui::_0x67EEDEA1B9BAFD94();
					}
					if (ui::does_blip_exist(iLocal_134))
					{
						ui::remove_blip(&iLocal_134);
					}
				}
				else
				{
					iLocal_674 = 1;
					if (iLocal_945)
					{
						if (!ui::does_blip_exist(iLocal_132))
						{
							fVar2 = func_234((fLocal_949 + 10000f), 20000f, vehicle::get_total_duration_of_vehicle_recording(iLocal_269, sLocal_267));
							iLocal_132 = func_208(vehicle::get_position_of_vehicle_recording_at_time(iLocal_269, fVar2, sLocal_267), 1);
						}
					}
					else
					{
						if (!ui::does_blip_exist(iLocal_132))
						{
							ui::clear_prints();
							iLocal_132 = func_208(vLocal_255, 0);
						}
						func_270(&vLocal_929, &iLocal_928);
					}
					if (ui::does_blip_exist(iLocal_135))
					{
						ui::remove_blip(&iLocal_135);
					}
				}
			}
		}
	}
	func_268();
}

void func_268()//Position - 0x27189
{
	if (entity::does_entity_exist(iLocal_112) && vehicle::is_vehicle_driveable(iLocal_112, 0))
	{
		switch (iLocal_271)
		{
			case 0:
				if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0) && !func_269())
				{
					if (!controls::_is_input_disabled(0))
					{
						func_237("FM2_BIKE1", -1);
					}
					else
					{
						func_237("FM2_BIKE1_KM", -1);
					}
					iLocal_271++;
				}
				break;
			
			case 1:
				if (!gameplay::is_pc_version())
				{
					if ((!func_236("FM2_BIKE1") && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0)) && !func_269())
					{
						func_237("FM2_BIKE2", -1);
						iLocal_271++;
					}
				}
				else if (((!func_236("FM2_BIKE1") && !func_236("FM2_BIKE1_KM")) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0)) && !func_269())
				{
					func_237("FM2_BIKE2", -1);
					iLocal_271++;
				}
				break;
			
			case 2:
				if ((!func_236("FM2_BIKE2") && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0)) && !func_269())
				{
					if (vehicle::is_vehicle_model(iLocal_112, joaat("bmx")) || vehicle::is_vehicle_model(iLocal_112, joaat("scorcher")))
					{
						func_237("FM2_BIKE3", -1);
					}
					iLocal_271++;
				}
				break;
			
			case 3:
				if (((!func_236("FM2_BIKE2") && !func_236("FM2_BIKE3")) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0)) && !func_269())
				{
					func_237("FM2_BIKE4", -1);
					iLocal_271++;
				}
				break;
		}
		if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0) || func_269())
		{
			if (gameplay::is_pc_version())
			{
				if (func_236("FM2_BIKE1_KM"))
				{
					ui::clear_help(1);
				}
			}
			if ((((func_236("FM2_BIKE1") || func_236("FM2_BIKE2")) || func_236("FM2_BIKE3")) || func_236("FM2_BIKE4")) || func_236("FM2_WHEELIE"))
			{
				ui::clear_help(1);
			}
		}
	}
}

var func_269()//Position - 0x273AA
{
	return Global_68127;
}

void func_270(int iParam0, int iParam1)//Position - 0x273B6
{
	int iVar0;
	int iVar1;
	float fVar2;
	vector3 vVar3;
	float fVar6;
	
	iVar0 = 0;
	iVar1 = -1;
	fVar2 = 0f;
	vVar3 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	iVar0 = 0;
	while (iVar0 < (*iParam0 - 1))
	{
		fVar6 = system::vdist2(vVar3, *(iParam0[iVar0 /*3*/]));
		if (iVar1 == -1 || fVar6 < fVar2)
		{
			iVar1 = iVar0;
			fVar2 = fVar6;
		}
		iVar0++;
	}
	if (system::vdist2(vVar3, *(iParam0[iVar1 + 1 /*3*/])) < system::vdist2(*(iParam0[iVar1 /*3*/]), *(iParam0[iVar1 + 1 /*3*/])))
	{
		iVar1++;
	}
	if (*iParam1 != iVar1)
	{
		if (*iParam1 >= 0 && system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), *(iParam0[*iParam1 /*3*/])) > 25f)
		{
			ui::_0x67EEDEA1B9BAFD94();
			ui::_0x3D3D15AF7BCAAF83(156, 1, 0);
			iVar0 = iVar1;
			while (iVar0 <= (*iParam0 - 1))
			{
				ui::_0xA905192A6781C41B(*(iParam0[iVar0 /*3*/]));
				iVar0++;
			}
			ui::_0xA905192A6781C41B(*(iParam0[(*iParam0 - 1) /*3*/]));
			ui::_0x3DDA37128DD1ACA8(1);
		}
		*iParam1 = iVar1;
	}
}

void func_271(float fParam0, float fParam1, int iParam2)//Position - 0x274C1
{
	float fVar0;
	
	fParam0 = gameplay::absf(fParam0);
	fVar0 = system::vdist(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1));
	if (vehicle::is_vehicle_driveable(iLocal_112, 0) && !ped::is_ped_injured(iLocal_104))
	{
		switch (iLocal_295)
		{
			case 0:
				iLocal_307 = 0;
				iLocal_308 = 0;
				iLocal_309 = 0;
				iLocal_310 = 0;
				iLocal_311 = 0;
				iLocal_298 = 0;
				iLocal_299 = 0;
				iLocal_300 = 0;
				if (iParam2 && fParam0 > 15000f)
				{
					iLocal_310 = 1;
				}
				if (!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0))
				{
					if (fVar0 < 35f)
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_PIER", 8, 0, 0, 0))
						{
							system::settimera(0);
							iLocal_295++;
						}
					}
					else
					{
						iLocal_295++;
					}
				}
				break;
			
			case 1:
				if (system::timera() > 2000)
				{
					if ((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_112))
					{
						system::settimera(0);
						ui::clear_prints();
						func_146(&Local_666);
						iLocal_295++;
					}
				}
				break;
			
			case 2:
				if ((system::timera() > 1000 && !func_170()) && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0))
				{
					if (fVar0 < 35f)
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_RACEM", 8, 0, 0, 0))
						{
							iLocal_295++;
						}
					}
				}
				else if (system::timera() > 15000)
				{
					iLocal_295++;
				}
				break;
			
			case 3:
				if ((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && fVar0 < 35f)
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_TRIA", 8, 0, 0, 0))
					{
						iLocal_295++;
					}
				}
				break;
			
			case 4:
				if (iParam2)
				{
					graphics::draw_debug_text_2d("Player in front", 0.01f, 0.68f, 0f, 0, 0, 255, 255);
				}
				else
				{
					graphics::draw_debug_text_2d("Jimmy in front", 0.01f, 0.68f, 0f, 0, 0, 255, 255);
				}
				if (iLocal_307)
				{
					graphics::draw_debug_text_2d("Michael take over line should fire", 0.01f, 0.7f, 0f, 0, 0, 255, 255);
				}
				if (iLocal_308)
				{
					graphics::draw_debug_text_2d("Jimmy take over line should fire", 0.01f, 0.72f, 0f, 0, 0, 255, 255);
				}
				if (iLocal_310)
				{
					graphics::draw_debug_text_2d("bPlayerHasCheated", 0.01f, 0.74f, 0f, 0, 0, 255, 255);
				}
				if (iLocal_311)
				{
					graphics::draw_debug_text_2d("bPlayerHasBumpedJimmy", 0.01f, 0.76f, 0f, 0, 0, 255, 255);
				}
				if (iParam2 != iLocal_849)
				{
					iLocal_850 = gameplay::get_game_timer();
					if (iParam2)
					{
						iLocal_307 = 1;
						iLocal_308 = 0;
						iLocal_297 = (gameplay::get_game_timer() - 10000);
					}
					else
					{
						iLocal_307 = 0;
						iLocal_308 = 1;
						iLocal_297 = (gameplay::get_game_timer() - 10000);
					}
				}
				if (iLocal_308)
				{
					if (((gameplay::get_game_timer() - iLocal_850) < 4000 && fVar0 < 30f) && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0))
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_STUFF", 8, 0, 0, 0))
						{
							iLocal_308 = 0;
						}
					}
					else
					{
						iLocal_308 = 0;
					}
				}
				if (iLocal_307)
				{
					if (((gameplay::get_game_timer() - iLocal_850) < 4000 && fVar0 < 30f) && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0))
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_PASS", 8, 0, 0, 0))
						{
							iLocal_307 = 0;
						}
					}
					else
					{
						iLocal_307 = 0;
					}
				}
				if (!iLocal_310 && !iLocal_311)
				{
					if (iParam2)
					{
						if (!func_170())
						{
							if ((gameplay::get_game_timer() - iLocal_851) > 10000)
							{
								if ((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && fVar0 < 35f)
								{
									if (func_156(&Local_676, cLocal_313, "FAM2_ROFF", 8, 0, 0, 0))
									{
										iLocal_851 = gameplay::get_game_timer();
									}
								}
							}
							else if ((gameplay::get_game_timer() - iLocal_851) < 5000 && (gameplay::get_game_timer() - iLocal_297) > 10000)
							{
								if ((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && fVar0 < 40f)
								{
									if (func_156(&Local_676, cLocal_313, "FAM2_FRONT", 8, 0, 0, 0))
									{
										iLocal_297 = gameplay::get_game_timer();
									}
								}
							}
						}
					}
					else if ((gameplay::get_game_timer() - iLocal_851) > 10000)
					{
						if (((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && fVar0 < 35f) && !iParam2)
						{
							if (func_156(&Local_676, cLocal_313, "FAM2_CLOSE", 8, 0, 0, 0))
							{
								iLocal_851 = gameplay::get_game_timer();
							}
						}
					}
					else if ((gameplay::get_game_timer() - iLocal_851) < 5000 && (gameplay::get_game_timer() - iLocal_297) > 10000)
					{
						if ((!func_170() && (!ui::is_message_being_displayed() || gameplay::get_profile_setting(203) == 0)) && fVar0 < 40f)
						{
							if (func_156(&Local_676, cLocal_313, "FAM2_BEH", 8, 0, 0, 0))
							{
								iLocal_297 = gameplay::get_game_timer();
							}
						}
					}
					if ((fVar0 < 5f && (gameplay::get_game_timer() - iLocal_298) > 1000) && (gameplay::get_game_timer() - iLocal_299) > 10000)
					{
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0) && entity::is_entity_touching_entity(iLocal_112, iLocal_113))
						{
							iLocal_311 = 1;
						}
						iLocal_298 = gameplay::get_game_timer();
					}
					if ((gameplay::get_game_timer() - iLocal_300) > 10000)
					{
						if (!iLocal_310)
						{
							if (fParam1 > 50f)
							{
								iLocal_310 = 1;
							}
						}
					}
				}
				else if (iLocal_310)
				{
					if ((fVar0 < 35f && !func_170()) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_CHEAT", 8, 0, 0, 0))
						{
							iLocal_300 = gameplay::get_game_timer();
							iLocal_310 = 0;
						}
					}
				}
				else if (iLocal_311)
				{
					if ((fVar0 < 35f && !func_170()) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_HIT", 8, 0, 0, 0))
						{
							iLocal_299 = gameplay::get_game_timer();
							iLocal_311 = 0;
						}
					}
				}
				if (!iLocal_309)
				{
					if (entity::is_entity_in_angled_area(iLocal_104, -1545.975f, -937.1822f, 10.33204f, -1556.068f, -928.8806f, 16.72215f, 3.75f, 0, true, 0) && fVar0 < 35f)
					{
						iLocal_295++;
						iLocal_297 = gameplay::get_game_timer();
						iLocal_309 = 1;
					}
				}
				break;
			
			case 5:
				if ((fVar0 < 35f && !func_170()) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_JEND", 8, 0, 0, 0))
					{
						iLocal_297 = gameplay::get_game_timer();
						iLocal_295++;
					}
				}
				if ((gameplay::get_game_timer() - iLocal_297) > 5000)
				{
					iLocal_295 = 4;
				}
				break;
			
			case 6:
				if ((fVar0 < 35f && !func_170()) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_ROFF", 8, 0, 0, 0))
					{
						iLocal_295 = 4;
					}
				}
				if ((gameplay::get_game_timer() - iLocal_297) > 5000)
				{
					iLocal_295 = 4;
				}
				break;
		}
		iLocal_849 = iParam2;
	}
}

void func_272()//Position - 0x27C48
{
	if (!ped::is_ped_injured(iLocal_104) && vehicle::is_vehicle_driveable(iLocal_113, 0))
	{
		if (ped::is_ped_in_vehicle(iLocal_104, iLocal_113, 0))
		{
			fLocal_924 = func_273(entity::get_entity_coords(player::player_ped_id(), 1), iLocal_269, sLocal_267, &uLocal_330);
			fLocal_925 = func_273(entity::get_entity_coords(iLocal_113, 1), iLocal_269, sLocal_267, &uLocal_330);
			if (!iLocal_922)
			{
				if (!iLocal_923)
				{
					if (entity::is_entity_in_angled_area(iLocal_104, -1572.474f, -994.6667f, 2.017392f, -1515.634f, -926.8091f, 29.12276f, 100f, 0, true, 0) || entity::is_entity_in_angled_area(iLocal_104, -1382.942f, -1442.319f, 3.013994f, -1367.638f, -1471.879f, 8.426488f, 22.25f, 0, true, 0))
					{
						if (vehicle::is_playback_using_ai_going_on_for_vehicle(iLocal_113) || vehicle::is_playback_going_on_for_vehicle(iLocal_113))
						{
							vehicle::stop_playback_recorded_vehicle(iLocal_113);
						}
						vehicle::start_playback_recorded_vehicle_using_ai(iLocal_113, iLocal_269, sLocal_267, 15f, 262144);
						iLocal_923 = 1;
					}
				}
				else if (!entity::is_entity_in_angled_area(iLocal_104, -1572.474f, -994.6667f, 2.017392f, -1515.634f, -926.8091f, 29.12276f, 100f, 0, true, 0) && !entity::is_entity_in_angled_area(iLocal_104, -1382.942f, -1442.319f, 3.013994f, -1367.638f, -1471.879f, 8.426488f, 22.25f, 0, true, 0))
				{
					if (vehicle::is_playback_using_ai_going_on_for_vehicle(iLocal_113) || vehicle::is_playback_going_on_for_vehicle(iLocal_113))
					{
						vehicle::stop_playback_recorded_vehicle(iLocal_113);
					}
					vehicle::start_playback_recorded_vehicle_using_ai(iLocal_113, iLocal_269, sLocal_267, 15f, 786549);
					iLocal_923 = 0;
				}
				if ((system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_104, 1)) > 10000f && fLocal_925 > 10f) && (vehicle::has_vehicle_recording_been_loaded(iLocal_269, sLocal_267) && fLocal_925 < (vehicle::get_total_duration_of_vehicle_recording(iLocal_269, sLocal_267) - 10f)))
				{
					if ((entity::is_entity_occluded(iLocal_104) && entity::is_entity_occluded(iLocal_113)) && !cam::is_sphere_visible(vehicle::get_position_of_vehicle_recording_at_time(iLocal_269, fLocal_925, sLocal_267), 4f))
					{
						entity::set_entity_collision(iLocal_113, false, 0);
						vehicle::stop_playback_recorded_vehicle(iLocal_113);
						vehicle::start_playback_recorded_vehicle(iLocal_113, iLocal_269, sLocal_267, 1);
						vehicle::skip_time_in_playback_recorded_vehicle(iLocal_113, fLocal_925);
						iLocal_922 = 1;
					}
				}
			}
			else if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_104, 1)) < 9025f)
			{
				if (vehicle::is_playback_going_on_for_vehicle(iLocal_113))
				{
					entity::set_entity_collision(iLocal_113, true, 0);
					vehicle::set_playback_to_use_ai(iLocal_113, 786549);
					iLocal_922 = 0;
				}
			}
		}
		else if (ai::get_script_task_status(iLocal_104, -1794415470) != 1)
		{
			ai::task_enter_vehicle(iLocal_104, iLocal_113, 20000, -1, 2f, 1, 0);
		}
	}
}

float func_273(vector3 vParam0, int iParam3, char* sParam4, var uParam5)//Position - 0x27EE9
{
	int iVar0;
	int iVar1;
	int iVar2[3];
	float fVar6;
	float fVar7;
	float fVar8;
	float fVar9;
	int iVar10;
	float fVar11;
	float fVar12;
	float fVar13;
	float fVar14;
	int iVar15;
	vector3 vVar16;
	vector3 vVar19;
	vector3 vVar22;
	vector3 vVar25;
	int iVar28;
	float fVar29;
	float fVar30;
	
	if (vehicle::has_vehicle_recording_been_loaded(iParam3, sParam4))
	{
		iVar2[0] = (*uParam5 - 1);
		iVar2[1] = (*uParam5 - 2);
		iVar2[2] = (*uParam5 - 3);
		iVar0 = 0;
		while (iVar0 < *uParam5)
		{
			fVar6 = gameplay::absf((vParam0.x - (*uParam5)[iVar0 /*3*/]));
			fVar7 = gameplay::absf((vParam0.y - (uParam5[iVar0 /*3*/])->f_1));
			fVar8 = (fVar6 + fVar7);
			fVar9 = 0f;
			iVar10 = 0;
			iVar1 = 0;
			while (iVar1 < iVar2)
			{
				if (iVar0 != iVar2[iVar1])
				{
					fVar11 = gameplay::absf((vParam0.x - (*uParam5)[iVar2[iVar1] /*3*/]));
					fVar12 = gameplay::absf((vParam0.y - (uParam5[iVar2[iVar1] /*3*/])->f_1));
					fVar13 = (fVar11 + fVar12);
					if (fVar13 > fVar9)
					{
						iVar10 = iVar1;
						fVar9 = fVar13;
					}
				}
				iVar1++;
			}
			if (fVar8 < fVar9)
			{
				iVar2[iVar10] = iVar0;
			}
			iVar0++;
		}
		fVar14 = 999999f;
		iVar0 = 0;
		while (iVar0 < iVar2)
		{
			if (iVar2[iVar0] > 0)
			{
				vVar19 = { gameplay::_0x21C235BC64831E5A(vParam0, *(uParam5[iVar2[iVar0] /*3*/]), *(uParam5[(iVar2[iVar0] - 1) /*3*/]), 1) };
			}
			else
			{
				vVar19 = { *(uParam5[0 /*3*/]) };
			}
			if (iVar2[iVar0] < (*uParam5 - 2))
			{
				vVar22 = { gameplay::_0x21C235BC64831E5A(vParam0, *(uParam5[iVar2[iVar0] /*3*/]), *(uParam5[iVar2[iVar0] + 1 /*3*/]), 1) };
			}
			else
			{
				vVar22 = { *(uParam5[(*uParam5 - 1) /*3*/]) };
			}
			iVar28 = false;
			if (system::vdist2(vParam0, vVar19) < system::vdist2(vParam0, vVar22))
			{
				vVar25 = { vVar19 };
			}
			else
			{
				iVar28 = true;
				vVar25 = { vVar22 };
			}
			if (system::vdist2(vParam0, vVar25) < fVar14)
			{
				if (iVar28)
				{
					iVar15 = iVar2[iVar0];
				}
				else
				{
					iVar15 = (iVar2[iVar0] - 1);
				}
				fVar14 = system::vdist2(vParam0, vVar25);
				vVar16 = { vVar25 };
			}
			iVar0++;
		}
		iVar15 = func_274(iVar15, 0, (*uParam5 - 2));
		fVar29 = (vehicle::get_total_duration_of_vehicle_recording(iParam3, sParam4) / IntToFloat((*uParam5 - 1)));
		fVar30 = ((system::vdist(*(uParam5[iVar15 /*3*/]), vVar16) / system::vdist(*(uParam5[iVar15 /*3*/]), *(uParam5[iVar15 + 1 /*3*/]))) * fVar29);
		return (fVar30 + (IntToFloat(iVar15) * fVar29));
	}
	return 0f;
}

int func_274(int iParam0, int iParam1, int iParam2)//Position - 0x28145
{
	if (iParam0 > iParam2)
	{
		return iParam2;
	}
	else if (iParam0 < iParam1)
	{
		return iParam1;
	}
	return iParam0;
}

void func_275(int iParam0)//Position - 0x2816A
{
	if (!cam::is_screen_faded_in())
	{
		cam::do_screen_fade_in(iParam0);
		while (!cam::is_screen_faded_in())
		{
			system::wait(0);
		}
	}
}

void func_276()//Position - 0x28190
{
	int iVar0;
	struct<6> Var1;
	int iVar7;
	int iVar8;
	
	player::set_all_random_peds_flee_this_frame(player::player_id());
	player::set_areas_generator_orientation(player::player_id());
	ped::set_ped_density_multiplier_this_frame(0.4f);
	if (iLocal_270 != 1000)
	{
		if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 2500f)
		{
			iLocal_274 = iLocal_270;
			iLocal_270 = 1000;
		}
	}
	if (audio::is_audio_scene_active("FAMILY_2_DRIVE_TO_BEACH"))
	{
		if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			audio::stop_audio_scene("FAMILY_2_DRIVE_TO_BEACH");
		}
	}
	if (iLocal_192 && iLocal_270 > 1)
	{
		if ((gameplay::get_game_timer() - iLocal_921) < 2000)
		{
			ped::set_ped_min_move_blend_ratio(player::player_ped_id(), 1f);
		}
		else
		{
			iLocal_192 = 0;
		}
	}
	if (!ped::is_ped_injured(iLocal_104) && !ped::is_ped_injured(iLocal_105))
	{
		switch (iLocal_270)
		{
			case 0:
				iLocal_674 = 0;
				ped::remove_ped_from_group(iLocal_104);
				vehicle::request_vehicle_recording(iLocal_269, sLocal_267);
				streaming::request_anim_dict("veh@bicycle@mountain_f@front@base");
				iLocal_270++;
				iLocal_276 = 0;
				iLocal_277 = 0;
				iLocal_275 = 4;
				iLocal_920 = 0;
				iLocal_921 = gameplay::get_game_timer();
				player::set_wanted_level_multiplier(0.3f);
				if (iLocal_266)
				{
					iLocal_270 = -1;
				}
				break;
			
			case -1:
				func_100();
				if ((!ped::is_ped_injured(iLocal_105) && object::does_object_of_type_exist_at_coords(-1105.241f, -1697.025f, 3.3678f, 2f, -741944541, 0)) && ped::is_ped_using_scenario(iLocal_105, "PROP_HUMAN_SEAT_CHAIR"))
				{
					iLocal_266 = 0;
					iLocal_270 = 1;
				}
				break;
			
			case 1:
				iLocal_132 = func_208(vLocal_226, 0);
				if (iLocal_293)
				{
					func_149("FM2_BK2BIKE", 7500, 1);
					system::settimera(0);
				}
				ai::task_look_at_entity(player::player_ped_id(), iLocal_104, 40000, 4, 2);
				ai::task_look_at_entity(iLocal_104, player::player_ped_id(), 40000, 4, 2);
				iLocal_917 = 0;
				if (func_170())
				{
					Var1 = { func_304() };
					if (!gameplay::are_strings_equal("FAM2_HIRE1", &Var1))
					{
						func_167();
					}
				}
				iLocal_919 = 0;
				if (cam::is_screen_faded_out())
				{
					ped::force_ped_motion_state(player::player_ped_id(), -668482597, false, 0, 0);
				}
				iLocal_270++;
				break;
			
			case 2:
				if (Global_100699)
				{
					while (Global_100699)
					{
						system::wait(0);
					}
				}
				if (cam::is_screen_faded_out() && !cam::is_screen_fading_in())
				{
					cam::do_screen_fade_in(1000);
				}
				if (ped::is_ped_in_any_vehicle(iLocal_104, 1))
				{
					if (!func_170())
					{
						player::set_player_control(player::player_id(), true, 0);
						if (vehicle::is_vehicle_driveable(iLocal_114, 0) && ped::is_ped_in_vehicle(iLocal_104, iLocal_114, 0))
						{
							ai::task_leave_vehicle(iLocal_104, iLocal_114, 0);
						}
						else
						{
							ai::task_leave_any_vehicle(iLocal_104, 0, 0);
						}
					}
				}
				else
				{
					system::settimerb(0);
					iLocal_270++;
				}
				break;
			
			case 3:
				if (!ped::is_ped_injured(iLocal_104) && system::timera() > 3000)
				{
					if (!ped::is_ped_facing_ped(iLocal_104, player::player_ped_id(), 60f))
					{
						if (ai::get_script_task_status(iLocal_104, 242628503) != 1)
						{
							ai::clear_ped_tasks(iLocal_104);
							ai::task_look_at_entity(iLocal_104, player::player_ped_id(), -1, 16, 2);
							ai::open_sequence_task(&iLocal_643);
							ai::task_turn_ped_to_face_entity(0, player::player_ped_id(), 0);
							ai::task_look_at_entity(0, player::player_ped_id(), -1, 16, 2);
							ai::close_sequence_task(iLocal_643);
							ai::task_perform_sequence(iLocal_104, iLocal_643);
							ai::clear_sequence_task(&iLocal_643);
						}
					}
					else if (ai::get_script_task_status(iLocal_104, 242628503) != 1)
					{
						if (!ped::is_ped_injured(iLocal_104))
						{
							ai::task_look_at_entity(iLocal_104, player::player_ped_id(), -1, 16, 2);
						}
					}
					if (!ped::is_ped_injured(iLocal_105))
					{
						if ((system::vdist(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(iLocal_105, 1)) > (system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_105, 1)) + 0.3f) || entity::is_entity_in_angled_area(player::player_ped_id(), -1099.756f, -1700.726f, 3.349046f, -1111.517f, -1683.962f, 5.340389f, 7.25f, 0, true, 0)) || system::timera() > 6000)
						{
							ai::clear_ped_tasks(iLocal_104);
							iLocal_270++;
						}
					}
				}
				break;
			
			case 4:
				if (ai::get_script_task_status(iLocal_104, 242628503) != 1 || entity::is_entity_in_angled_area(player::player_ped_id(), -1099.756f, -1700.726f, 3.349046f, -1111.517f, -1683.962f, 5.340389f, 7.25f, 0, true, 0))
				{
					if (vehicle::is_vehicle_driveable(iLocal_114, 0))
					{
						player::set_player_control(player::player_id(), true, 0);
						entity::freeze_entity_position(iLocal_114, false);
					}
					ai::open_sequence_task(&iVar7);
					if (ped::is_ped_in_any_vehicle(iLocal_104, 0))
					{
						ai::task_leave_any_vehicle(0, 0, 0);
					}
					ai::task_follow_nav_mesh_to_coord(0, -1102.187f, -1697.891f, 3.3562f, 2f, 20000, 1048576000, 0, 1193033728);
					ai::task_turn_ped_to_face_entity(0, player::player_ped_id(), 0);
					ai::close_sequence_task(iVar7);
					ai::task_perform_sequence(iLocal_104, iVar7);
					ai::clear_sequence_task(&iVar7);
					ped::set_ped_max_move_blend_ratio(iLocal_104, 1f);
					iLocal_270++;
				}
				break;
			
			case 5:
				ped::set_ped_max_move_blend_ratio(iLocal_104, 1f);
				if (entity::is_entity_in_angled_area(player::player_ped_id(), -1099.756f, -1700.726f, 3.349046f, -1111.517f, -1683.962f, 5.340389f, 7.25f, 0, true, 0))
				{
					if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
					{
						func_153();
						if (func_156(&Local_676, cLocal_313, "FAM2_HIRE3", 8, 0, 0, 0))
						{
							ui::clear_prints();
							ai::task_look_at_entity(iLocal_105, player::player_ped_id(), 30000, 0, 2);
							ai::task_look_at_entity(player::player_ped_id(), iLocal_105, 10000, 0, 2);
							ui::remove_blip(&iLocal_132);
							system::settimera(0);
							iLocal_270++;
						}
					}
					else
					{
						iLocal_270++;
					}
				}
				break;
			
			case 6:
				if (vehicle::is_vehicle_driveable(iLocal_115[iLocal_275], 0) && !ped::is_ped_in_vehicle(iLocal_104, iLocal_115[iLocal_275], 0))
				{
					if (!vehicle::is_vehicle_seat_free(iLocal_115[iLocal_275], -1, 0))
					{
						if (iLocal_919)
						{
							ai::clear_ped_tasks(iLocal_104);
							iLocal_919 = 0;
						}
						if (iLocal_275 == 4)
						{
							iLocal_275 = 1;
						}
						else if (iLocal_275 == 1)
						{
							iLocal_275 = 4;
						}
					}
				}
				if (!entity::does_entity_exist(iLocal_112))
				{
					ped::set_ped_max_move_blend_ratio(iLocal_104, 1f);
				}
				streaming::request_anim_dict("veh@bicycle@mountain_f@front@base");
				if (streaming::has_anim_dict_loaded("veh@bicycle@mountain_f@front@base"))
				{
					if (vehicle::is_vehicle_driveable(iLocal_115[iLocal_275], 0))
					{
						if (!iLocal_919 && (entity::is_entity_in_angled_area(iLocal_104, -1099.756f, -1700.726f, 3.349046f, -1111.517f, -1683.962f, 5.340389f, 9.25f, 0, true, 0) || !entity::is_entity_in_angled_area(iLocal_115[iLocal_275], -1099.756f, -1700.726f, 3.349046f, -1111.517f, -1683.962f, 5.340389f, 9.25f, 0, true, 0)))
						{
							ai::open_sequence_task(&iVar8);
							ai::task_enter_vehicle(0, iLocal_115[iLocal_275], -1, -1, 2f, 1, 0);
							ai::task_stand_still(0, 2000);
							ai::task_vehicle_drive_to_coord(0, iLocal_115[iLocal_275], -1099.682f, -1694.073f, 3.2758f, 5f, 0, joaat("cruiser"), 786471, 2f, 3f);
							ai::close_sequence_task(iVar8);
							ai::task_perform_sequence(iLocal_104, iVar8);
							ai::clear_sequence_task(&iVar8);
							iLocal_919 = 1;
						}
					}
				}
				if (!entity::does_entity_exist(iLocal_113))
				{
					iVar0 = 0;
					while (iVar0 < iLocal_115)
					{
						if (entity::does_entity_exist(iLocal_115[iVar0]) && vehicle::is_vehicle_driveable(iLocal_115[iVar0], 0))
						{
							if (ped::is_ped_sitting_in_vehicle(iLocal_104, iLocal_115[iVar0]))
							{
								iLocal_113 = iLocal_115[iVar0];
								ped::set_ped_in_vehicle_context(iLocal_104, gameplay::get_hash_key("MISS_FAMILY2_JIMMY_BICYCLE"));
								vehicle::set_vehicle_is_considered_by_player(iLocal_113, 0);
								func_277(0, 1, 20);
								if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 1))
								{
									func_156(&Local_676, cLocal_313, "FAM2_JBIKE", 8, 0, 0, 0);
								}
								ped::set_ped_can_be_knocked_off_vehicle(iLocal_104, 1);
								iLocal_276 = iVar0;
								entity::freeze_entity_position(iLocal_113, false);
							}
						}
						iVar0++;
					}
				}
				else if (!ped::is_ped_in_any_vehicle(iLocal_104, 0))
				{
					func_103("FM2_JSPOOK");
				}
				if (!entity::does_entity_exist(iLocal_112))
				{
					iVar0 = 0;
					while (iVar0 < iLocal_115)
					{
						if (vehicle::is_vehicle_driveable(iLocal_115[iVar0], 0))
						{
							if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_115[iVar0], 1))
							{
								iLocal_112 = iLocal_115[iVar0];
								func_277(0, 1, 20);
								entity::freeze_entity_position(iLocal_115[iVar0], false);
								ui::clear_prints();
								iLocal_277 = iVar0;
								if ((system::vdist(entity::get_entity_coords(iLocal_104, 1), -1108.664f, -1691.623f, 3.3746f) > 5f && !ped::is_ped_in_any_vehicle(iLocal_104, 0)) && iLocal_919)
								{
									iLocal_919 = 0;
								}
							}
						}
						iVar0++;
					}
					if (!iLocal_917)
					{
						if (system::timera() > 1000)
						{
							if (!func_170() || gameplay::get_profile_setting(203) == 0)
							{
								func_147("FM2_CHSEBIKE", 7500, 1);
								iLocal_917 = 1;
							}
						}
					}
				}
				else
				{
					if (!iLocal_920)
					{
						if (func_156(&Local_676, cLocal_313, "FAM2_HIRE4", 8, 0, 0, 0))
						{
							iLocal_920 = 1;
						}
					}
					if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
					{
						iLocal_112 = 0;
					}
				}
				if (((((!func_170() && entity::does_entity_exist(iLocal_113)) && entity::does_entity_exist(iLocal_112)) && vehicle::is_vehicle_driveable(iLocal_113, 0)) && vehicle::is_vehicle_driveable(iLocal_112, 0)) && ped::is_ped_sitting_in_vehicle(iLocal_104, iLocal_113))
				{
					iLocal_115[iLocal_277] = 0;
					iLocal_115[iLocal_276] = 0;
					unk1::_0x293220DA1B46CEBC(4f, 10f, 3);
					iLocal_270++;
				}
				break;
			
			case 7:
				if (system::timera() > 3000)
				{
					func_200(3);
				}
				break;
			
			case 1000:
				if (!ui::does_blip_exist(iLocal_134))
				{
					if (!iLocal_287)
					{
						ui::clear_prints();
						func_153();
						func_149("FM2_JIMGB", 7500, 1);
					}
					iLocal_134 = func_150(iLocal_104, 0, 145);
				}
				if (ui::does_blip_exist(iLocal_132))
				{
					if (ui::get_blip_alpha(iLocal_132) != 0)
					{
						ui::set_blip_alpha(iLocal_132, 0);
					}
				}
				if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 400f || (!ped::is_ped_injured(iLocal_105) && system::vdist2(entity::get_entity_coords(iLocal_105, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 900f))
				{
					iLocal_270 = iLocal_274;
					if (ui::does_blip_exist(iLocal_132))
					{
						if (ui::get_blip_alpha(iLocal_132) != 255)
						{
							ui::set_blip_alpha(iLocal_132, 255);
						}
					}
					if (ui::does_blip_exist(iLocal_134))
					{
						ui::remove_blip(&iLocal_134);
					}
				}
				if (system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 22500f)
				{
					func_103("FM2_JIMAB");
				}
				break;
		}
		if (!iLocal_918)
		{
			if ((vehicle::is_vehicle_driveable(iLocal_113, 0) && !ped::is_ped_injured(iLocal_104)) && ped::is_ped_in_vehicle(iLocal_104, iLocal_113, 0))
			{
				entity::freeze_entity_position(iLocal_113, false);
				iLocal_918 = 1;
			}
		}
	}
	if ((entity::does_entity_exist(iLocal_112) && vehicle::is_vehicle_driveable(iLocal_112, 0)) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_112, 0))
	{
		if (!audio::is_audio_scene_active("FAMILY_2_BIKE_RACE_JIMMY"))
		{
			audio::start_audio_scene("FAMILY_2_BIKE_RACE_JIMMY");
		}
	}
}

int func_277(int iParam0, int iParam1, int iParam2)//Position - 0x28BD8
{
	if (Global_101652.f_26993[iParam0 /*29*/].f_17 == 3)
	{
		return 0;
	}
	if (Global_101652.f_26993[iParam0 /*29*/].f_17 == 4)
	{
		return 0;
	}
	return func_278(Global_101652.f_26993[iParam0 /*29*/].f_17, 0, iParam1, iParam2, 0);
}

bool func_278(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x28C21
{
	float fVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	
	func_303();
	if (iParam3 < 1)
	{
		return false;
	}
	fVar0 = 1f;
	switch (iParam1)
	{
		case 0:
			switch (iParam0)
			{
				case 0:
					func_302(99, 1);
					func_301(joaat("sp0_money_total_spent"), iParam3);
					break;
				
				case 1:
					func_301(joaat("sp1_money_total_spent"), iParam3);
					break;
				
				case 2:
					func_301(joaat("sp2_money_total_spent"), iParam3);
					break;
			}
			func_286(0);
			switch (iParam2)
			{
				case 126:
				case 128:
				case 124:
				case 125:
				case 127:
					if (func_285(5))
					{
						fVar0 = 0.9f;
						iVar1 = 5;
					}
					break;
				
				case 63:
				case 64:
				case 65:
				case 66:
				case 67:
				case 68:
					switch (iParam0)
					{
						case 0:
							func_301(joaat("sp0_money_spent_on_tattoos"), iParam3);
							break;
						
						case 1:
							func_301(joaat("sp1_money_spent_on_tattoos"), iParam3);
							break;
						
						case 2:
							func_301(joaat("sp2_money_spent_on_tattoos"), iParam3);
							break;
					}
					if (func_285(1))
					{
						fVar0 = 0f;
						iVar1 = 1;
					}
					break;
				
				case 21:
					switch (iParam0)
					{
						case 0:
							func_301(joaat("sp0_money_spent_on_taxis"), iParam3);
							break;
						
						case 1:
							func_301(joaat("sp1_money_spent_on_taxis"), iParam3);
							break;
						
						case 2:
							func_301(joaat("sp2_money_spent_on_taxis"), iParam3);
							break;
					}
					break;
				
				case 25:
					switch (iParam0)
					{
						case 0:
							func_301(joaat("sp0_money_spent_in_strip_clubs"), iParam3);
							break;
						
						case 1:
							func_301(joaat("sp1_money_spent_in_strip_clubs"), iParam3);
							break;
						
						case 2:
							func_301(joaat("sp2_money_spent_in_strip_clubs"), iParam3);
							break;
					}
					break;
				
				case 98:
				case 99:
				case 100:
				case 101:
				case 103:
				case 104:
				case 105:
				case 106:
				case 107:
				case 108:
				case 109:
				case 110:
				case 111:
				case 112:
					switch (iParam0)
					{
						case 0:
							func_301(joaat("sp0_money_spent_property"), iParam3);
							break;
						
						case 1:
							func_301(joaat("sp1_money_spent_property"), iParam3);
							break;
						
						case 2:
							func_301(joaat("sp2_money_spent_property"), iParam3);
							break;
					}
					break;
				
				default:
					switch (script::_get_this_script_hash())
					{
						case joaat("clothes_shop_sp"):
							switch (iParam0)
							{
								case 0:
									func_301(joaat("sp0_money_spent_in_clothes"), iParam3);
									break;
								
								case 1:
									func_301(joaat("sp1_money_spent_in_clothes"), iParam3);
									break;
								
								case 2:
									func_301(joaat("sp2_money_spent_in_clothes"), iParam3);
									break;
							}
							break;
						
						case joaat("hairdo_shop_sp"):
							switch (iParam0)
							{
								case 0:
									func_301(joaat("sp0_money_spent_on_hairdos"), iParam3);
									break;
								
								case 1:
									func_301(joaat("sp1_money_spent_on_hairdos"), iParam3);
									break;
								
								case 2:
									func_301(joaat("sp2_money_spent_on_hairdos"), iParam3);
									break;
							}
							if (func_285(0))
							{
								fVar0 = 0f;
								iVar1 = 0;
							}
							break;
						
						case joaat("gunclub_shop"):
							switch (iParam0)
							{
								case 0:
									func_301(joaat("sp0_money_spent_in_buying_guns"), iParam3);
									break;
								
								case 1:
									func_301(joaat("sp1_money_spent_in_buying_guns"), iParam3);
									break;
								
								case 2:
									func_301(joaat("sp2_money_spent_in_buying_guns"), iParam3);
									break;
							}
							break;
						
						case joaat("carmod_shop"):
							switch (iParam0)
							{
								case 0:
									func_301(joaat("sp0_money_spent_car_mods"), iParam3);
									break;
								
								case 1:
									func_301(joaat("sp1_money_spent_car_mods"), iParam3);
									break;
								
								case 2:
									func_301(joaat("sp2_money_spent_car_mods"), iParam3);
									break;
							}
							func_284(iParam3);
							break;
					}
					break;
			}
			break;
		
		case 1:
			switch (iParam0)
			{
				case 0:
					func_302(95, iParam3);
					break;
				
				case 1:
					func_302(97, iParam3);
					break;
				
				case 2:
					func_302(96, iParam3);
					break;
			}
			func_302(98, iParam3);
			break;
	}
	iVar2 = iParam0;
	iParam3 = system::floor((fVar0 * system::to_float(iParam3)));
	iVar3 = 0;
	iVar4 = iParam3;
	if (fVar0 == 0f)
	{
		func_281(iVar1);
		return true;
	}
	else if (fVar0 != 1f)
	{
		func_281(iVar1);
	}
	iVar5 = (Global_52992[iVar2] + iParam3);
	switch (iParam1)
	{
		case 1:
			if (Global_52992[iVar2] >= 0 && iParam3 > 0)
			{
				if (iVar5 <= 0)
				{
					Global_52992[iVar2] = 2147483647;
				}
				else
				{
					Global_52992[iVar2] = (Global_52992[iVar2] + iParam3);
				}
			}
			switch (iParam0)
			{
				case 0:
					func_301(joaat("sp0_total_cash_earned"), iParam3);
					break;
				
				case 1:
					func_301(joaat("sp1_total_cash_earned"), iParam3);
					break;
				
				case 2:
					func_301(joaat("sp2_total_cash_earned"), iParam3);
					break;
			}
			break;
		
		case 0:
			if (!iParam4)
			{
				if ((Global_52992[iVar2] - iParam3) < 0)
				{
					return false;
				}
			}
			iVar3 = Global_52992[iVar2];
			Global_52992[iVar2] = (Global_52992[iVar2] - iParam3);
			if (iParam4)
			{
				iVar4 = iVar3;
			}
			break;
	}
	if (iParam2 == 1)
	{
		if (iVar4 > 20)
		{
		}
	}
	else
	{
		Global_101652.f_19507.f_233[iVar2 /*69*/].f_2[Global_101652.f_19507.f_233[iVar2 /*69*/].f_1 /*6*/] = iParam1;
		Global_101652.f_19507.f_233[iVar2 /*69*/].f_2[Global_101652.f_19507.f_233[iVar2 /*69*/].f_1 /*6*/].f_1 = iParam2;
		Global_101652.f_19507.f_233[iVar2 /*69*/].f_2[Global_101652.f_19507.f_233[iVar2 /*69*/].f_1 /*6*/].f_2 = iParam3;
		Global_101652.f_19507.f_233[iVar2 /*69*/]++;
		Global_101652.f_19507.f_233[iVar2 /*69*/].f_1++;
		if (Global_101652.f_19507.f_233[iVar2 /*69*/].f_1 > 10)
		{
			Global_101652.f_19507.f_233[iVar2 /*69*/].f_1 = 0;
		}
	}
	func_280(iParam0);
	if (Global_35777 == 15)
	{
		func_279(0);
	}
	return true;
}

void func_279(int iParam0)//Position - 0x29220
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	iVar1 = 0;
	iVar0 = 0;
	while (iVar0 < 3)
	{
		iVar1 = 0;
		while (iVar1 < 11)
		{
			Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_3 = Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/];
			Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_4 = Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_1;
			Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_5 = Global_101652.f_19507.f_233[iVar0 /*69*/].f_2[iVar1 /*6*/].f_2;
			iVar1++;
		}
		iVar0++;
	}
	iVar0 = 0;
	while (iVar0 < 10)
	{
		Global_53000[iVar0 /*3*/][0] = Global_101652.f_19507[iVar0];
		Global_53000.f_31[iVar0 /*3*/][0] = Global_101652.f_19507.f_11[iVar0];
		Global_53000.f_62[iVar0 /*3*/][0] = Global_101652.f_19507.f_22[iVar0];
		Global_53000.f_93[iVar0 /*3*/][0] = Global_101652.f_19507.f_33[iVar0];
		Global_53000.f_124[iVar0 /*3*/][0] = Global_101652.f_19507.f_44[iVar0];
		Global_53000.f_155[iVar0 /*3*/][0] = Global_101652.f_19507.f_55[iVar0];
		Global_53000.f_186[iVar0 /*3*/][0] = Global_101652.f_19507.f_66[iVar0];
		Global_53000.f_217[iVar0 /*3*/][0] = Global_101652.f_19507.f_77[iVar0];
		Global_53000.f_248[iVar0 /*3*/][0] = Global_101652.f_19507.f_88[iVar0];
		if (!iParam0)
		{
			Global_53000[iVar0 /*3*/][1] = Global_101652.f_19507[iVar0];
			Global_53000.f_31[iVar0 /*3*/][1] = Global_101652.f_19507.f_11[iVar0];
			Global_53000.f_62[iVar0 /*3*/][1] = Global_101652.f_19507.f_22[iVar0];
			Global_53000.f_93[iVar0 /*3*/][1] = Global_101652.f_19507.f_33[iVar0];
			Global_53000.f_124[iVar0 /*3*/][1] = Global_101652.f_19507.f_44[iVar0];
			Global_53000.f_155[iVar0 /*3*/][1] = Global_101652.f_19507.f_55[iVar0];
			Global_53000.f_186[iVar0 /*3*/][1] = Global_101652.f_19507.f_66[iVar0];
			Global_53000.f_217[iVar0 /*3*/][1] = Global_101652.f_19507.f_77[iVar0];
			Global_53000.f_248[iVar0 /*3*/][1] = Global_101652.f_19507.f_88[iVar0];
		}
		iVar0++;
	}
}

void func_280(int iParam0)//Position - 0x294A2
{
	int iVar0;
	
	iVar0 = Global_52992[iParam0];
	switch (iParam0)
	{
		case 0:
			stats::stat_set_int(joaat("sp0_total_cash"), iVar0, 1);
			break;
		
		case 1:
			stats::stat_set_int(joaat("sp1_total_cash"), iVar0, 1);
			break;
		
		case 2:
			stats::stat_set_int(joaat("sp2_total_cash"), iVar0, 1);
			break;
	}
}

void func_281(int iParam0)//Position - 0x294FC
{
	int iVar0;
	char cVar1[64];
	
	iVar0 = false;
	if (!network::network_is_game_in_progress())
	{
		if (gameplay::is_bit_set(Global_101652.f_19507.f_471, iParam0))
		{
			iVar0 = true;
			gameplay::clear_bit(&(Global_101652.f_19507.f_471), iParam0);
		}
	}
	else if (gameplay::is_bit_set(Global_101652.f_19507.f_471, iParam0) || gameplay::is_bit_set(Global_2097152[func_283() /*10730*/].f_7546.f_10, iParam0))
	{
		iVar0 = true;
		gameplay::clear_bit(&(Global_101652.f_19507.f_471), iParam0);
		gameplay::clear_bit(&(Global_2097152[func_283() /*10730*/].f_7546.f_10), iParam0);
	}
	if (iVar0)
	{
		StringCopy(&cVar1, "CHAR_LIFEINVADER", 64);
		ui::_set_notification_text_entry("COUP_RED");
		ui::_add_text_component_item_string(func_282(iParam0));
		ui::_set_notification_message(&cVar1, &cVar1, 1, 0, "", 0);
	}
}

char* func_282(int iParam0)//Position - 0x295BE
{
	switch (iParam0)
	{
		case 0:
			return "COUP_HAIRC";
		
		case 1:
			return "COUP_TATTOO";
		
		case 2:
			return "COUP_WARSTOCK";
		
		case 3:
			return "COUP_MOSPORT";
		
		case 4:
			return "COUP_ELITAS";
		
		case 5:
			return "COUP_MEDSPENS";
		
		case 6:
			return "COUP_SPRUNK";
		
		case 7:
			return "COUP_RESPRAY";
		
		default:
	}
	return "";
}

int func_283()//Position - 0x29638
{
	int iVar0;
	
	iVar0 = 0;
	return iVar0;
}

void func_284(int iParam0)//Position - 0x29645
{
	func_302(93, iParam0);
	func_302(29, iParam0);
	func_302(30, iParam0);
}

int func_285(int iParam0)//Position - 0x29665
{
	if (!network::network_is_game_in_progress())
	{
		return gameplay::is_bit_set(Global_101652.f_19507.f_471, iParam0);
	}
	return gameplay::is_bit_set(Global_2097152[func_283() /*10730*/].f_7546.f_10, iParam0);
}

bool func_286(int iParam0)//Position - 0x296A1
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	iVar1 = 0;
	if (player::has_achievement_been_passed(27))
	{
		return false;
	}
	if (stats::stat_get_int(joaat("sp0_money_total_spent"), &iVar0, -1))
	{
		iVar1 = (iVar1 + iVar0);
	}
	if (stats::stat_get_int(joaat("sp1_money_total_spent"), &iVar0, -1))
	{
		iVar1 = (iVar1 + iVar0);
	}
	if (stats::stat_get_int(joaat("sp2_money_total_spent"), &iVar0, -1))
	{
		iVar1 = (iVar1 + iVar0);
	}
	if (iParam0)
	{
	}
	iVar2 = 0;
	stats::stat_get_int(joaat("num_cash_spent"), &iVar2, -1);
	if (iVar1 > 0 && (iVar2 / 2000000) != (iVar1 / 2000000))
	{
		stats::stat_set_int(joaat("num_cash_spent"), iVar1, 1);
		func_300(27, iVar1);
	}
	if (iVar1 < 200000000)
	{
		return false;
	}
	func_287(27, 1);
	return true;
}

int func_287(int iParam0, int iParam1)//Position - 0x29758
{
	if (iParam0 >= 70)
	{
		return 0;
	}
	return func_288(iParam0, iParam1);
}

bool func_288(int iParam0, int iParam1)//Position - 0x29773
{
	if (func_27(14) && !func_299(iParam0))
	{
		return false;
	}
	if (player::has_achievement_been_passed(iParam0) && iParam1 == 1)
	{
		return false;
	}
	if (Global_25431 != 0 && !Global_69697)
	{
		return false;
	}
	if (func_298(&Global_2595490))
	{
		if (func_296(&Global_2595490, iParam0))
		{
			return false;
		}
		if (func_289(&Global_2595490, iParam0))
		{
			return true;
		}
	}
	else
	{
		if (!player::give_achievement_to_player(iParam0))
		{
			return false;
		}
		if (player::has_achievement_been_passed(iParam0))
		{
			return true;
		}
		return false;
	}
	return false;
}

bool func_289(var uParam0, int iParam1)//Position - 0x29810
{
	int iVar0;
	var uVar1[70];
	
	if (player::has_achievement_been_passed(iParam1))
	{
		return false;
	}
	if (func_27(14) && !func_299(iParam1))
	{
		return false;
	}
	if (func_296(uParam0, iParam1))
	{
		return false;
	}
	if (func_295(uParam0) < 0f)
	{
		func_294(uParam0, 0);
	}
	func_292(&uVar1);
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < (*uParam0 - 1))
	{
		uVar1[iVar0 + 1] = (*uParam0)[iVar0];
		iVar0++;
	}
	func_290(&uVar1, iParam1);
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		(*uParam0)[iVar0] = uVar1[iVar0];
		iVar0++;
	}
	return true;
}

bool func_290(var uParam0, int iParam1)//Position - 0x298C1
{
	int iVar0;
	
	if (player::has_achievement_been_passed(iParam1))
	{
		return false;
	}
	if (func_27(14) && !func_299(iParam1))
	{
		return false;
	}
	if (func_296(uParam0, iParam1))
	{
		return false;
	}
	if (func_295(uParam0) < 0f)
	{
		func_294(uParam0, 0);
	}
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if (func_291(uParam0, iVar0))
		{
			(*uParam0)[iVar0] = iParam1;
			return true;
		}
		iVar0++;
	}
	return false;
}

int func_291(var uParam0, int iParam1)//Position - 0x2993C
{
	return (*uParam0)[iParam1] == 70;
}

void func_292(var uParam0)//Position - 0x2994D
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		func_293(uParam0, iVar0);
		iVar0++;
	}
	func_294(uParam0, (Global_2595489 - 0.5f));
}

void func_293(var uParam0, int iParam1)//Position - 0x29981
{
	(*uParam0)[iParam1] = 70;
}

void func_294(var uParam0, float fParam1)//Position - 0x29991
{
	if (fParam1 == 0f)
	{
		uParam0->f_72 = 0f;
	}
	else
	{
		uParam0->f_72 = fParam1;
	}
}

var func_295(var uParam0)//Position - 0x299AE
{
	return uParam0->f_72;
}

int func_296(var uParam0, int iParam1)//Position - 0x299BA
{
	return func_297(uParam0, iParam1) != -1;
}

int func_297(var uParam0, int iParam1)//Position - 0x299CC
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < *uParam0)
	{
		if ((*uParam0)[iVar0] == iParam1)
		{
			return iVar0;
		}
		iVar0++;
	}
	return -1;
}

int func_298(var uParam0)//Position - 0x299F9
{
	return uParam0->f_71 == 1;
}

bool func_299(int iParam0)//Position - 0x29A07
{
	switch (iParam0)
	{
		case 60:
		case 61:
		case 62:
		case 63:
		case 64:
		case 65:
		case 66:
		case 67:
		case 68:
		case 69:
			return true;
		
		default:
	}
	return false;
}

int func_300(int iParam0, int iParam1)//Position - 0x29A57
{
	int iVar0;
	
	if (iParam0 < 0)
	{
		return 0;
	}
	if (iParam0 > 70)
	{
		return 0;
	}
	if (iParam1 <= 0 || iParam1 > 100)
	{
		return 0;
	}
	iVar0 = player::_0x1C186837D0619335(iParam0);
	if (iParam1 > iVar0)
	{
		return player::_0xC2AFFFDABBDC2C5C(iParam0, iParam1);
	}
	return 0;
}

void func_301(int iParam0, int iParam1)//Position - 0x29AA8
{
	int iVar0;
	
	stats::stat_get_int(iParam0, &iVar0, -1);
	iVar0 = (iVar0 + iParam1);
	stats::stat_set_int(iParam0, iVar0, 1);
}

void func_302(int iParam0, int iParam1)//Position - 0x29ACB
{
	int iVar0;
	
	if (iParam1 < 1)
	{
		return;
	}
	if (Global_51560[iParam0 /*7*/].f_2)
	{
		return;
	}
	if (network::network_is_game_in_progress())
	{
		return;
	}
	if (Global_51560[iParam0 /*7*/])
	{
		stats::stat_get_int(Global_51560[iParam0 /*7*/].f_1, &iVar0, -1);
		iVar0 = (iVar0 + iParam1);
		stats::stat_set_int(Global_51560[iParam0 /*7*/].f_1, iVar0, 1);
	}
}

void func_303()//Position - 0x29B28
{
	int iVar0;
	
	if (network::network_is_signed_in())
	{
		stats::stat_get_int(joaat("sp0_total_cash"), &iVar0, -1);
		if (!Global_52992[0] == iVar0)
		{
			Global_52992[0] = iVar0;
		}
		stats::stat_get_int(joaat("sp1_total_cash"), &iVar0, -1);
		if (!Global_52992[1] == iVar0)
		{
			Global_52992[1] = iVar0;
		}
		stats::stat_get_int(joaat("sp2_total_cash"), &iVar0, -1);
		if (!Global_52992[2] == iVar0)
		{
			Global_52992[2] = iVar0;
		}
	}
}

struct<6> func_304()//Position - 0x29B9D
{
	struct<6> Var0;
	
	StringCopy(&Var0, "NULL", 24);
	if (Global_15745 == 4)
	{
		return Global_15364;
	}
	return Var0;
}

void func_305()//Position - 0x29BC1
{
	int iVar0;
	int iVar1;
	
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		if (!entity::does_entity_exist(iLocal_138))
		{
			if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_199) < 2500f)
			{
				streaming::request_model(joaat("prop_cs_office_chair"));
				if (streaming::has_model_loaded(joaat("prop_cs_office_chair")))
				{
					iLocal_138 = object::create_object(joaat("prop_cs_office_chair"), -809.4098f, 172.7913f, 75.7732f, 1, true, false);
					entity::set_entity_quaternion(iLocal_138, 0f, 0f, 0.3857f, 0.9226f);
					streaming::set_model_as_no_longer_needed(joaat("prop_cs_office_chair"));
				}
			}
		}
		else if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_199) > 5625f && entity::is_entity_occluded(iLocal_138))
		{
			object::delete_object(&iLocal_138);
		}
	}
	func_330();
	if (system::vdist2(entity::get_entity_coords(player::player_ped_id(), 1), vLocal_226) < 1000f)
	{
		ped::set_ped_density_multiplier_this_frame(0.5f);
	}
	if (!ped::is_ped_injured(iLocal_104))
	{
		if (!ped::is_ped_in_any_vehicle(iLocal_104, 0))
		{
			ped::set_ped_reset_flag(iLocal_104, 60, true);
		}
		switch (iLocal_270)
		{
			case 0:
				iLocal_916 = 0;
				if (!entity::does_entity_exist(iLocal_122))
				{
					func_318(&iLocal_122, 0, vLocal_211, fLocal_214, 1, 1);
				}
				else if (vehicle::is_vehicle_driveable(iLocal_122, 0))
				{
					entity::set_entity_coords(iLocal_122, vLocal_211, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_122, fLocal_214);
				}
				if (vehicle::is_vehicle_driveable(iLocal_114, 0))
				{
					entity::_0x3910051CCECDB00C(iLocal_122, true);
				}
				if (!ai::is_waypoint_playback_going_on_for_ped(iLocal_104))
				{
					ai::task_follow_waypoint_recording(iLocal_104, sLocal_268, 0, 8, -1);
				}
				iLocal_286 = false;
				iLocal_287 = false;
				cam::do_screen_fade_in(500);
				audio::set_initial_player_station("RADIO_01_CLASS_ROCK");
				if (entity::does_entity_exist(iLocal_104) && !entity::is_entity_visible(iLocal_104))
				{
					entity::set_entity_visible(iLocal_104, true, 0);
				}
				if (iLocal_266)
				{
					ped::force_ped_motion_state(player::player_ped_id(), -668482597, true, 1, 0);
					player::simulate_player_input_gait(player::player_id(), 1f, 2000, 0, 1, 0);
					iLocal_266 = 0;
				}
				iLocal_270++;
				break;
			
			case 1:
				if (!entity::does_entity_exist(iLocal_114))
				{
					func_310(&iLocal_121, 15, -812.4639f, 159.7855f, 71.0588f, 113.1515f, 1, 1);
				}
				if (!entity::does_entity_exist(iLocal_122))
				{
					func_318(&iLocal_122, 0, vLocal_211, fLocal_214, 1, 1);
				}
				if (entity::does_entity_exist(iLocal_121) && entity::does_entity_exist(iLocal_122))
				{
					iLocal_270++;
				}
				break;
			
			case 2:
				if (ai::is_waypoint_playback_going_on_for_ped(iLocal_104) && !ped::is_ped_in_group(iLocal_104))
				{
					if (ai::get_ped_waypoint_progress(iLocal_104) > 13)
					{
						if (entity::does_entity_exist(iLocal_122) && vehicle::is_vehicle_driveable(iLocal_122, 0))
						{
							ai::task_enter_vehicle(iLocal_104, iLocal_122, -1, 0, 1f, 1, 0);
						}
						else if (entity::does_entity_exist(iLocal_114) && vehicle::is_vehicle_driveable(iLocal_114, 0))
						{
							ai::task_enter_vehicle(iLocal_104, iLocal_114, -1, 0, 1f, 1, 0);
						}
						ai::remove_waypoint_recording(sLocal_268);
					}
				}
				if (!iLocal_916)
				{
					if ((((entity::is_entity_in_angled_area(player::player_ped_id(), -818.1541f, 177.6431f, 75.12778f, -819.7911f, 176.9991f, 70.62586f, 3.25f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -795.1501f, 176.5434f, 74.13519f, -795.5303f, 177.5501f, 71.83518f, 2.5f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -793.7302f, 181.551f, 74.13519f, -792.5385f, 182.0002f, 71.83518f, 2.5f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -802.4019f, 167.6163f, 79.10717f, -801.4336f, 165.4639f, 76.0724f, 2.5f, 0, true, 0)) || entity::is_entity_in_angled_area(player::player_ped_id(), -806.8907f, 185.8457f, 71.43164f, -807.4306f, 187.2417f, 74.22646f, 1.75f, 0, true, 0))
					{
						iLocal_916 = 1;
					}
				}
				iVar0 = false;
				if ((vehicle::is_vehicle_driveable(iLocal_122, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_122, 0)) || !entity::does_entity_exist(iLocal_122))
				{
					iVar0 = true;
				}
				if ((system::vdist(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) > 15f || ped::is_ped_in_any_vehicle(player::player_ped_id(), 0)) && iLocal_916)
				{
					if (!iVar0)
					{
						ai::clear_ped_tasks(iLocal_104);
					}
					ped::set_ped_as_group_member(iLocal_104, player::get_player_group(player::player_id()));
					ped::set_ped_group_member_passenger_index(iLocal_104, 0);
					iLocal_270++;
				}
				break;
			
			case 3:
				if (ai::is_waypoint_playback_going_on_for_ped(iLocal_104))
				{
					if (ai::get_ped_waypoint_progress(iLocal_104) > 13)
					{
						if (entity::does_entity_exist(iLocal_122) && vehicle::is_vehicle_driveable(iLocal_122, 0))
						{
							ai::task_enter_vehicle(iLocal_104, iLocal_122, -1, 0, 1f, 1, 0);
						}
						else if (entity::does_entity_exist(iLocal_114) && vehicle::is_vehicle_driveable(iLocal_114, 0))
						{
							ai::task_enter_vehicle(iLocal_104, iLocal_114, -1, 0, 1f, 1, 0);
							ped::force_ped_motion_state(iLocal_104, -668482597, false, 0, 0);
						}
						ai::remove_waypoint_recording(sLocal_268);
					}
				}
				if (func_155(iLocal_104))
				{
					if (!entity::does_entity_exist(iLocal_114))
					{
						if ((ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 0)) && vehicle::get_ped_in_vehicle_seat(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), -1, 0) == player::player_ped_id())
						{
							iLocal_114 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
							entity::set_entity_as_mission_entity(iLocal_114, true, 1);
							entity::_0x3910051CCECDB00C(iLocal_114, true);
							unk1::_0x293220DA1B46CEBC(3f, 5f, 3);
							func_309(iLocal_114, 209);
						}
					}
					else
					{
						if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0))
						{
							iLocal_286 = true;
						}
						if (vehicle::is_vehicle_driveable(iLocal_114, 0))
						{
							if ((ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0)) && vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 0))
							{
								iLocal_114 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
								entity::set_entity_as_mission_entity(iLocal_114, true, 1);
								entity::_0x3910051CCECDB00C(iLocal_114, true);
								func_309(iLocal_114, 209);
							}
						}
						else
						{
							entity::set_vehicle_as_no_longer_needed(&iLocal_114);
						}
					}
					if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
					{
						iLocal_286 = false;
					}
					if (iLocal_286)
					{
						if (ui::does_blip_exist(iLocal_132))
						{
							if (!func_105(ui::get_blip_coords(iLocal_132), vLocal_222, 0))
							{
								ui::remove_blip(&iLocal_132);
							}
						}
						else
						{
							iLocal_132 = func_208(vLocal_222, 1);
						}
					}
					else if (ui::does_blip_exist(iLocal_132))
					{
						if (!func_105(ui::get_blip_coords(iLocal_132), -1103.213f, -1695.151f, 3.3416f, 0))
						{
							ui::remove_blip(&iLocal_132);
						}
					}
					else
					{
						iLocal_132 = func_208(-1103.213f, -1695.151f, 3.3416f, 0);
					}
					if (iLocal_286)
					{
						if ((vehicle::is_vehicle_driveable(iLocal_114, 0) && entity::is_entity_at_coord(iLocal_114, vLocal_222, 3f, 3f, 2f, true, true, 0)) && ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_114))
						{
							ui::remove_blip(&iLocal_132);
							iLocal_270++;
						}
					}
					else if (entity::is_entity_at_coord(player::player_ped_id(), -1103.213f, -1695.151f, 3.3416f, 6f, 6f, 2f, true, true, 0))
					{
						func_200(2);
					}
					if (ui::does_blip_exist(iLocal_134))
					{
						ui::clear_prints();
						ui::remove_blip(&iLocal_134);
					}
				}
				else
				{
					if (ui::does_blip_exist(iLocal_132))
					{
						ui::remove_blip(&iLocal_132);
					}
					if (!ui::does_blip_exist(iLocal_134))
					{
						ui::clear_prints();
						if (func_170())
						{
							Local_843 = { func_169() };
							func_167();
							iLocal_842 = 1;
						}
						func_153();
						if (!iLocal_287)
						{
							func_149("FM2_JIMGB", 7500, 1);
						}
						iLocal_134 = func_150(iLocal_104, 0, 145);
					}
				}
				if ((ped::is_ped_in_any_vehicle(player::player_ped_id(), 0) && vehicle::is_vehicle_driveable(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0), 0)) && vehicle::get_vehicle_max_number_of_passengers(ped::get_vehicle_ped_is_in(player::player_ped_id(), 0)) == 0)
				{
					if (!func_170() && !iLocal_294)
					{
						func_149("FM2_BIGGERV", 7500, 1);
						iLocal_294 = 1;
					}
				}
				else if (!func_170() && iLocal_294)
				{
					ui::clear_prints();
					iLocal_294 = 0;
				}
				break;
			
			case 4:
				if (vehicle::is_vehicle_driveable(iLocal_114, 0))
				{
					if (func_201(iLocal_114, 4f, 1, 1056964608, 0, 1, 0))
					{
						if (ped::is_ped_in_vehicle(iLocal_104, iLocal_114, 0))
						{
							if (func_308(0))
							{
								func_306(1);
							}
							func_167();
							ai::task_look_at_coord(player::player_ped_id(), entity::get_offset_from_entity_in_world_coords(iLocal_114, 10f, 5f, 0f), 20000, 4, 3);
							if (!func_170())
							{
								if (func_156(&Local_676, cLocal_313, "FAM2_HIRE1", 8, 0, 0, 0))
								{
									iLocal_842 = 0;
									ai::task_look_at_entity(player::player_ped_id(), iLocal_104, 30000, 4, 2);
									ai::open_sequence_task(&iVar1);
									ai::task_leave_vehicle(0, iLocal_114, 0);
									ai::task_follow_nav_mesh_to_coord(0, -1102.187f, -1697.891f, 3.3562f, 1f, 20000, 1048576000, 0, 1193033728);
									ai::task_turn_ped_to_face_entity(0, player::player_ped_id(), 0);
									ai::close_sequence_task(iVar1);
									ai::task_perform_sequence(iLocal_104, iVar1);
									player::set_player_control(player::player_id(), true, 0);
									ped::remove_ped_from_group(iLocal_104);
									ai::clear_sequence_task(&iVar1);
									unk1::_0x293220DA1B46CEBC(4f, 4f, 4);
									iLocal_270 = 8;
								}
							}
						}
						else
						{
							unk1::_0x293220DA1B46CEBC(5f, 10f, 3);
							func_309(0, 209);
							func_200(2);
						}
					}
				}
				break;
			
			case 5:
				if (func_156(&Local_676, cLocal_313, "FAM2_HIRE1", 8, 0, 0, 0))
				{
					ai::task_look_at_entity(player::player_ped_id(), iLocal_104, 20000, 4, 3);
					system::settimera(0);
					iLocal_270 = 8;
				}
				break;
			
			case 8:
				unk1::_0x293220DA1B46CEBC(5f, 10f, 4);
				func_309(0, 209);
				func_200(2);
				break;
		}
		if (vehicle::is_vehicle_driveable(iLocal_114, 0))
		{
			if (ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0))
			{
				if (!audio::is_audio_scene_active("FAMILY_2_DRIVE_TO_BEACH"))
				{
					audio::start_audio_scene("FAMILY_2_DRIVE_TO_BEACH");
				}
			}
			else if (audio::is_audio_scene_active("FAMILY_2_DRIVE_TO_BEACH"))
			{
				audio::stop_audio_scene("FAMILY_2_DRIVE_TO_BEACH");
			}
		}
	}
	if (player::get_player_wanted_level(player::player_id()) > 0)
	{
		func_145();
	}
}

void func_306(int iParam0)//Position - 0x2A50A
{
	if (Global_14604)
	{
		func_307(0, 0);
	}
	if (Global_14443.f_1 == 10 || Global_14443.f_1 == 9)
	{
		gameplay::set_bit(&Global_2314, 16);
	}
	if (audio::is_mobile_phone_call_ongoing())
	{
		audio::stop_scripted_conversation(false);
	}
	Global_15745 = 5;
	if (iParam0 == 1)
	{
		gameplay::set_bit(&Global_2313, 30);
	}
	else
	{
		gameplay::clear_bit(&Global_2313, 30);
	}
	if (!func_160())
	{
		Global_14443.f_1 = 3;
	}
}

void func_307(int iParam0, int iParam1)//Position - 0x2A57A
{
	if (iParam0)
	{
		if (func_308(0))
		{
			Global_14604 = 1;
			if (iParam1)
			{
				mobile::get_mobile_phone_position(&Global_14380);
			}
			Global_14371 = { Global_14389[Global_14388 /*3*/] };
			mobile::set_mobile_phone_position(Global_14371);
		}
	}
	else if (Global_14604 == 1)
	{
		Global_14604 = 0;
		Global_14371 = { Global_14396[Global_14388 /*3*/] };
		if (iParam1)
		{
			mobile::set_mobile_phone_position(Global_14380);
		}
		else
		{
			mobile::set_mobile_phone_position(Global_14371);
		}
	}
}

bool func_308(int iParam0)//Position - 0x2A5EE
{
	if (iParam0 == 1)
	{
		if (Global_14443.f_1 > 3)
		{
			if (gameplay::is_bit_set(Global_2313, 14))
			{
				return true;
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
	if (script::_get_number_of_instances_of_streamed_script(joaat("cellphone_flashhand")) > 0)
	{
		return true;
	}
	if (Global_14443.f_1 > 3)
	{
		return true;
	}
	return false;
}

void func_309(int iParam0, int iParam1)//Position - 0x2A648
{
	Global_55829 = iParam0;
	Global_55830 = iParam1;
}

bool func_310(int iParam0, int iParam1, vector3 vParam2, float fParam5, int iParam6, int iParam7)//Position - 0x2A65A
{
	struct<98> Var0;
	int iVar98;
	int iVar99;
	
	if (!func_89(iParam1))
	{
		Var0.f_11 = 12;
		Var0.f_31 = 49;
		Var0.f_81 = 2;
		func_199(iParam1, &Var0, iParam7);
		if (entity::does_entity_exist(*iParam0))
		{
			if (entity::get_entity_model(*iParam0) != Var0)
			{
			}
			return true;
		}
		if ((iParam1 == 17 && Global_101652.f_2079.f_539.f_2846[0 /*197*/][0 /*98*/] == Var0) || (iParam1 == 15 && Global_101652.f_2079.f_539.f_2846[0 /*197*/][1 /*98*/] == Var0))
		{
			if (iParam1 == 17)
			{
				iVar98 = 0;
			}
			else if (iParam1 == 15)
			{
				iVar98 = 1;
			}
			streaming::request_model(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/]);
			if (streaming::has_model_loaded(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/]))
			{
				*iParam0 = vehicle::create_vehicle(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/], vParam2, fParam5, 0, false);
				vehicle::set_vehicle_on_ground_properly(*iParam0, 1084227584);
				vehicle::_0xAB04325045427AAE(*iParam0, 0);
				vehicle::_0x428BACCDF5E26EAD(*iParam0, false);
				vehicle::set_vehicle_has_strong_axles(*iParam0, true);
				entity::set_entity_health(*iParam0, 1250);
				vehicle::set_vehicle_engine_health(*iParam0, 1250f);
				vehicle::set_vehicle_petrol_tank_health(*iParam0, 1250f);
				Var0.f_3 = 1250;
				vehicle::set_vehicle_colours(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_5, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_6);
				vehicle::set_vehicle_extra_colours(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_7, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_8);
				vehicle::set_vehicle_dirt_level(*iParam0, Var0.f_2);
				iVar99 = 0;
				while (iVar99 < 12)
				{
					vehicle::set_vehicle_extra(*iParam0, iVar99 + 1, !Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_11[iVar99]);
					iVar99++;
				}
				if (Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_24)
				{
					if (vehicle::is_vehicle_a_convertible(*iParam0, 0))
					{
						if (Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_24)
						{
							vehicle::raise_convertible_roof(*iParam0, 1);
						}
						else
						{
							vehicle::lower_convertible_roof(*iParam0, 1);
						}
					}
				}
				vehicle::set_vehicle_number_plate_text(*iParam0, &(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_27));
				if (Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_26 >= 0 && Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_26 < vehicle::get_number_of_vehicle_number_plates())
				{
					vehicle::set_vehicle_number_plate_text_index(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_26);
				}
				vehicle::set_vehicle_tyre_smoke_color(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_84, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_85, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_86);
				vehicle::set_vehicle_tyres_can_burst(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_88);
				vehicle::set_vehicle_window_tint(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_87);
				vehicle::_set_vehicle_neon_lights_colour(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_93, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_94, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_95);
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 2, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_92, 28));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 3, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_92, 29));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 0, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_92, 30));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 1, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_92, 31));
				if (vehicle::get_vehicle_livery_count(*iParam0) > 1 && Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_89 >= 0)
				{
					vehicle::set_vehicle_livery(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_89);
				}
				if (Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_90 > -1)
				{
					if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(*iParam0)))
					{
						if (vehicle::is_this_model_a_bike(entity::get_entity_model(*iParam0)))
						{
							if (Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_90 == 6)
							{
								vehicle::set_vehicle_wheel_type(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_90);
							}
						}
						else
						{
							vehicle::set_vehicle_wheel_type(*iParam0, Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_90);
						}
					}
				}
				func_314(iParam0, &(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_31), &(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/].f_81));
				vehicle::_set_vehicle_paint_fade(*iParam0, Var0.f_96);
				if (iParam6)
				{
					streaming::set_model_as_no_longer_needed(Global_101652.f_2079.f_539.f_2846[0 /*197*/][iVar98 /*98*/]);
				}
				func_313(*iParam0);
				return true;
			}
		}
		else
		{
			streaming::request_model(Var0);
			if (streaming::has_model_loaded(Var0))
			{
				*iParam0 = vehicle::create_vehicle(Var0, vParam2, fParam5, 0, false);
				vehicle::set_vehicle_on_ground_properly(*iParam0, 1084227584);
				vehicle::_0xAB04325045427AAE(*iParam0, 0);
				vehicle::_0x428BACCDF5E26EAD(*iParam0, false);
				vehicle::set_vehicle_has_strong_axles(*iParam0, true);
				func_311(iParam0, Var0);
				if (iParam1 == 17 || iParam1 == 15)
				{
					func_313(*iParam0);
				}
				if (iParam6)
				{
					streaming::set_model_as_no_longer_needed(Var0);
				}
				return true;
			}
		}
	}
	return false;
}

void func_311(int iParam0, struct<98> Param1)//Position - 0x2AC2D
{
	int iVar0;
	int iVar1;
	var uVar2;
	
	if (Param1.f_9)
	{
		vehicle::set_vehicle_colour_combination(*iParam0, Param1.f_4);
	}
	else
	{
		vehicle::set_vehicle_colours(*iParam0, Param1.f_5, Param1.f_6);
	}
	if (Param1.f_10)
	{
		vehicle::set_vehicle_extra_colours(*iParam0, Param1.f_7, Param1.f_8);
	}
	vehicle::set_vehicle_dirt_level(*iParam0, Param1.f_2);
	entity::set_entity_health(*iParam0, Param1.f_3);
	iVar0 = 0;
	while (iVar0 < 12)
	{
		vehicle::set_vehicle_extra(*iParam0, iVar0 + 1, !Param1.f_11[iVar0]);
		iVar0++;
	}
	if (Param1.f_24)
	{
		if (vehicle::is_vehicle_a_convertible(*iParam0, 0))
		{
			vehicle::raise_convertible_roof(*iParam0, 1);
		}
	}
	if (func_312(&uVar2, &iVar1) && Param1.f_97)
	{
		vehicle::set_vehicle_number_plate_text(*iParam0, &uVar2);
		vehicle::set_vehicle_number_plate_text_index(*iParam0, iVar1);
	}
	else if (!gameplay::is_string_null_or_empty(&(Param1.f_27)))
	{
		vehicle::set_vehicle_number_plate_text(*iParam0, &(Param1.f_27));
		if (Param1.f_26 >= 0 && Param1.f_26 < vehicle::get_number_of_vehicle_number_plates())
		{
			vehicle::set_vehicle_number_plate_text_index(*iParam0, Param1.f_26);
		}
	}
	vehicle::set_vehicle_tyre_smoke_color(*iParam0, Param1.f_84, Param1.f_85, Param1.f_86);
	vehicle::set_vehicle_tyres_can_burst(*iParam0, Param1.f_88);
	vehicle::set_vehicle_window_tint(*iParam0, Param1.f_87);
	vehicle::_set_vehicle_neon_lights_colour(*iParam0, Param1.f_93, Param1.f_94, Param1.f_95);
	vehicle::_set_vehicle_neon_light_enabled(*iParam0, 2, gameplay::is_bit_set(Param1.f_92, 28));
	vehicle::_set_vehicle_neon_light_enabled(*iParam0, 3, gameplay::is_bit_set(Param1.f_92, 29));
	vehicle::_set_vehicle_neon_light_enabled(*iParam0, 0, gameplay::is_bit_set(Param1.f_92, 30));
	vehicle::_set_vehicle_neon_light_enabled(*iParam0, 1, gameplay::is_bit_set(Param1.f_92, 31));
	if (vehicle::get_vehicle_livery_count(*iParam0) > 1 && Param1.f_89 >= 0)
	{
		vehicle::set_vehicle_livery(*iParam0, Param1.f_89);
	}
	if (Param1.f_90 > -1)
	{
		if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(*iParam0)))
		{
			if (vehicle::is_this_model_a_bike(entity::get_entity_model(*iParam0)))
			{
				if (Param1.f_90 == 6)
				{
					vehicle::set_vehicle_wheel_type(*iParam0, Param1.f_90);
				}
			}
			else
			{
				vehicle::set_vehicle_wheel_type(*iParam0, Param1.f_90);
			}
		}
	}
	func_314(iParam0, &(Param1.f_31), &(Param1.f_81));
	vehicle::_set_vehicle_paint_fade(*iParam0, Param1.f_96);
}

bool func_312(var uParam0, int iParam1)//Position - 0x2AE2E
{
	if (network::network_is_game_in_progress())
	{
	}
	else if (Global_101652.f_19061.f_261)
	{
		*uParam0 = { Global_101652.f_19061.f_267 };
		*iParam1 = Global_101652.f_19061.f_271;
		return true;
	}
	return false;
}

void func_313(var uParam0)//Position - 0x2AE6F
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 3)
	{
		if (!entity::does_entity_exist(Global_89180[iVar0]))
		{
			Global_89180[iVar0] = uParam0;
			iVar0 = 3;
		}
		if (iVar0 == 2)
		{
		}
		iVar0++;
	}
}

bool func_314(int iParam0, var uParam1, var uParam2)//Position - 0x2AEAC
{
	int iVar0;
	int iVar1;
	
	if (!vehicle::is_vehicle_driveable(*iParam0, 0))
	{
		return false;
	}
	if (vehicle::get_num_mod_kits(*iParam0) == 0)
	{
		return false;
	}
	vehicle::set_vehicle_mod_kit(*iParam0, 0);
	iVar0 = 0;
	while (iVar0 < *uParam1)
	{
		iVar1 = iVar0;
		if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
		{
			vehicle::toggle_vehicle_mod(*iParam0, iVar1, (*uParam1)[iVar0] > 0);
		}
		else if (vehicle::get_vehicle_mod(*iParam0, iVar1) != ((*uParam1)[iVar0] - 1))
		{
			vehicle::remove_vehicle_mod(*iParam0, iVar1);
			if ((*uParam1)[iVar0] > 0)
			{
				if (iVar0 == 23)
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), (*uParam2)[0] > 0);
				}
				else if (iVar0 == 24)
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), (*uParam2)[1] > 0);
				}
				else
				{
					vehicle::set_vehicle_mod(*iParam0, iVar1, ((*uParam1)[iVar0] - 1), false);
				}
			}
		}
		iVar0++;
	}
	if (func_317(entity::get_entity_model(*iParam0), 1) && vehicle::get_vehicle_mod(*iParam0, 24) != func_316(*iParam0, ((*uParam1)[38] - 1)))
	{
		vehicle::set_vehicle_mod(*iParam0, 24, func_316(*iParam0, ((*uParam1)[38] - 1)), false);
	}
	if (func_315(*iParam0))
	{
		vehicle::set_vehicle_strong(*iParam0, true);
		vehicle::set_vehicle_has_strong_axles(*iParam0, true);
	}
	return true;
}

bool func_315(int iParam0)//Position - 0x2B024
{
	int iVar0;
	int iVar1;
	int iVar2;
	char cVar3[16];
	
	if ((entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::get_num_mod_kits(iParam0) > 0)
	{
		vehicle::set_vehicle_mod_kit(iParam0, 0);
		iVar0 = 0;
		while (iVar0 < 49)
		{
			iVar1 = iVar0;
			if (((((iVar1 == 17 || iVar1 == 18) || iVar1 == 19) || iVar1 == 20) || iVar1 == 21) || iVar1 == 22)
			{
			}
			else if (vehicle::get_vehicle_mod(iParam0, iVar1) != -1)
			{
				StringCopy(&cVar3, vehicle::get_mod_text_label(iParam0, iVar1, vehicle::get_vehicle_mod(iParam0, iVar1)), 16);
				iVar2 = gameplay::get_hash_key(&cVar3);
				if (iVar2 != 0)
				{
					if (iVar2 == gameplay::get_hash_key("MNU_CAGE") || iVar2 == gameplay::get_hash_key("SABRE_CAG"))
					{
						return true;
					}
				}
			}
			iVar0++;
		}
	}
	return false;
}

int func_316(int iParam0, int iParam1)//Position - 0x2B100
{
	int iVar0;
	int iVar1;
	float fVar2;
	int iVar3;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		switch (entity::get_entity_model(iParam0))
		{
			case joaat("tornado5"):
				switch (iParam1)
				{
					case 0:
						return 0;
						break;
					
					case 1:
						return 1;
						break;
					
					case 2:
						return 2;
						break;
					
					case 3:
						return 3;
						break;
					
					case 4:
						return 4;
						break;
					
					case 5:
						return 4;
						break;
				}
				break;
			
			case joaat("faction3"):
				return 3;
				break;
		}
		iVar0 = vehicle::get_num_vehicle_mods(iParam0, 38);
		iVar1 = vehicle::get_num_vehicle_mods(iParam0, 24);
		fVar2 = (system::to_float(iParam1 + 1) / system::to_float(iVar0));
		iVar3 = (system::floor((system::to_float(iVar1) * fVar2)) - 1);
		if (iVar3 < 0)
		{
			iVar3 = 0;
		}
		if (iVar3 >= iVar0)
		{
			iVar3 = (iVar0 - 1);
		}
		return iVar3;
	}
	return 0;
}

bool func_317(int iParam0, int iParam1)//Position - 0x2B1E5
{
	switch (iParam0)
	{
		case joaat("faction2"):
		case joaat("buccaneer2"):
		case joaat("chino2"):
		case joaat("moonbeam2"):
		case joaat("primo2"):
		case joaat("voodoo"):
			return true;
			break;
		
		case joaat("sabregt2"):
			if (!Global_262145.f_12218)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("tornado5"):
			if (!Global_262145.f_12219)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("virgo2"):
			if (!Global_262145.f_12217)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("minivan2"):
			if (!Global_262145.f_12220)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("slamvan3"):
			if (!Global_262145.f_12222)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("faction3"):
			if (!Global_262145.f_12221)
			{
				return false;
			}
			else
			{
				return true;
			}
			break;
		
		case joaat("sultanrs"):
		case joaat("banshee2"):
			if (iParam1 & 1 != 0)
			{
				return false;
			}
			return true;
			break;
		
		case joaat("comet3"):
			if (Global_262145.f_16659)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("diablous2"):
			if (Global_262145.f_16661)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("fcr2"):
			if (Global_262145.f_16665)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("elegy"):
			if (Global_262145.f_16662)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("nero2"):
			if (Global_262145.f_16669)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("italigtb2"):
			if (Global_262145.f_16667)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
		
		case joaat("specter2"):
			if (Global_262145.f_16672)
			{
				if (iParam1 & 1 != 0)
				{
					return false;
				}
				return true;
			}
			return false;
			break;
	}
	return false;
}

bool func_318(int iParam0, int iParam1, vector3 vParam2, float fParam5, int iParam6, int iParam7)//Position - 0x2B40A
{
	int iVar0;
	var uVar1;
	struct<97> Var5;
	int iVar103;
	int iVar104;
	int iVar105;
	char cVar106[16];
	int iVar110;
	
	if (func_89(iParam1))
	{
		Var5.f_11 = 12;
		Var5.f_31 = 49;
		Var5.f_81 = 2;
		func_329(iParam1, &Var5, iParam7);
		if (Var5 == 0)
		{
			return true;
		}
		if (entity::does_entity_exist(*iParam0))
		{
			if (entity::get_entity_model(*iParam0) != Var5)
			{
			}
			return true;
		}
		if ((iParam1 == 0 && !Global_101652.f_2079.f_539.f_3544) && Global_101652.f_8028.f_99.f_58[131])
		{
			Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/] = 0;
		}
		if (Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/] == Var5)
		{
			streaming::request_model(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/]);
			if (streaming::has_model_loaded(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/]))
			{
				*iParam0 = vehicle::create_vehicle(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/], vParam2, fParam5, 0, false);
				vehicle::set_vehicle_on_ground_properly(*iParam0, 1084227584);
				vehicle::_0xAB04325045427AAE(*iParam0, 0);
				vehicle::_0x428BACCDF5E26EAD(*iParam0, false);
				vehicle::set_vehicle_has_strong_axles(*iParam0, true);
				entity::set_entity_health(*iParam0, 1250);
				vehicle::set_vehicle_engine_health(*iParam0, 1250f);
				vehicle::set_vehicle_petrol_tank_health(*iParam0, 1250f);
				Var5.f_3 = 1250;
				vehicle::set_vehicle_colours(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_5, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_6);
				vehicle::set_vehicle_extra_colours(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_7, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_8);
				vehicle::set_vehicle_dirt_level(*iParam0, Var5.f_2);
				iVar103 = 0;
				while (iVar103 < 12)
				{
					vehicle::set_vehicle_extra(*iParam0, iVar103 + 1, !Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_11[iVar103]);
					iVar103++;
				}
				if (Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_24)
				{
					vehicle::set_convertible_roof(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_24);
				}
				if (func_312(&uVar1, &iVar0))
				{
					vehicle::set_vehicle_number_plate_text(*iParam0, &uVar1);
					vehicle::set_vehicle_number_plate_text_index(*iParam0, iVar0);
				}
				else
				{
					vehicle::set_vehicle_number_plate_text(*iParam0, &(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_27));
					if (Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_26 >= 0 && Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_26 < vehicle::get_number_of_vehicle_number_plates())
					{
						vehicle::set_vehicle_number_plate_text_index(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_26);
					}
				}
				vehicle::set_vehicle_tyre_smoke_color(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_84, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_85, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_86);
				vehicle::set_vehicle_tyres_can_burst(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_88);
				vehicle::set_vehicle_window_tint(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_87);
				vehicle::_set_vehicle_neon_lights_colour(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_93, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_94, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_95);
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 2, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_92, 28));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 3, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_92, 29));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 0, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_92, 30));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 1, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_92, 31));
				if (vehicle::get_vehicle_livery_count(*iParam0) > 1 && Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_89 >= 0)
				{
					vehicle::set_vehicle_livery(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_89);
				}
				if (Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_90 > -1)
				{
					if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(*iParam0)))
					{
						if (vehicle::is_this_model_a_bike(entity::get_entity_model(*iParam0)))
						{
							if (Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_90 == 6)
							{
								vehicle::set_vehicle_wheel_type(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_90);
							}
						}
						else
						{
							vehicle::set_vehicle_wheel_type(*iParam0, Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_90);
						}
					}
				}
				func_314(iParam0, &(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_31), &(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/].f_81));
				vehicle::_set_vehicle_paint_fade(*iParam0, Var5.f_96);
				if (iParam1 == 2)
				{
					if (entity::get_entity_model(*iParam0) == joaat("bodhi2"))
					{
						func_327(iParam0);
					}
				}
				if (iParam6)
				{
					streaming::set_model_as_no_longer_needed(Global_101652.f_2079.f_539.f_1635[0 /*295*/][iParam1 /*98*/]);
				}
				func_326(*iParam0, iParam1);
				return true;
			}
		}
		else if (Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/] == Var5)
		{
			streaming::request_model(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/]);
			if (streaming::has_model_loaded(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/]))
			{
				*iParam0 = vehicle::create_vehicle(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/], vParam2, fParam5, 0, false);
				vehicle::set_vehicle_on_ground_properly(*iParam0, 1084227584);
				vehicle::_0xAB04325045427AAE(*iParam0, 0);
				vehicle::_0x428BACCDF5E26EAD(*iParam0, false);
				vehicle::set_vehicle_has_strong_axles(*iParam0, true);
				entity::set_entity_health(*iParam0, 1250);
				vehicle::set_vehicle_engine_health(*iParam0, 1250f);
				vehicle::set_vehicle_petrol_tank_health(*iParam0, 1250f);
				Var5.f_3 = 1250;
				vehicle::set_vehicle_colours(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_5, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_6);
				vehicle::set_vehicle_extra_colours(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_7, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_8);
				vehicle::set_vehicle_dirt_level(*iParam0, Var5.f_2);
				iVar104 = 0;
				while (iVar104 < 12)
				{
					vehicle::set_vehicle_extra(*iParam0, iVar104 + 1, !Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_11[iVar104]);
					iVar104++;
				}
				if (Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_24)
				{
					vehicle::set_convertible_roof(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_24);
				}
				if (func_312(&uVar1, &iVar0))
				{
					vehicle::set_vehicle_number_plate_text(*iParam0, &uVar1);
					vehicle::set_vehicle_number_plate_text_index(*iParam0, iVar0);
				}
				else
				{
					vehicle::set_vehicle_number_plate_text(*iParam0, &(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_27));
					if (Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_26 >= 0 && Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_26 < vehicle::get_number_of_vehicle_number_plates())
					{
						vehicle::set_vehicle_number_plate_text_index(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_26);
					}
				}
				vehicle::set_vehicle_tyre_smoke_color(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_84, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_85, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_86);
				vehicle::set_vehicle_tyres_can_burst(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_88);
				vehicle::set_vehicle_window_tint(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_87);
				vehicle::_set_vehicle_neon_lights_colour(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_93, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_94, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_95);
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 2, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_92, 28));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 3, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_92, 29));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 0, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_92, 30));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 1, gameplay::is_bit_set(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_92, 31));
				if (vehicle::get_vehicle_livery_count(*iParam0) > 1 && Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_89 >= 0)
				{
					vehicle::set_vehicle_livery(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_89);
				}
				if (Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_90 > -1)
				{
					if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(*iParam0)))
					{
						if (vehicle::is_this_model_a_bike(entity::get_entity_model(*iParam0)))
						{
							if (Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_90 == 6)
							{
								vehicle::set_vehicle_wheel_type(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_90);
							}
						}
						else
						{
							vehicle::set_vehicle_wheel_type(*iParam0, Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_90);
						}
					}
				}
				func_314(iParam0, &(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_31), &(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/].f_81));
				vehicle::_set_vehicle_paint_fade(*iParam0, Var5.f_96);
				if (iParam1 == 2)
				{
					if (entity::get_entity_model(*iParam0) == joaat("bodhi2"))
					{
						func_327(iParam0);
					}
				}
				if (iParam6)
				{
					streaming::set_model_as_no_longer_needed(Global_101652.f_2079.f_539.f_1635[1 /*295*/][iParam1 /*98*/]);
				}
				func_326(*iParam0, iParam1);
				return true;
			}
		}
		else
		{
			streaming::request_model(Var5);
			if (streaming::has_model_loaded(Var5))
			{
				iVar105 = true;
				*iParam0 = vehicle::create_vehicle(Var5, vParam2, fParam5, 1, true);
				vehicle::set_vehicle_on_ground_properly(*iParam0, 1084227584);
				vehicle::_0xAB04325045427AAE(*iParam0, 0);
				vehicle::_0x428BACCDF5E26EAD(*iParam0, false);
				vehicle::set_vehicle_has_strong_axles(*iParam0, true);
				StringCopy(&cVar106, vehicle::get_vehicle_number_plate_text(*iParam0), 16);
				entity::set_entity_health(*iParam0, 1250);
				vehicle::set_vehicle_engine_health(*iParam0, 1250f);
				vehicle::set_vehicle_petrol_tank_health(*iParam0, 1250f);
				Var5.f_3 = 1250;
				vehicle::set_vehicle_colours(*iParam0, Var5.f_5, Var5.f_6);
				vehicle::set_vehicle_extra_colours(*iParam0, Var5.f_7, Var5.f_8);
				vehicle::set_vehicle_dirt_level(*iParam0, Var5.f_2);
				iVar110 = 0;
				while (iVar110 < 12)
				{
					vehicle::set_vehicle_extra(*iParam0, iVar110 + 1, !Var5.f_11[iVar110]);
					iVar110++;
				}
				if (Var5.f_24)
				{
					vehicle::set_convertible_roof(*iParam0, Var5.f_24);
				}
				if (func_312(&uVar1, &iVar0))
				{
					vehicle::set_vehicle_number_plate_text(*iParam0, &uVar1);
					vehicle::set_vehicle_number_plate_text_index(*iParam0, iVar0);
				}
				else
				{
					vehicle::set_vehicle_number_plate_text(*iParam0, &(Var5.f_27));
					if (Var5.f_26 >= 0 && Var5.f_26 < vehicle::get_number_of_vehicle_number_plates())
					{
						vehicle::set_vehicle_number_plate_text_index(*iParam0, Var5.f_26);
					}
				}
				vehicle::set_vehicle_tyre_smoke_color(*iParam0, Var5.f_84, Var5.f_85, Var5.f_86);
				vehicle::set_vehicle_tyres_can_burst(*iParam0, Var5.f_88);
				vehicle::set_vehicle_window_tint(*iParam0, Var5.f_87);
				vehicle::_set_vehicle_neon_lights_colour(*iParam0, Var5.f_93, Var5.f_94, Var5.f_95);
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 2, gameplay::is_bit_set(Var5.f_92, 28));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 3, gameplay::is_bit_set(Var5.f_92, 29));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 0, gameplay::is_bit_set(Var5.f_92, 30));
				vehicle::_set_vehicle_neon_light_enabled(*iParam0, 1, gameplay::is_bit_set(Var5.f_92, 31));
				if (vehicle::get_vehicle_livery_count(*iParam0) > 1 && Var5.f_89 >= 0)
				{
					vehicle::set_vehicle_livery(*iParam0, Var5.f_89);
				}
				if (Var5.f_90 > -1)
				{
					if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(*iParam0)))
					{
						if (vehicle::is_this_model_a_bike(entity::get_entity_model(*iParam0)))
						{
							if (Var5.f_90 == 6)
							{
								vehicle::set_vehicle_wheel_type(*iParam0, Var5.f_90);
							}
						}
						else
						{
							vehicle::set_vehicle_wheel_type(*iParam0, Var5.f_90);
						}
					}
				}
				func_314(iParam0, &(Var5.f_31), &(Var5.f_81));
				vehicle::_set_vehicle_paint_fade(*iParam0, Var5.f_96);
				if (iParam1 == 1)
				{
					if (entity::get_entity_model(*iParam0) == joaat("bagger") && !Global_101652.f_8028.f_99.f_58[118])
					{
						vehicle::set_vehicle_number_plate_text(*iParam0, &cVar106);
						iVar105 = false;
					}
				}
				else if (iParam1 == 2)
				{
					if (entity::get_entity_model(*iParam0) == joaat("bodhi2"))
					{
						func_327(iParam0);
					}
				}
				else if (((iParam1 == 0 && !Global_101652.f_2079.f_539.f_3544) && Global_101652.f_8028.f_99.f_58[131]) && entity::get_entity_model(*iParam0) == joaat("tailgater"))
				{
					vehicle::set_vehicle_mod(*iParam0, 6, 1, false);
					vehicle::set_vehicle_mod(*iParam0, 14, 7, false);
					vehicle::set_vehicle_mod(*iParam0, 11, 2, false);
					vehicle::set_vehicle_mod(*iParam0, 2, 3, false);
					vehicle::set_vehicle_mod(*iParam0, 7, 5, false);
					vehicle::set_vehicle_mod(*iParam0, 0, 0, false);
					vehicle::set_vehicle_mod(*iParam0, 3, 3, false);
					vehicle::set_vehicle_mod(*iParam0, 13, 1, false);
					vehicle::set_vehicle_mod(*iParam0, 4, 3, false);
					vehicle::set_vehicle_mod(*iParam0, 12, 2, false);
					vehicle::toggle_vehicle_mod(*iParam0, 22, true);
					vehicle::set_vehicle_wheel_type(*iParam0, 2);
					vehicle::set_vehicle_mod(*iParam0, 23, 11, false);
					vehicle::set_vehicle_window_tint(*iParam0, 2);
					Global_101652.f_2079.f_539.f_3544 = 1;
					func_319(iParam1, iParam0, 0, 1);
				}
				if (iParam6)
				{
					streaming::set_model_as_no_longer_needed(Var5);
				}
				if (iVar105)
				{
					func_326(*iParam0, iParam1);
				}
				return true;
			}
		}
	}
	return false;
}

void func_319(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x2C24A
{
	var uVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	var uVar5;
	var uVar6;
	
	if ((func_89(iParam0) && entity::does_entity_exist(*iParam1)) && vehicle::is_vehicle_driveable(*iParam1, 0))
	{
		if (iParam2 > Global_101652.f_2079.f_539.f_1635)
		{
			return;
		}
		if (iParam2 == 0)
		{
		}
		else if (iParam2 == 1)
		{
		}
		else if (iParam2 == 2)
		{
		}
		else if (iParam2 == 3)
		{
			func_107(*iParam1, iParam0);
		}
		if (vehicle::get_num_mod_kits(*iParam1) != 0)
		{
			vehicle::set_vehicle_mod_kit(*iParam1, 0);
		}
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/] = entity::get_entity_model(*iParam1);
		if (vehicle::get_vehicle_trailer_vehicle(*iParam1, &iVar1))
		{
			Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_1 = entity::get_entity_model(iVar1);
		}
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_2 = vehicle::get_vehicle_dirt_level(*iParam1);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_3 = entity::get_entity_health(*iParam1);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[0] = vehicle::is_vehicle_extra_turned_on(*iParam1, 1);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[1] = vehicle::is_vehicle_extra_turned_on(*iParam1, 2);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[2] = vehicle::is_vehicle_extra_turned_on(*iParam1, 3);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[3] = vehicle::is_vehicle_extra_turned_on(*iParam1, 4);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[4] = vehicle::is_vehicle_extra_turned_on(*iParam1, 5);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[5] = vehicle::is_vehicle_extra_turned_on(*iParam1, 6);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[6] = vehicle::is_vehicle_extra_turned_on(*iParam1, 7);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[7] = vehicle::is_vehicle_extra_turned_on(*iParam1, 8);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[8] = vehicle::is_vehicle_extra_turned_on(*iParam1, 9);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[9] = vehicle::is_vehicle_extra_turned_on(*iParam1, 10);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[10] = vehicle::is_vehicle_extra_turned_on(*iParam1, 11);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_11[11] = vehicle::is_vehicle_extra_turned_on(*iParam1, 12);
		if (vehicle::is_vehicle_a_convertible(*iParam1, 0))
		{
			iVar2 = vehicle::get_convertible_roof_state(*iParam1);
			if (iVar2 == 0 || iVar2 == 5)
			{
				Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_24 = 1;
			}
			else
			{
				Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_24 = 0;
			}
		}
		else
		{
			Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_24 = 0;
		}
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_25 = audio::get_player_radio_station_index();
		StringCopy(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_27), vehicle::get_vehicle_number_plate_text(*iParam1), 16);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_26 = vehicle::get_vehicle_number_plate_text_index(*iParam1);
		vehicle::get_vehicle_colours(*iParam1, &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_5), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_6));
		vehicle::get_vehicle_extra_colours(*iParam1, &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_7), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_8));
		vehicle::get_vehicle_tyre_smoke_color(*iParam1, &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_84), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_85), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_86));
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_88 = vehicle::get_vehicle_tyres_can_burst(*iParam1);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_87 = vehicle::get_vehicle_window_tint(*iParam1);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_89 = vehicle::get_vehicle_livery(*iParam1);
		Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_90 = vehicle::get_vehicle_wheel_type(*iParam1);
		vehicle::_get_vehicle_neon_lights_colour(*iParam1, &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_93), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_94), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_95));
		if (vehicle::_is_vehicle_neon_light_enabled(*iParam1, 2))
		{
			gameplay::set_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 28);
		}
		else
		{
			gameplay::clear_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 28);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(*iParam1, 3))
		{
			gameplay::set_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 29);
		}
		else
		{
			gameplay::clear_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 29);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(*iParam1, 0))
		{
			gameplay::set_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 30);
		}
		else
		{
			gameplay::clear_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 30);
		}
		if (vehicle::_is_vehicle_neon_light_enabled(*iParam1, 1))
		{
			gameplay::set_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 31);
		}
		else
		{
			gameplay::clear_bit(&(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_92), 31);
		}
		Global_101652.f_2079.f_539.f_3545[iParam0] = 10;
		if ((vehicle::get_vehicle_mod_kit(*iParam1) >= 0 && vehicle::get_vehicle_mod_kit(*iParam1) < 255) && func_323(*iParam1, 0, &uVar0))
		{
			func_110(iParam1, &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31), &(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_81));
			if (iParam3)
			{
				Global_101652.f_19061[iParam0 /*43*/].f_40 = 1;
				Global_101652.f_19061[iParam0 /*43*/] = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/];
				Global_101652.f_19061[iParam0 /*43*/].f_3 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_87;
				Global_101652.f_19061[iParam0 /*43*/].f_4 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_84;
				Global_101652.f_19061[iParam0 /*43*/].f_5 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_85;
				Global_101652.f_19061[iParam0 /*43*/].f_6 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_86;
				Global_101652.f_19061[iParam0 /*43*/].f_10 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_90;
				Global_101652.f_19061[iParam0 /*43*/].f_16 = !Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_88;
				Global_101652.f_19061[iParam0 /*43*/].f_19 = { Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_27 };
				Global_101652.f_19061[iParam0 /*43*/].f_23 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_26;
				Global_101652.f_19061[iParam0 /*43*/].f_7 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[11];
				Global_101652.f_19061[iParam0 /*43*/].f_8 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[12];
				Global_101652.f_19061[iParam0 /*43*/].f_9 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[23];
				Global_101652.f_19061[iParam0 /*43*/].f_11 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[4];
				Global_101652.f_19061[iParam0 /*43*/].f_12 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[15];
				Global_101652.f_19061[iParam0 /*43*/].f_13 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[16];
				Global_101652.f_19061[iParam0 /*43*/].f_14 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[14];
				Global_101652.f_19061[iParam0 /*43*/].f_15 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[22];
				Global_101652.f_19061[iParam0 /*43*/].f_18 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[20];
				Global_101652.f_19061[iParam0 /*43*/].f_17 = Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_31[18];
				Global_101652.f_19061[iParam0 /*43*/].f_24 = vehicle::get_num_vehicle_mods(*iParam1, 11) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_25 = vehicle::get_num_vehicle_mods(*iParam1, 12) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_26 = vehicle::get_num_vehicle_mods(*iParam1, 4) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_27 = vehicle::get_num_vehicle_mods(*iParam1, 23) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_28 = vehicle::get_num_vehicle_mods(*iParam1, 14) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_29 = vehicle::get_num_vehicle_mods(*iParam1, 16) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_30 = vehicle::get_num_vehicle_mods(*iParam1, 15) + 1;
				Global_101652.f_19061[iParam0 /*43*/].f_32 = vehicle::_0xEEBFC7A7EFDC35B4(*iParam1);
				Global_101652.f_19061[iParam0 /*43*/].f_33[0] = audio::get_vehicle_default_horn(*iParam1);
				Global_101652.f_19061[iParam0 /*43*/].f_33[1] = vehicle::get_vehicle_mod_modifier_value(*iParam1, 14, 0);
				Global_101652.f_19061[iParam0 /*43*/].f_33[2] = vehicle::get_vehicle_mod_modifier_value(*iParam1, 14, 1);
				Global_101652.f_19061[iParam0 /*43*/].f_33[3] = vehicle::get_vehicle_mod_modifier_value(*iParam1, 14, 2);
				Global_101652.f_19061[iParam0 /*43*/].f_33[4] = vehicle::get_vehicle_mod_modifier_value(*iParam1, 14, 3);
				Global_101652.f_19061[iParam0 /*43*/].f_39 = vehicle::get_vehicle_mod_kit_type(*iParam1);
				Global_101652.f_19061[iParam0 /*43*/].f_31 = func_322(*iParam1);
				Global_101652.f_19061[iParam0 /*43*/].f_33[0] = audio::_0xACB5DCCA1EC76840(*iParam1);
				vehicle::get_vehicle_mod_color_1(*iParam1, &iVar4, &uVar5, &uVar6);
				if (iVar4 == 0)
				{
					iVar3 = 0;
				}
				else if (iVar4 == 1)
				{
					iVar3 = 1;
				}
				else if (iVar4 == 3)
				{
					iVar3 = 2;
				}
				else if (iVar4 == 4)
				{
					iVar3 = 3;
				}
				else if (iVar4 == 5)
				{
					iVar3 = 4;
				}
				else
				{
					iVar3 = -1;
				}
				func_320(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_5, Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_7, iVar3, 1, &(Global_101652.f_19061[iParam0 /*43*/].f_1));
				vehicle::get_vehicle_mod_color_2(*iParam1, &iVar4, &uVar5);
				if (iVar4 == 0)
				{
					iVar3 = 0;
				}
				else if (iVar4 == 1)
				{
					iVar3 = 1;
				}
				else if (iVar4 == 3)
				{
					iVar3 = 2;
				}
				else if (iVar4 == 4)
				{
					iVar3 = 3;
				}
				else if (iVar4 == 5)
				{
					iVar3 = 4;
				}
				else
				{
					iVar3 = -1;
				}
				func_320(Global_101652.f_2079.f_539.f_1635[iParam2 /*295*/][iParam0 /*98*/].f_6, -1, iVar3, 0, &(Global_101652.f_19061[iParam0 /*43*/].f_2));
			}
		}
	}
}

bool func_320(int iParam0, int iParam1, int iParam2, int iParam3, var uParam4)//Position - 0x2CE6D
{
	int iVar0;
	int iVar1;
	char* sVar2;
	int iVar6;
	int iVar7;
	
	iVar0 = 0;
	while (func_321(iVar0, &sVar2, &iVar1, &iVar6, &iVar7))
	{
		if ((iParam0 == iVar6 && (!iParam3 || iParam1 == iVar7)) && ((iParam2 == iVar1 || iParam2 == -1) || iParam2 == 255))
		{
			*uParam4 = iVar0;
			return true;
		}
		iVar0++;
	}
	iParam0 = -1;
	iParam1 = -1;
	*uParam4 = -1;
	return false;
}

int func_321(int iParam0, char* sParam1, var uParam2, var uParam3, var uParam4)//Position - 0x2CEE0
{
	*uParam2 = -1;
	*uParam3 = -1;
	*uParam4 = -1;
	switch (iParam0)
	{
		case 0:
			StringCopy(sParam1, "BR BLACK_STEEL", 16);
			*uParam2 = 3;
			*uParam3 = 118;
			*uParam4 = 3;
			break;
		
		case 1:
			StringCopy(sParam1, "BLACK_GRAPHITE", 16);
			*uParam2 = 0;
			*uParam3 = 147;
			*uParam4 = 4;
			break;
		
		case 2:
			StringCopy(sParam1, "CHOCOLATE_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 96;
			*uParam4 = 0;
			break;
		
		case 3:
			StringCopy(sParam1, "PURPLE", 16);
			*uParam2 = 0;
			*uParam3 = 71;
			*uParam4 = 145;
			break;
		
		case 4:
			StringCopy(sParam1, "HOT PINK", 16);
			*uParam2 = 0;
			*uParam3 = 135;
			*uParam4 = 135;
			break;
		
		case 5:
			StringCopy(sParam1, "FORMULA_RED", 16);
			*uParam2 = 0;
			*uParam3 = 29;
			*uParam4 = 28;
			break;
		
		case 6:
			StringCopy(sParam1, "BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 64;
			*uParam4 = 68;
			break;
		
		case 7:
			StringCopy(sParam1, "ULTRA_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 70;
			*uParam4 = 0;
			break;
		
		case 8:
			StringCopy(sParam1, "RACING_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 50;
			*uParam4 = 0;
			break;
		
		case 9:
			StringCopy(sParam1, "LIME_GREEN", 16);
			*uParam2 = 2;
			*uParam3 = 55;
			*uParam4 = 0;
			break;
		
		case 10:
			StringCopy(sParam1, "RACE_YELLOW", 16);
			*uParam2 = 1;
			*uParam3 = 89;
			*uParam4 = 0;
			break;
		
		case 11:
			StringCopy(sParam1, "ORANGE", 16);
			*uParam2 = 1;
			*uParam3 = 38;
			*uParam4 = 0;
			break;
		
		case 12:
			StringCopy(sParam1, "GOLD", 16);
			*uParam2 = 0;
			*uParam3 = 37;
			*uParam4 = 106;
			break;
		
		case 13:
			StringCopy(sParam1, "SILVER", 16);
			*uParam2 = 0;
			*uParam3 = 4;
			*uParam4 = 111;
			break;
		
		case 14:
			StringCopy(sParam1, "CHROME", 16);
			*uParam2 = 4;
			*uParam3 = 120;
			*uParam4 = 0;
			break;
		
		case 15:
			StringCopy(sParam1, "WHITE", 16);
			*uParam2 = 1;
			*uParam3 = 111;
			*uParam4 = 0;
			break;
		
		case 16:
			StringCopy(sParam1, "BLACK", 16);
			*uParam2 = 0;
			*uParam3 = 0;
			*uParam4 = 10;
			break;
		
		case 17:
			StringCopy(sParam1, "GRAPHITE", 16);
			*uParam2 = 0;
			*uParam3 = 1;
			*uParam4 = 5;
			break;
		
		case 18:
			StringCopy(sParam1, "ANTHR_BLACK", 16);
			*uParam2 = 0;
			*uParam3 = 11;
			*uParam4 = 2;
			break;
		
		case 19:
			StringCopy(sParam1, "BLACK_STEEL", 16);
			*uParam2 = 0;
			*uParam3 = 2;
			*uParam4 = 5;
			break;
		
		case 20:
			StringCopy(sParam1, "DARK_SILVER", 16);
			*uParam2 = 0;
			*uParam3 = 3;
			*uParam4 = 6;
			break;
		
		case 21:
			StringCopy(sParam1, "BLUE_SILVER", 16);
			*uParam2 = 0;
			*uParam3 = 5;
			*uParam4 = 111;
			break;
		
		case 22:
			StringCopy(sParam1, "ROLLED_STEEL", 16);
			*uParam2 = 0;
			*uParam3 = 6;
			*uParam4 = 4;
			break;
		
		case 23:
			StringCopy(sParam1, "SHADOW_SILVER", 16);
			*uParam2 = 0;
			*uParam3 = 7;
			*uParam4 = 5;
			break;
		
		case 24:
			StringCopy(sParam1, "STONE_SILVER", 16);
			*uParam2 = 0;
			*uParam3 = 8;
			*uParam4 = 5;
			break;
		
		case 25:
			StringCopy(sParam1, "MIDNIGHT_SILVER", 16);
			*uParam2 = 0;
			*uParam3 = 9;
			*uParam4 = 7;
			break;
		
		case 26:
			StringCopy(sParam1, "CAST_IRON_SIL", 16);
			*uParam2 = 0;
			*uParam3 = 10;
			*uParam4 = 7;
			break;
		
		case 27:
			StringCopy(sParam1, "RED", 16);
			*uParam2 = 0;
			*uParam3 = 27;
			*uParam4 = 36;
			break;
		
		case 28:
			StringCopy(sParam1, "TORINO_RED", 16);
			*uParam2 = 0;
			*uParam3 = 28;
			*uParam4 = 28;
			break;
		
		case 29:
			StringCopy(sParam1, "LAVA_RED", 16);
			*uParam2 = 0;
			*uParam3 = 150;
			*uParam4 = 42;
			break;
		
		case 30:
			StringCopy(sParam1, "BLAZE_RED", 16);
			*uParam2 = 0;
			*uParam3 = 30;
			*uParam4 = 36;
			break;
		
		case 31:
			StringCopy(sParam1, "GRACE_RED", 16);
			*uParam2 = 0;
			*uParam3 = 31;
			*uParam4 = 27;
			break;
		
		case 32:
			StringCopy(sParam1, "GARNET_RED", 16);
			*uParam2 = 0;
			*uParam3 = 32;
			*uParam4 = 25;
			break;
		
		case 33:
			StringCopy(sParam1, "SUNSET_RED", 16);
			*uParam2 = 0;
			*uParam3 = 33;
			*uParam4 = 47;
			break;
		
		case 34:
			StringCopy(sParam1, "CABERNET_RED", 16);
			*uParam2 = 0;
			*uParam3 = 34;
			*uParam4 = 47;
			break;
		
		case 35:
			StringCopy(sParam1, "WINE_RED", 16);
			*uParam2 = 0;
			*uParam3 = 143;
			*uParam4 = 31;
			break;
		
		case 36:
			StringCopy(sParam1, "CANDY_RED", 16);
			*uParam2 = 0;
			*uParam3 = 35;
			*uParam4 = 25;
			break;
		
		case 37:
			StringCopy(sParam1, "PINK", 16);
			*uParam2 = 0;
			*uParam3 = 137;
			*uParam4 = 3;
			break;
		
		case 38:
			StringCopy(sParam1, "SALMON_PINK", 16);
			*uParam2 = 0;
			*uParam3 = 136;
			*uParam4 = 5;
			break;
		
		case 39:
			StringCopy(sParam1, "SUNRISE_ORANGE", 16);
			*uParam2 = 0;
			*uParam3 = 36;
			*uParam4 = 26;
			break;
		
		case 40:
			StringCopy(sParam1, "ORANGE", 16);
			*uParam2 = 0;
			*uParam3 = 38;
			*uParam4 = 37;
			break;
		
		case 41:
			StringCopy(sParam1, "BRIGHT_ORANGE", 16);
			*uParam2 = 0;
			*uParam3 = 138;
			*uParam4 = 89;
			break;
		
		case 42:
			StringCopy(sParam1, "BRONZE", 16);
			*uParam2 = 0;
			*uParam3 = 90;
			*uParam4 = 102;
			break;
		
		case 43:
			StringCopy(sParam1, "YELLOW", 16);
			*uParam2 = 0;
			*uParam3 = 88;
			*uParam4 = 88;
			break;
		
		case 44:
			StringCopy(sParam1, "RACE_YELLOW", 16);
			*uParam2 = 0;
			*uParam3 = 89;
			*uParam4 = 88;
			break;
		
		case 45:
			StringCopy(sParam1, "FLUR_YELLOW", 16);
			*uParam2 = 0;
			*uParam3 = 91;
			*uParam4 = 91;
			break;
		
		case 46:
			StringCopy(sParam1, "DARK_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 49;
			*uParam4 = 52;
			break;
		
		case 47:
			StringCopy(sParam1, "RACING_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 50;
			*uParam4 = 53;
			break;
		
		case 48:
			StringCopy(sParam1, "SEA_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 51;
			*uParam4 = 66;
			break;
		
		case 49:
			StringCopy(sParam1, "OLIVE_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 52;
			*uParam4 = 59;
			break;
		
		case 50:
			StringCopy(sParam1, "BRIGHT_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 53;
			*uParam4 = 59;
			break;
		
		case 51:
			StringCopy(sParam1, "PETROL_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 54;
			*uParam4 = 60;
			break;
		
		case 52:
			StringCopy(sParam1, "LIME_GREEN", 16);
			*uParam2 = 0;
			*uParam3 = 92;
			*uParam4 = 92;
			break;
		
		case 53:
			StringCopy(sParam1, "MIDNIGHT_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 141;
			*uParam4 = 73;
			break;
		
		case 54:
			StringCopy(sParam1, "GALAXY_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 61;
			*uParam4 = 63;
			break;
		
		case 55:
			StringCopy(sParam1, "DARK_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 62;
			*uParam4 = 68;
			break;
		
		case 56:
			StringCopy(sParam1, "SAXON_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 63;
			*uParam4 = 87;
			break;
		
		case 57:
			StringCopy(sParam1, "MARINER_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 65;
			*uParam4 = 87;
			break;
		
		case 58:
			StringCopy(sParam1, "HARBOR_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 66;
			*uParam4 = 60;
			break;
		
		case 59:
			StringCopy(sParam1, "DIAMOND_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 67;
			*uParam4 = 67;
			break;
		
		case 60:
			StringCopy(sParam1, "SURF_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 68;
			*uParam4 = 68;
			break;
		
		case 61:
			StringCopy(sParam1, "NAUTICAL_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 69;
			*uParam4 = 74;
			break;
		
		case 62:
			StringCopy(sParam1, "RACING_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 73;
			*uParam4 = 73;
			break;
		
		case 63:
			StringCopy(sParam1, "ULTRA_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 70;
			*uParam4 = 70;
			break;
		
		case 64:
			StringCopy(sParam1, "LIGHT_BLUE", 16);
			*uParam2 = 0;
			*uParam3 = 74;
			*uParam4 = 74;
			break;
		
		case 65:
			StringCopy(sParam1, "CHOCOLATE_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 96;
			*uParam4 = 95;
			break;
		
		case 66:
			StringCopy(sParam1, "BISON_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 101;
			*uParam4 = 95;
			break;
		
		case 67:
			StringCopy(sParam1, "CREEK_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 95;
			*uParam4 = 97;
			break;
		
		case 68:
			StringCopy(sParam1, "UMBER_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 94;
			*uParam4 = 104;
			break;
		
		case 69:
			StringCopy(sParam1, "MAPLE_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 97;
			*uParam4 = 98;
			break;
		
		case 70:
			StringCopy(sParam1, "BEECHWOOD_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 103;
			*uParam4 = 104;
			break;
		
		case 71:
			StringCopy(sParam1, "SIENNA_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 104;
			*uParam4 = 104;
			break;
		
		case 72:
			StringCopy(sParam1, "SADDLE_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 98;
			*uParam4 = 95;
			break;
		
		case 73:
			StringCopy(sParam1, "MOSS_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 100;
			*uParam4 = 100;
			break;
		
		case 74:
			StringCopy(sParam1, "WOODBEECH_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 102;
			*uParam4 = 105;
			break;
		
		case 75:
			StringCopy(sParam1, "STRAW_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 99;
			*uParam4 = 106;
			break;
		
		case 76:
			StringCopy(sParam1, "SANDY_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 105;
			*uParam4 = 105;
			break;
		
		case 77:
			StringCopy(sParam1, "BLEECHED_BROWN", 16);
			*uParam2 = 0;
			*uParam3 = 106;
			*uParam4 = 106;
			break;
		
		case 78:
			StringCopy(sParam1, "SPIN_PURPLE", 16);
			*uParam2 = 0;
			*uParam3 = 72;
			*uParam4 = 64;
			break;
		
		case 79:
			StringCopy(sParam1, "MIGHT_PURPLE", 16);
			*uParam2 = 0;
			*uParam3 = 146;
			*uParam4 = 145;
			break;
		
		case 80:
			StringCopy(sParam1, "BRIGHT_PURPLE", 16);
			*uParam2 = 0;
			*uParam3 = 145;
			*uParam4 = 74;
			break;
		
		case 81:
			StringCopy(sParam1, "CREAM", 16);
			*uParam2 = 0;
			*uParam3 = 107;
			*uParam4 = 107;
			break;
		
		case 82:
			StringCopy(sParam1, "WHITE", 16);
			*uParam2 = 0;
			*uParam3 = 111;
			*uParam4 = 0;
			break;
		
		case 83:
			StringCopy(sParam1, "FROST_WHITE", 16);
			*uParam2 = 0;
			*uParam3 = 112;
			*uParam4 = 0;
			break;
		
		case 84:
			StringCopy(sParam1, "BLACK", 16);
			*uParam2 = 1;
			*uParam3 = 0;
			*uParam4 = 0;
			break;
		
		case 85:
			StringCopy(sParam1, "BLACK_GRAPHITE", 16);
			*uParam2 = 1;
			*uParam3 = 147;
			*uParam4 = 0;
			break;
		
		case 86:
			StringCopy(sParam1, "GRAPHITE", 16);
			*uParam2 = 1;
			*uParam3 = 1;
			*uParam4 = 0;
			break;
		
		case 87:
			StringCopy(sParam1, "ANTHR_BLACK", 16);
			*uParam2 = 1;
			*uParam3 = 11;
			*uParam4 = 0;
			break;
		
		case 88:
			StringCopy(sParam1, "BLACK_STEEL", 16);
			*uParam2 = 1;
			*uParam3 = 2;
			*uParam4 = 0;
			break;
		
		case 89:
			StringCopy(sParam1, "DARK_SILVER", 16);
			*uParam2 = 1;
			*uParam3 = 3;
			*uParam4 = 2;
			break;
		
		case 90:
			StringCopy(sParam1, "SILVER", 16);
			*uParam2 = 1;
			*uParam3 = 4;
			*uParam4 = 4;
			break;
		
		case 91:
			StringCopy(sParam1, "BLUE_SILVER", 16);
			*uParam2 = 1;
			*uParam3 = 5;
			*uParam4 = 5;
			break;
		
		case 92:
			StringCopy(sParam1, "ROLLED_STEEL", 16);
			*uParam2 = 1;
			*uParam3 = 6;
			*uParam4 = 0;
			break;
		
		case 93:
			StringCopy(sParam1, "SHADOW_SILVER", 16);
			*uParam2 = 1;
			*uParam3 = 7;
			*uParam4 = 0;
			break;
		
		case 94:
			StringCopy(sParam1, "STONE_SILVER", 16);
			*uParam2 = 1;
			*uParam3 = 8;
			*uParam4 = 0;
			break;
		
		case 95:
			StringCopy(sParam1, "MIDNIGHT_SILVER", 16);
			*uParam2 = 1;
			*uParam3 = 9;
			*uParam4 = 0;
			break;
		
		case 96:
			StringCopy(sParam1, "CAST_IRON_SIL", 16);
			*uParam2 = 1;
			*uParam3 = 10;
			*uParam4 = 0;
			break;
		
		case 97:
			StringCopy(sParam1, "RED", 16);
			*uParam2 = 1;
			*uParam3 = 27;
			*uParam4 = 0;
			break;
		
		case 98:
			StringCopy(sParam1, "TORINO_RED", 16);
			*uParam2 = 1;
			*uParam3 = 28;
			*uParam4 = 0;
			break;
		
		case 99:
			StringCopy(sParam1, "FORMULA_RED", 16);
			*uParam2 = 1;
			*uParam3 = 29;
			*uParam4 = 0;
			break;
		
		case 100:
			StringCopy(sParam1, "LAVA_RED", 16);
			*uParam2 = 1;
			*uParam3 = 150;
			*uParam4 = 0;
			break;
		
		case 101:
			StringCopy(sParam1, "BLAZE_RED", 16);
			*uParam2 = 1;
			*uParam3 = 30;
			*uParam4 = 0;
			break;
		
		case 102:
			StringCopy(sParam1, "GRACE_RED", 16);
			*uParam2 = 1;
			*uParam3 = 31;
			*uParam4 = 0;
			break;
		
		case 103:
			StringCopy(sParam1, "GARNET_RED", 16);
			*uParam2 = 1;
			*uParam3 = 32;
			*uParam4 = 0;
			break;
		
		case 104:
			StringCopy(sParam1, "SUNSET_RED", 16);
			*uParam2 = 1;
			*uParam3 = 33;
			*uParam4 = 0;
			break;
		
		case 105:
			StringCopy(sParam1, "CABERNET_RED", 16);
			*uParam2 = 1;
			*uParam3 = 34;
			*uParam4 = 0;
			break;
		
		case 106:
			StringCopy(sParam1, "WINE_RED", 16);
			*uParam2 = 1;
			*uParam3 = 143;
			*uParam4 = 0;
			break;
		
		case 107:
			StringCopy(sParam1, "CANDY_RED", 16);
			*uParam2 = 1;
			*uParam3 = 35;
			*uParam4 = 0;
			break;
		
		case 108:
			StringCopy(sParam1, "HOT PINK", 16);
			*uParam2 = 1;
			*uParam3 = 135;
			*uParam4 = 0;
			break;
		
		case 109:
			StringCopy(sParam1, "PINK", 16);
			*uParam2 = 1;
			*uParam3 = 137;
			*uParam4 = 0;
			break;
		
		case 110:
			StringCopy(sParam1, "SALMON_PINK", 16);
			*uParam2 = 1;
			*uParam3 = 136;
			*uParam4 = 0;
			break;
		
		case 111:
			StringCopy(sParam1, "SUNRISE_ORANGE", 16);
			*uParam2 = 1;
			*uParam3 = 36;
			*uParam4 = 0;
			break;
		
		case 112:
			StringCopy(sParam1, "BRIGHT_ORANGE", 16);
			*uParam2 = 1;
			*uParam3 = 138;
			*uParam4 = 0;
			break;
		
		case 113:
			StringCopy(sParam1, "GOLD", 16);
			*uParam2 = 1;
			*uParam3 = 99;
			*uParam4 = 99;
			break;
		
		case 114:
			StringCopy(sParam1, "BRONZE", 16);
			*uParam2 = 1;
			*uParam3 = 90;
			*uParam4 = 102;
			break;
		
		case 115:
			StringCopy(sParam1, "YELLOW", 16);
			*uParam2 = 1;
			*uParam3 = 88;
			*uParam4 = 0;
			break;
		
		case 116:
			StringCopy(sParam1, "FLUR_YELLOW", 16);
			*uParam2 = 1;
			*uParam3 = 91;
			*uParam4 = 0;
			break;
		
		case 117:
			StringCopy(sParam1, "DARK_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 49;
			*uParam4 = 0;
			break;
		
		case 118:
			StringCopy(sParam1, "SEA_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 51;
			*uParam4 = 0;
			break;
		
		case 119:
			StringCopy(sParam1, "OLIVE_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 52;
			*uParam4 = 0;
			break;
		
		case 120:
			StringCopy(sParam1, "BRIGHT_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 53;
			*uParam4 = 0;
			break;
		
		case 121:
			StringCopy(sParam1, "PETROL_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 54;
			*uParam4 = 0;
			break;
		
		case 122:
			StringCopy(sParam1, "LIME_GREEN", 16);
			*uParam2 = 1;
			*uParam3 = 92;
			*uParam4 = 0;
			break;
		
		case 123:
			StringCopy(sParam1, "MIDNIGHT_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 141;
			*uParam4 = 0;
			break;
		
		case 124:
			StringCopy(sParam1, "GALAXY_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 61;
			*uParam4 = 0;
			break;
		
		case 125:
			StringCopy(sParam1, "DARK_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 62;
			*uParam4 = 0;
			break;
		
		case 126:
			StringCopy(sParam1, "SAXON_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 63;
			*uParam4 = 0;
			break;
		
		case 127:
			StringCopy(sParam1, "BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 64;
			*uParam4 = 0;
			break;
		
		case 128:
			StringCopy(sParam1, "MARINER_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 65;
			*uParam4 = 0;
			break;
		
		case 129:
			StringCopy(sParam1, "HARBOR_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 66;
			*uParam4 = 0;
			break;
		
		case 130:
			StringCopy(sParam1, "DIAMOND_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 67;
			*uParam4 = 0;
			break;
		
		case 131:
			StringCopy(sParam1, "SURF_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 68;
			*uParam4 = 0;
			break;
		
		case 132:
			StringCopy(sParam1, "NAUTICAL_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 69;
			*uParam4 = 0;
			break;
		
		case 133:
			StringCopy(sParam1, "RACING_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 73;
			*uParam4 = 0;
			break;
		
		case 134:
			StringCopy(sParam1, "LIGHT_BLUE", 16);
			*uParam2 = 1;
			*uParam3 = 74;
			*uParam4 = 0;
			break;
		
		case 135:
			StringCopy(sParam1, "BISON_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 101;
			*uParam4 = 0;
			break;
		
		case 136:
			StringCopy(sParam1, "CREEK_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 95;
			*uParam4 = 0;
			break;
		
		case 137:
			StringCopy(sParam1, "UMBER_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 94;
			*uParam4 = 0;
			break;
		
		case 138:
			StringCopy(sParam1, "MAPLE_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 97;
			*uParam4 = 0;
			break;
		
		case 139:
			StringCopy(sParam1, "BEECHWOOD_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 103;
			*uParam4 = 0;
			break;
		
		case 140:
			StringCopy(sParam1, "SIENNA_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 104;
			*uParam4 = 0;
			break;
		
		case 141:
			StringCopy(sParam1, "SADDLE_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 98;
			*uParam4 = 0;
			break;
		
		case 142:
			StringCopy(sParam1, "MOSS_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 100;
			*uParam4 = 0;
			break;
		
		case 143:
			StringCopy(sParam1, "WOODBEECH_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 102;
			*uParam4 = 0;
			break;
		
		case 144:
			StringCopy(sParam1, "STRAW_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 99;
			*uParam4 = 0;
			break;
		
		case 145:
			StringCopy(sParam1, "SANDY_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 105;
			*uParam4 = 0;
			break;
		
		case 146:
			StringCopy(sParam1, "BLEECHED_BROWN", 16);
			*uParam2 = 1;
			*uParam3 = 106;
			*uParam4 = 0;
			break;
		
		case 147:
			StringCopy(sParam1, "PURPLE", 16);
			*uParam2 = 1;
			*uParam3 = 71;
			*uParam4 = 0;
			break;
		
		case 148:
			StringCopy(sParam1, "SPIN_PURPLE", 16);
			*uParam2 = 1;
			*uParam3 = 72;
			*uParam4 = 0;
			break;
		
		case 149:
			StringCopy(sParam1, "MIGHT_PURPLE", 16);
			*uParam2 = 1;
			*uParam3 = 142;
			*uParam4 = 0;
			break;
		
		case 150:
			StringCopy(sParam1, "BRIGHT_PURPLE", 16);
			*uParam2 = 1;
			*uParam3 = 145;
			*uParam4 = 0;
			break;
		
		case 151:
			StringCopy(sParam1, "CREAM", 16);
			*uParam2 = 1;
			*uParam3 = 107;
			*uParam4 = 0;
			break;
		
		case 152:
			StringCopy(sParam1, "FROST_WHITE", 16);
			*uParam2 = 1;
			*uParam3 = 112;
			*uParam4 = 0;
			break;
		
		case 153:
			StringCopy(sParam1, "BLACK", 16);
			*uParam2 = 2;
			*uParam3 = 12;
			*uParam4 = 0;
			break;
		
		case 154:
			StringCopy(sParam1, "GREY", 16);
			*uParam2 = 2;
			*uParam3 = 13;
			*uParam4 = 0;
			break;
		
		case 155:
			StringCopy(sParam1, "LIGHT_GREY", 16);
			*uParam2 = 2;
			*uParam3 = 14;
			*uParam4 = 0;
			break;
		
		case 156:
			StringCopy(sParam1, "WHITE", 16);
			*uParam2 = 2;
			*uParam3 = 131;
			*uParam4 = 0;
			break;
		
		case 157:
			StringCopy(sParam1, "BLUE", 16);
			*uParam2 = 2;
			*uParam3 = 83;
			*uParam4 = 0;
			break;
		
		case 158:
			StringCopy(sParam1, "DARK_BLUE", 16);
			*uParam2 = 2;
			*uParam3 = 82;
			*uParam4 = 0;
			break;
		
		case 159:
			StringCopy(sParam1, "MIDNIGHT_BLUE", 16);
			*uParam2 = 2;
			*uParam3 = 84;
			*uParam4 = 0;
			break;
		
		case 160:
			StringCopy(sParam1, "MIGHT_PURPLE", 16);
			*uParam2 = 2;
			*uParam3 = 149;
			*uParam4 = 0;
			break;
		
		case 161:
			StringCopy(sParam1, "Purple", 16);
			*uParam2 = 2;
			*uParam3 = 148;
			*uParam4 = 0;
			break;
		
		case 162:
			StringCopy(sParam1, "RED", 16);
			*uParam2 = 2;
			*uParam3 = 39;
			*uParam4 = 0;
			break;
		
		case 163:
			StringCopy(sParam1, "DARK_RED", 16);
			*uParam2 = 2;
			*uParam3 = 40;
			*uParam4 = 0;
			break;
		
		case 164:
			StringCopy(sParam1, "ORANGE", 16);
			*uParam2 = 2;
			*uParam3 = 41;
			*uParam4 = 0;
			break;
		
		case 165:
			StringCopy(sParam1, "YELLOW", 16);
			*uParam2 = 2;
			*uParam3 = 42;
			*uParam4 = 0;
			break;
		
		case 166:
			StringCopy(sParam1, "GREEN", 16);
			*uParam2 = 2;
			*uParam3 = 128;
			*uParam4 = 0;
			break;
		
		case 167:
			StringCopy(sParam1, "MATTE_FOR", 16);
			*uParam2 = 2;
			*uParam3 = 151;
			*uParam4 = 0;
			break;
		
		case 168:
			StringCopy(sParam1, "MATTE_FOIL", 16);
			*uParam2 = 2;
			*uParam3 = 155;
			*uParam4 = 0;
			break;
		
		case 169:
			StringCopy(sParam1, "MATTE_OD", 16);
			*uParam2 = 2;
			*uParam3 = 152;
			*uParam4 = 0;
			break;
		
		case 170:
			StringCopy(sParam1, "MATTE_DIRT", 16);
			*uParam2 = 2;
			*uParam3 = 153;
			*uParam4 = 0;
			break;
		
		case 171:
			StringCopy(sParam1, "MATTE_DESERT", 16);
			*uParam2 = 2;
			*uParam3 = 154;
			*uParam4 = 0;
			break;
		
		case 172:
			StringCopy(sParam1, "BR_STEEL", 16);
			*uParam2 = 3;
			*uParam3 = 117;
			*uParam4 = 18;
			break;
		
		case 173:
			StringCopy(sParam1, "BR_ALUMINIUM", 16);
			*uParam2 = 3;
			*uParam3 = 119;
			*uParam4 = 5;
			break;
		
		case 174:
			StringCopy(sParam1, "GOLD_P", 16);
			*uParam2 = 3;
			*uParam3 = 158;
			*uParam4 = 160;
			break;
		
		case 175:
			StringCopy(sParam1, "GOLD_S", 16);
			*uParam2 = 3;
			*uParam3 = 159;
			*uParam4 = 160;
			break;
	}
	return *uParam2 != -1;
}

float func_322(int iParam0)//Position - 0x2E3D2
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	float fVar6;
	
	iVar0 = 100000;
	iVar1 = 65000;
	iVar2 = 50000;
	iVar3 = 20000;
	iVar4 = 20000;
	iVar5 = iVar4;
	if (((entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::get_vehicle_mod_kit(iParam0) >= 0) && vehicle::get_vehicle_mod_kit(iParam0) < 255)
	{
		if (vehicle::get_vehicle_mod_kit_type(iParam0) == 3)
		{
			iVar5 = iVar0;
		}
		else if (vehicle::get_vehicle_mod_kit_type(iParam0) == 1)
		{
			iVar5 = iVar1;
		}
		else if (vehicle::get_vehicle_mod_kit_type(iParam0) == 2)
		{
			iVar5 = iVar2;
		}
		else if (vehicle::get_vehicle_mod_kit_type(iParam0) == 0)
		{
			if (vehicle::is_this_model_a_bike(entity::get_entity_model(iParam0)))
			{
				iVar5 = iVar3;
			}
			else
			{
				iVar5 = iVar4;
			}
		}
	}
	fVar6 = (system::to_float(iVar5) / system::to_float(iVar4));
	return fVar6;
}

bool func_323(int iParam0, int iParam1, var uParam2)//Position - 0x2E490
{
	int iVar0;
	
	*uParam2 = 0;
	if (!entity::does_entity_exist(iParam0))
	{
		return false;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	if (!streaming::is_model_a_vehicle(entity::get_entity_model(iParam0)))
	{
		return false;
	}
	iVar0 = entity::get_entity_model(iParam0);
	if (!func_324(iVar0, iParam1, uParam2))
	{
		return false;
	}
	if (vehicle::is_big_vehicle(iParam0))
	{
		*uParam2 = 2;
		return false;
	}
	if (!network::network_is_game_in_progress())
	{
		if ((func_428(iParam0) && entity::get_entity_model(iParam0) != joaat("sentinel2")) && entity::get_entity_model(iParam0) != joaat("issi2"))
		{
			*uParam2 = 2;
			return false;
		}
	}
	return true;
}

bool func_324(int iParam0, int iParam1, var uParam2)//Position - 0x2E532
{
	if (!iParam1)
	{
		if ((((((((((((((iParam0 == joaat("police") || iParam0 == joaat("policeold1")) || iParam0 == joaat("policeold2")) || iParam0 == joaat("police2")) || iParam0 == joaat("police3")) || iParam0 == joaat("police4")) || iParam0 == joaat("fbi")) || iParam0 == joaat("fbi2")) || iParam0 == joaat("polmav")) || iParam0 == joaat("policeb")) || iParam0 == joaat("policet")) || iParam0 == joaat("riot")) || iParam0 == joaat("sheriff")) || iParam0 == joaat("pranger")) || iParam0 == joaat("sheriff2"))
		{
			*uParam2 = 1;
			return false;
		}
	}
	if (((((((iParam0 == joaat("ambulance") || iParam0 == 1938952078) || iParam0 == joaat("taxi")) || iParam0 == joaat("lguard")) || iParam0 == joaat("ripley")) || iParam0 == joaat("dilettante2")) || iParam0 == joaat("airbus")) || iParam0 == joaat("airtug"))
	{
		*uParam2 = 2;
		return false;
	}
	if (((iParam0 == joaat("burrito") || iParam0 == joaat("rumpo2")) || iParam0 == joaat("speedo")) || iParam0 == joaat("speedo2"))
	{
		*uParam2 = 2;
		return false;
	}
	if (((iParam0 == joaat("scorcher") || iParam0 == joaat("bmx")) || iParam0 == joaat("cruiser")) || iParam0 == joaat("fixter"))
	{
		*uParam2 = 2;
		return false;
	}
	if (((((((((((((((((((iParam0 == joaat("caddy") || iParam0 == joaat("forklift")) || iParam0 == joaat("caddy2")) || iParam0 == joaat("crusader")) || iParam0 == joaat("tribike")) || iParam0 == joaat("tribike2")) || iParam0 == joaat("tribike3")) || iParam0 == joaat("tractor")) || iParam0 == joaat("tractor2")) || iParam0 == joaat("mower")) || iParam0 == joaat("tornado4")) || iParam0 == joaat("docktug")) || iParam0 == joaat("stretch")) || iParam0 == joaat("bison2")) || iParam0 == joaat("bison3")) || iParam0 == joaat("benson")) || iParam0 == joaat("pounder")) || iParam0 == joaat("submersible")) || iParam0 == joaat("emperor3")) || iParam0 == joaat("dune2"))
	{
		*uParam2 = 2;
		return false;
	}
	if ((((((!vehicle::is_this_model_a_car(iParam0) && !vehicle::is_this_model_a_bike(iParam0)) && iParam0 != joaat("blazer")) && iParam0 != joaat("blazer3")) && iParam0 != joaat("blazer4")) && iParam0 != joaat("blazer5")) && iParam0 != joaat("chimera"))
	{
		*uParam2 = 2;
		return false;
	}
	if (iParam0 == joaat("monster"))
	{
		*uParam2 = 2;
		return false;
	}
	if ((iParam0 == joaat("insurgent") || iParam0 == joaat("technical")) || iParam0 == joaat("limo2"))
	{
		*uParam2 = 2;
		return false;
	}
	if (network::network_is_game_in_progress())
	{
		if (func_325(iParam0))
		{
			*uParam2 = 2;
			return false;
		}
	}
	if (!network::network_is_game_in_progress())
	{
		if (iParam0 == joaat("insurgent") || iParam0 == joaat("insurgent2"))
		{
			*uParam2 = 2;
		}
	}
	return true;
}

bool func_325(int iParam0)//Position - 0x2E900
{
	switch (iParam0)
	{
		case joaat("towtruck"):
		case joaat("towtruck2"):
		case joaat("forklift"):
			return true;
			break;
	}
	return false;
}

void func_326(int iParam0, int iParam1)//Position - 0x2E929
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (!entity::does_entity_exist(Global_89150[iVar0]))
		{
			Global_89150[iVar0] = iParam0;
			Global_89160[iVar0] = iParam1;
			Global_89170[iVar0] = entity::get_entity_model(iParam0);
			if (vehicle::is_this_model_a_car(Global_89170[iVar0]))
			{
				Global_89198[iParam1 /*3*/][0] = -1;
			}
			else
			{
				Global_89198[iParam1 /*3*/][1] = -1;
			}
			iVar0 = 9;
		}
		if (iVar0 == 8)
		{
		}
		iVar0++;
	}
}

void func_327(int iParam0)//Position - 0x2E9AB
{
	if (!func_328(*iParam0))
	{
		vehicle::set_vehicle_extra(*iParam0, 5, !Global_101652.f_8028.f_99.f_58[119]);
	}
}

int func_328(int iParam0)//Position - 0x2E9D6
{
	return vehicle::is_vehicle_extra_turned_on(iParam0, 5);
}

void func_329(int iParam0, var uParam1, int iParam2)//Position - 0x2E9E5
{
	int iVar0;
	
	uParam1->f_88 = 1;
	uParam1->f_84 = 255;
	uParam1->f_85 = 255;
	uParam1->f_86 = 255;
	uParam1->f_97 = 1;
	uParam1->f_3 = 1000;
	uParam1->f_1 = 0;
	switch (iParam0)
	{
		case 0:
			iVar0 = joaat("tailgater");
			if (Global_101652.f_8028.f_99.f_58[128] && !Global_101652.f_8028.f_99.f_58[131])
			{
				iVar0 = joaat("premier");
			}
			switch (iVar0)
			{
				case joaat("tailgater"):
					*uParam1 = iVar0;
					uParam1->f_2 = 3f;
					uParam1->f_4 = 0;
					uParam1->f_9 = 1;
					uParam1->f_11[0] = 1;
					StringCopy(&(uParam1->f_27), "5MDS003", 16);
					break;
				
				case joaat("premier"):
					*uParam1 = iVar0;
					uParam1->f_2 = 14.9f;
					uParam1->f_5 = 43;
					uParam1->f_6 = 43;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					uParam1->f_9 = 0;
					StringCopy(&(uParam1->f_27), "880HS955", 16);
					break;
			}
			break;
		
		case 2:
			iVar0 = joaat("bodhi2");
			switch (iVar0)
			{
				case joaat("bodhi2"):
					*uParam1 = iVar0;
					uParam1->f_2 = 14f;
					uParam1->f_5 = 32;
					uParam1->f_6 = 0;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					StringCopy(&(uParam1->f_27), "BETTY 32", 16);
					if (Global_101652.f_8028.f_99.f_58[119])
					{
						uParam1->f_11[1] = 1;
					}
					break;
			}
			break;
		
		case 1:
			if (iParam2 == 1)
			{
				iVar0 = joaat("buffalo2");
			}
			else if (iParam2 == 2)
			{
				iVar0 = joaat("bagger");
			}
			else if (Global_101652.f_8028.f_99.f_58[118])
			{
				iVar0 = joaat("bagger");
			}
			else
			{
				iVar0 = joaat("buffalo2");
			}
			switch (iVar0)
			{
				case joaat("bagger"):
					*uParam1 = iVar0;
					uParam1->f_2 = 6f;
					uParam1->f_5 = 53;
					uParam1->f_6 = 0;
					uParam1->f_7 = 59;
					uParam1->f_8 = 156;
					StringCopy(&(uParam1->f_27), "FC88", 16);
					break;
				
				case joaat("buffalo2"):
					*uParam1 = iVar0;
					uParam1->f_2 = 0f;
					uParam1->f_5 = 111;
					uParam1->f_6 = 111;
					uParam1->f_7 = 0;
					uParam1->f_8 = 156;
					uParam1->f_10 = 1;
					StringCopy(&(uParam1->f_27), "FC1988", 16);
					uParam1->f_11[0] = 1;
					uParam1->f_11[1] = 1;
					uParam1->f_11[2] = 1;
					uParam1->f_11[3] = 1;
					uParam1->f_11[4] = 1;
					uParam1->f_11[5] = 1;
					uParam1->f_11[6] = 1;
					uParam1->f_11[7] = 1;
					uParam1->f_11[8] = 1;
					break;
			}
			break;
		
		default:
			break;
	}
}

void func_330()//Position - 0x2EC41
{
	int iVar0;
	struct<6> Var1;
	
	if ((((!ped::is_ped_in_any_vehicle(iLocal_104, 0) && !ped::is_ped_in_any_vehicle(player::player_ped_id(), 0)) && system::vdist2(entity::get_entity_coords(iLocal_104, 1), entity::get_entity_coords(player::player_ped_id(), 1)) < 225f) && entity::is_entity_at_entity(player::player_ped_id(), iLocal_104, 15f, 15f, 1f, 0, 1, 0)) && !func_332())
	{
		iVar0 = true;
	}
	if (((vehicle::is_vehicle_driveable(iLocal_114, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0)) && ped::is_ped_in_vehicle(iLocal_104, iLocal_114, 0)) && !func_332())
	{
		iVar0 = true;
	}
	if (!iLocal_914)
	{
		if ((vehicle::is_vehicle_driveable(iLocal_114, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0)) && ped::is_ped_in_vehicle(iLocal_104, iLocal_114, 0))
		{
			if (iLocal_912 == 0)
			{
				if (gameplay::are_strings_equal(audio::get_radio_station_name(audio::get_player_radio_station_index()), "RADIO_01_CLASS_ROCK"))
				{
					fLocal_261 = (fLocal_261 + gameplay::get_frame_time());
				}
				if (fLocal_261 > 7f)
				{
					iLocal_914 = 1;
				}
			}
			else if (iLocal_912 == 4)
			{
				if (audio::get_player_radio_station_index() != 8)
				{
					iLocal_912++;
					iLocal_914 = 1;
				}
			}
		}
	}
	else if ((!vehicle::is_vehicle_driveable(iLocal_114, 0) || (vehicle::is_vehicle_driveable(iLocal_114, 0) && !ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0))) || (vehicle::is_vehicle_driveable(iLocal_114, 0) && !ped::is_ped_in_vehicle(iLocal_104, iLocal_114, 0)))
	{
		iLocal_914 = 0;
	}
	if (system::vdist(entity::get_entity_coords(player::player_ped_id(), 1), entity::get_entity_coords(iLocal_104, 1)) < 15f)
	{
		if (!ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
		{
			if (ped::is_ped_in_melee_combat(player::player_ped_id()))
			{
				if (!iLocal_915)
				{
					if ((gameplay::get_game_timer() - iLocal_279) > 7500)
					{
						iLocal_915 = 1;
						iVar0 = false;
					}
				}
			}
		}
	}
	if (iLocal_915)
	{
		iVar0 = false;
		if (!func_170())
		{
			func_195(iLocal_103, "GENERIC_SHOCKED_MED", "Jimmy", 3);
			iLocal_280 = gameplay::get_game_timer();
			iLocal_915 = 0;
		}
	}
	if (!iLocal_914)
	{
		if (iLocal_272 < 7 && !gameplay::are_strings_equal(&Local_843, "FAM2_DRIV2"))
		{
			if ((vehicle::is_vehicle_driveable(iLocal_114, 0) && ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_114, 0)) && vehicle::get_ped_in_vehicle_seat(iLocal_114, -1, 0) == player::player_ped_id())
			{
				if (entity::get_entity_speed(iLocal_114) > 30f)
				{
					if (entity::has_entity_collided_with_anything(iLocal_114))
					{
						func_167();
						iLocal_842 = 0;
						iLocal_841 = 0;
						StringCopy(&Local_843, "", 24);
						iLocal_272 = 7;
					}
				}
				if ((Global_67914[5 /*9*/].f_1 - iLocal_913) > 3)
				{
					func_167();
					iLocal_842 = 0;
					iLocal_841 = 0;
					StringCopy(&Local_843, "", 24);
					iLocal_272 = 7;
				}
			}
		}
		switch (iLocal_272)
		{
			case 0:
				if (func_156(&Local_676, cLocal_313, "FAM2_BEACH", 8, 0, 0, 0))
				{
					unk1::_0x293220DA1B46CEBC(1f, 7f, 3);
					fLocal_261 = 0f;
					iLocal_913 = Global_67914[5 /*9*/].f_1;
					iLocal_272++;
					iLocal_842 = 0;
					iLocal_841 = 0;
					iLocal_273 = gameplay::get_game_timer();
					StringCopy(&Local_843, "", 24);
				}
				break;
			
			case 1:
				if ((gameplay::get_game_timer() - iLocal_273) > 2000)
				{
					if (!ui::does_blip_exist(iLocal_132))
					{
						iLocal_132 = func_208(vLocal_226, 0);
					}
					else if (!func_170())
					{
						func_149("FM2_BK2BIKE", 7500, 1);
						iLocal_273 = gameplay::get_game_timer();
						iLocal_272++;
					}
				}
				break;
			
			case 2:
				if (((gameplay::get_game_timer() - iLocal_273) > 2000 && gameplay::get_profile_setting(203) == 0) || (gameplay::get_game_timer() - iLocal_273) > 6000)
				{
					iLocal_272++;
				}
				break;
			
			case 3:
				if (func_206())
				{
					func_204("FAM2_WALK", iVar0);
				}
				else
				{
					func_204("FAM2_WALK2", iVar0);
				}
				if ((!func_170() && !iLocal_842) && iLocal_841)
				{
					fLocal_261 = 0f;
					iLocal_272++;
					iLocal_842 = 0;
					iLocal_841 = 0;
					StringCopy(&Local_843, "", 24);
					iLocal_273 = gameplay::get_game_timer();
				}
				break;
			
			case 4:
				if ((gameplay::get_game_timer() - iLocal_273) > 3000)
				{
					iLocal_272++;
				}
				break;
			
			case 5:
				if (func_206())
				{
					func_204("FAM2_DRIVB", iVar0);
				}
				else
				{
					func_204("FAM2_DRIVE", iVar0);
				}
				if ((!func_170() && !iLocal_842) && iLocal_841)
				{
					iLocal_272++;
					iLocal_842 = 0;
					iLocal_841 = 0;
					StringCopy(&Local_843, "", 24);
					iLocal_273 = gameplay::get_game_timer();
				}
				break;
			
			case 6:
				break;
			
			case 7:
				if (!ped::is_ped_in_any_vehicle(iLocal_104, 0) || !ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
				{
					iVar0 = false;
				}
				func_204("FAM2_DRIV2", iVar0);
				if ((!func_170() && !iLocal_842) && iLocal_841)
				{
					iLocal_272++;
					iLocal_842 = 0;
					iLocal_841 = 0;
					StringCopy(&Local_843, "", 24);
				}
				break;
		}
	}
	else
	{
		switch (iLocal_912)
		{
			case 0:
				if (func_170())
				{
					Local_843 = { func_169() };
					func_167();
					iLocal_842 = 1;
				}
				iLocal_912++;
				break;
			
			case 1:
				if (func_156(&Local_676, cLocal_313, "FAM2_JAZZ", 8, 0, 0, 0))
				{
					system::settimerb(0);
					iLocal_912++;
				}
				break;
			
			case 2:
				if (system::timerb() > 1000)
				{
					audio::set_radio_to_station_index(8);
					system::settimerb(0);
					iLocal_912++;
				}
				break;
			
			case 3:
				if (!func_170())
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_JAZZ2", 8, 0, 0, 0))
					{
						system::settimerb(0);
						iLocal_912++;
					}
				}
				break;
			
			case 4:
				iLocal_914 = 0;
				break;
			
			case 5:
				if ((func_170() && !func_331("FAM2_JAZZ")) && !func_331("FAM2_JAZZ2"))
				{
					Var1 = { func_169() };
					if (!gameplay::is_string_null_or_empty(&Var1) && !gameplay::are_strings_equal("NULL", &Var1))
					{
						Local_843 = { Var1 };
					}
					func_167();
					iLocal_842 = 1;
				}
				if (!func_170())
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_JAZZ3", 8, 0, 0, 0))
					{
						system::settimerb(0);
						iLocal_912++;
					}
				}
				break;
			
			case 6:
				if (!func_170())
				{
					if (func_156(&Local_676, cLocal_313, "FAM2_JAZZ4", 8, 0, 0, 0))
					{
						system::settimerb(0);
						iLocal_912++;
					}
				}
				break;
			
			case 7:
				iLocal_914 = 0;
				break;
			}
	}
}

bool func_331(char* sParam0)//Position - 0x2F297
{
	var uVar0;
	
	if (func_170())
	{
		MemCopy(&uVar0, {func_304()}, 4);
		if (gameplay::are_strings_equal(sParam0, &uVar0))
		{
			return true;
		}
	}
	return false;
}

int func_332()//Position - 0x2F2BF
{
	return Global_91538.f_303 > 0;
}

void func_333()//Position - 0x2F2D0
{
	switch (iLocal_270)
	{
		case 0:
			audio::set_static_emitter_enabled("SE_MICHAELS_HOUSE_RADIO", false);
			iLocal_1416 = 0;
			if (!cutscene::is_cutscene_active())
			{
				cutscene::request_cutscene("family_2_int", 8);
				iLocal_270 = -1;
			}
			else
			{
				iLocal_270++;
			}
			break;
		
		case -1:
			if (cutscene::_0xB56BBBCC2955D9CB())
			{
				func_337("Michael", func_93(0), 32);
				iLocal_270 = 1;
			}
			break;
		
		case 1:
			if (func_192())
			{
				if (func_266("family_2_int"))
				{
					func_184(1, 1, 1, 0);
					if (!entity::does_entity_exist(iLocal_104))
					{
						cutscene::register_entity_for_cutscene(iLocal_104, "Jimmy", 2, func_99(14), 0);
					}
					else if (!ped::is_ped_injured(iLocal_104))
					{
						cutscene::register_entity_for_cutscene(iLocal_104, "Jimmy", 0, 0, 0);
					}
					func_197(1);
					func_183();
					ui::clear_help(1);
					cutscene::start_cutscene(0);
					unk1::_0x48621C9FCA3EBD28(4);
					streaming::end_srl();
					iLocal_270++;
				}
				else
				{
					cutscene::remove_cutscene();
					iLocal_270 = 0;
				}
			}
			break;
		
		case 2:
			gameplay::set_weather_type_now_persist("EXTRASUNNY");
			gameplay::set_wind(0.1f);
			if (entity::does_entity_exist(iLocal_139))
			{
				object::delete_object(&iLocal_139);
				entity::remove_model_hide(vLocal_631, 1f, joaat("v_ilev_mm_doorm_l"), false);
			}
			if (entity::does_entity_exist(iLocal_140))
			{
				object::delete_object(&iLocal_140);
				entity::remove_model_hide(vLocal_634, 1f, joaat("v_ilev_mm_doorm_r"), false);
			}
			if (object::_does_door_exist(-2097039789))
			{
				object::_set_door_ajar_angle(-2097039789, 0f, 0, 0);
				object::_set_door_acceleration_limit(-2097039789, 3, 0, 1);
			}
			if (object::_does_door_exist(-2127416656))
			{
				object::_set_door_ajar_angle(-2127416656, 0f, 0, 0);
				object::_set_door_acceleration_limit(-2127416656, 3, 0, 1);
			}
			streaming::remove_anim_dict("missfam2mcs_intp1");
			ai::clear_ped_tasks(player::player_ped_id());
			if (entity::does_entity_exist(iLocal_139))
			{
				entity::stop_synchronized_entity_anim(iLocal_139, -1000f, 1);
				entity::set_object_as_no_longer_needed(&iLocal_139);
			}
			if (entity::does_entity_exist(iLocal_140))
			{
				entity::stop_synchronized_entity_anim(iLocal_140, -1000f, 1);
				entity::set_object_as_no_longer_needed(&iLocal_140);
			}
			graphics::remove_particle_fx_in_range(entity::get_entity_coords(player::player_ped_id(), 1), 300f);
			func_405(&Local_91, 0, 0, 2000, 1, 0, 0, 1);
			ped::clear_ped_blood_damage(player::player_ped_id());
			iLocal_270++;
			break;
		
		case 3:
			if (!entity::does_entity_exist(iLocal_104))
			{
				if (entity::does_entity_exist(cutscene::get_entity_index_of_registered_entity("Jimmy", 0)))
				{
					iLocal_104 = entity::get_ped_index_from_entity_index(cutscene::get_entity_index_of_registered_entity("Jimmy", 0));
				}
			}
			if (cutscene::can_set_exit_state_for_registered_entity("Jimmy", 0))
			{
				if (!ped::is_ped_injured(iLocal_104))
				{
					entity::set_entity_coords(iLocal_104, vLocal_203, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_104, fLocal_206);
					ped::force_ped_motion_state(iLocal_104, -668482597, true, 1, 0);
					ai::task_follow_waypoint_recording(iLocal_104, sLocal_268, 0, 8, -1);
				}
			}
			if (cutscene::can_set_exit_state_for_registered_entity("Michael", 0) && cutscene::can_set_exit_state_for_camera(0))
			{
				ped::force_ped_motion_state(player::player_ped_id(), -668482597, false, 0, 0);
				ped::set_ped_stealth_movement(player::player_ped_id(), 0, 0);
				player::simulate_player_input_gait(player::player_id(), 1f, 2000, 0, 1, 0);
				if (!ped::is_ped_injured(iLocal_104))
				{
					func_96(iLocal_104);
				}
			}
			if (!iLocal_1416)
			{
				if (cam::is_screen_faded_out() && cutscene::was_cutscene_skipped())
				{
					system::settimera(0);
					if (streaming::_new_load_scene_start_safe(vLocal_199, 30f, 2))
					{
						while (!streaming::is_new_load_scene_loaded() && system::timera() < 5000)
						{
							cam::do_screen_fade_out(0);
							system::wait(0);
						}
						streaming::new_load_scene_stop();
						iLocal_1416 = 1;
					}
				}
			}
			cam::set_gameplay_cam_relative_heading(0f);
			cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
			if (!entity::does_entity_exist(iLocal_122))
			{
				if (func_336(0, 1, vLocal_211, 100f))
				{
					func_334(0, 1);
				}
				controls::disable_control_action(0, 18, 1);
				func_318(&iLocal_122, 0, vLocal_211, fLocal_214, 1, 1);
			}
			if (!cutscene::is_cutscene_active())
			{
				func_184(0, 1, 1, 0);
				func_181();
				func_200(1);
				ui::request_additional_text("FAMILY2", 0);
				ui::request_additional_text(cLocal_313, 6);
				if (!ped::is_ped_injured(iLocal_104))
				{
					func_96(iLocal_104);
				}
				unk1::_0x81CBAE94390F9F89();
				if (interior::is_valid_interior(iLocal_143))
				{
					interior::unpin_interior(iLocal_143);
				}
				uLocal_1417 = object::_0xB48FCED898292E52(-809.962f, 170.919f, 75.7407f, 3f, "des_tvsmash");
				if (object::_0x52AF537A0C5B8AAD(uLocal_1417))
				{
					object::_0x5C29F698D404C5E1(uLocal_1417, 9);
				}
				if (cam::is_screen_faded_out() || cutscene::was_cutscene_skipped())
				{
					if (!ped::is_ped_injured(iLocal_104))
					{
						entity::set_entity_coords(iLocal_104, vLocal_203, 1, false, 0, 1);
						entity::set_entity_heading(iLocal_104, fLocal_206);
						ped::force_ped_motion_state(iLocal_104, -668482597, true, 1, 0);
						ai::task_follow_waypoint_recording(iLocal_104, sLocal_268, 3, 0, -1);
					}
					system::wait(0);
					ped::force_ped_motion_state(player::player_ped_id(), -668482597, true, 1, 0);
					player::simulate_player_input_gait(player::player_id(), 1f, 2000, 0, 1, 0);
				}
				func_408(24);
				audio::set_static_emitter_enabled("SE_MICHAELS_HOUSE_RADIO", true);
				cam::set_widescreen_borders(false, 0);
				cam::do_screen_fade_in(500);
			}
			break;
	}
}

void func_334(int iParam0, int iParam1)//Position - 0x2F74B
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89150[iVar0]))
		{
			if (iParam0 == 145 || Global_89160[iVar0] == iParam0)
			{
				if (iParam1 == 0 || entity::get_entity_model(Global_89150[iVar0]) == func_335(iParam0, iParam1))
				{
					if (!ped::is_ped_in_vehicle(player::player_ped_id(), Global_89150[iVar0], 0))
					{
						entity::set_entity_as_mission_entity(Global_89150[iVar0], false, 1);
						vehicle::delete_vehicle(&(Global_89150[iVar0]));
						Global_89160[iVar0] = 145;
					}
				}
			}
		}
		iVar0++;
	}
}

int func_335(int iParam0, int iParam1)//Position - 0x2F7E9
{
	struct<82> Var0;
	
	if (func_89(iParam0))
	{
		Var0.f_11 = 12;
		Var0.f_31 = 49;
		Var0.f_81 = 2;
		func_329(iParam0, &Var0, iParam1);
		return Var0;
	}
	else if (iParam0 != 145)
	{
	}
	return 0;
}

bool func_336(int iParam0, int iParam1, vector3 vParam2, float fParam5)//Position - 0x2F82B
{
	int iVar0;
	struct<82> Var1;
	int iVar99;
	
	if (!func_89(iParam0))
	{
		return false;
	}
	Var1.f_11 = 12;
	Var1.f_31 = 49;
	Var1.f_81 = 2;
	iVar99 = 0;
	func_329(iParam0, &Var1, iParam1);
	iVar99 = Var1;
	if (iVar99 != 0)
	{
		iVar0 = 0;
		while (iVar0 < 9)
		{
			if (entity::does_entity_exist(Global_89150[iVar0]) && vehicle::is_vehicle_driveable(Global_89150[iVar0], 0))
			{
				if (entity::get_entity_model(Global_89150[iVar0]) == iVar99 && Global_89160[iVar0] == iParam0)
				{
					if (fParam5 == -1f || gameplay::get_distance_between_coords(entity::get_entity_coords(Global_89150[iVar0], 0), vParam2, 1) <= fParam5)
					{
						return true;
					}
				}
			}
			iVar0++;
		}
	}
	return false;
}

void func_337(char* sParam0, int iParam1, int iParam2)//Position - 0x2F8F0
{
	int iVar0;
	struct<14> Var1;
	var uVar15;
	int iVar25;
	int iVar26;
	int iVar27;
	int iVar28;
	int iVar29;
	var uVar30;
	int iVar47;
	
	uVar15 = 9;
	uVar30 = { func_341(iParam1, iParam2) };
	iVar47 = 0;
	if (uVar30[2] == -99 && uVar30[0] == -99)
	{
		iVar47 = 1;
	}
	iVar28 = 0;
	while (iVar28 <= 14)
	{
		iVar0 = iVar28;
		if (iVar0 != 12 && iVar0 != 14)
		{
			if (iVar0 == 13)
			{
				uVar15 = { func_338(iParam1, uVar30[iVar28]) };
				iVar29 = 0;
				while (iVar29 <= 8)
				{
					iVar25 = iVar29;
					iVar26 = func_28(iVar25);
					iVar27 = func_11(iVar26);
					if (uVar15[iVar29] != iVar27)
					{
						Var1 = { func_14(iParam1, 14, uVar15[iVar29]) };
						cutscene::set_cutscene_ped_prop_variation(sParam0, Var1.f_12, Var1.f_3, 0, iParam1);
					}
					iVar29++;
				}
			}
			else
			{
				Var1 = { func_14(iParam1, iVar0, uVar30[iVar28]) };
				if (((iVar28 == 2 || iVar28 == 0) && iVar47) || uVar30[iVar28] == -99)
				{
					Var1.f_3 = Global_101652.f_2079.f_539[Var1.f_5 /*65*/].f_13[iVar28];
					Var1.f_4 = Global_101652.f_2079.f_539[Var1.f_5 /*65*/][iVar28];
				}
				cutscene::set_cutscene_ped_component_variation(sParam0, func_9(iVar0), Var1.f_3, Var1.f_4, iParam1);
			}
		}
		iVar28++;
	}
}

struct<10> func_338(int iParam0, int iParam1)//Position - 0x2FA4D
{
	int iVar0;
	struct<10> Var1;
	
	Var1 = 9;
	iVar0 = 0;
	while (iVar0 <= 8)
	{
		Var1[iVar0] = -99;
		iVar0++;
	}
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 31:
					func_340(&Var1, 0, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 0:
					func_340(&Var1, 10, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 1:
					func_340(&Var1, 19, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 2:
					func_340(&Var1, 14, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 3:
					func_340(&Var1, 18, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 4:
					func_340(&Var1, 0, 59, 112, 3, 4, 5, 6, 7, 8);
					break;
				
				case 5:
					func_340(&Var1, 0, 60, 112, 3, 4, 5, 6, 7, 8);
					break;
				
				case 6:
					func_340(&Var1, 15, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 7:
					func_340(&Var1, 0, 60, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 8:
					func_340(&Var1, 55, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 9:
					func_340(&Var1, 0, 1, 112, 3, 4, 5, 6, 7, 8);
					break;
				
				default:
					func_339(&Var1, iParam0, iParam1, 10);
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 31:
					func_340(&Var1, 0, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 0:
					func_340(&Var1, 10, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 1:
					func_340(&Var1, 0, 82, 158, 3, 4, 5, 6, 7, 8);
					break;
				
				case 2:
					func_340(&Var1, 0, 1, 158, 3, 4, 5, 6, 7, 8);
					break;
				
				case 3:
					func_340(&Var1, 15, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 4:
					func_340(&Var1, 41, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 5:
					func_340(&Var1, 40, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 6:
					func_340(&Var1, 41, 95, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 7:
					func_340(&Var1, 0, 95, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 8:
					func_340(&Var1, 69, 95, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				default:
					func_339(&Var1, iParam0, iParam1, 9);
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 31:
					func_340(&Var1, 0, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 0:
					func_340(&Var1, 11, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 1:
					func_340(&Var1, 17, 90, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 2:
					func_340(&Var1, 15, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 3:
					func_340(&Var1, 0, 88, 154, 3, 4, 5, 6, 7, 8);
					break;
				
				case 4:
					func_340(&Var1, 0, 1, 154, 3, 4, 5, 6, 7, 8);
					break;
				
				case 5:
					func_340(&Var1, 16, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 6:
					func_340(&Var1, 36, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 7:
					func_340(&Var1, 0, 123, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 8:
					func_340(&Var1, 69, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				default:
					func_339(&Var1, iParam0, iParam1, 9);
					break;
			}
			break;
		
		case joaat("mp_m_freemode_01"):
			switch (iParam1)
			{
				case 31:
					func_340(&Var1, 0, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 0:
					func_340(&Var1, 129, 167, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 1:
					func_340(&Var1, 90, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 2:
					func_340(&Var1, 23, 251, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 3:
					func_340(&Var1, 36, 262, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 4:
					func_340(&Var1, 88, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 5:
					func_340(&Var1, 125, 175, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 6:
					func_340(&Var1, 35, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 7:
					func_340(&Var1, 44, 208, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 8:
					func_340(&Var1, 52, 189, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 9:
					func_340(&Var1, 0, 261, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 10:
					func_340(&Var1, 0, 243, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 11:
					func_340(&Var1, 0, 243, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 12:
					func_340(&Var1, 0, 212, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 13:
					func_340(&Var1, 64, 291, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 14:
					func_340(&Var1, 61, 207, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 15:
					func_340(&Var1, 0, 291, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 16:
					func_340(&Var1, 0, 208, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 17:
					func_340(&Var1, 0, 229, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 18:
					func_340(&Var1, 36, 249, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 19:
					func_340(&Var1, 0, 259, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 20:
					func_340(&Var1, 0, 174, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 21:
					func_340(&Var1, 35, 180, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 22:
					func_340(&Var1, 36, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 23:
					func_340(&Var1, 0, 259, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 24:
					func_340(&Var1, 35, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				default:
					func_339(&Var1, iParam0, iParam1, 25);
					break;
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			switch (iParam1)
			{
				case 31:
					func_340(&Var1, 0, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 0:
					func_340(&Var1, 35, 233, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 1:
					func_340(&Var1, 36, 178, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 2:
					func_340(&Var1, 53, 221, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 3:
					func_340(&Var1, 38, 170, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 4:
					func_340(&Var1, 37, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 5:
					func_340(&Var1, 113, 203, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 6:
					func_340(&Var1, 114, 183, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 7:
					func_340(&Var1, 0, 221, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 8:
					func_340(&Var1, 0, 221, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 9:
					func_340(&Var1, 0, 199, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 10:
					func_340(&Var1, 0, 182, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 11:
					func_340(&Var1, 0, 233, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 12:
					func_340(&Var1, 107, 167, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 13:
					func_340(&Var1, 109, 170, 2, 3, 4, 5, 323, 7, 8);
					break;
				
				case 14:
					func_340(&Var1, 119, 237, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 15:
					func_340(&Var1, 0, 221, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 16:
					func_340(&Var1, 114, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 17:
					func_340(&Var1, 35, 268, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 18:
					func_340(&Var1, 0, 266, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 19:
					func_340(&Var1, 42, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 20:
					func_340(&Var1, 76, 1, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 21:
					func_340(&Var1, 39, 235, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 22:
					func_340(&Var1, 41, 183, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				case 23:
					func_340(&Var1, 111, 194, 2, 3, 4, 5, 6, 7, 8);
					break;
				
				default:
					func_339(&Var1, iParam0, iParam1, 25);
					break;
			}
			break;
	}
	return Var1;
}

void func_339(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x3037E
{
	int iVar0;
	struct<4> Var1;
	vector3 vVar16;
	int iVar19;
	
	if (iParam2 != 0 && iParam2 != -99)
	{
		(*iParam0)[0] = 0;
		(*iParam0)[1] = 1;
		(*iParam0)[2] = 2;
		(*iParam0)[3] = 3;
		(*iParam0)[4] = 4;
		(*iParam0)[5] = 5;
		(*iParam0)[6] = 6;
		(*iParam0)[7] = 7;
		(*iParam0)[8] = 8;
		iVar0 = 0;
		if (iParam1 == joaat("player_zero"))
		{
			iVar0 = 0;
		}
		else if (iParam1 == joaat("player_one"))
		{
			iVar0 = 1;
		}
		else if (iParam1 == joaat("player_two"))
		{
			iVar0 = 2;
		}
		else if (iParam1 == joaat("mp_m_freemode_01"))
		{
			iVar0 = 3;
		}
		else if (iParam1 == joaat("mp_f_freemode_01"))
		{
			iVar0 = 4;
		}
		dlc1::get_shop_ped_outfit(iParam2, &Var1);
		if (!dlc1::_is_dlc_data_empty(Var1))
		{
			iVar19 = 0;
			while (iVar19 < Var1.f_3)
			{
				if (dlc1::_0xA9F9C2E0FDE11CBB(Var1.f_1, iVar19, &vVar16) && vVar16.y != -1)
				{
					if ((vVar16.x != 0 && vVar16.x != -1) && vVar16.x != 1849449579)
					{
						(*iParam0)[vVar16.y] = func_7(iParam1, vVar16.x, 14, iVar0);
					}
					else if (vVar16.y != -1)
					{
						(*iParam0)[vVar16.y] = vVar16.y;
					}
				}
				iVar19++;
			}
		}
	}
}

void func_340(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9)//Position - 0x304A8
{
	(*iParam0)[0] = iParam1;
	(*iParam0)[1] = iParam2;
	(*iParam0)[2] = iParam3;
	(*iParam0)[3] = iParam4;
	(*iParam0)[4] = iParam5;
	(*iParam0)[5] = iParam6;
	(*iParam0)[6] = iParam7;
	(*iParam0)[7] = iParam8;
	(*iParam0)[8] = iParam9;
}

struct<17> func_341(int iParam0, int iParam1)//Position - 0x304F0
{
	int iVar0;
	struct<17> Var1;
	
	Var1 = 15;
	iVar0 = 0;
	while (iVar0 <= 14)
	{
		Var1[iVar0] = -99;
		iVar0++;
	}
	Var1.f_16 = 0;
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 0:
					if (Global_101652.f_8028.f_99.f_58[120])
					{
						func_343(&Var1, -99, -99, 1, 1, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					}
					else
					{
						func_343(&Var1, -99, -99, 0, 0, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					}
					break;
				
				case 1:
					func_343(&Var1, -99, -99, 16, 16, 6, 1, 1, 0, 1, -99, 0, 0, 0);
					break;
				
				case 2:
					func_343(&Var1, -99, -99, 36, 21, 6, 1, 5, 0, 0, -99, 0, 0, 8);
					break;
				
				case 3:
					func_343(&Var1, -99, -99, 65, 36, 6, 0, 2, 0, 0, -99, 0, 0, 31);
					break;
				
				case 4:
					func_343(&Var1, -99, -99, 61, 32, 6, 0, 0, 7, 3, -99, 0, 0, 2);
					break;
				
				case 5:
					func_343(&Var1, -99, -99, Global_101652.f_2079.f_539.f_196[0], Global_101652.f_2079.f_539.f_200[0], 6, 3, 0, 0, 0, -99, 0, 0, 3);
					break;
				
				case 6:
					func_343(&Var1, -99, -99, 92, 72, 7, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 7:
					func_343(&Var1, -99, -99, 85, 95, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 8:
					func_343(&Var1, -99, -99, 170, 80, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 9:
					func_343(&Var1, -99, -99, 171, 89, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 10:
					func_343(&Var1, -99, -99, 33, 18, 8, 10, 3, 8, 0, -99, 0, 0, 4);
					break;
				
				case 11:
					func_343(&Var1, -99, -99, 33, 18, 17, 10, 4, 8, 0, -99, 0, 0, 5);
					break;
				
				case 12:
					func_343(&Var1, -99, -99, 35, 20, 9, 10, 23, 0, 0, -99, 0, 0, 31);
					break;
				
				case 13:
					func_343(&Var1, -99, -99, 69, 40, 13, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 14:
					func_343(&Var1, -99, -99, 62, 33, 38, 0, 8, 0, 0, -99, 0, 0, 6);
					break;
				
				case 15:
					func_343(&Var1, -99, -99, 63, 34, 6, 10, 0, 0, 4, -99, 0, 0, 31);
					break;
				
				case 16:
					func_343(&Var1, -99, -99, 174, 93, 18, 0, 18, 0, 0, -99, 0, 0, 31);
					break;
				
				case 17:
					func_343(&Var1, -99, -99, 76, 46, 6, 10, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 18:
					func_343(&Var1, -99, -99, 35, 20, 9, 10, 0, 4, 0, -99, 0, 0, 7);
					break;
				
				case 19:
					func_343(&Var1, -99, -99, 64, 35, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 20:
					func_343(&Var1, -99, -99, 66, 37, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 21:
					func_343(&Var1, -99, -99, 67, 38, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 22:
					func_343(&Var1, -99, -99, 68, 39, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 23:
					func_343(&Var1, -99, -99, 177, 94, 19, 9, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 24:
					func_343(&Var1, -99, -99, 35, 20, 9, 10, 4, 0, 0, -99, 0, 0, 31);
					break;
				
				case 25:
					func_343(&Var1, -99, -99, 97, 81, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 26:
					func_343(&Var1, -99, -99, 3, 3, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 27:
					func_343(&Var1, -99, -99, 129, 81, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 28:
					func_343(&Var1, -99, -99, 170, 80, 6, 0, 13, 0, 0, -99, 0, 0, 31);
					break;
				
				case 29:
					func_343(&Var1, -99, -99, 2, 2, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 30:
					func_343(&Var1, -99, -99, 161, 3, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 31:
					func_343(&Var1, -99, -99, 3, 3, 0, 12, 0, 0, 0, -99, 0, 1, 31);
					break;
				
				case 32:
					func_343(&Var1, -99, -99, 85, 55, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 33:
					func_343(&Var1, -99, -99, 86, 4, 20, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 34:
					func_343(&Var1, -99, -99, 44, 97, 6, 0, 0, 0, 0, -99, 0, 2, 31);
					break;
				
				case 35:
					func_343(&Var1, -99, -99, 85, 81, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 36:
					func_343(&Var1, -99, -99, 4, 4, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 37:
					func_343(&Var1, -99, -99, 5, 5, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 38:
					func_343(&Var1, -99, -99, 6, 6, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 39:
					func_343(&Var1, -99, -99, 7, 7, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 40:
					func_343(&Var1, -99, -99, 8, 8, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 41:
					func_343(&Var1, -99, -99, 9, 9, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 42:
					func_343(&Var1, -99, -99, 10, 10, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 43:
					func_343(&Var1, -99, -99, 11, 11, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 44:
					func_343(&Var1, -99, -99, 12, 12, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 45:
					func_343(&Var1, -99, -99, 13, 13, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 46:
					func_343(&Var1, -99, -99, 14, 14, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 47:
					func_343(&Var1, -99, -99, 15, 15, 0, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 48:
					func_343(&Var1, -99, -99, 91, 71, 14, 13, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 49:
					func_343(&Var1, -99, -99, 35, 20, 9, 10, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 50:
					func_343(&Var1, -99, -99, 33, 18, 8, 10, 3, 8, 0, -99, 0, 0, 9);
					break;
				
				case 51:
					func_343(&Var1, -99, -99, 169, 95, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 52:
					func_343(&Var1, -99, -99, 169, 72, 6, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				default:
					func_342(&Var1, iParam0, iParam1, 53);
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 0:
					func_343(&Var1, -99, -99, 73, 24, 18, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 1:
					func_343(&Var1, -99, -99, 22, 10, 64, 0, 24, 0, 0, -99, 0, 43, 31);
					break;
				
				case 2:
					func_343(&Var1, -99, -99, Global_101652.f_2079.f_539.f_196[1], Global_101652.f_2079.f_539.f_200[1], 17, 2, 26, 0, 0, -99, 0, 45, 31);
					break;
				
				case 3:
					func_343(&Var1, -99, -99, 23, 11, 13, 5, 2, 4, 0, -99, 0, 0, 1);
					break;
				
				case 4:
					func_343(&Var1, -99, -99, 23, 11, 34, 5, 26, 0, 0, -99, 0, 0, 2);
					break;
				
				case 5:
					func_343(&Var1, -99, 20, 159, 69, 17, 5, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 6:
					func_343(&Var1, -99, -99, 40, 13, 14, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 7:
					func_343(&Var1, -99, -99, 90, 32, 17, 1, 8, 0, 1, -99, 0, 0, 3);
					break;
				
				case 8:
					func_343(&Var1, -99, -99, 17, 5, 12, 0, 26, 0, 2, -99, 0, 0, 5);
					break;
				
				case 9:
					func_343(&Var1, -99, -99, 16, 4, 12, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 10:
					func_343(&Var1, -99, -99, 208, 71, 17, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 11:
					func_343(&Var1, -99, -99, 259, 10, 35, 0, 24, 0, 0, -99, 0, 43, 31);
					break;
				
				case 12:
					func_343(&Var1, -99, -99, 18, 6, 12, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 13:
					func_343(&Var1, -99, -99, 19, 7, 12, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 14:
					func_343(&Var1, -99, -99, 20, 8, 12, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 15:
					func_343(&Var1, -99, -99, 21, 9, 12, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 16:
					func_343(&Var1, -99, -99, 135, 40, 0, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 17:
					func_343(&Var1, -99, -99, 74, 24, 52, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 18:
					func_343(&Var1, -99, -99, 176, 53, 26, 5, 26, 0, 0, -99, 0, 41, 31);
					break;
				
				case 19:
					func_343(&Var1, -99, -99, 125, 24, 18, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 20:
					func_343(&Var1, -99, -99, 162, 24, 36, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 21:
					func_343(&Var1, -99, -99, 75, 24, 36, 0, 26, 0, 0, -99, 0, 0, 4);
					break;
				
				case 22:
					func_343(&Var1, -99, -99, 227, 53, 25, 0, 27, 0, 0, -99, 0, 25, 31);
					break;
				
				case 23:
					func_343(&Var1, -99, -99, 228, 54, 25, 0, 28, 0, 0, -99, 0, 26, 31);
					break;
				
				case 24:
					func_343(&Var1, -99, -99, 229, 55, 25, 0, 29, 0, 0, -99, 0, 27, 31);
					break;
				
				case 25:
					func_343(&Var1, -99, -99, 230, 56, 25, 0, 30, 0, 0, -99, 0, 28, 31);
					break;
				
				case 26:
					func_343(&Var1, -99, -99, 231, 57, 25, 0, 31, 0, 0, -99, 0, 29, 31);
					break;
				
				case 27:
					func_343(&Var1, -99, -99, 232, 58, 25, 0, 32, 0, 0, -99, 0, 30, 31);
					break;
				
				case 28:
					func_343(&Var1, -99, -99, 233, 59, 25, 0, 33, 0, 0, -99, 0, 31, 31);
					break;
				
				case 29:
					func_343(&Var1, -99, -99, 234, 60, 25, 0, 34, 0, 0, -99, 0, 32, 31);
					break;
				
				case 30:
					func_343(&Var1, -99, -99, 235, 61, 25, 0, 35, 0, 0, -99, 0, 33, 31);
					break;
				
				case 31:
					func_343(&Var1, -99, -99, 236, 62, 25, 0, 36, 0, 0, -99, 0, 34, 31);
					break;
				
				case 32:
					func_343(&Var1, -99, -99, 237, 63, 25, 0, 37, 0, 0, -99, 0, 35, 31);
					break;
				
				case 33:
					func_343(&Var1, -99, -99, 238, 64, 25, 0, 38, 0, 0, -99, 0, 36, 31);
					break;
				
				case 34:
					func_343(&Var1, -99, -99, 239, 65, 25, 0, 39, 0, 0, -99, 0, 37, 31);
					break;
				
				case 35:
					func_343(&Var1, -99, -99, 240, 66, 25, 0, 40, 0, 0, -99, 0, 38, 31);
					break;
				
				case 36:
					func_343(&Var1, -99, -99, 241, 67, 25, 0, 41, 0, 0, -99, 0, 39, 31);
					break;
				
				case 37:
					func_343(&Var1, -99, -99, 242, 68, 25, 0, 42, 0, 0, -99, 0, 40, 31);
					break;
				
				case 38:
					func_343(&Var1, -99, -99, 260, 72, 17, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 39:
					func_343(&Var1, -99, -99, 125, 24, 0, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 40:
					func_343(&Var1, -99, -99, 123, 24, 0, 0, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 41:
					func_343(&Var1, -99, -99, 159, 69, 17, 5, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 42:
					func_343(&Var1, -99, -99, 89, 22, 15, 6, 26, 0, 0, -99, 0, 0, 31);
					break;
				
				case 43:
					func_343(&Var1, -99, -99, 317, 69, 17, 0, 0, 0, 51, -99, 0, 0, 6);
					break;
				
				case 44:
					func_343(&Var1, -99, -99, 30, 23, 16, 0, 0, 0, 0, -99, 0, 0, 7);
					break;
				
				case 45:
					func_343(&Var1, -99, -99, 106, 70, 17, 5, 26, 0, 0, -99, 0, 0, 8);
					break;
				
				case 46:
					func_343(&Var1, -99, -99, 117, 24, 20, 5, 26, 0, 52, -99, 0, 0, 31);
					break;
				
				default:
					func_342(&Var1, iParam0, iParam1, 47);
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 0:
					func_343(&Var1, -99, -99, 0, 91, 28, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 1:
					func_343(&Var1, -99, -99, 17, 5, 8, 2, 3, 0, 0, -99, 0, 0, 8);
					break;
				
				case 2:
					func_343(&Var1, -99, -99, 43, 8, 12, 3, 5, 0, 0, -99, 0, 0, 1);
					break;
				
				case 3:
					func_343(&Var1, -99, -99, 50, 14, 8, 0, 15, 6, 3, -99, 0, 0, 2);
					break;
				
				case 4:
					func_343(&Var1, -99, -99, Global_101652.f_2079.f_539.f_196[2], Global_101652.f_2079.f_539.f_200[2], 8, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 5:
					func_343(&Var1, -99, -99, 95, 33, 8, 0, 15, 0, 0, -99, 0, 0, 6);
					break;
				
				case 6:
					func_343(&Var1, -99, -99, 49, 13, 10, 4, 6, 0, 0, -99, 0, 0, 3);
					break;
				
				case 7:
					func_343(&Var1, -99, -99, 49, 13, 14, 4, 15, 0, 0, -99, 0, 0, 4);
					break;
				
				case 8:
					func_343(&Var1, -99, -99, 79, 32, 8, 5, 7, 0, 0, -99, 0, 0, 31);
					break;
				
				case 9:
					func_343(&Var1, -99, -99, 53, 17, 11, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 10:
					func_343(&Var1, -99, -99, 96, 81, 8, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 11:
					func_343(&Var1, -99, -99, 51, 15, 33, 0, 8, 0, 0, -99, 0, 0, 5);
					break;
				
				case 12:
					func_343(&Var1, -99, -99, 0, 93, 29, 0, 13, 0, 0, -99, 0, 0, 31);
					break;
				
				case 13:
					func_343(&Var1, -99, -99, 52, 16, 30, 5, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 14:
					func_343(&Var1, -99, -99, 241, 92, 16, 0, 12, 0, 0, -99, 0, 0, 31);
					break;
				
				case 15:
					func_343(&Var1, -99, -99, 97, 34, 8, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 16:
					func_343(&Var1, -99, -99, 44, 9, 12, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 17:
					func_343(&Var1, -99, -99, 45, 10, 12, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 18:
					func_343(&Var1, -99, -99, 46, 11, 12, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 19:
					func_343(&Var1, -99, -99, 47, 12, 12, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 20:
					func_343(&Var1, -99, -99, 161, 53, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 21:
					func_343(&Var1, -99, -99, 0, 44, 8, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 22:
					func_343(&Var1, -99, -99, 98, 0, 28, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 23:
					func_343(&Var1, -99, -99, 27, 0, 31, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 24:
					func_343(&Var1, -99, -99, 190, 71, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 25:
					func_343(&Var1, -99, -99, 191, 72, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 26:
					func_343(&Var1, -99, -99, 192, 73, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 27:
					func_343(&Var1, -99, -99, 193, 74, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 28:
					func_343(&Var1, -99, -99, 194, 75, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 29:
					func_343(&Var1, -99, -99, 195, 76, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 30:
					func_343(&Var1, -99, -99, 196, 77, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 31:
					func_343(&Var1, -99, -99, 197, 78, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 32:
					func_343(&Var1, -99, -99, 198, 79, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 33:
					func_343(&Var1, -99, -99, 199, 80, 8, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 34:
					func_343(&Var1, -99, -99, 200, 62, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 35:
					func_343(&Var1, -99, -99, 201, 63, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 36:
					func_343(&Var1, -99, -99, 202, 64, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 37:
					func_343(&Var1, -99, -99, 203, 65, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 38:
					func_343(&Var1, -99, -99, 204, 66, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 39:
					func_343(&Var1, -99, -99, 205, 67, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 40:
					func_343(&Var1, -99, -99, 206, 68, 16, 0, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 41:
					func_343(&Var1, -99, -99, 2, 43, 8, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 42:
					func_343(&Var1, -99, -99, 55, 0, 28, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 43:
					func_343(&Var1, -99, -99, 0, 52, 8, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 44:
					func_343(&Var1, -99, -99, 70, 30, 32, 6, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				case 45:
					func_343(&Var1, -99, -99, 19, 91, 28, 0, 0, 0, 0, -99, 0, 0, 7);
					break;
				
				case 46:
					func_343(&Var1, -99, -99, 0, 0, 28, 0, 0, 0, 0, -99, 0, 0, 31);
					break;
				
				case 47:
					func_343(&Var1, -99, -99, 79, 32, 8, 5, 15, 0, 0, -99, 0, 0, 31);
					break;
				
				default:
					func_342(&Var1, iParam0, iParam1, 48);
					break;
			}
			break;
		
		case joaat("mp_m_freemode_01"):
			switch (iParam1)
			{
				case 0:
					func_343(&Var1, -99, -99, 0, 0, 10, -99, 0, -99, -99, 0, 0, 0, 31);
					break;
				
				case 1:
					func_343(&Var1, -99, -99, 1, 127, 38, -99, 2, 0, 0, 0, 0, 62, 0);
					break;
				
				case 2:
					func_343(&Var1, -99, -99, 0, 248, 45, -99, 240, 0, 0, 0, 0, 144, 1);
					break;
				
				case 3:
					func_343(&Var1, -99, -99, 4, 31, 25, -99, 240, 0, 0, 0, 0, 231, 2);
					break;
				
				case 4:
					func_343(&Var1, -99, -99, 1, 66, 10, -99, 21, 0, 0, 0, 0, 123, 3);
					break;
				
				case 5:
					func_343(&Var1, -99, -99, 1, 93, 141, -99, 3, 0, 0, 0, 0, 114, 4);
					break;
				
				case 6:
					func_343(&Var1, -99, -99, 1, 116, 113, -99, 7, 0, 0, 0, 0, 113, 5);
					break;
				
				case 7:
					func_343(&Var1, -99, -99, 1, 61, 136, -99, 27, 0, 0, 0, 0, 61, 6);
					break;
				
				case 8:
					func_343(&Var1, -99, -99, 0, 112, 10, -99, 240, 0, 0, 0, 0, 8, 7);
					break;
				
				case 9:
					func_343(&Var1, -99, -99, 4, 131, 24, -99, 240, 0, 0, 0, 0, 223, 8);
					break;
				
				case 10:
					func_343(&Var1, -99, -99, 1, 209, 188, -99, 208, 0, 0, 0, 0, 64, 9);
					break;
				
				case 11:
					func_343(&Var1, -99, -99, 1, 209, 160, -99, 211, 0, 0, 0, 43, 157, 10);
					break;
				
				case 12:
					func_343(&Var1, -99, -99, 1, 162, 174, -99, 201, 0, 0, 0, 0, 158, 11);
					break;
				
				case 13:
					func_343(&Var1, -99, -99, 1, 4, 240, -99, 34, 0, 0, 0, 0, 97, 12);
					break;
				
				case 14:
					func_343(&Var1, -99, -99, 1, 128, 232, -99, 43, 0, 0, 0, 0, 102, 13);
					break;
				
				case 15:
					func_343(&Var1, -99, -99, 1, 66, 65, -99, 224, 0, 0, 0, 0, 100, 14);
					break;
				
				case 16:
					func_343(&Var1, -99, -99, 1, 65, 172, -99, 202, 0, 0, 0, 0, 64, 15);
					break;
				
				case 17:
					func_343(&Var1, -99, -99, 1, 64, 10, -99, 1, 0, 0, 0, 0, 66, 16);
					break;
				
				case 18:
					func_343(&Var1, -99, -99, 5, 98, 80, -99, 240, 0, 0, 0, 0, 87, 17);
					break;
				
				case 19:
					func_343(&Var1, -99, -99, 5, 192, 96, -99, 240, 0, 0, 0, 0, 80, 18);
					break;
				
				case 20:
					func_343(&Var1, -99, -99, 1, 124, 96, -99, 11, 0, 0, 0, 0, 110, 19);
					break;
				
				case 21:
					func_343(&Var1, -99, -99, 0, 80, 114, -99, 240, 0, 0, 0, 0, 2, 20);
					break;
				
				case 22:
					func_343(&Var1, -99, -99, 6, 43, 112, -99, 82, 0, 0, 0, 0, 48, 21);
					break;
				
				case 23:
					func_343(&Var1, -99, -99, 1, 116, 144, -99, 2, 0, 0, 0, 0, 108, 22);
					break;
				
				case 24:
					func_343(&Var1, -99, -99, 1, 63, 38, -99, 3, 0, 0, 0, 0, 63, 23);
					break;
				
				case 25:
					func_343(&Var1, -99, -99, 2, 64, 10, -99, 240, 0, 0, 0, 0, 41, 24);
					break;
				
				default:
					func_342(&Var1, iParam0, iParam1, 26);
					break;
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			switch (iParam1)
			{
				case 0:
					func_343(&Var1, -99, -99, 0, 0, 0, -99, 0, -99, -99, 0, -99, 0, 31);
					break;
				
				case 1:
					func_343(&Var1, -99, -99, 5, 136, 241, -99, 47, 0, 0, 0, 0, 21, 31);
					break;
				
				case 2:
					func_343(&Var1, -99, -99, 4, 1, 96, -99, 32, 0, 0, 0, 7, 215, 0);
					break;
				
				case 3:
					func_343(&Var1, -99, -99, 1, 73, 241, -99, 3, 0, 0, 0, 0, 25, 1);
					break;
				
				case 4:
					func_343(&Var1, -99, -99, 2, 88, 217, -99, 32, 0, 0, 0, 0, 33, 2);
					break;
				
				case 5:
					func_343(&Var1, -99, -99, 9, 7, 98, -99, 32, 0, 0, 0, 7, 153, 3);
					break;
				
				case 6:
					func_343(&Var1, -99, -99, 1, 140, 241, -99, 7, 0, 0, 0, 31, 16, 4);
					break;
				
				case 7:
					func_343(&Var1, -99, -99, 4, 139, 112, -99, 32, 0, 0, 0, 49, 78, 5);
					break;
				
				case 8:
					func_343(&Var1, -99, -99, 1, 193, 48, -99, 108, 0, 0, 0, 0, 17, 6);
					break;
				
				case 9:
					func_343(&Var1, -99, -99, 5, 114, 97, -99, 103, 0, 0, 0, 0, 98, 7);
					break;
				
				case 10:
					func_343(&Var1, -99, -99, 9, 134, 239, -99, 32, 0, 0, 0, 2, 144, 8);
					break;
				
				case 11:
					func_343(&Var1, -99, -99, 5, 152, 96, -99, 10, 0, 0, 0, 31, 96, 9);
					break;
				
				case 12:
					func_343(&Var1, -99, -99, 6, 129, 1, -99, 96, 0, 0, 0, 5, 120, 10);
					break;
				
				case 13:
					func_343(&Var1, -99, -99, 5, 0, 0, -99, 10, 0, 0, 0, 0, 130, 31);
					break;
				
				case 14:
					func_343(&Var1, -99, -99, 4, 159, 96, -99, 32, 0, 0, 0, 22, 214, 11);
					break;
				
				case 15:
					func_343(&Var1, -99, -99, 9, 232, 213, -99, 32, 0, 0, 0, 22, 147, 12);
					break;
				
				case 16:
					func_343(&Var1, -99, -99, 2, 8, 98, -99, 32, 0, 0, 0, 33, 39, 13);
					break;
				
				case 17:
					func_343(&Var1, -99, -99, 5, 150, 235, -99, 106, 0, 0, 0, 0, 128, 14);
					break;
				
				case 18:
					func_343(&Var1, -99, -99, 6, 96, 97, -99, 7, 0, 0, 0, 32, 114, 15);
					break;
				
				case 19:
					func_343(&Var1, -99, -99, 4, 48, 64, -99, 32, 0, 0, 0, 0, 89, 16);
					break;
				
				case 20:
					func_343(&Var1, -99, -99, 4, 62, 64, -99, 32, 0, 0, 0, 0, 78, 17);
					break;
				
				case 21:
					func_343(&Var1, -99, -99, 4, 49, 65, -99, 32, 0, 0, 0, 8, 80, 31);
					break;
				
				case 22:
					func_343(&Var1, -99, -99, 3, 20, 16, -99, 32, 0, 0, 0, 0, 49, 18);
					break;
				
				case 23:
					func_343(&Var1, -99, -99, 0, 73, 178, -99, 32, 0, 0, 0, 38, 11, 19);
					break;
				
				case 24:
					func_343(&Var1, -99, -99, 5, 135, 53, -99, 9, 0, 0, 0, 29, 27, 20);
					break;
				
				case 25:
					func_343(&Var1, -99, -99, 7, 233, 176, -99, 120, 0, 0, 0, 11, 160, 21);
					break;
				
				case 26:
					func_343(&Var1, -99, -99, 4, 34, 179, -99, 32, 0, 0, 0, 0, 77, 22);
					break;
				
				case 27:
					func_343(&Var1, -99, -99, 15, 131, 93, -99, 32, 0, 0, 0, 0, 250, 23);
					break;
				
				default:
					func_342(&Var1, iParam0, iParam1, 28);
					break;
			}
			break;
	}
	return Var1;
}

void func_342(var uParam0, int iParam1, int iParam2, int iParam3)//Position - 0x32338
{
	int iVar0;
	struct<5> Var1;
	vector3 vVar16;
	struct<2> Var19;
	int iVar36;
	
	(*uParam0)[0] = 0;
	(*uParam0)[2] = -99;
	(*uParam0)[3] = 0;
	(*uParam0)[4] = 0;
	(*uParam0)[6] = 0;
	(*uParam0)[5] = 0;
	(*uParam0)[8] = 0;
	(*uParam0)[9] = 0;
	(*uParam0)[10] = 0;
	(*uParam0)[1] = 0;
	(*uParam0)[7] = 0;
	(*uParam0)[11] = 0;
	(*uParam0)[13] = -99;
	(*uParam0)[14] = -99;
	uParam0->f_16 = 0;
	iVar0 = 0;
	if (iParam1 == joaat("player_zero"))
	{
		iVar0 = 0;
		(*uParam0)[13] = (10 + (iParam2 - iParam3));
	}
	else if (iParam1 == joaat("player_one"))
	{
		iVar0 = 1;
		(*uParam0)[13] = (9 + (iParam2 - iParam3));
	}
	else if (iParam1 == joaat("player_two"))
	{
		iVar0 = 2;
		(*uParam0)[13] = (9 + (iParam2 - iParam3));
	}
	else if (iParam1 == joaat("mp_m_freemode_01"))
	{
		iVar0 = 3;
	}
	else if (iParam1 == joaat("mp_f_freemode_01"))
	{
		iVar0 = 4;
	}
	dlc1::_0xF3FBE2D50A6A8C28(iVar0, 0);
	dlc1::get_shop_ped_query_outfit((iParam2 - iParam3), &Var1);
	if (!dlc1::_is_dlc_data_empty(Var1))
	{
		iVar36 = 0;
		while (iVar36 < Var1.f_4)
		{
			if (dlc1::_get_prop_from_outfit(Var1.f_1, iVar36, &vVar16))
			{
				if ((vVar16.x != 0 && vVar16.x != -1) && vVar16.x != 1849449579)
				{
					if (vVar16.y == 10)
					{
						dlc1::init_shop_ped_component(&Var19);
						dlc1::get_shop_ped_component(vVar16.x, &Var19);
						if (vVar16.x != Var19.f_1)
						{
							uParam0->f_16 = 1;
						}
					}
					if (vVar16.y == 10 && uParam0->f_16)
					{
						(*uParam0)[func_86(vVar16.y)] = vVar16.x;
						uParam0->f_16 = 1;
					}
					else
					{
						(*uParam0)[func_86(vVar16.y)] = func_7(iParam1, vVar16.x, func_86(vVar16.y), iVar0);
					}
				}
				else if (vVar16.y != -1)
				{
					(*uParam0)[func_86(vVar16.y)] = vVar16.y;
				}
			}
			iVar36++;
		}
		if (Var1.f_3 == 0)
		{
			(*uParam0)[13] = -99;
		}
		else
		{
			(*uParam0)[13] = Var1.f_1;
		}
	}
}

void func_343(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13)//Position - 0x32522
{
	(*uParam0)[0] = iParam1;
	(*uParam0)[2] = iParam2;
	(*uParam0)[3] = iParam3;
	(*uParam0)[4] = iParam4;
	(*uParam0)[6] = iParam5;
	(*uParam0)[5] = iParam6;
	(*uParam0)[8] = iParam7;
	(*uParam0)[9] = iParam8;
	(*uParam0)[10] = iParam9;
	(*uParam0)[1] = iParam10;
	(*uParam0)[7] = iParam11;
	(*uParam0)[11] = iParam12;
	(*uParam0)[13] = iParam13;
	(*uParam0)[14] = -99;
}

bool func_344(int iParam0, int iParam1)//Position - 0x32593
{
	if (iParam0)
	{
		func_429(player::player_ped_id(), 51);
		if (ped::_0x66680A92700F43DF(player::player_ped_id()) || !iParam1)
		{
			func_345(player::player_ped_id(), 12, 51, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
			ped::_0x5AAB586FFEC0FD96(player::player_ped_id());
			return true;
		}
	}
	else
	{
		func_429(player::player_ped_id(), 32);
		if (ped::_0x66680A92700F43DF(player::player_ped_id()) || !iParam1)
		{
			func_345(player::player_ped_id(), 12, 32, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
			ped::_0x5AAB586FFEC0FD96(player::player_ped_id());
			return true;
		}
	}
	return false;
}

bool func_345(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13)//Position - 0x32626
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	int iVar10;
	var uVar11;
	var uVar28;
	var uVar38;
	struct<14> Var55;
	var uVar69;
	
	if (ped::is_ped_injured(iParam0) || iParam2 == -99)
	{
		return false;
	}
	Global_69517++;
	iVar5 = -99;
	iVar6 = -99;
	iVar7 = -99;
	iVar8 = -99;
	iVar9 = -99;
	iVar10 = entity::get_entity_model(iParam0);
	if (iParam5 == 0)
	{
		Global_69518[1 /*14*/] = { func_14(iVar10, iParam1, iParam2) };
		if (!func_372(iParam3))
		{
			Global_69517 = (Global_69517 - 1);
			return false;
		}
		func_369(iParam1);
	}
	if (iParam1 == 12)
	{
		if (iParam7 == 1)
		{
			if (iVar10 == joaat("player_one"))
			{
				iVar5 = func_368(iParam0, 8);
				if (iVar5 != 9)
				{
					iVar5 = -99;
				}
			}
			iVar6 = func_368(iParam0, 9);
			if (iVar10 == joaat("player_zero"))
			{
				if (iVar6 >= 9 && iVar6 <= 14)
				{
				}
				else
				{
					iVar6 = -99;
				}
			}
			else if (iVar10 == joaat("player_one"))
			{
				if (iVar6 >= 5 && iVar6 <= 10)
				{
				}
				else
				{
					iVar6 = -99;
				}
			}
			else if (iVar10 == joaat("player_two"))
			{
				if ((iVar6 >= 9 && iVar6 <= 14) || (iVar6 >= 15 && iVar6 <= 16))
				{
				}
				else
				{
					iVar6 = -99;
				}
			}
			iVar7 = func_367(iParam0, 1);
			if (!func_366(iVar10, 14, iVar7, -1))
			{
				iVar7 = -99;
			}
			iVar8 = func_367(iParam0, 0);
			if (!func_365(iVar10, 14, iVar8, -1) && !func_364(iVar10, 14, iVar8, -1))
			{
				iVar8 = -99;
			}
			if (iVar10 == joaat("player_one"))
			{
				iVar9 = func_367(iParam0, 2);
			}
		}
		ped::clear_all_ped_props(iParam0);
		uVar11 = 15;
		if (iParam5 == 1)
		{
			uVar11 = { Global_69561 };
		}
		else
		{
			uVar11 = { func_341(iVar10, iParam2) };
		}
		iVar0 = 0;
		while (iVar0 <= 14)
		{
			if (uVar11[iVar0] != -99)
			{
				Global_69518[1 /*14*/] = { func_14(iVar10, iVar0, uVar11[iVar0]) };
				if (gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 0))
				{
					if (iVar0 == 13)
					{
						uVar28 = 9;
						if (iParam5 == 1)
						{
							uVar28 = { Global_69578 };
						}
						else
						{
							uVar28 = { func_338(iVar10, uVar11[iVar0]) };
						}
						iVar1 = 0;
						while (iVar1 <= 8)
						{
							Global_69518[1 /*14*/] = { func_14(iVar10, 14, uVar28[iVar1]) };
							func_361(iParam0, Global_69518[1 /*14*/].f_12, Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4);
							func_369(14);
							if (Global_69517 == 1)
							{
								iVar2 = 0;
								while (iVar2 < 15)
								{
									iVar3 = func_355(iParam0, iVar10, 14, uVar28[iVar1], iVar2, 0);
									if (iVar3 != -99)
									{
										func_345(iParam0, iVar2, iVar3, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
									}
									iVar2++;
								}
							}
							iVar1++;
						}
					}
					else if (iVar0 != 14 && iVar0 != 12)
					{
						if ((iVar10 == joaat("player_one") && iVar0 == 2) && uVar11[iVar0] == 20)
						{
							func_84(iVar10, 2, 20, &iVar4);
						}
						if (iParam4 == -1)
						{
							ped::set_ped_component_variation(iParam0, func_9(iVar0), Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4, ped::get_ped_palette_variation(iParam0, func_9(iVar0)));
						}
						else
						{
							ped::set_ped_component_variation(iParam0, func_9(iVar0), Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4, iParam4);
						}
						func_369(iVar0);
						if (Global_69517 == 1)
						{
							iVar2 = 0;
							while (iVar2 < 15)
							{
								iVar3 = func_355(iParam0, iVar10, iVar0, uVar11[iVar0], iVar2, 0);
								if (iVar3 != -99)
								{
									func_345(iParam0, iVar2, iVar3, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
								}
								iVar2++;
							}
						}
					}
				}
			}
			else if (iVar0 != 12 && iVar0 != 14)
			{
				Global_69518[1 /*14*/] = { func_14(iVar10, iVar0, func_354(iParam0, iVar0, -1)) };
				if (gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 3))
				{
					if (iVar0 == 2)
					{
						if (iVar10 == joaat("player_one"))
						{
							if (func_353(iParam0, iVar10, &iVar4, 1))
							{
								func_345(iParam0, 2, iVar4, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
							}
						}
					}
					else
					{
						uVar38 = { func_341(iVar10, 0) };
						func_345(iParam0, iVar0, uVar38[iVar0], 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
					}
				}
			}
			iVar0++;
		}
		if (iParam7 == 1)
		{
			Var55 = { func_14(iVar10, 8, iVar5) };
			if (iVar5 != -99)
			{
				if (func_351(iVar10, iParam2, 8, iVar5, &uVar11, &Var55))
				{
					func_345(iParam0, 8, iVar5, iParam3, iParam4, iParam5, iParam6, iParam7, -1, -1, -1, 0, 0, 0);
				}
			}
			Var55 = { func_14(iVar10, 9, iVar6) };
			if (iVar6 != -99)
			{
				if (func_351(iVar10, iParam2, 9, iVar6, &uVar11, &Var55))
				{
					func_345(iParam0, 9, iVar6, iParam3, iParam4, iParam5, iParam6, iParam7, -1, -1, -1, 0, 0, 0);
				}
			}
			Var55 = { func_14(iVar10, 14, iVar7) };
			if (iVar7 != -99)
			{
				if (func_351(iVar10, iParam2, 14, iVar7, &uVar11, &Var55))
				{
					func_345(iParam0, 14, iVar7, iParam3, iParam4, iParam5, iParam6, iParam7, -1, -1, -1, 0, 0, 0);
				}
			}
			Var55 = { func_14(iVar10, 14, iVar8) };
			if (iVar8 != -99)
			{
				if (func_351(iVar10, iParam2, 14, iVar8, &uVar11, &Var55))
				{
					func_345(iParam0, 14, iVar8, iParam3, iParam4, iParam5, iParam6, iParam7, -1, -1, -1, 0, 0, 0);
				}
			}
			Var55 = { func_14(iVar10, 14, iVar9) };
			if (iVar9 != -99)
			{
				if (func_351(iVar10, iParam2, 14, iVar9, &uVar11, &Var55))
				{
					func_345(iParam0, 14, iVar9, iParam3, iParam4, iParam5, iParam6, iParam7, -1, -1, -1, 0, 0, 0);
				}
			}
		}
	}
	else if (iParam1 == 13)
	{
		uVar69 = { func_338(iVar10, iParam2) };
		iVar1 = 0;
		while (iVar1 <= 8)
		{
			Global_69518[1 /*14*/] = { func_14(iVar10, 14, uVar69[iVar1]) };
			func_361(iParam0, Global_69518[1 /*14*/].f_12, Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4);
			func_369(14);
			if (Global_69517 == 1)
			{
				iVar2 = 0;
				while (iVar2 < 15)
				{
					iVar3 = func_355(iParam0, iVar10, 14, uVar69[iVar1], iVar2, 0);
					if (iVar3 != -99)
					{
						func_345(iParam0, iVar2, iVar3, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
					}
					iVar2++;
				}
			}
			iVar1++;
		}
	}
	else if (iParam1 == 14)
	{
		func_361(iParam0, Global_69518[1 /*14*/].f_12, Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4);
		func_369(iParam1);
		if (Global_69517 == 1)
		{
			iVar2 = 0;
			while (iVar2 < 15)
			{
				iVar3 = func_355(iParam0, iVar10, iParam1, iParam2, iVar2, 0);
				if (iVar3 != -99)
				{
					func_345(iParam0, iVar2, iVar3, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
				}
				iVar2++;
			}
		}
	}
	else
	{
		if (iParam4 == -1)
		{
			ped::set_ped_component_variation(iParam0, func_9(iParam1), Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4, ped::get_ped_palette_variation(iParam0, func_9(iParam1)));
		}
		else
		{
			ped::set_ped_component_variation(iParam0, func_9(iParam1), Global_69518[1 /*14*/].f_3, Global_69518[1 /*14*/].f_4, iParam4);
		}
		if (Global_69517 == 1)
		{
			iVar2 = 0;
			while (iVar2 < 15)
			{
				iVar3 = func_355(iParam0, iVar10, iParam1, iParam2, iVar2, 0);
				if (iVar3 != -99)
				{
					func_345(iParam0, iVar2, iVar3, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
				}
				iVar2++;
			}
		}
		if (iParam6 == 0)
		{
			func_348(iVar10, iParam1, iParam2);
		}
	}
	if (Global_69517 == 1)
	{
		if (func_353(iParam0, iVar10, &iVar4, 0))
		{
			func_345(iParam0, 2, iVar4, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
		}
		if (func_346(iParam0, iVar10, &iVar4))
		{
			func_345(iParam0, 1, iVar4, 0, -1, 0, 0, 0, -1, -1, -1, 0, 0, 0);
		}
	}
	Global_69517 = (Global_69517 - 1);
	return true;
}

bool func_346(int iParam0, int iParam1, int iParam2)//Position - 0x32E32
{
	var uVar0;
	
	uVar0 = func_13(iParam1);
	if (Global_101652.f_2079.f_539[uVar0 /*65*/].f_63 != -99)
	{
		if (!func_347(iParam0, Global_101652.f_2079.f_539[uVar0 /*65*/].f_64, Global_101652.f_2079.f_539[uVar0 /*65*/].f_63))
		{
			*iParam2 = Global_101652.f_2079.f_539[uVar0 /*65*/].f_62;
			Global_101652.f_2079.f_539[uVar0 /*65*/].f_63 = -99;
			Global_101652.f_2079.f_539[uVar0 /*65*/].f_64 = 1;
			return true;
		}
	}
	return false;
}

bool func_347(int iParam0, int iParam1, int iParam2)//Position - 0x32EBE
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	var uVar5;
	var uVar22;
	int iVar32;
	var uVar33;
	
	if (ped::is_ped_injured(iParam0))
	{
		return false;
	}
	iVar0 = entity::get_entity_model(iParam0);
	Global_69518[1 /*14*/] = { func_14(iVar0, iParam1, iParam2) };
	if (!gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 0))
	{
		return false;
	}
	if (iParam1 == 12)
	{
		uVar5 = { func_341(iVar0, iParam2) };
		iVar2 = 0;
		while (iVar2 <= 14)
		{
			if ((uVar5[iVar2] != -99 && iVar2 != 12) && iVar2 != 14)
			{
				if (!func_347(iParam0, iVar2, uVar5[iVar2]))
				{
					if (iVar2 == 13)
					{
						uVar22 = { func_338(iVar0, uVar5[iVar2]) };
						iVar3 = 0;
						while (iVar3 <= 8)
						{
							if (!func_347(iParam0, 14, uVar22[iVar3]))
							{
								iVar4 = 0;
								while (iVar4 <= 19)
								{
									Global_69518[2 /*14*/] = { func_14(iVar0, 14, iVar4) };
									if (Global_69518[2 /*14*/].f_12 == iVar3)
									{
										if (func_347(iParam0, 14, iVar4))
										{
											if (!func_351(iVar0, iParam2, 14, iVar4, &uVar5, &(Global_69518[2 /*14*/])))
											{
												return false;
											}
										}
									}
									iVar4++;
								}
							}
							iVar3++;
						}
					}
					else
					{
						iVar1 = func_368(iParam0, iVar2);
						Global_69518[2 /*14*/] = { func_14(iVar0, iVar2, iVar1) };
						if (!func_351(iVar0, iParam2, iVar2, iVar1, &uVar5, &(Global_69518[2 /*14*/])))
						{
							return false;
						}
					}
				}
			}
			iVar2++;
		}
		return true;
	}
	else if (iParam1 == 13)
	{
		uVar33 = { func_338(iVar0, iParam2) };
		iVar32 = 0;
		while (iVar32 <= 8)
		{
			if (!func_347(iParam0, 14, uVar33[iVar32]))
			{
				return false;
			}
			iVar32++;
		}
		return true;
	}
	else if (iParam1 == 14)
	{
		if (ped::get_ped_prop_index(iParam0, Global_69518[1 /*14*/].f_12) == Global_69518[1 /*14*/].f_3 && (ped::get_ped_prop_texture_index(iParam0, Global_69518[1 /*14*/].f_12) == Global_69518[1 /*14*/].f_4 || Global_69518[1 /*14*/].f_3 == -1))
		{
			return true;
		}
	}
	else if (Global_69518[1 /*14*/].f_3 == ped::get_ped_drawable_variation(iParam0, func_9(iParam1)) && Global_69518[1 /*14*/].f_4 == ped::get_ped_texture_variation(iParam0, func_9(iParam1)))
	{
		return true;
	}
	return false;
}

void func_348(int iParam0, int iParam1, int iParam2)//Position - 0x33116
{
	int iVar0;
	var uVar1;
	
	if (iParam0 == joaat("player_zero"))
	{
		iVar0 = 5;
	}
	else if (iParam0 == joaat("player_one"))
	{
		iVar0 = 2;
	}
	else if (iParam0 == joaat("player_two"))
	{
		iVar0 = 4;
	}
	if (func_350(iParam0, 12, iVar0))
	{
		if (func_349(iParam0, iParam1, iParam2))
		{
			uVar1 = func_13(iParam0);
			if (iParam1 == 3)
			{
				Global_101652.f_2079.f_539.f_196[uVar1] = iParam2;
			}
			else if (iParam1 == 4)
			{
				Global_101652.f_2079.f_539.f_200[uVar1] = iParam2;
			}
		}
	}
}

bool func_349(int iParam0, int iParam1, int iParam2)//Position - 0x331A0
{
	if (iParam0 == joaat("player_zero"))
	{
		if (iParam1 == 4)
		{
			if (iParam2 >= 47 && iParam2 <= 54)
			{
				return true;
			}
		}
		else if (iParam1 == 3)
		{
			if (iParam2 >= 77 && iParam2 <= 84)
			{
				return true;
			}
		}
	}
	else if (iParam0 == joaat("player_one"))
	{
		if (iParam1 == 4)
		{
			if (iParam2 >= 14 && iParam2 <= 21)
			{
				return true;
			}
		}
		else if (iParam1 == 3)
		{
			if (iParam2 >= 41 && iParam2 <= 56)
			{
				return true;
			}
		}
	}
	else if (iParam0 == joaat("player_two"))
	{
		if (iParam1 == 4)
		{
			if (iParam2 >= 18 && iParam2 <= 29)
			{
				return true;
			}
		}
		else if (iParam1 == 3)
		{
			if (iParam2 >= 54 && iParam2 <= 69)
			{
				return true;
			}
		}
	}
	return false;
}

int func_350(int iParam0, int iParam1, int iParam2)//Position - 0x3327E
{
	Global_69518[1 /*14*/] = { func_14(iParam0, iParam1, iParam2) };
	return gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 2);
}

bool func_351(int iParam0, int iParam1, int iParam2, int iParam3, var uParam4, var uParam5)//Position - 0x332A8
{
	var uVar0;
	int iVar10;
	
	if ((*uParam4)[iParam2] == iParam3)
	{
		return true;
	}
	if (((*uParam4)[iParam2] == -99 && iParam2 != 14) && iParam2 != 13)
	{
		return true;
	}
	if (iParam2 == 13 || (iParam2 == 14 && (*uParam4)[13] == 31))
	{
		if ((((((((iParam3 == 0 || iParam3 == 1) || iParam3 == 2) || iParam3 == 3) || iParam3 == 4) || iParam3 == 5) || iParam3 == 6) || iParam3 == 7) || iParam3 == 8)
		{
			return true;
		}
	}
	if (iParam3 == -99 || uParam5->f_1 == -1)
	{
		return true;
	}
	if (iParam2 == 14)
	{
		uVar0 = { func_338(iParam0, (*uParam4)[13]) };
		iVar10 = 0;
		while (iVar10 <= 8)
		{
			if (uVar0[iVar10] == iParam3)
			{
				return true;
			}
			iVar10++;
		}
	}
	if (func_352(iParam0, iParam2, iParam3))
	{
		return true;
	}
	if (iParam0 == joaat("player_zero"))
	{
		if (func_366(iParam0, iParam2, iParam3, -1))
		{
			if ((((((iParam1 == 1 || iParam1 == 2) || iParam1 == 10) || iParam1 == 11) || iParam1 == 12) || iParam1 == 18) || iParam1 == 50)
			{
				return false;
			}
			return true;
		}
		else if (func_365(iParam0, iParam2, iParam3, -1))
		{
			if (((((((((iParam1 == 1 || iParam1 == 2) || iParam1 == 4) || iParam1 == 5) || iParam1 == 10) || iParam1 == 11) || iParam1 == 12) || iParam1 == 14) || iParam1 == 18) || iParam1 == 50)
			{
				return false;
			}
			if (iParam2 == 8)
			{
				if ((*uParam4)[8] != 0)
				{
					return false;
				}
			}
			else if (iParam2 == 9)
			{
				if ((*uParam4)[9] != 0)
				{
					return false;
				}
			}
			return true;
		}
		else if (func_364(iParam0, iParam2, iParam3, -1))
		{
			if (((((((((iParam1 == 1 || iParam1 == 2) || iParam1 == 4) || iParam1 == 5) || iParam1 == 10) || iParam1 == 11) || iParam1 == 12) || iParam1 == 14) || iParam1 == 18) || iParam1 == 50)
			{
				return false;
			}
			return true;
		}
	}
	else if (iParam0 == joaat("player_one"))
	{
		if (func_366(iParam0, iParam2, iParam3, -1))
		{
			if ((iParam1 == 3 || iParam1 == 5) || iParam1 == 7)
			{
				return false;
			}
			return true;
		}
		else if (func_365(iParam0, iParam2, iParam3, -1))
		{
			if ((((iParam1 == 3 || iParam1 == 5) || iParam1 == 7) || iParam1 == 8) || iParam1 == 21)
			{
				if (iParam2 == 8)
				{
					if (iParam3 == 9)
					{
						if (iParam1 == 8 || iParam1 == 21)
						{
							return true;
						}
					}
					else
					{
						return false;
					}
				}
				else
				{
					return false;
				}
			}
			if (iParam2 == 8)
			{
				if ((*uParam4)[8] != 26)
				{
					return false;
				}
			}
			else if (iParam2 == 9)
			{
				if ((*uParam4)[9] != 0)
				{
					return false;
				}
				if (((iParam1 == 43 || iParam1 == 44) || iParam1 == 45) || iParam1 == 46)
				{
					if (iParam3 >= 5 && iParam3 <= 10)
					{
						return false;
					}
				}
			}
			else if (iParam2 == 14)
			{
				if (((iParam1 == 43 || iParam1 == 44) || iParam1 == 45) || iParam1 == 46)
				{
					if (iParam3 >= 26 && iParam3 <= 39)
					{
						return false;
					}
				}
			}
			return true;
		}
		else if (func_364(iParam0, iParam2, iParam3, -1))
		{
			if (((((iParam1 == 3 || iParam1 == 3) || iParam1 == 5) || iParam1 == 7) || iParam1 == 8) || iParam1 == 21)
			{
				return false;
			}
			return true;
		}
		else if (iParam2 == 14)
		{
			if (iParam3 >= 159 && iParam3 <= 174)
			{
				return true;
			}
		}
	}
	else if (iParam0 == joaat("player_two"))
	{
		if (iParam1 == 2)
		{
			if (iParam2 == 14 && iParam3 == 0)
			{
				return true;
			}
		}
		if (func_366(iParam0, iParam2, iParam3, -1))
		{
			if (((((iParam1 == 1 || iParam1 == 2) || iParam1 == 6) || iParam1 == 8) || iParam1 == 45) || iParam1 == 12)
			{
				return false;
			}
			return true;
		}
		else if (func_365(iParam0, iParam2, iParam3, -1))
		{
			if (((((((iParam1 == 1 || iParam1 == 2) || iParam1 == 3) || iParam1 == 6) || iParam1 == 8) || iParam1 == 11) || iParam1 == 45) || iParam1 == 12)
			{
				return false;
			}
			if (iParam2 == 8)
			{
				if ((*uParam4)[8] != 15)
				{
					return false;
				}
			}
			else if (iParam2 == 9)
			{
				if ((*uParam4)[9] != 0)
				{
					return false;
				}
			}
			return true;
		}
		else if (func_364(iParam0, iParam2, iParam3, -1))
		{
			if ((((((iParam1 == 1 || iParam1 == 2) || iParam1 == 3) || iParam1 == 6) || iParam1 == 8) || iParam1 == 11) || iParam1 == 12)
			{
				return false;
			}
			return true;
		}
	}
	return false;
}

bool func_352(int iParam0, int iParam1, int iParam2)//Position - 0x338AC
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 8:
					if (iParam2 == 15)
					{
						return true;
					}
					break;
				
				case 9:
					if (iParam2 == 6)
					{
						return true;
					}
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 8:
					if (iParam2 == 1 || iParam2 == 10)
					{
						return true;
					}
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 8:
					if (iParam2 == 4)
					{
						return true;
					}
					break;
			}
			break;
	}
	return false;
}

bool func_353(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x33945
{
	var uVar0;
	
	uVar0 = func_13(iParam1);
	if (Global_101652.f_2079.f_539[uVar0 /*65*/].f_60 != -99)
	{
		if (!func_347(iParam0, Global_101652.f_2079.f_539[uVar0 /*65*/].f_61, Global_101652.f_2079.f_539[uVar0 /*65*/].f_60) || iParam3 == 1)
		{
			*iParam2 = Global_101652.f_2079.f_539[uVar0 /*65*/].f_59;
			Global_101652.f_2079.f_539[uVar0 /*65*/].f_60 = -99;
			Global_101652.f_2079.f_539[uVar0 /*65*/].f_61 = 2;
			return true;
		}
	}
	return false;
}

int func_354(int iParam0, int iParam1, int iParam2)//Position - 0x339DB
{
	int iVar0;
	int iVar1;
	
	if (!ped::is_ped_injured(iParam0))
	{
		if (iParam1 == 12)
		{
			iVar0 = 0;
			while (iVar0 <= 53)
			{
				if (func_347(iParam0, iParam1, iVar0))
				{
					return iVar0;
				}
				iVar0++;
			}
		}
		else if (iParam1 == 13)
		{
			iVar1 = 0;
			while (iVar1 <= 19)
			{
				if (func_347(iParam0, iParam1, iVar1))
				{
					return iVar1;
				}
				iVar1++;
			}
			return 31;
		}
		else if (iParam1 == 14)
		{
			if (iParam2 == -1)
			{
			}
			else
			{
				return func_367(iParam0, iParam2);
			}
		}
		else
		{
			return func_368(iParam0, iParam1);
		}
	}
	return -99;
}

int func_355(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0x33A7C
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	int iVar8;
	int iVar9;
	
	iVar0 = -99;
	if (iParam4 == 0)
	{
		switch (iParam2)
		{
			case 2:
				iVar1 = func_368(iParam0, 1);
				iVar0 = func_4(iParam1, iParam3, iVar1);
				break;
			
			case 1:
				iVar2 = func_368(iParam0, 2);
				iVar0 = func_4(iParam1, iVar2, iParam3);
				break;
		}
	}
	else if (iParam4 == 2)
	{
		func_84(iParam1, iParam2, iParam3, &iVar0);
	}
	else if (iParam4 == 1)
	{
		func_12(iParam1, iParam2, iParam3, &iVar0);
	}
	else if (iParam4 == 6)
	{
		if (iParam2 == 4)
		{
			if (func_360(iParam1, iParam3, &iVar0))
			{
			}
		}
	}
	else
	{
		switch (iParam1)
		{
			case joaat("player_zero"):
				switch (iParam4)
				{
					case 3:
						switch (iParam2)
						{
							case 10:
								switch (iParam3)
								{
									case 36:
										iVar0 = 17;
										break;
									
									case 37:
										iVar0 = 17;
										break;
									
									case 38:
										iVar0 = 18;
										break;
									
									case 39:
										iVar0 = 18;
										break;
									
									case 40:
										iVar0 = 19;
										break;
									
									case 41:
										iVar0 = 19;
										break;
									
									case 42:
										iVar0 = 20;
										break;
									
									case 43:
										iVar0 = 20;
										break;
								}
								break;
							
							case 11:
								if (iParam3 >= 2 && iParam3 <= 7)
								{
									if (!func_359(iParam0, 3, 44, 59))
									{
										iVar0 = 44;
									}
								}
								else if (((iParam3 >= 8 && iParam3 <= 17) || (iParam3 >= 18 && iParam3 <= 27)) || (iParam3 >= 28 && iParam3 <= 43))
								{
									if (!func_359(iParam0, 3, 135, 150))
									{
										iVar0 = func_358(iParam1, 3, 135, 150);
									}
								}
								break;
						}
						break;
					
					case 10:
						switch (iParam2)
						{
							case 3:
								switch (iParam3)
								{
									case 63:
										iVar0 = 4;
										break;
									
									case 61:
										iVar0 = 3;
										break;
									
									case 16:
										iVar0 = 1;
										break;
									
									case 114:
										iVar0 = 15;
										break;
									
									case 115:
										iVar0 = 17;
										break;
									
									case 116:
										iVar0 = 16;
										break;
									
									case 117:
										iVar0 = 18;
										break;
									
									case 118:
										iVar0 = 20;
										break;
									
									case 119:
										iVar0 = 19;
										break;
									
									case 125:
										iVar0 = 21;
										break;
									
									case 120:
										iVar0 = 22;
										break;
									
									case 124:
										iVar0 = 23;
										break;
									
									case 126:
										iVar0 = 24;
										break;
									
									case 121:
										iVar0 = 25;
										break;
									
									case 127:
										iVar0 = 26;
										break;
									
									case 128:
										iVar0 = 27;
										break;
									
									case 85:
										iVar0 = 6;
										break;
									
									case 77:
										iVar0 = 7;
										break;
									
									case 78:
										iVar0 = 8;
										break;
									
									case 79:
										iVar0 = 9;
										break;
									
									case 80:
										iVar0 = 10;
										break;
									
									case 81:
										iVar0 = 11;
										break;
									
									case 82:
										iVar0 = 12;
										break;
									
									case 83:
										iVar0 = 13;
										break;
									
									case 84:
										iVar0 = 14;
										break;
									
									case 21:
										iVar0 = 31;
										break;
									
									case 22:
										iVar0 = 30;
										break;
									
									case 23:
										iVar0 = 29;
										break;
									
									case 24:
										iVar0 = 28;
										break;
									
									case 25:
										iVar0 = 33;
										break;
									
									case 26:
										iVar0 = 35;
										break;
									
									case 27:
										iVar0 = 34;
										break;
									
									case 28:
										iVar0 = 32;
										break;
									
									default:
										if (iParam3 >= 17 && iParam3 <= 20)
										{
										}
										else
										{
											iVar0 = 0;
										}
										break;
								}
								break;
							
							case 11:
								if (iParam3 != 0)
								{
									iVar0 = 0;
								}
								break;
						}
						break;
					
					case 11:
						if (iParam2 == 3)
						{
							if ((iParam3 >= 44 && iParam3 <= 59) || (iParam3 >= 135 && iParam3 <= 150))
							{
							}
							else
							{
								iVar0 = 0;
							}
						}
						else if (iParam2 == 10)
						{
							if (iParam3 >= 36 && iParam3 <= 43)
							{
								iVar0 = 0;
							}
						}
						break;
				}
				break;
			
			case joaat("player_one"):
				switch (iParam4)
				{
					case 10:
						switch (iParam2)
						{
							case 3:
								switch (iParam3)
								{
									case 17:
										iVar0 = 2;
										break;
									
									case 90:
										iVar0 = 1;
										break;
									
									case 268:
										iVar0 = 3;
										break;
									
									case 269:
										iVar0 = 5;
										break;
									
									case 270:
										iVar0 = 4;
										break;
									
									case 271:
										iVar0 = 6;
										break;
									
									case 272:
										iVar0 = 8;
										break;
									
									case 273:
										iVar0 = 7;
										break;
									
									case 279:
										iVar0 = 9;
										break;
									
									case 274:
										iVar0 = 10;
										break;
									
									case 278:
										iVar0 = 11;
										break;
									
									case 280:
										iVar0 = 12;
										break;
									
									case 275:
										iVar0 = 13;
										break;
									
									case 281:
										iVar0 = 14;
										break;
									
									case 282:
										iVar0 = 15;
										break;
									
									case 107:
										iVar0 = 16;
										break;
									
									case 108:
										iVar0 = 17;
										break;
									
									case 109:
										iVar0 = 18;
										break;
									
									case 110:
										iVar0 = 19;
										break;
									
									case 111:
										iVar0 = 20;
										break;
									
									case 112:
										iVar0 = 21;
										break;
									
									case 113:
										iVar0 = 22;
										break;
									
									case 114:
										iVar0 = 23;
										break;
									
									case 115:
										iVar0 = 24;
										break;
									
									case 116:
										iVar0 = 25;
										break;
									
									case 117:
										iVar0 = 52;
										break;
									
									case 118:
										iVar0 = 27;
										break;
									
									case 119:
										iVar0 = 28;
										break;
									
									case 120:
										iVar0 = 29;
										break;
									
									case 121:
										iVar0 = 30;
										break;
									
									case 122:
										iVar0 = 31;
										break;
									
									case 296:
										iVar0 = 32;
										break;
									
									case 297:
										iVar0 = 33;
										break;
									
									case 298:
										iVar0 = 34;
										break;
									
									case 299:
										iVar0 = 35;
										break;
									
									case 300:
										iVar0 = 36;
										break;
									
									case 301:
										iVar0 = 37;
										break;
									
									case 302:
										iVar0 = 38;
										break;
									
									case 309:
										iVar0 = 39;
										break;
									
									case 310:
										iVar0 = 40;
										break;
									
									case 311:
										iVar0 = 41;
										break;
									
									case 312:
										iVar0 = 42;
										break;
									
									case 313:
										iVar0 = 43;
										break;
									
									case 314:
										iVar0 = 44;
										break;
									
									case 315:
										iVar0 = 45;
										break;
									
									case 316:
										iVar0 = 46;
										break;
									
									case 317:
										iVar0 = 51;
										break;
									
									default:
										iVar0 = 0;
										break;
								}
								break;
							
							case 11:
								if (iParam3 != 0)
								{
									iVar0 = 0;
								}
								break;
						}
						break;
					
					case 3:
						switch (iParam2)
						{
							case 11:
								if (iParam3 >= 47 && iParam3 <= 62)
								{
									if (!func_359(iParam0, 3, 209, 222))
									{
										iVar0 = func_358(iParam1, 3, 209, 222);
									}
								}
								else if ((iParam3 >= 1 && iParam3 <= 4) || (iParam3 >= 5 && iParam3 <= 8))
								{
									if (!func_359(iParam0, 3, 243, 258))
									{
										if (iParam3 == 1 || iParam3 == 5)
										{
											iVar0 = func_358(iParam1, 3, 243, 246);
										}
										else if (iParam3 == 2 || iParam3 == 6)
										{
											iVar0 = func_358(iParam1, 3, 247, 250);
										}
										else if (iParam3 == 3 || iParam3 == 7)
										{
											iVar0 = func_358(iParam1, 3, 251, 254);
										}
										else if (iParam3 == 4 || iParam3 == 8)
										{
											iVar0 = func_358(iParam1, 3, 255, 258);
										}
									}
								}
								else if (iParam3 == 41 || iParam3 == 42)
								{
									if (!func_359(iParam0, 3, 176, 191) && !func_359(iParam0, 3, 227, 242))
									{
										iVar0 = func_358(iParam1, 3, 176, 191);
									}
								}
								break;
						}
						break;
					
					case 8:
						if (iParam2 == 11 || iParam2 == 3)
						{
							if (iParam2 == 11)
							{
								iVar5 = iParam3;
								iVar4 = func_368(iParam0, 3);
							}
							else if (iParam2 == 3)
							{
								iVar4 = iParam3;
								iVar5 = func_368(iParam0, 11);
								iVar5 = func_357(iParam1, iVar4, iVar5, 0);
							}
							iVar3 = func_368(iParam0, 8);
							if (((iVar5 >= 5 && iVar5 <= 8) || (iVar5 >= 25 && iVar5 <= 40)) || (iVar5 >= 42 && iVar5 <= 43))
							{
								if (!func_356(joaat("player_one"), iVar3, iVar5, iVar4, &iVar6))
								{
									if (iVar6 != -99)
									{
										iVar0 = iVar6;
									}
								}
							}
							else if (((iVar3 >= 27 && iVar3 <= 42) || (iVar3 >= 43 && iVar3 <= 58)) || (iVar3 >= 59 && iVar3 <= 74))
							{
								iVar0 = 26;
							}
						}
						break;
					
					case 11:
						if (iParam2 == 3)
						{
							if (iParam3 >= 209 && iParam3 <= 222)
							{
							}
							else if (((iParam3 >= 176 && iParam3 <= 191) || (iParam3 >= 227 && iParam3 <= 242)) || (iParam3 >= 243 && iParam3 <= 258))
							{
								iVar7 = func_368(iParam0, 8);
								iVar8 = func_368(iParam0, 11);
								if (((iVar7 >= 27 && iVar7 <= 42) || (iVar7 >= 43 && iVar7 <= 58)) || (iVar7 >= 59 && iVar7 <= 74))
								{
									iVar0 = func_357(iParam1, iParam3, iVar8, 0);
								}
								else
								{
									iVar0 = func_357(iParam1, iParam3, iVar8, 1);
								}
							}
							else if (iParam3 >= 41 && iParam3 <= 56)
							{
								iVar0 = 45;
							}
							else if (iParam3 >= 223 && iParam3 <= 226)
							{
								iVar0 = 44;
							}
							else
							{
								iVar0 = 0;
							}
						}
						else if (iParam2 == 8)
						{
							if (((iParam3 >= 27 && iParam3 <= 42) || (iParam3 >= 43 && iParam3 <= 58)) || (iParam3 >= 59 && iParam3 <= 74))
							{
								iVar9 = func_368(iParam0, 11);
								iVar0 = func_357(iParam1, -99, iVar9, 0);
							}
						}
						break;
				}
				break;
			
			case joaat("player_two"):
				switch (iParam4)
				{
					case 10:
						switch (iParam2)
						{
							case 3:
								switch (iParam3)
								{
									case 50:
										iVar0 = 3;
										break;
									
									case 81:
										iVar0 = 5;
										break;
									
									case 82:
										iVar0 = 6;
										break;
									
									case 83:
										iVar0 = 7;
										break;
									
									case 84:
										iVar0 = 10;
										break;
									
									case 85:
										iVar0 = 9;
										break;
									
									case 86:
										iVar0 = 8;
										break;
									
									case 92:
										iVar0 = 22;
										break;
									
									case 87:
										iVar0 = 23;
										break;
									
									case 91:
										iVar0 = 24;
										break;
									
									case 93:
										iVar0 = 25;
										break;
									
									case 88:
										iVar0 = 26;
										break;
									
									case 94:
										iVar0 = 27;
										break;
									
									case 120:
										iVar0 = 11;
										break;
									
									case 121:
										iVar0 = 13;
										break;
									
									case 122:
										iVar0 = 14;
										break;
									
									case 124:
										iVar0 = 12;
										break;
									
									case 126:
										iVar0 = 18;
										break;
									
									case 128:
										iVar0 = 17;
										break;
									
									case 130:
										iVar0 = 19;
										break;
									
									case 131:
										iVar0 = 16;
										break;
									
									case 134:
										iVar0 = 15;
										break;
									
									case 135:
										iVar0 = 20;
										break;
									
									default:
										iVar0 = 0;
										break;
								}
								break;
						}
						break;
				}
				break;
			}
	}
	return iVar0;
}

bool func_356(int iParam0, int iParam1, int iParam2, int iParam3, var uParam4)//Position - 0x34630
{
	int iVar0;
	
	switch (iParam0)
	{
		case joaat("player_zero"):
			break;
		
		case joaat("player_one"):
			*uParam4 = 0;
			if (iParam1 >= 27 && iParam1 <= 42)
			{
				if (iParam2 != -99)
				{
					if ((iParam2 >= 5 && iParam2 <= 8) || (iParam2 >= 25 && iParam2 <= 40))
					{
					}
					else
					{
						if (iParam2 >= 42 && iParam2 <= 43)
						{
							if (iParam3 >= 176 && iParam3 <= 191)
							{
								iVar0 = (iParam1 - 27);
								*uParam4 = (59 + iVar0);
							}
							else if (iParam3 >= 227 && iParam3 <= 242)
							{
								iVar0 = (iParam1 - 27);
								*uParam4 = (43 + iVar0);
							}
						}
						return false;
					}
				}
				if (iParam3 != -99)
				{
					if (((iParam3 >= 227 && iParam3 <= 242) || (iParam3 >= 176 && iParam3 <= 191)) || (iParam3 >= 243 && iParam3 <= 258))
					{
					}
					else
					{
						return false;
					}
				}
			}
			else if (iParam1 >= 43 && iParam1 <= 58)
			{
				if (iParam2 != -99)
				{
					if (iParam2 >= 42 && iParam2 <= 43)
					{
					}
					else
					{
						if ((iParam2 >= 5 && iParam2 <= 8) || (iParam2 >= 25 && iParam2 <= 40))
						{
							iVar0 = (iParam1 - 43);
							*uParam4 = (27 + iVar0);
						}
						return false;
					}
				}
				if (iParam3 != -99)
				{
					if (iParam3 >= 227 && iParam3 <= 242)
					{
					}
					else
					{
						if (iParam3 >= 176 && iParam3 <= 191)
						{
							if (iParam2 >= 42 && iParam2 <= 43)
							{
								iVar0 = (iParam1 - 43);
								*uParam4 = (59 + iVar0);
							}
						}
						return false;
					}
				}
			}
			else if (iParam1 >= 59 && iParam1 <= 74)
			{
				if (iParam2 != -99)
				{
					if (iParam2 >= 42 && iParam2 <= 43)
					{
					}
					else
					{
						if ((iParam2 >= 5 && iParam2 <= 8) || (iParam2 >= 25 && iParam2 <= 40))
						{
							iVar0 = (iParam1 - 59);
							*uParam4 = (27 + iVar0);
						}
						return false;
					}
				}
				if (iParam3 != -99)
				{
					if (iParam3 >= 176 && iParam3 <= 191)
					{
					}
					else
					{
						if (iParam3 >= 227 && iParam3 <= 242)
						{
							if (iParam2 >= 42 && iParam2 <= 43)
							{
								iVar0 = (iParam1 - 59);
								*uParam4 = (43 + iVar0);
							}
						}
						else if ((iParam2 >= 5 && iParam2 <= 8) || (iParam2 >= 25 && iParam2 <= 40))
						{
							iVar0 = (iParam1 - 59);
							*uParam4 = (27 + iVar0);
						}
						return false;
					}
				}
			}
			break;
		
		case joaat("player_two"):
			if (iParam1 == 12)
			{
				if (iParam3 != 241)
				{
					return false;
				}
			}
			break;
	}
	return true;
}

int func_357(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x34914
{
	int iVar0;
	
	if (iParam1 >= 243 && iParam1 <= 246)
	{
		if (iParam3 == 1)
		{
			return 1;
		}
		else
		{
			return 5;
		}
	}
	else if (iParam1 >= 247 && iParam1 <= 250)
	{
		if (iParam3 == 1)
		{
			return 2;
		}
		else
		{
			return 6;
		}
	}
	else if (iParam1 >= 251 && iParam1 <= 254)
	{
		if (iParam3 == 1)
		{
			return 3;
		}
		else
		{
			return 7;
		}
	}
	else if (iParam1 >= 255 && iParam1 <= 258)
	{
		if (iParam3 == 1)
		{
			return 4;
		}
		else
		{
			return 8;
		}
	}
	else if (iParam1 >= 255 && iParam1 <= 258)
	{
		if (iParam3 == 1)
		{
			return 4;
		}
		else
		{
			return 8;
		}
	}
	else if ((iParam1 >= 176 && iParam1 <= 191) || (iParam1 >= 227 && iParam1 <= 242))
	{
		if (iParam2 >= 9 && iParam2 <= 24)
		{
			if (iParam3 == 1)
			{
				return iParam2;
			}
			else
			{
				iVar0 = (iParam2 - 9);
				iParam2 = (25 + iVar0);
				return iParam2;
			}
		}
		else if (iParam2 >= 25 && iParam2 <= 40)
		{
			if (iParam3 == 1)
			{
				iVar0 = (iParam2 - 25);
				iParam2 = (9 + iVar0);
				return iParam2;
			}
			else
			{
				return iParam2;
			}
		}
		else if (iParam2 == 41 || iParam2 == 42)
		{
			if (iParam3 == 1)
			{
				return 41;
			}
			else
			{
				return 42;
			}
		}
		else
		{
			if (iParam3 == 1)
			{
				iParam2 = func_358(iParam0, 11, 9, 24);
			}
			else
			{
				iParam2 = func_358(iParam0, 11, 25, 40);
			}
			if (iParam2 == -99)
			{
				if (iParam3 == 1)
				{
					return 41;
				}
				else
				{
					return 42;
				}
			}
			else
			{
				return iParam2;
			}
		}
	}
	else if (iParam2 >= 1 && iParam2 <= 4)
	{
		if (iParam3 == 1)
		{
			return iParam2;
		}
		else
		{
			iVar0 = (iParam2 - 1);
			iParam2 = (5 + iVar0);
			return iParam2;
		}
	}
	else if (iParam2 >= 5 && iParam2 <= 8)
	{
		if (iParam3 == 1)
		{
			iVar0 = (iParam2 - 5);
			iParam2 = (1 + iVar0);
			return iParam2;
		}
		else
		{
			return iParam2;
		}
	}
	else if (iParam2 >= 9 && iParam2 <= 24)
	{
		if (iParam3 == 1)
		{
			return iParam2;
		}
		else
		{
			iVar0 = (iParam2 - 9);
			iParam2 = (25 + iVar0);
			return iParam2;
		}
	}
	else if (iParam2 >= 25 && iParam2 <= 40)
	{
		if (iParam3 == 1)
		{
			iVar0 = (iParam2 - 25);
			iParam2 = (9 + iVar0);
			return iParam2;
		}
		else
		{
			return iParam2;
		}
	}
	else if (iParam2 == 41 || iParam2 == 42)
	{
		if (iParam3 == 1)
		{
			return 41;
		}
		else
		{
			return 42;
		}
	}
	return -99;
}

int func_358(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x34BDB
{
	int iVar0;
	int iVar1;
	
	iVar0 = iParam2;
	while (iVar0 <= (iParam3 - 1))
	{
		iVar1 = iVar0;
		if (func_350(iParam0, iParam1, iVar1))
		{
			return iVar1;
		}
		iVar0++;
	}
	return -99;
}

bool func_359(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x34C12
{
	int iVar0;
	
	iVar0 = func_368(iParam0, iParam1);
	if (iVar0 >= iParam2 && iVar0 <= iParam3)
	{
		return true;
	}
	return false;
}

bool func_360(int iParam0, int iParam1, int iParam2)//Position - 0x34C3B
{
	*iParam2 = -99;
	switch (iParam0)
	{
		case joaat("player_zero"):
			if ((((((((((((((((((iParam1 == 16 || iParam1 == 17) || iParam1 == 21) || iParam1 == 22) || iParam1 == 32) || (iParam1 >= 34 && iParam1 <= 39)) || (iParam1 >= 41 && iParam1 <= 45)) || iParam1 == 46) || (iParam1 >= 47 && iParam1 <= 54)) || (iParam1 >= 55 && iParam1 <= 70)) || (iParam1 >= 72 && iParam1 <= 79)) || iParam1 == 80) || (iParam1 >= 81 && iParam1 <= 83)) || (iParam1 >= 84 && iParam1 <= 87)) || iParam1 == 88) || (iParam1 >= 89 && iParam1 <= 91)) || iParam1 == 95) || (iParam1 >= 96 && iParam1 <= 111)) || iParam1 == 112)
			{
				*iParam2 = 6;
				return true;
			}
			break;
		
		case joaat("player_one"):
			if ((((((iParam1 == 12 || (iParam1 >= 14 && iParam1 <= 21)) || iParam1 == 32) || iParam1 == 52) || (iParam1 >= 69 && iParam1 <= 70)) || iParam1 == 71) || (iParam1 >= 72 && iParam1 <= 77))
			{
				*iParam2 = 17;
				return true;
			}
			break;
		
		case joaat("player_two"):
			if (((((((((((((((iParam1 == 4 || iParam1 == 5) || iParam1 == 6) || iParam1 == 7) || iParam1 == 14) || (iParam1 >= 18 && iParam1 <= 29)) || iParam1 == 31) || iParam1 == 32) || iParam1 == 33) || iParam1 == 34) || (iParam1 >= 35 && iParam1 <= 42)) || (iParam1 >= 43 && iParam1 <= 53)) || (iParam1 >= 54 && iParam1 <= 61)) || (iParam1 >= 71 && iParam1 <= 80)) || (iParam1 >= 81 && iParam1 <= 90)) || (iParam1 >= 94 && iParam1 <= 103))
			{
				*iParam2 = 8;
				return true;
			}
			break;
	}
	return false;
}

void func_361(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x34F05
{
	int iVar0;
	
	if (iParam2 == -1)
	{
		ped::clear_ped_prop(iParam0, iParam1);
		if (iParam1 == 0)
		{
			ped::set_ped_config_flag(iParam0, 34, false);
			ped::set_ped_config_flag(iParam0, 36, false);
		}
	}
	else
	{
		ped::set_ped_prop_index(iParam0, iParam1, iParam2, iParam3, network::network_is_game_in_progress());
		if (iParam1 == 0)
		{
			iVar0 = func_5(iParam0, iParam2, iParam3, iParam1);
			if (func_362(entity::get_entity_model(iParam0), 14, iVar0, dlc1::get_hash_name_for_prop(iParam0, 0, iParam2, iParam3)))
			{
				ped::set_ped_config_flag(iParam0, 34, true);
				ped::set_ped_config_flag(iParam0, 36, true);
			}
			else
			{
				ped::set_ped_config_flag(iParam0, 34, false);
				ped::set_ped_config_flag(iParam0, 36, false);
			}
		}
	}
}

bool func_362(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x34F9D
{
	switch (iParam0)
	{
		case joaat("mp_m_freemode_01"):
			switch (iParam1)
			{
				case 14:
					if (iParam3 == -1)
					{
						iParam3 = func_363(iParam0, iParam2, 14, 3);
					}
					if ((iParam2 >= 131 && iParam2 <= 154) || (iParam2 >= 327 && dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1033433901, 1)))
					{
						return true;
					}
					break;
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			switch (iParam1)
			{
				case 14:
					if (iParam3 == -1)
					{
						iParam3 = func_363(iParam0, iParam2, 14, 4);
					}
					if ((iParam2 >= 131 && iParam2 <= 154) || (iParam2 >= 327 && dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1033433901, 1)))
					{
						return true;
					}
					break;
			}
			break;
	}
	return false;
}

int func_363(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x3506B
{
	struct<2> Var0;
	int iVar17;
	int iVar18;
	int iVar19;
	int iVar20;
	struct<2> Var21;
	int iVar38;
	int iVar39;
	int iVar40;
	int iVar41;
	
	if (iParam2 == 12)
	{
	}
	else if (iParam2 == 13)
	{
	}
	else if (iParam2 == 14)
	{
		dlc1::init_shop_ped_prop(&Var0);
		iVar18 = 0;
		iVar19 = (iParam1 - func_10(iParam0));
		if (iVar19 < 0)
		{
			return -1;
		}
		iVar20 = dlc1::_get_num_props_from_outfit(iParam3, 6, -1, 1, -1, -1);
		iVar17 = 0;
		while (iVar17 < iVar20)
		{
			dlc1::get_shop_ped_query_prop(iVar17, &Var0);
			if (!dlc1::_is_dlc_data_empty(Var0))
			{
				if (iVar18 == iVar19)
				{
					return Var0.f_1;
				}
				iVar18++;
			}
			iVar17++;
		}
	}
	else
	{
		dlc1::init_shop_ped_component(&Var21);
		iVar39 = 0;
		iVar40 = (iParam1 - func_8(iParam0, func_9(iParam2)));
		if (iVar40 < 0)
		{
			return -1;
		}
		if ((iParam0 == Global_69640.f_26[iParam2] && iParam1 == Global_69640[iParam2]) && Global_69640.f_13[iParam2] != 0)
		{
			return Global_69640.f_13[iParam2];
		}
		iVar41 = dlc1::_get_num_props_from_outfit(iParam3, 6, -1, 0, -1, func_9(iParam2));
		iVar38 = 0;
		while (iVar38 < iVar41)
		{
			dlc1::get_shop_ped_query_component(iVar38, &Var21);
			if (!dlc1::_is_dlc_data_empty(Var21))
			{
				if (iVar39 == iVar40)
				{
					Global_69640.f_13[iParam2] = Var21.f_1;
					Global_69640[iParam2] = iParam1;
					Global_69640.f_26[iParam2] = iParam0;
					return Var21.f_1;
				}
				iVar39++;
			}
			iVar38++;
		}
	}
	return -1;
}

int func_364(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x351C7
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			switch (iParam1)
			{
				case 14:
					if (iParam2 == 16)
					{
						return true;
					}
					break;
			}
			break;
		
		case joaat("player_one"):
			switch (iParam1)
			{
				case 14:
					if ((iParam2 == 40 || (iParam2 >= 41 && iParam2 <= 56)) || (iParam2 >= 64 && iParam2 <= 79))
					{
						return true;
					}
					break;
			}
			break;
		
		case joaat("player_two"):
			switch (iParam1)
			{
				case 14:
					if ((iParam2 >= 17 && iParam2 <= 18) || (iParam2 >= 71 && iParam2 <= 86))
					{
						return true;
					}
					break;
			}
			break;
		
		case joaat("mp_m_freemode_01"):
			switch (iParam1)
			{
				case 14:
					if (iParam2 >= 18 && iParam2 <= 130)
					{
						return true;
					}
					else if (iParam2 >= 10 && iParam2 <= 17)
					{
						return true;
					}
					else if (iParam2 >= 327)
					{
						if (iParam3 == -1)
						{
							iParam3 = func_363(iParam0, iParam2, 14, 3);
						}
						return (dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1757550583, 1) || dlc1::_0x341DE7ED1D2A1BFD(func_363(iParam0, iParam2, 14, 3), -1842686353, 1));
					}
					break;
				
				case 1:
					if (iParam2 >= 26)
					{
						if (iParam3 == -1)
						{
							iParam3 = func_363(iParam0, iParam2, 1, 3);
						}
						return (dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1757550583, 0) || dlc1::_0x341DE7ED1D2A1BFD(func_363(iParam0, iParam2, 1, 3), -1842686353, 0));
					}
					break;
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			switch (iParam1)
			{
				case 14:
					if (iParam2 >= 18 && iParam2 <= 130)
					{
						return true;
					}
					else if (iParam2 >= 10 && iParam2 <= 17)
					{
						return true;
					}
					else if (iParam2 >= 327)
					{
						if (iParam3 == -1)
						{
							iParam3 = func_363(iParam0, iParam2, 14, 4);
						}
						return (dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1757550583, 1) || dlc1::_0x341DE7ED1D2A1BFD(func_363(iParam0, iParam2, 14, 4), -1842686353, 1));
					}
					break;
				
				case 1:
					if (iParam2 >= 26)
					{
						if (iParam3 == -1)
						{
							iParam3 = func_363(iParam0, iParam2, 1, 4);
						}
						return (dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1757550583, 0) || dlc1::_0x341DE7ED1D2A1BFD(func_363(iParam0, iParam2, 1, 4), -1842686353, 0));
					}
					break;
			}
			break;
	}
	return false;
}

bool func_365(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x35444
{
	if (iParam0 == joaat("player_zero"))
	{
		if (iParam1 == 6)
		{
			if (iParam2 == 10)
			{
				return true;
			}
		}
		else if (iParam1 == 8)
		{
			if ((iParam2 == 9 || iParam2 == 7) || iParam2 == 23)
			{
				return true;
			}
		}
		else if (iParam1 == 9)
		{
			if (iParam2 >= 9 && iParam2 <= 14)
			{
				return true;
			}
		}
		else if (iParam1 == 14)
		{
			if ((((((((((((((((iParam2 == 12 || iParam2 == 59) || iParam2 == 60) || iParam2 == 31) || iParam2 == 32) || iParam2 == 33) || iParam2 == 34) || iParam2 == 35) || iParam2 == 36) || iParam2 == 37) || iParam2 == 38) || iParam2 == 39) || iParam2 == 40) || iParam2 == 41) || (iParam2 >= 42 && iParam2 <= 44)) || iParam2 == 54) || iParam2 == 55)
			{
				return true;
			}
		}
	}
	else if (iParam0 == joaat("player_one"))
	{
		if (iParam1 == 2)
		{
			if (iParam2 == 20)
			{
				return true;
			}
		}
		else if (iParam1 == 8)
		{
			if ((iParam2 == 3 || iParam2 == 5) || iParam2 == 9)
			{
				return true;
			}
		}
		else if (iParam1 == 9)
		{
			if (iParam2 >= 5 && iParam2 <= 10)
			{
				return true;
			}
		}
		else if (iParam1 == 14)
		{
			if (((((((((((((iParam2 == 82 || iParam2 == 10) || iParam2 == 26) || iParam2 == 27) || iParam2 == 28) || iParam2 == 29) || iParam2 == 30) || iParam2 == 31) || iParam2 == 32) || iParam2 == 33) || iParam2 == 34) || iParam2 == 35) || iParam2 == 36) || (iParam2 >= 37 && iParam2 <= 39))
			{
				return true;
			}
		}
	}
	else if (iParam0 == joaat("player_two"))
	{
		if (iParam1 == 8)
		{
			if (iParam2 == 14 || iParam2 == 7)
			{
				return true;
			}
		}
		else if (iParam1 == 9)
		{
			if (((iParam2 == 8 || (iParam2 >= 9 && iParam2 <= 14)) || iParam2 == 15) || iParam2 == 16)
			{
				return true;
			}
		}
		else if (iParam1 == 14)
		{
			if (((((((((((((iParam2 == 88 || iParam2 == 12) || iParam2 == 47) || iParam2 == 48) || iParam2 == 49) || iParam2 == 50) || iParam2 == 51) || iParam2 == 52) || iParam2 == 53) || iParam2 == 54) || iParam2 == 55) || iParam2 == 56) || iParam2 == 57) || (iParam2 >= 58 && iParam2 <= 60))
			{
				return true;
			}
		}
	}
	else if (iParam0 == joaat("mp_m_freemode_01"))
	{
		if (iParam1 == 1)
		{
			if (iParam2 > 0)
			{
				if (iParam2 >= 26)
				{
					if (iParam3 == -1)
					{
						iParam3 = func_363(iParam0, iParam2, 1, 3);
					}
					if (dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1757550583, 0))
					{
						return false;
					}
				}
				return true;
			}
		}
	}
	else if (iParam0 == joaat("mp_f_freemode_01"))
	{
		if (iParam1 == 1)
		{
			if (iParam2 > 0)
			{
				if (iParam2 >= 26)
				{
					if (iParam3 == -1)
					{
						iParam3 = func_363(iParam0, iParam2, 1, 4);
					}
					if (dlc1::_0x341DE7ED1D2A1BFD(iParam3, -1757550583, 0))
					{
						return false;
					}
				}
				return true;
			}
		}
	}
	return false;
}

int func_366(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x35845
{
	switch (iParam0)
	{
		case joaat("player_zero"):
			if (iParam1 == 14)
			{
				if ((((((((iParam2 == 58 || iParam2 == 61) || (iParam2 >= 62 && iParam2 <= 69)) || (iParam2 >= 70 && iParam2 <= 79)) || (iParam2 >= 80 && iParam2 <= 89)) || iParam2 == 90) || (iParam2 >= 91 && iParam2 <= 102)) || (iParam2 >= 103 && iParam2 <= 110)) || iParam2 == 111)
				{
					return true;
				}
			}
			break;
		
		case joaat("player_one"):
			if (iParam1 == 14)
			{
				if (((((((((((iParam2 >= 83 && iParam2 <= 92) || iParam2 == 93) || iParam2 == 94) || (iParam2 >= 95 && iParam2 <= 101)) || (iParam2 >= 102 && iParam2 <= 111)) || (iParam2 >= 112 && iParam2 <= 121)) || (iParam2 >= 122 && iParam2 <= 131)) || (iParam2 >= 132 && iParam2 <= 139)) || (iParam2 >= 140 && iParam2 <= 149)) || (iParam2 >= 150 && iParam2 <= 156)) || iParam2 == 157)
				{
					return true;
				}
			}
			break;
		
		case joaat("player_two"):
			if (iParam1 == 14)
			{
				if (((((((((iParam2 == 89 || (iParam2 >= 90 && iParam2 <= 99)) || (iParam2 >= 100 && iParam2 <= 109)) || iParam2 == 111) || iParam2 == 112) || (iParam2 >= 113 && iParam2 <= 122)) || (iParam2 >= 123 && iParam2 <= 132)) || (iParam2 >= 133 && iParam2 <= 142)) || (iParam2 >= 143 && iParam2 <= 152)) || iParam2 == 153)
				{
					return true;
				}
			}
			break;
		
		case joaat("mp_m_freemode_01"):
			if (iParam1 == 14)
			{
				if (iParam2 >= 155 && iParam2 <= 318)
				{
					return true;
				}
				else if (iParam2 >= 327)
				{
					if (iParam3 == -1)
					{
						iParam3 = func_363(iParam0, iParam2, 14, 3);
					}
					return dlc1::_0x341DE7ED1D2A1BFD(iParam3, 97230661, 1);
				}
			}
			break;
		
		case joaat("mp_f_freemode_01"):
			if (iParam1 == 14)
			{
				if (iParam2 >= 155 && iParam2 <= 318)
				{
					return true;
				}
				else if (iParam2 >= 327)
				{
					if (iParam3 == -1)
					{
						iParam3 = func_363(iParam0, iParam2, 14, 4);
					}
					return dlc1::_0x341DE7ED1D2A1BFD(iParam3, 97230661, 1);
				}
			}
			break;
	}
	return false;
}

int func_367(int iParam0, int iParam1)//Position - 0x35B38
{
	int iVar0;
	int iVar1;
	
	if (ped::is_ped_injured(iParam0))
	{
		return -99;
	}
	iVar0 = ped::get_ped_prop_index(iParam0, iParam1);
	if (iVar0 == -1)
	{
		return func_11(iParam1);
	}
	iVar1 = ped::get_ped_prop_texture_index(iParam0, iParam1);
	return func_5(iParam0, iVar0, iVar1, iParam1);
}

int func_368(int iParam0, int iParam1)//Position - 0x35B7E
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (((iParam1 == 12 || iParam1 == 13) || iParam1 == 14) || ped::is_ped_injured(iParam0))
	{
		return -99;
	}
	iVar0 = func_9(iParam1);
	iVar1 = ped::get_ped_drawable_variation(iParam0, iVar0);
	iVar2 = ped::get_ped_texture_variation(iParam0, iVar0);
	return func_85(iParam0, iVar1, iVar2, iParam1);
}

void func_369(int iParam0)//Position - 0x35BDE
{
	if (gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 1) && !gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 6))
	{
		func_24(iParam0, Global_69518[1 /*14*/].f_5, Global_69518[1 /*14*/].f_2, 2, Global_69518[1 /*14*/].f_1, 1, 0);
	}
	if (gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 1) && gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 6))
	{
		if (iParam0 == 12)
		{
			func_370(Global_2621444, 2, 1, 1, -1);
		}
		else if (iParam0 == 13)
		{
		}
		else if (iParam0 == 14)
		{
			func_370(Global_2621444, 2, 1, 1, -1);
		}
		else
		{
			func_370(Global_2621444, 2, 1, 1, -1);
		}
	}
}

void func_370(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x35C96
{
	int iVar0;
	int iVar1;
	var uVar2;
	int iVar3;
	
	iVar0 = Global_69516;
	if (iParam4 != -1)
	{
		iVar0 = iParam4;
	}
	if (func_26(iParam0, iParam1, &uVar2, &iVar1, iParam2, iParam3))
	{
		iVar3 = func_20(uVar2, iVar0, 0);
		gameplay::set_bit(&iVar3, iVar1);
		func_371(uVar2, iVar3, iVar0, 1, 0);
	}
}

void func_371(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4)//Position - 0x35CE0
{
	int iVar0;
	
	if (iParam4)
	{
	}
	iVar0 = Global_2503773[uParam0 /*3*/][func_21(iParam2)];
	if (iVar0 != 0)
	{
		stats::stat_set_int(iVar0, iParam1, iParam3);
	}
}

bool func_372(int iParam0)//Position - 0x35D10
{
	if (!gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 0))
	{
		return false;
	}
	if (iParam0 == 1)
	{
		if (!gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 1))
		{
			return false;
		}
		if (!gameplay::is_bit_set(Global_69518[1 /*14*/].f_6, 2))
		{
			return false;
		}
	}
	return true;
}

bool func_373()//Position - 0x35D61
{
	if (ui::is_pause_menu_active())
	{
		return false;
	}
	if (controls::is_control_just_pressed(0, 18) || controls::is_control_just_pressed(2, 18))
	{
		return true;
	}
	return false;
}

bool func_374(int iParam0, int iParam1, char* sParam2, char* sParam3, var uParam4, float fParam5, int iParam6, int iParam7, float fParam8)//Position - 0x35D93
{
	float fVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	var uVar6;
	var uVar7;
	var uVar8;
	float fVar9;
	float fVar10;
	float fVar11;
	float fVar12;
	
	fVar0 = -1f;
	switch (uParam4->f_3)
	{
		case 0:
			*uParam4 = func_404();
			iVar5 = func_404();
			func_403(&iVar5, iParam0);
			func_402(&iVar5, iParam1);
			func_401(&iVar5, 0);
			if (func_399(*uParam4, iVar5))
			{
				func_394(&iVar5, 0, 0, 0, 1, 0, 0);
			}
			func_391(*uParam4, iVar5, &iVar1, &iVar2, &iVar3, &uVar6, &uVar7, &uVar8);
			uParam4->f_11 = ((iVar1 + iVar2 * 60) + (iVar3 + iParam6) * 3600);
			func_384((system::to_float(uParam4->f_11) / 3600f));
			if (iParam7)
			{
				graphics::_0x5F0F3F56635809EF(0.6f);
				graphics::_set_far_shadows_suppressed(0);
				graphics::_0x0AE73D8DF3A762B2(0);
			}
			func_383();
			uParam4->f_10 = audio::get_sound_id();
			audio::play_sound_frontend(uParam4->f_10, "TIME_LAPSE_MASTER", 0, 1);
			audio::start_audio_scene("TOD_SHIFT_SCENE");
			func_382();
			uParam4->f_3++;
			break;
		
		case 1:
		case 2:
			if ((cam::does_cam_exist(uParam4->f_4) && cam::is_cam_interpolating(uParam4->f_4)) || !(fParam5 >= 0.99f || fParam5 == -1f))
			{
				if (cam::does_cam_exist(uParam4->f_4) && cam::is_cam_interpolating(uParam4->f_4))
				{
					fVar0 = cam::get_cam_spline_phase(uParam4->f_4);
				}
				else if (!(fParam5 >= 0.99f || fParam5 == -1f))
				{
					fVar0 = fParam5;
				}
				else
				{
					fVar0 = -1f;
				}
				if (fVar0 >= 0.5f)
				{
					if (uParam4->f_3 == 1)
					{
						if (gameplay::get_hash_key(sParam2) != 0)
						{
							gameplay::_set_weather_type_over_time(sParam2, fParam8);
						}
						if (gameplay::get_hash_key(sParam3) != 0)
						{
							gameplay::_clear_cloud_hat();
							gameplay::_set_cloud_hat_transition(sParam3, 0);
						}
						uParam4->f_3 = 2;
					}
				}
			}
			if (fVar0 >= 0.99f || fVar0 == -1f)
			{
				iVar5 = *uParam4;
				func_394(&iVar5, uParam4->f_11, 0, 0, 0, 0, 0);
				time::set_clock_time(func_381(iVar5), func_380(iVar5), func_379(iVar5));
				if (iParam7)
				{
					graphics::_0x03FC694AE06C5A20();
				}
				audio::stop_sound(uParam4->f_10);
				audio::release_named_script_audio_bank("TIME_LAPSE");
				if (iParam7)
				{
					graphics::_0x0AE73D8DF3A762B2(1);
					graphics::_set_far_shadows_suppressed(1);
				}
				return true;
			}
			fVar11 = fVar0;
			fVar9 = 0.1f;
			fVar10 = 0.9f;
			fVar12 = func_234(((fVar11 - fVar9) / (fVar10 - fVar9)), 0f, 1f);
			iVar4 = system::round((IntToFloat(uParam4->f_11) * fVar12));
			iVar5 = *uParam4;
			func_394(&iVar5, iVar4, 0, 0, 0, 0, 0);
			time::set_clock_time(func_381(iVar5), func_380(iVar5), func_379(iVar5));
			if (func_378(iVar5) != time::get_clock_day_of_month())
			{
				time::set_clock_date(func_378(iVar5), func_377(iVar5), func_375(iVar5));
			}
			func_176();
			graphics::_0xE3E2C1B4C59DBC77(6);
			break;
	}
	return false;
}

var func_375(int iParam0)//Position - 0x36026
{
	return (system::shift_right(iParam0, 26) & 31 * func_376(gameplay::is_bit_set(iParam0, 31), -1, 1)) + 2011;
}

int func_376(int iParam0, int iParam1, int iParam2)//Position - 0x3604B
{
	if (iParam0)
	{
		return iParam1;
	}
	return iParam2;
}

int func_377(int iParam0)//Position - 0x36062
{
	return iParam0 & 15;
}

int func_378(int iParam0)//Position - 0x3606F
{
	return system::shift_right(iParam0, 4) & 31;
}

int func_379(int iParam0)//Position - 0x36081
{
	return system::shift_right(iParam0, 20) & 63;
}

int func_380(int iParam0)//Position - 0x36094
{
	return system::shift_right(iParam0, 14) & 63;
}

int func_381(int iParam0)//Position - 0x360A7
{
	return system::shift_right(iParam0, 9) & 31;
}

void func_382()//Position - 0x360BA
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 35)
	{
		ui::_remove_notification(Global_101652.f_13084[iVar0 /*104*/].f_16);
		iVar0++;
	}
}

bool func_383()//Position - 0x360E6
{
	int iVar0;
	
	if (!entity::is_entity_dead(player::player_ped_id(), 0))
	{
		return false;
	}
	if (!ped::is_ped_sitting_in_any_vehicle(player::player_ped_id()))
	{
		return false;
	}
	iVar0 = ped::get_vehicle_ped_is_in(player::player_ped_id(), 0);
	if (!entity::is_entity_dead(iVar0, 0))
	{
		return false;
	}
	audio::set_veh_radio_station(iVar0, "OFF");
	return true;
}

void func_384(float fParam0)//Position - 0x36134
{
	int iVar0;
	int iVar1;
	
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (func_390(&(Global_101652.f_17046.f_175[iVar0 /*19*/].f_5)))
		{
			func_385(&(Global_101652.f_17046.f_175[iVar0 /*19*/].f_5), (fParam0 * 60f));
		}
		iVar0++;
	}
	iVar1 = 0;
	while (iVar1 < 6)
	{
		if (func_390(&(Global_101652.f_17046.f_362[iVar1 /*3*/])))
		{
			func_385(&(Global_101652.f_17046.f_362[iVar1 /*3*/]), (fParam0 * 60f));
		}
		iVar1++;
	}
	audio::skip_radio_forward();
}

void func_385(int iParam0, float fParam1)//Position - 0x361C5
{
	if (func_390(iParam0))
	{
		func_386(iParam0, (func_388(iParam0) + fParam1));
	}
}

void func_386(int iParam0, float fParam1)//Position - 0x361E8
{
	iParam0->f_1 = (func_387(gameplay::is_bit_set(*iParam0, 4)) - fParam1);
	gameplay::set_bit(iParam0, 1);
	gameplay::clear_bit(iParam0, 2);
	iParam0->f_2 = 0f;
}

float func_387(int iParam0)//Position - 0x36216
{
	float fVar0;
	float fVar1;
	int iVar2;
	float fVar3;
	float fVar4;
	
	if (iParam0)
	{
		fVar0 = system::to_float(gameplay::get_game_timer());
		fVar1 = (fVar0 / 1000f);
		return fVar1;
	}
	if (network::network_is_game_in_progress())
	{
		iVar2 = network::get_network_time();
		fVar3 = system::to_float(iVar2);
		fVar4 = (fVar3 / 1000f);
		return fVar4;
	}
	return (system::to_float(gameplay::get_game_timer()) / 1000f);
}

float func_388(var uParam0)//Position - 0x3626E
{
	if (func_390(uParam0))
	{
		if (func_389(uParam0))
		{
			return uParam0->f_2;
		}
		else
		{
			return (func_387(gameplay::is_bit_set(*uParam0, 4)) - uParam0->f_1);
		}
	}
	return uParam0->f_1;
}

int func_389(var uParam0)//Position - 0x362AD
{
	return gameplay::is_bit_set(*uParam0, 2);
}

int func_390(var uParam0)//Position - 0x362BD
{
	return gameplay::is_bit_set(*uParam0, 1);
}

void func_391(int iParam0, int iParam1, var uParam2, var uParam3, var uParam4, var uParam5, var uParam6, var uParam7)//Position - 0x362CD
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	int iVar7;
	
	if (func_399(iParam0, iParam1))
	{
		iVar0 = func_377(iParam1);
		iVar1 = func_375(iParam0);
		iVar2 = (func_375(iParam0) - func_375(iParam1));
		iVar3 = (func_377(iParam0) - func_377(iParam1));
		iVar4 = (func_378(iParam0) - func_378(iParam1));
		iVar5 = (func_381(iParam0) - func_381(iParam1));
		iVar6 = (func_380(iParam0) - func_380(iParam1));
		iVar7 = (func_379(iParam0) - func_379(iParam1));
	}
	else
	{
		iVar0 = func_377(iParam0);
		iVar1 = func_375(iParam1);
		iVar2 = (func_375(iParam1) - func_375(iParam0));
		iVar3 = (func_377(iParam1) - func_377(iParam0));
		iVar4 = (func_378(iParam1) - func_378(iParam0));
		iVar5 = (func_381(iParam1) - func_381(iParam0));
		iVar6 = (func_380(iParam1) - func_380(iParam0));
		iVar7 = (func_379(iParam1) - func_379(iParam0));
	}
	while (iVar7 < 0)
	{
		iVar7 += 60;
		iVar6 = (iVar6 - 1);
	}
	while (iVar7 > 59)
	{
		iVar7 = (iVar7 - 60);
		iVar6++;
	}
	while (iVar6 < 0)
	{
		iVar6 += 60;
		iVar5 = (iVar5 - 1);
	}
	while (iVar6 > 59)
	{
		iVar6 = (iVar6 - 60);
		iVar5++;
	}
	while (iVar5 < 0)
	{
		iVar5 += 24;
		iVar4 = (iVar4 - 1);
	}
	while (iVar5 > 23)
	{
		iVar5 = (iVar5 - 24);
		iVar4++;
	}
	while (iVar4 < 0)
	{
		while (iVar3 < 0)
		{
			iVar3 += 12;
			iVar2 = (iVar2 - 1);
		}
		iVar4 = (iVar4 + func_393(iVar0, iVar1));
		iVar3 = (iVar3 - 1);
		iVar0 = system::round(func_392(system::to_float(iVar0 + 1), 0f, 12f));
	}
	while (iVar3 < 0)
	{
		iVar3 += 12;
		iVar2 = (iVar2 - 1);
	}
	while (iVar3 > 12)
	{
		iVar3 = (iVar3 - 12);
		iVar2++;
	}
	*uParam2 = iVar7;
	*uParam3 = iVar6;
	*uParam4 = iVar5;
	*uParam5 = iVar4;
	*uParam6 = iVar3;
	*uParam7 = iVar2;
}

float func_392(float fParam0, float fParam1, float fParam2)//Position - 0x364CE
{
	float fVar0;
	
	if (fParam1 == fParam2)
	{
		return fParam1;
	}
	fVar0 = (fParam2 - fParam1);
	fParam0 = (fParam0 - (IntToFloat(system::round(((fParam0 - fParam1) / fVar0))) * fVar0));
	if (fParam0 < fParam1)
	{
		fParam0 = (fParam0 + fVar0);
	}
	return fParam0;
}

int func_393(int iParam0, int iParam1)//Position - 0x36510
{
	if (iParam1 < 0)
	{
		iParam1 = 0;
	}
	switch (iParam0)
	{
		case 0:
		case 2:
		case 4:
		case 6:
		case 7:
		case 9:
		case 11:
			return 31;
			break;
		
		case 3:
		case 5:
		case 8:
		case 10:
			return 30;
			break;
		
		case 1:
			if ((iParam1 % 4) == 0)
			{
				if ((iParam1 % 100) != 0)
				{
					return 29;
				}
				else if ((iParam1 % 400) == 0)
				{
					return 29;
				}
			}
			return 28;
			break;
	}
	return 30;
}

void func_394(int iParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x365B2
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	int iVar6;
	
	iVar0 = func_375(*iParam0);
	iVar1 = func_377(*iParam0);
	iVar2 = func_378(*iParam0);
	iVar3 = func_381(*iParam0);
	iVar4 = func_380(*iParam0);
	iVar5 = func_379(*iParam0);
	if (((((iParam6 == 0 && iParam5 == 0) && iParam4 == 0) && iParam3 == 0) && iParam2 == 0) && iParam1 == 0)
	{
		return;
	}
	if (iParam1 < 0)
	{
		return;
	}
	if (iParam2 < 0)
	{
		return;
	}
	if (iParam3 < 0)
	{
		return;
	}
	if (iParam4 < 0)
	{
		return;
	}
	if (iParam5 < 0)
	{
		return;
	}
	if (iParam6 < 0)
	{
		return;
	}
	iVar5 = (iVar5 + iParam1);
	while (iVar5 >= 60)
	{
		iParam2++;
		iVar5 = (iVar5 - 60);
	}
	iVar4 = (iVar4 + iParam2);
	while (iVar4 >= 60)
	{
		iParam3++;
		iVar4 = (iVar4 - 60);
	}
	iVar3 = (iVar3 + iParam3);
	while (iVar3 >= 24)
	{
		iParam4++;
		iVar3 = (iVar3 - 24);
	}
	iVar2 = (iVar2 + iParam4);
	iVar6 = func_393(iVar1, iVar0);
	while (iVar2 > iVar6)
	{
		iVar1++;
		iVar2 = (iVar2 - iVar6);
		if (iVar1 > 11)
		{
			iVar0++;
			iVar1 = (iVar1 - 12);
		}
		iVar6 = func_393(iVar1, iVar0);
	}
	iVar1 = (iVar1 + iParam5);
	while (iVar1 > 11)
	{
		iParam6++;
		iVar1 = (iVar1 - 12);
	}
	iVar0 = (iVar0 + iParam6);
	func_395(iParam0, iVar5, iVar4, iVar3, iVar2, iVar1, iVar0);
}

void func_395(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6)//Position - 0x36734
{
	func_401(uParam0, iParam1);
	func_402(uParam0, iParam2);
	func_403(uParam0, iParam3);
	func_398(uParam0, iParam5);
	func_397(uParam0, iParam4);
	func_396(uParam0, iParam6);
}

void func_396(var uParam0, int iParam1)//Position - 0x3676C
{
	if (iParam1 <= 0)
	{
		return;
	}
	if (iParam1 > 2043 || iParam1 < 1979)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 2080374784);
	if (iParam1 < 2011)
	{
		*uParam0 = (*uParam0 || system::shift_left((2011 - iParam1), 26));
		*uParam0 |= -2147483648;
	}
	else
	{
		*uParam0 = (*uParam0 || system::shift_left((iParam1 - 2011), 26));
		*uParam0 = (*uParam0 - *uParam0 & -2147483648);
	}
}

void func_397(var uParam0, int iParam1)//Position - 0x367F2
{
	int iVar0;
	int iVar1;
	
	iVar0 = func_377(*uParam0);
	iVar1 = func_375(*uParam0);
	if (iParam1 < 1 || iParam1 > func_393(iVar0, iVar1))
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 496);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 4));
}

void func_398(var uParam0, int iParam1)//Position - 0x36843
{
	if (iParam1 < 0 || iParam1 > 11)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 15);
	*uParam0 = (*uParam0 || iParam1);
}

bool func_399(int iParam0, int iParam1)//Position - 0x36876
{
	int iVar0;
	int iVar1;
	
	if (!func_400(iParam1) || !func_400(iParam0))
	{
		return true;
	}
	iVar0 = func_375(iParam0);
	iVar1 = func_375(iParam1);
	if (iVar0 > iVar1)
	{
		return true;
	}
	else if (iVar0 < iVar1)
	{
		return false;
	}
	iVar0 = func_377(iParam0);
	iVar1 = func_377(iParam1);
	if (iVar0 > iVar1)
	{
		return true;
	}
	else if (iVar0 < iVar1)
	{
		return false;
	}
	iVar0 = func_378(iParam0);
	iVar1 = func_378(iParam1);
	if (iVar0 > iVar1)
	{
		return true;
	}
	else if (iVar0 < iVar1)
	{
		return false;
	}
	iVar0 = func_381(iParam0);
	iVar1 = func_381(iParam1);
	if (iVar0 > iVar1)
	{
		return true;
	}
	else if (iVar0 < iVar1)
	{
		return false;
	}
	iVar0 = func_380(iParam0);
	iVar1 = func_380(iParam1);
	if (iVar0 > iVar1)
	{
		return true;
	}
	else if (iVar0 < iVar1)
	{
		return false;
	}
	iVar0 = func_379(iParam0);
	iVar1 = func_379(iParam1);
	if (iVar0 > iVar1)
	{
		return true;
	}
	return false;
}

bool func_400(int iParam0)//Position - 0x36982
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	int iVar5;
	
	if (iParam0 == -15)
	{
		return false;
	}
	iVar0 = func_379(iParam0);
	if (iVar0 < 0 || iVar0 >= 60)
	{
		return false;
	}
	iVar1 = func_380(iParam0);
	if (iVar1 < 0 || iVar1 >= 60)
	{
		return false;
	}
	iVar2 = func_381(iParam0);
	if (iVar2 < 0 || iVar2 > 23)
	{
		return false;
	}
	iVar3 = func_375(iParam0);
	if ((iVar3 <= 0 || iVar3 > 2043) || iVar3 < 1979)
	{
		return false;
	}
	iVar4 = func_377(iParam0);
	if (iVar4 < 0 || iVar4 > 11)
	{
		return false;
	}
	iVar5 = func_378(iParam0);
	if (iVar5 < 1 || iVar5 > func_393(iVar4, iVar3))
	{
		return false;
	}
	return true;
}

void func_401(var uParam0, int iParam1)//Position - 0x36A5E
{
	if (iParam1 < 0 || iParam1 >= 60)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 66060288);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 20));
}

void func_402(var uParam0, int iParam1)//Position - 0x36A9A
{
	if (iParam1 < 0 || iParam1 >= 60)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 1032192);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 14));
}

void func_403(var uParam0, int iParam1)//Position - 0x36AD5
{
	if (iParam1 < 0 || iParam1 > 24)
	{
		return;
	}
	*uParam0 = (*uParam0 - *uParam0 & 15872);
	*uParam0 = (*uParam0 || system::shift_left(iParam1, 9));
}

var func_404()//Position - 0x36B0F
{
	var uVar0;
	
	func_401(&uVar0, time::get_clock_seconds());
	func_402(&uVar0, time::get_clock_minutes());
	func_403(&uVar0, time::get_clock_hours());
	func_397(&uVar0, time::get_clock_day_of_month());
	func_398(&uVar0, time::get_clock_month());
	func_396(&uVar0, time::get_clock_year());
	return uVar0;
}

void func_405(var uParam0, int iParam1, int iParam2, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0x36B55
{
	int iVar0;
	
	if (iParam4 == 1)
	{
		player::set_player_control(player::player_id(), player::is_player_control_on(player::player_id()), 64);
	}
	if (!cutscene::is_cutscene_playing())
	{
		player::set_player_control(player::player_id(), !iParam1, 0);
	}
	if (iParam7)
	{
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			ped::remove_ped_helmet(player::player_ped_id(), 1);
		}
	}
	if (!iParam1 && iParam6)
	{
		cam::_0xC819F3CBB62BF692(0, 0, 3, 0);
	}
	else
	{
		cam::render_script_cams(iParam1, iParam2, iParam3, 1, 0, 0);
	}
	if (iParam1)
	{
		ui::clear_help(1);
	}
	else
	{
		if (cam::does_cam_exist(uParam0->f_4))
		{
			if (cam::is_cam_active(uParam0->f_4))
			{
				cam::set_cam_active(uParam0->f_4, false);
			}
			cam::destroy_cam(uParam0->f_4, 1);
		}
		if (!entity::is_entity_dead(player::player_ped_id(), 0))
		{
			entity::set_entity_visible(player::player_ped_id(), true, 0);
		}
		iVar0 = player::get_players_last_vehicle();
		if (entity::does_entity_exist(iVar0))
		{
			entity::set_entity_visible(iVar0, true, 0);
		}
		audio::release_named_script_audio_bank("TIME_LAPSE");
		if (audio::is_audio_scene_active("TOD_SHIFT_SCENE"))
		{
			audio::stop_sound(uParam0->f_10);
			audio::release_named_script_audio_bank("TIME_LAPSE");
			audio::stop_audio_scene("TOD_SHIFT_SCENE");
		}
	}
	func_184(iParam1, 1, 0, 0);
	func_382();
	if (!iParam1 && iParam5)
	{
		if (uParam0->f_5)
		{
			time::set_clock_time(uParam0->f_7, 0, 0);
		}
		else
		{
			time::set_clock_time(uParam0->f_8, 0, 0);
		}
	}
	if (!iParam1)
	{
		if (cam::is_screen_faded_out())
		{
			cam::do_screen_fade_in(250);
		}
	}
	if (!iParam1)
	{
		if (Global_101652.f_31373.f_4801 != -15)
		{
			Global_101652.f_31373.f_4801 = func_404();
		}
	}
}

void func_406(int iParam0)//Position - 0x36CC4
{
	if (!cam::is_screen_faded_out())
	{
		cam::do_screen_fade_out(iParam0);
		while (!cam::is_screen_faded_out())
		{
			system::wait(0);
		}
	}
}

bool func_407(int iParam0)//Position - 0x36CEA
{
	if (cam::is_screen_faded_in())
	{
		if ((gameplay::get_game_timer() - Global_28) > iParam0)
		{
			Global_27 = gameplay::get_game_timer();
		}
		Global_28 = gameplay::get_game_timer();
		if ((gameplay::get_game_timer() - Global_27) > iParam0)
		{
			if (func_373())
			{
				Global_27 = gameplay::get_game_timer();
				return true;
			}
		}
	}
	return false;
}

void func_408(int iParam0)//Position - 0x36D34
{
	if (iParam0 == -1)
	{
		return;
	}
	Global_68526[iParam0] = 0;
	Global_68526.f_69[iParam0] = 0;
}

void func_409(int iParam0, vector3 vParam1, float fParam4, int iParam5, int iParam6)//Position - 0x36D59
{
	struct<60> Var0;
	
	if (entity::does_entity_exist(iParam0) && vehicle::is_vehicle_driveable(iParam0, 0))
	{
		if (iParam5 != 24 && iParam5 != 25)
		{
			return;
		}
		if (iParam5 == 24)
		{
			if (entity::does_entity_exist(Global_68526.f_484[25]) && vehicle::is_vehicle_driveable(Global_68526.f_484[25], 0))
			{
				if (Global_68526.f_484[25] == iParam0)
				{
					return;
				}
			}
		}
		if (!iParam6)
		{
			if ((vehicle::is_big_vehicle(iParam0) || entity::get_entity_model(iParam0) == joaat("bus")) || entity::get_entity_model(iParam0) == joaat("tourbus"))
			{
				return;
			}
		}
		func_419(iParam5);
		Var0.f_9 = 49;
		Var0.f_59 = 2;
		func_108(iParam0, &Var0);
		if (func_105(vParam1, 0f, 0f, 0f, 0))
		{
			vParam1 = { entity::get_entity_coords(iParam0, 1) };
			fParam4 = entity::get_entity_heading(iParam0);
		}
		if (iParam5 == 24)
		{
			if (gameplay::get_hash_key(script::get_this_script_name()) != joaat("vehicle_gen_controller"))
			{
				Global_69514 = gameplay::get_hash_key(script::get_this_script_name());
			}
		}
		func_413(iParam5, &Var0, vParam1, fParam4, func_420(iParam0));
		func_410(iParam5, iParam0, 0);
	}
}

void func_410(int iParam0, int iParam1, int iParam2)//Position - 0x36E82
{
	int iVar0;
	
	if (iParam0 == -1)
	{
		return;
	}
	if (!func_412(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		return;
	}
	if (!gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 12) && !gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 10))
	{
		if (Global_68526.f_555[0 /*21*/].f_4 != entity::get_entity_model(iParam1))
		{
			return;
		}
	}
	if (Global_69433 != -1 && Global_69433 != iParam0)
	{
		return;
	}
	if (entity::does_entity_exist(iParam1))
	{
		if (vehicle::is_vehicle_driveable(iParam1, 0))
		{
			if (!entity::is_entity_a_mission_entity(iParam1))
			{
				entity::set_entity_as_mission_entity(iParam1, true, 1);
			}
			if (iParam0 == 24)
			{
				Global_101652.f_31373.f_4801 = func_404();
			}
			if (iParam1 != Global_68526.f_139[iParam0])
			{
				if (iParam0 == 24)
				{
					iVar0 = func_411(iParam0);
					if ((entity::does_entity_exist(iVar0) && vehicle::is_vehicle_driveable(iVar0, 0)) && iParam1 != iVar0)
					{
						func_107(iVar0, 145);
					}
				}
				Global_69432 = iParam1;
				Global_69433 = iParam0;
				Global_69434 = iParam2;
			}
		}
	}
}

int func_411(int iParam0)//Position - 0x36F9F
{
	if (iParam0 == -1)
	{
		return 0;
	}
	return Global_68526.f_139[iParam0];
}

int func_412(var uParam0, int iParam1)//Position - 0x36FBB
{
	int iVar0;
	int iVar1;
	
	*uParam0 = { 0f, 0f, 0f };
	uParam0->f_3 = 0f;
	uParam0->f_4 = 0;
	StringCopy(&(uParam0->f_5), "", 16);
	uParam0->f_9 = 0;
	uParam0->f_10 = 0;
	uParam0->f_11 = 0;
	uParam0->f_12 = 145;
	uParam0->f_13 = -1;
	uParam0->f_14 = 0;
	uParam0->f_15 = { 0f, 0f, 0f };
	uParam0->f_18 = { 0f, 0f, 0f };
	switch (iParam1)
	{
		case 0:
			*uParam0 = { -831.8538f, 172.1154f, 69.9058f };
			uParam0->f_3 = 157.5705f;
			uParam0->f_4 = func_335(0, 1);
			uParam0->f_12 = 0;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 1:
			*uParam0 = { 1970.943f, 3801.684f, 31.1396f };
			uParam0->f_3 = 301.3964f;
			uParam0->f_4 = func_335(0, 1);
			uParam0->f_12 = 0;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 2:
			*uParam0 = { -22.6297f, -1439.137f, 29.6549f };
			uParam0->f_3 = 180.0808f;
			uParam0->f_4 = func_335(1, 1);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 3:
			*uParam0 = { -22.5229f, -1434.699f, 29.6552f };
			uParam0->f_3 = 141.6114f;
			uParam0->f_4 = func_335(1, 2);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 19);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 4:
			*uParam0 = { 10.9281f, 545.669f, 174.7951f };
			uParam0->f_3 = 61.392f;
			uParam0->f_4 = func_335(1, 1);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 5:
			*uParam0 = { 6.1093f, 544.9742f, 174.2835f };
			uParam0->f_3 = 92.1548f;
			uParam0->f_4 = func_335(1, 2);
			uParam0->f_12 = 1;
			gameplay::set_bit(&(uParam0->f_9), 19);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 6:
			*uParam0 = { 1981.416f, 3808.131f, 31.1384f };
			uParam0->f_3 = 117.2557f;
			uParam0->f_4 = func_335(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 7:
			*uParam0 = { -1158.488f, -1529.367f, 3.8995f };
			uParam0->f_3 = 35.7505f;
			uParam0->f_4 = func_335(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 8:
			*uParam0 = { 148.2868f, -1270.569f, 28.2252f };
			uParam0->f_3 = 208.4685f;
			uParam0->f_4 = func_335(2, 1);
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 20);
			gameplay::set_bit(&(uParam0->f_9), 7);
			iVar0 = 1;
			break;
		
		case 9:
			*uParam0 = { 1459.509f, -1380.45f, 78.3259f };
			uParam0->f_3 = 99.6211f;
			uParam0->f_4 = joaat("scorcher");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 10:
			*uParam0 = { -1518.947f, -1387.865f, -0.5134f };
			uParam0->f_3 = 98.3867f;
			uParam0->f_4 = joaat("seashark");
			iVar0 = 1;
			gameplay::set_bit(&(uParam0->f_9), 6);
			break;
		
		case 11:
			*uParam0 = { 353.0926f, 3577.593f, 32.351f };
			uParam0->f_3 = 16.6205f;
			uParam0->f_4 = joaat("duster");
			iVar0 = 1;
			gameplay::set_bit(&(uParam0->f_9), 6);
			break;
		
		case 12:
			uParam0->f_14 = 0;
			*uParam0 = { -1652.004f, -3142.348f, 12.9921f };
			uParam0->f_3 = 329.1082f;
			uParam0->f_12 = 0;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 13:
			uParam0->f_14 = 1;
			*uParam0 = { -1271.649f, -3380.685f, 12.9451f };
			uParam0->f_3 = 329.5137f;
			uParam0->f_12 = 1;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 14:
			uParam0->f_14 = 2;
			*uParam0 = { 1735.586f, 3294.531f, 40.1651f };
			uParam0->f_3 = 194.9525f;
			uParam0->f_12 = 2;
			uParam0->f_13 = 359;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 15:
			uParam0->f_14 = 3;
			*uParam0 = { -846.27f, -1363.19f, 0.22f };
			uParam0->f_3 = 108.78f;
			uParam0->f_12 = 0;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 16:
			uParam0->f_14 = 4;
			*uParam0 = { -849.47f, -1354.99f, 0.24f };
			uParam0->f_3 = 109.84f;
			uParam0->f_12 = 1;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 17:
			uParam0->f_14 = 5;
			*uParam0 = { -852.47f, -1346.2f, 0.21f };
			uParam0->f_3 = 108.76f;
			uParam0->f_12 = 2;
			uParam0->f_13 = 356;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 18:
			uParam0->f_14 = 6;
			*uParam0 = { -745.857f, -1433.904f, 4.0005f };
			uParam0->f_12 = 0;
			uParam0->f_13 = 360;
			uParam0->f_15 = { -756.2952f, -1441.609f, 2.9184f };
			uParam0->f_18 = { -738.0606f, -1423.068f, 8.2835f };
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 19:
			uParam0->f_14 = 7;
			*uParam0 = { -761.8486f, -1453.829f, 4.0005f };
			uParam0->f_12 = 1;
			uParam0->f_13 = 360;
			uParam0->f_15 = { -772.8158f, -1459.957f, 3.2894f };
			uParam0->f_18 = { -754.3353f, -1440.836f, 8.3334f };
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 20:
			uParam0->f_14 = 8;
			*uParam0 = { 1769.3f, 3244f, 41.1f };
			uParam0->f_12 = 2;
			uParam0->f_13 = 360;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 28);
			iVar0 = 1;
			break;
		
		case 21:
			uParam0->f_14 = 9;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 0;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 22:
			uParam0->f_14 = 10;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 1;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 23:
			uParam0->f_14 = 11;
			*uParam0 = { 192.7897f, -1020.539f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = 2;
			uParam0->f_13 = 357;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 14);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 28);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 26:
		case 27:
		case 28:
			iVar1 = (iParam1 - 26);
			uParam0->f_14 = (12 + iVar1);
			*uParam0 = { 196.2794f, -1020.479f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 29:
		case 30:
		case 31:
			iVar1 = (iParam1 - 29);
			uParam0->f_14 = (15 + iVar1);
			*uParam0 = { 199.8872f, -1020.048f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 32:
		case 33:
		case 34:
			iVar1 = (iParam1 - 32);
			uParam0->f_14 = (18 + iVar1);
			*uParam0 = { 203.6006f, -1019.776f, -99.98f };
			uParam0->f_3 = 180f;
			uParam0->f_4 = 0;
			uParam0->f_12 = (0 + iVar1);
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 12);
			gameplay::set_bit(&(uParam0->f_9), 7);
			gameplay::set_bit(&(uParam0->f_9), 27);
			gameplay::set_bit(&(uParam0->f_9), 24);
			gameplay::set_bit(&(uParam0->f_9), 29);
			iVar0 = 1;
			break;
		
		case 24:
			uParam0->f_14 = 21;
			*uParam0 = { 0f, 0f, 0f };
			uParam0->f_3 = 0f;
			uParam0->f_4 = 0;
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 11);
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 12);
			iVar0 = 1;
			break;
		
		case 25:
			uParam0->f_14 = 22;
			*uParam0 = { 723.2515f, -632.0496f, 27.1484f };
			uParam0->f_3 = 12.9316f;
			uParam0->f_4 = joaat("tailgater");
			gameplay::set_bit(&(uParam0->f_9), 10);
			gameplay::set_bit(&(uParam0->f_9), 11);
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 12);
			iVar0 = 1;
			break;
		
		case 35:
			*uParam0 = { -51.23f, 3111.9f, 24.95f };
			uParam0->f_3 = 46.78f;
			uParam0->f_4 = joaat("proptrailer");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 36:
			*uParam0 = { -55.7984f, -1096.586f, 25.4223f };
			uParam0->f_3 = 308.0596f;
			uParam0->f_4 = joaat("bjxl");
			uParam0->f_10 = 126;
			uParam0->f_11 = 126;
			gameplay::set_bit(&(uParam0->f_9), 9);
			gameplay::set_bit(&(uParam0->f_9), 13);
			iVar0 = 1;
			break;
		
		case 37:
			*uParam0 = { -2892.93f, 3192.37f, 11.66f };
			uParam0->f_3 = -132.35f;
			uParam0->f_4 = joaat("velum");
			uParam0->f_10 = 157;
			uParam0->f_11 = 157;
			gameplay::set_bit(&(uParam0->f_9), 9);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 13);
			iVar0 = 1;
			break;
		
		case 38:
			*uParam0 = { 1744.308f, 3270.673f, 40.2076f };
			uParam0->f_3 = 125f;
			uParam0->f_4 = joaat("cargobob3");
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 39:
			*uParam0 = { 1751.44f, 3322.643f, 42.1855f };
			uParam0->f_3 = 268.134f;
			uParam0->f_4 = joaat("submersible");
			gameplay::set_bit(&(uParam0->f_9), 23);
			iVar0 = 1;
			break;
		
		case 41:
			*uParam0 = { 1377.104f, -2076.2f, 52f };
			uParam0->f_3 = 37.5f;
			uParam0->f_4 = joaat("towtruck");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 40:
			*uParam0 = { 1380.42f, -2072.77f, 51.7607f };
			uParam0->f_3 = 37.5f;
			uParam0->f_4 = joaat("trash");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 42:
			*uParam0 = { 1359.389f, 3618.441f, 33.8907f };
			uParam0->f_3 = 108.2337f;
			uParam0->f_4 = joaat("barracks");
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 43:
			*uParam0 = { 693.1154f, -1018.155f, 21.6387f };
			uParam0->f_3 = 177.6454f;
			uParam0->f_4 = 1938952078;
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 8);
			iVar0 = 1;
			break;
		
		case 44:
			*uParam0 = { -73.6963f, 495.124f, 143.5226f };
			uParam0->f_3 = 155.5994f;
			uParam0->f_4 = joaat("vacca");
			iVar0 = 1;
			break;
		
		case 45:
			*uParam0 = { -67.6314f, 891.8266f, 234.5348f };
			uParam0->f_3 = 294.993f;
			uParam0->f_4 = joaat("surano");
			iVar0 = 1;
			break;
		
		case 46:
			*uParam0 = { 533.9048f, -169.2469f, 53.7005f };
			uParam0->f_3 = 1.2998f;
			uParam0->f_4 = joaat("tornado2");
			iVar0 = 1;
			break;
		
		case 47:
			*uParam0 = { -726.8914f, -408.6952f, 34.0416f };
			uParam0->f_3 = 267.7392f;
			uParam0->f_4 = joaat("superd");
			iVar0 = 1;
			break;
		
		case 48:
			*uParam0 = { -1321.519f, 261.3993f, 61.5709f };
			uParam0->f_3 = 350.7697f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 49:
			*uParam0 = { -1267.999f, 451.6463f, 93.7071f };
			uParam0->f_3 = 48.9311f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 50:
			*uParam0 = { -1062.076f, -226.7637f, 37.157f };
			uParam0->f_3 = 234.2767f;
			uParam0->f_4 = joaat("double");
			iVar0 = 1;
			break;
		
		case 51:
			*uParam0 = { 68.16914f, -1558.958f, 29.46904f };
			uParam0->f_3 = 49.90575f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 52:
			*uParam0 = { 589.4399f, 2736.708f, 42.03316f };
			uParam0->f_3 = -175.7105f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 53:
			*uParam0 = { -488.774f, -344.5721f, 34.36356f };
			uParam0->f_3 = 82.4042f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 54:
			*uParam0 = { 288.8808f, -585.4728f, 43.15428f };
			uParam0->f_3 = -20.80707f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 55:
			*uParam0 = { 304.8294f, -1383.674f, 31.67744f };
			uParam0->f_3 = -41.11603f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 56:
			*uParam0 = { 1126.194f, -1481.486f, 34.7016f };
			uParam0->f_3 = -91.43369f;
			uParam0->f_4 = joaat("rumpo2");
			uParam0->f_12 = 2;
			gameplay::set_bit(&(uParam0->f_9), 26);
			iVar0 = 1;
			break;
		
		case 57:
			*uParam0 = { -1598.36f, 5252.84f, 0f };
			uParam0->f_3 = 28.14f;
			uParam0->f_4 = joaat("submersible");
			uParam0->f_13 = 308;
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 58:
			*uParam0 = { -1602.62f, 5260.37f, 0.86f };
			uParam0->f_3 = 25.32f;
			uParam0->f_4 = joaat("dinghy");
			uParam0->f_13 = 404;
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 22);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 59:
			*uParam0 = { 2116.571f, 4763.279f, 40.1596f };
			uParam0->f_3 = 198.723f;
			uParam0->f_4 = joaat("bfinjection");
			iVar0 = 1;
			break;
		
		case 60:
			*uParam0 = { 1133.21f, 120.2f, 80.9f };
			uParam0->f_3 = 134.4f;
			if (func_122())
			{
				uParam0->f_4 = joaat("blimp2");
			}
			else
			{
				uParam0->f_4 = joaat("blimp");
			}
			uParam0->f_13 = 401;
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 1);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 21);
			iVar0 = 1;
			break;
		
		case 61:
			*uParam0 = { -806.31f, -2679.65f, 13.9f };
			uParam0->f_3 = 150.54f;
			if (func_122())
			{
				uParam0->f_4 = joaat("blimp2");
			}
			else
			{
				uParam0->f_4 = joaat("blimp");
			}
			uParam0->f_13 = 401;
			gameplay::set_bit(&(uParam0->f_9), 13);
			gameplay::set_bit(&(uParam0->f_9), 2);
			gameplay::set_bit(&(uParam0->f_9), 1);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 21);
			iVar0 = 1;
			break;
		
		case 62:
			*uParam0 = { 1985.85f, 3828.96f, 31.98f };
			uParam0->f_3 = -16.58f;
			uParam0->f_4 = joaat("blazer3");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 63:
			*uParam0 = { 3870.75f, 4464.67f, 0f };
			uParam0->f_3 = 0f;
			uParam0->f_4 = joaat("submersible2");
			uParam0->f_13 = 308;
			gameplay::set_bit(&(uParam0->f_9), 0);
			gameplay::set_bit(&(uParam0->f_9), 21);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			gameplay::set_bit(&(uParam0->f_9), 30);
			iVar0 = 1;
			break;
		
		case 64:
			*uParam0 = { 1257.729f, -2564.474f, 41.717f };
			uParam0->f_3 = 284.5561f;
			uParam0->f_4 = joaat("dukes2");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 65:
			*uParam0 = { 643.2823f, 3014.152f, 42.2733f };
			uParam0->f_3 = 128.0554f;
			uParam0->f_4 = joaat("dukes2");
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 66:
			*uParam0 = { 38.9368f, 850.8677f, 196.3f };
			uParam0->f_3 = 311.6813f;
			uParam0->f_4 = joaat("dodo");
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
		
		case 67:
			*uParam0 = { 1333.875f, 4262.226f, 30.78f };
			uParam0->f_3 = 262.5293f;
			uParam0->f_4 = joaat("dodo");
			gameplay::set_bit(&(uParam0->f_9), 30);
			gameplay::set_bit(&(uParam0->f_9), 23);
			gameplay::set_bit(&(uParam0->f_9), 6);
			iVar0 = 1;
			break;
	}
	if (gameplay::is_bit_set(uParam0->f_9, 10))
	{
		uParam0->f_4 = Global_101652.f_31373.f_69[uParam0->f_14 /*78*/].f_66;
		if (iParam1 == 14)
		{
			if (((((uParam0->f_4 == joaat("miljet") || uParam0->f_4 == joaat("besra")) || uParam0->f_4 == joaat("luxor")) || uParam0->f_4 == joaat("shamal")) || uParam0->f_4 == joaat("titan")) || uParam0->f_4 == joaat("luxor2"))
			{
				*uParam0 = { 1678.8f, 3229.6f, 41.8f };
				uParam0->f_3 = 106.0906f;
			}
		}
		if (!func_105(Global_101652.f_31373.f_1864[uParam0->f_14 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101652.f_31373.f_1864[uParam0->f_14 /*3*/] };
		}
		if (Global_101652.f_31373.f_1934[uParam0->f_14] != -1f)
		{
			uParam0->f_3 = Global_101652.f_31373.f_1934[uParam0->f_14];
		}
	}
	if (gameplay::is_bit_set(uParam0->f_9, 19))
	{
		if (!func_105(Global_101652.f_2079.f_539.f_2816[1 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101652.f_2079.f_539.f_2816[1 /*10*/][uParam0->f_12 /*3*/] };
			uParam0->f_3 = Global_101652.f_2079.f_539.f_2837[1 /*4*/][uParam0->f_12];
		}
	}
	else if (gameplay::is_bit_set(uParam0->f_9, 20))
	{
		if (!func_105(Global_101652.f_2079.f_539.f_2816[0 /*10*/][uParam0->f_12 /*3*/], 0f, 0f, 0f, 0))
		{
			*uParam0 = { Global_101652.f_2079.f_539.f_2816[0 /*10*/][uParam0->f_12 /*3*/] };
			uParam0->f_3 = Global_101652.f_2079.f_539.f_2837[0 /*4*/][uParam0->f_12];
		}
	}
	return iVar0;
}

void func_413(int iParam0, var uParam1, vector3 vParam2, float fParam5, int iParam6)//Position - 0x386B5
{
	if (func_412(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 10))
		{
			func_418(iParam0);
			func_417(uParam1, &(Global_101652.f_31373.f_69[Global_68526.f_555[0 /*21*/].f_14 /*78*/]));
			if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 11))
			{
				Global_101652.f_31373.f_1864[Global_68526.f_555[0 /*21*/].f_14 /*3*/] = { vParam2 };
				Global_101652.f_31373.f_1934[Global_68526.f_555[0 /*21*/].f_14] = fParam5;
			}
			else
			{
				Global_101652.f_31373.f_1864[Global_68526.f_555[0 /*21*/].f_14 /*3*/] = { 0f, 0f, 0f };
				Global_101652.f_31373.f_1934[Global_68526.f_555[0 /*21*/].f_14] = -1f;
			}
			Global_101652.f_31373.f_1958[Global_68526.f_555[0 /*21*/].f_14] = iParam6 + 1;
			func_414(iParam0, 1);
		}
	}
}

void func_414(int iParam0, int iParam1)//Position - 0x387B4
{
	if (iParam0 == -1)
	{
		return;
	}
	if (iParam1)
	{
		if (!func_416(iParam0, 0))
		{
			func_415(iParam0, 1, 0);
			func_415(iParam0, 2, 0);
			func_415(iParam0, 3, 0);
			func_415(iParam0, 4, 0);
			func_415(iParam0, 0, 1);
			Global_68526[iParam0] = 1;
		}
	}
	else
	{
		func_415(iParam0, 0, 0);
	}
}

void func_415(int iParam0, int iParam1, int iParam2)//Position - 0x38811
{
	if (iParam0 == -1)
	{
		return;
	}
	if (iParam2)
	{
		gameplay::set_bit(&(Global_101652.f_31373[iParam0]), iParam1);
	}
	else
	{
		gameplay::clear_bit(&(Global_101652.f_31373[iParam0]), iParam1);
	}
}

int func_416(int iParam0, int iParam1)//Position - 0x3884C
{
	if (iParam0 == -1)
	{
		return false;
	}
	return gameplay::is_bit_set(Global_101652.f_31373[iParam0], iParam1);
}

void func_417(var uParam0, var uParam1)//Position - 0x3886F
{
	uParam1->f_66 = uParam0->f_66;
	*uParam1 = *uParam0;
	uParam1->f_1 = { uParam0->f_1 };
	uParam1->f_5 = uParam0->f_5;
	uParam1->f_6 = uParam0->f_6;
	uParam1->f_7 = uParam0->f_7;
	uParam1->f_8 = uParam0->f_8;
	uParam1->f_9 = { uParam0->f_9 };
	uParam1->f_59 = { uParam0->f_59 };
	uParam1->f_62 = uParam0->f_62;
	uParam1->f_63 = uParam0->f_63;
	uParam1->f_64 = uParam0->f_64;
	uParam1->f_65 = uParam0->f_65;
	uParam1->f_77 = uParam0->f_77;
	uParam1->f_67 = uParam0->f_67;
	uParam1->f_69 = uParam0->f_69;
	uParam1->f_68 = uParam0->f_68;
	uParam1->f_71 = uParam0->f_71;
	uParam1->f_72 = uParam0->f_72;
	uParam1->f_73 = uParam0->f_73;
	uParam1->f_74 = uParam0->f_74;
	uParam1->f_75 = uParam0->f_75;
	uParam1->f_76 = uParam0->f_76;
}

void func_418(int iParam0)//Position - 0x3893B
{
	if (iParam0 == -1)
	{
		return;
	}
	if (func_412(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		if (entity::does_entity_exist(Global_68526.f_139[iParam0]))
		{
			entity::set_entity_as_mission_entity(Global_68526.f_139[iParam0], true, 1);
			entity::set_vehicle_as_no_longer_needed(&(Global_68526.f_139[iParam0]));
			Global_68526.f_139[iParam0] = 0;
		}
		if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 13))
		{
			func_414(iParam0, 0);
		}
	}
}

void func_419(int iParam0)//Position - 0x389B5
{
	if (iParam0 != 24 && iParam0 != 25)
	{
	}
	func_418(iParam0);
	func_414(iParam0, 0);
}

int func_420(int iParam0)//Position - 0x389DC
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return 145;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return 145;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89150[iVar0]))
		{
			if (Global_89150[iVar0] == iParam0)
			{
				return Global_89160[iVar0];
			}
		}
		iVar0++;
	}
	return 145;
}

bool func_421(int iParam0)//Position - 0x38A3F
{
	int iVar0;
	vector3 vVar1;
	vector3 vVar4;
	float fVar7;
	
	iVar0 = entity::get_entity_model(iParam0);
	gameplay::get_model_dimensions(iVar0, &vVar1, &vVar4);
	fVar7 = (-vVar1.y + vVar4.y);
	if (fVar7 < 2.6f)
	{
		return true;
	}
	return false;
}

bool func_422(int iParam0, int iParam1, int iParam2)//Position - 0x38A75
{
	int iVar0;
	char* sVar1;
	var uVar9;
	
	if (!entity::does_entity_exist(iParam0) || !vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	iVar0 = 0;
	while (func_423(iParam1, iVar0, &sVar1, &uVar9))
	{
		if (!iParam2 || gameplay::is_bit_set(Global_101652.f_6172[uVar9], 0))
		{
			if (vehicle::is_vehicle_in_garage_area(&sVar1, iParam0))
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_423(int iParam0, int iParam1, char* sParam2, var uParam3)//Position - 0x38AE6
{
	StringCopy(sParam2, "", 32);
	switch (iParam0)
	{
		case 0:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Michael - Beverly Hills", 32);
				*uParam3 = 0;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Trevor - Countryside", 32);
				*uParam3 = 1;
				return true;
			}
			break;
		
		case 1:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Franklin - Aunt", 32);
				*uParam3 = 5;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Franklin - Hills", 32);
				*uParam3 = 6;
				return true;
			}
			break;
		
		case 2:
			if (iParam1 == 0)
			{
				StringCopy(sParam2, "Trevor - Countryside", 32);
				*uParam3 = 2;
				return true;
			}
			else if (iParam1 == 1)
			{
				StringCopy(sParam2, "Trevor - City", 32);
				*uParam3 = 3;
				return true;
			}
			else if (iParam1 == 2)
			{
				StringCopy(sParam2, "Trevor - Stripclub", 32);
				*uParam3 = 4;
				return true;
			}
			break;
	}
	return false;
}

void func_424(vector3 vParam0, float fParam3, int iParam4)//Position - 0x38BBE
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (func_412(&(Global_68526.f_555[0 /*21*/]), iVar0))
		{
			if (gameplay::get_distance_between_coords(vParam0, Global_68526.f_555[0 /*21*/], iParam4) <= fParam3)
			{
				func_425(iVar0);
			}
		}
		iVar0++;
	}
}

void func_425(int iParam0)//Position - 0x38C0E
{
	int iVar0;
	
	if (iParam0 == -1)
	{
		return;
	}
	if (func_412(&(Global_68526.f_555[0 /*21*/]), iParam0))
	{
		if (entity::does_entity_exist(Global_68526.f_139[iParam0]))
		{
			iVar0 = true;
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (vehicle::is_vehicle_driveable(Global_68526.f_139[iParam0], 0))
				{
					if (ped::is_ped_in_vehicle(player::player_ped_id(), Global_68526.f_139[iParam0], 0))
					{
						iVar0 = false;
					}
				}
			}
			if (iVar0)
			{
				entity::set_entity_as_mission_entity(Global_68526.f_139[iParam0], true, 1);
				vehicle::delete_vehicle(&(Global_68526.f_139[iParam0]));
			}
		}
		Global_68526[iParam0] = 1;
		if (gameplay::is_bit_set(Global_68526.f_555[0 /*21*/].f_9, 13))
		{
			if (((((iParam0 == 24 && func_416(iParam0, 0)) && Global_69435.f_66 == 0) && Global_101652.f_31373.f_1958[Global_68526.f_555[0 /*21*/].f_14] != 0) && Global_101652.f_31373.f_1958[Global_68526.f_555[0 /*21*/].f_14] > 3) && (!func_426(0, Global_68526.f_555[0 /*21*/].f_12) || !func_426(1, Global_68526.f_555[0 /*21*/].f_12)))
			{
				func_417(&(Global_101652.f_31373.f_69[Global_68526.f_555[0 /*21*/].f_14 /*78*/]), &Global_69435);
				Global_69513 = Global_101652.f_31373.f_5591;
			}
			func_414(iParam0, 0);
		}
	}
}

int func_426(int iParam0, int iParam1)//Position - 0x38D80
{
	int iVar0;
	
	switch (iParam1)
	{
		case 0:
			iVar0 = 0;
			break;
		
		case 1:
			iVar0 = 1;
			break;
		
		case 2:
			iVar0 = 2;
			break;
	}
	if (iParam0 < 0 || iParam0 >= func_427(&(Global_101652.f_31373.f_5038[iVar0 /*157*/])))
	{
		return 0;
	}
	return func_114(Global_101652.f_31373.f_5038[iVar0 /*157*/][iParam0 /*78*/].f_66, 0);
}

var func_427(var uParam0)//Position - 0x38DF2
{
	return *uParam0;
}

bool func_428(int iParam0)//Position - 0x38DFD
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 3)
	{
		if (entity::does_entity_exist(Global_89180[iVar0]))
		{
			if (Global_89180[iVar0] == iParam0)
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

void func_429(int iParam0, int iParam1)//Position - 0x38E38
{
	int iVar0;
	struct<17> Var1;
	
	iVar0 = entity::get_entity_model(iParam0);
	Var1 = { func_341(iVar0, iParam1) };
	func_430(iParam0, iVar0, &Var1);
}

void func_430(int iParam0, int iParam1, var uParam2)//Position - 0x38E5F
{
	int iVar0;
	struct<14> Var1;
	int iVar15;
	int iVar16;
	int iVar17;
	int iVar18;
	var uVar19;
	
	iVar0 = 0;
	while (iVar0 <= 11)
	{
		Var1 = { func_14(iParam1, func_86(iVar0), (*uParam2)[func_86(iVar0)]) };
		if (Var1.f_3 != -1 && Var1.f_4 != -1)
		{
			ped::_0x39D55A620FCB6A3A(iParam0, iVar0, Var1.f_3, Var1.f_4);
		}
		iVar0++;
	}
	uVar19 = { func_338(iParam1, (*uParam2)[13]) };
	iVar15 = 0;
	while (iVar15 <= 8)
	{
		iVar16 = iVar15;
		iVar17 = func_28(iVar16);
		iVar18 = func_11(iVar17);
		if (uVar19[iVar15] != iVar18)
		{
			Var1 = { func_14(iParam1, 14, uVar19[iVar15]) };
			if (Var1.f_3 != -1 && Var1.f_3 != 255)
			{
				ped::_is_ped_prop_valid(iParam0, iVar17, Var1.f_3, Var1.f_4);
			}
		}
		iVar15++;
	}
}

void func_431(int iParam0)//Position - 0x38F39
{
	if (Global_88741 != -1)
	{
		if (iParam0 == Global_88741)
		{
			Global_88745 = 1;
			return;
		}
	}
}

bool func_432(vector3 vParam0, float fParam3)//Position - 0x38F5D
{
	switch (iLocal_875)
	{
		case 0:
			if (func_97(&iLocal_104, 14, -808.0422f, 168.5755f, 75.7504f, 244.0649f, 1))
			{
				iLocal_875++;
			}
			break;
		
		case 1:
			if (!ped::is_ped_injured(iLocal_104))
			{
				ped::_0x39D55A620FCB6A3A(iLocal_104, 1, 0, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_104, 3, 0, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_104, 4, 0, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_104, 6, 0, 0);
				ped::_0x39D55A620FCB6A3A(iLocal_104, 10, 0, 0);
				iLocal_875++;
			}
			break;
		
		case 2:
			if (!ped::is_ped_injured(iLocal_104))
			{
				if (ped::_0x66680A92700F43DF(iLocal_104))
				{
					ped::set_ped_component_variation(iLocal_104, 1, 0, 0, 0);
					ped::set_ped_component_variation(iLocal_104, 3, 0, 0, 0);
					ped::set_ped_component_variation(iLocal_104, 4, 0, 0, 0);
					ped::set_ped_component_variation(iLocal_104, 6, 0, 0, 0);
					ped::set_ped_component_variation(iLocal_104, 10, 0, 0, 0);
					ped::_0x5AAB586FFEC0FD96(iLocal_104);
					entity::set_entity_coords(iLocal_104, vParam0, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_104, fParam3);
					func_96(iLocal_104);
					ped::_0x5AAB586FFEC0FD96(iLocal_104);
					iLocal_875 = 0;
					return true;
				}
			}
			break;
	}
	return false;
}

void func_433()//Position - 0x3906C
{
	if (!iLocal_908)
	{
		fLocal_899 = 0f;
		iLocal_900 = 0;
		iLocal_901 = 0;
		iLocal_902 = 0;
		iLocal_903 = 0;
		iLocal_904 = 0;
		iLocal_905 = 0;
		iLocal_906 = 0;
		iLocal_907 = 0;
		iLocal_908 = 1;
	}
	switch (iLocal_70)
	{
		case 1:
			if (entity::does_entity_exist(iLocal_114) && vehicle::is_vehicle_driveable(iLocal_114, 0))
			{
				if (fLocal_899 > (IntToFloat(entity::get_entity_health(iLocal_114)) + vehicle::get_vehicle_engine_health(iLocal_114)))
				{
					func_435(208, 1, 0);
				}
				fLocal_899 = (IntToFloat(entity::get_entity_health(iLocal_114)) + vehicle::get_vehicle_engine_health(iLocal_114));
			}
			else
			{
				fLocal_899 = 0f;
			}
			break;
		
		case 2:
			if (!iLocal_903)
			{
				if (entity::does_entity_exist(iLocal_112) && vehicle::is_vehicle_driveable(iLocal_112, 0))
				{
					if (vehicle::is_vehicle_model(iLocal_112, joaat("tribike")))
					{
						func_435(214, 0, 1);
					}
					if (vehicle::is_vehicle_model(iLocal_112, joaat("bmx")))
					{
						func_435(214, 1, 1);
					}
					if (vehicle::is_vehicle_model(iLocal_112, joaat("cruiser")))
					{
						func_435(214, 2, 1);
					}
					if (vehicle::is_vehicle_model(iLocal_112, joaat("scorcher")))
					{
						func_435(214, 3, 1);
					}
					iLocal_903 = 1;
				}
			}
			break;
		
		case 3:
			if (!iLocal_901)
			{
				func_261(211, 0);
				iLocal_901 = 1;
			}
			else if (!iLocal_902)
			{
				if (iLocal_296)
				{
					func_434(0, -1);
					iLocal_902 = 1;
				}
			}
			if (vehicle::is_vehicle_driveable(iLocal_112, 0))
			{
				if (!iLocal_900)
				{
					if (ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_112))
					{
						iLocal_900 = 1;
					}
				}
				else if (!ped::is_ped_sitting_in_vehicle(player::player_ped_id(), iLocal_112))
				{
					if (ped::is_ped_ragdoll(player::player_ped_id()))
					{
						func_435(206, 1, 0);
					}
					iLocal_900 = 0;
				}
			}
			break;
		
		case 5:
			if (!iLocal_904)
			{
				func_261(207, 0);
				iLocal_904 = 1;
			}
			else if (!iLocal_905)
			{
				if (entity::is_entity_in_angled_area(player::player_ped_id(), -2022.824f, -1045.762f, 1.449759f, -2018.304f, -1032.236f, 4.478201f, 8f, 0, true, 0))
				{
					func_434(0, -1);
					iLocal_905 = 1;
				}
			}
			break;
		
		case 7:
			if (!iLocal_906)
			{
				if (ui::does_blip_exist(uLocal_129[0]))
				{
					func_261(213, 0);
					iLocal_906 = 1;
				}
				break;
			}
			if (!iLocal_907)
			{
				if ((!entity::does_entity_exist(iLocal_126[0]) && !entity::does_entity_exist(iLocal_123[0])) || ped::is_ped_injured(iLocal_126[0]))
				{
					func_434(0, -1);
					iLocal_907 = 1;
				}
			}
	}
}

void func_434(int iParam0, int iParam1)//Position - 0x392C0
{
	int iVar0;
	
	if (Global_55826)
	{
	}
	Global_55826 = 0;
	if (iParam0)
	{
		Global_55827 = 1;
	}
	iVar0 = 0;
	if (iParam1 == -1)
	{
		iVar0 = 0;
		while (iVar0 < Global_67913)
		{
			if (Global_56043[Global_67914[iVar0 /*9*/] /*13*/] == 4)
			{
				Global_67914[iVar0 /*9*/].f_5 = 0;
				return;
			}
			iVar0++;
		}
	}
	else
	{
		iVar0 = 0;
		while (iVar0 < Global_67913)
		{
			if (Global_67914[iVar0 /*9*/] > 0)
			{
				if (Global_67914[iVar0 /*9*/] == iParam1)
				{
					Global_67914[iVar0 /*9*/].f_5 = 0;
					return;
				}
			}
			iVar0++;
		}
	}
}

void func_435(int iParam0, int iParam1, int iParam2)//Position - 0x3935A
{
	int iVar0;
	
	iVar0 = 0;
	iVar0 = 0;
	while (iVar0 < Global_67913)
	{
		if (Global_67914[iVar0 /*9*/] == iParam0)
		{
			if (iParam2)
			{
				Global_67914[iVar0 /*9*/].f_1 = iParam1;
			}
			else
			{
				Global_67914[iVar0 /*9*/].f_1 = (Global_67914[iVar0 /*9*/].f_1 + iParam1);
			}
			return;
		}
		iVar0++;
	}
	if (Global_67914[iVar0 /*9*/] != -1)
	{
		if (Global_56043[Global_67914[iVar0 /*9*/] /*13*/] == 3)
		{
			if (Global_67914[iVar0 /*9*/].f_1 > 1)
			{
				Global_67914[iVar0 /*9*/].f_1 = 1;
			}
			if (Global_67914[iVar0 /*9*/].f_1 < 0)
			{
				Global_67914[iVar0 /*9*/].f_1 = 0;
			}
		}
	}
}

void func_436()//Position - 0x39404
{
	if (iLocal_265)
	{
		if (!ui::is_help_message_being_displayed())
		{
			if (player::get_player_sprint_time_remaining(player::player_id()) <= 5f)
			{
				if (!func_438(29))
				{
					func_237("AM_H_NOSTAM", -1);
					func_437(29);
				}
			}
		}
	}
}

void func_437(int iParam0)//Position - 0x39440
{
	int iVar0;
	int iVar1;
	
	iVar0 = iParam0;
	iVar1 = 0;
	while (iVar0 > 31)
	{
		iVar0 = (iVar0 - 32);
		iVar1++;
	}
	if (iVar1 < 3)
	{
		gameplay::set_bit(&(Global_101652.f_19353.f_150[iVar1]), iVar0);
	}
}

int func_438(int iParam0)//Position - 0x39482
{
	int iVar0;
	int iVar1;
	
	iVar0 = iParam0;
	iVar1 = 0;
	while (iVar0 > 31)
	{
		iVar0 = (iVar0 - 32);
		iVar1++;
	}
	if (iVar1 < 3)
	{
		return gameplay::is_bit_set(Global_101652.f_19353.f_150[iVar1], iVar0);
	}
	return false;
}

void func_439()//Position - 0x394C5
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	func_446();
	if (!func_180())
	{
		if (iLocal_70 >= 4)
		{
			if (!streaming::is_ipl_active("smboat"))
			{
				streaming::request_ipl("smBoat");
			}
		}
		else if (streaming::is_ipl_active("smboat"))
		{
			streaming::remove_ipl("smBoat");
		}
	}
	switch (iLocal_70)
	{
		case 0:
			if (iLocal_284)
			{
				func_179(-803.2507f, 172.9356f, 71.8447f, 108.735f, 1);
				while (!func_344(0, 1))
				{
					system::wait(0);
				}
				ai::request_waypoint_recording(sLocal_268);
				while (!ai::get_is_waypoint_recording_loaded(sLocal_268))
				{
					system::wait(0);
				}
				while (!interior::is_interior_ready(interior::get_interior_at_coords(-803.2507f, 172.9356f, 71.8447f)))
				{
					system::wait(0);
				}
				func_194(&iLocal_104, 14, -809.6773f, 171.191f, 75.7409f, 138.7408f);
			}
			break;
		
		case 1:
			iLocal_314 = 0;
			iLocal_315 = 0;
			ai::set_scenario_type_enabled("WORLD_VEHICLE_DRIVE_SOLO", false);
			if (!ped::is_ped_injured(iLocal_104))
			{
				func_96(iLocal_104);
			}
			cam::set_gameplay_cam_relative_heading(0f);
			cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
			ai::assisted_movement_request_route("Mansion_1");
			if (iLocal_284)
			{
				if (entity::does_entity_exist(iLocal_114))
				{
					vehicle::delete_vehicle(&iLocal_114);
				}
				if (entity::does_entity_exist(iLocal_121))
				{
					vehicle::delete_vehicle(&iLocal_121);
				}
				if (entity::does_entity_exist(iLocal_122))
				{
					vehicle::delete_vehicle(&iLocal_122);
				}
				while (!func_318(&iLocal_122, 0, vLocal_211, fLocal_214, 1, 1))
				{
					system::wait(0);
				}
				if (vehicle::is_vehicle_driveable(iLocal_114, 0))
				{
					entity::_0x3910051CCECDB00C(iLocal_114, true);
				}
				while (!func_344(0, 1))
				{
					system::wait(0);
				}
				ai::request_waypoint_recording(sLocal_268);
				while (!ai::get_is_waypoint_recording_loaded(sLocal_268))
				{
					system::wait(0);
				}
				func_179(vLocal_199, fLocal_202, 1);
				if (!ped::is_ped_injured(iLocal_104))
				{
					ai::clear_ped_tasks_immediately(iLocal_104);
				}
				func_194(&iLocal_104, 14, vLocal_203, fLocal_206);
				iVar0 = false;
				while (!iVar0)
				{
					if (!ped::is_ped_injured(iLocal_104))
					{
						if (ped::_0x7350823473013C02(iLocal_104))
						{
							iVar0 = true;
						}
					}
					system::wait(0);
				}
				if (!func_180())
				{
					ped::force_ped_motion_state(player::player_ped_id(), -668482597, false, 0, 0);
					ped::set_ped_min_move_blend_ratio(player::player_ped_id(), 1f);
				}
			}
			if (vehicle::is_vehicle_driveable(iLocal_114, 0))
			{
				vehicle::set_vehicle_on_ground_properly(iLocal_114, 1084227584);
				entity::apply_force_to_entity(iLocal_114, 0, 0f, 0f, 0.1f, 0f, 0f, 0f, 0, 1, 1, 0, 0, 1);
				entity::set_entity_quaternion(iLocal_114, -0.0062f, -0.0656f, 0.9462f, 0.3169f);
			}
			system::settimera(0);
			break;
		
		case 2:
			ai::set_scenario_type_enabled("WORLD_VEHICLE_DRIVE_SOLO", false);
			if (entity::does_entity_exist(iLocal_122))
			{
				if ((entity::does_entity_exist(iLocal_114) && iLocal_114 != iLocal_122) || !entity::does_entity_exist(iLocal_114))
				{
					entity::set_vehicle_as_no_longer_needed(&iLocal_122);
				}
			}
			if (entity::does_entity_exist(iLocal_121))
			{
				if ((entity::does_entity_exist(iLocal_114) && iLocal_114 != iLocal_121) || !entity::does_entity_exist(iLocal_114))
				{
					entity::set_vehicle_as_no_longer_needed(&iLocal_121);
				}
			}
			if (iLocal_284)
			{
				while (!func_344(0, 1))
				{
					system::wait(0);
				}
				if (!entity::does_entity_exist(iLocal_114))
				{
					func_445(2, vLocal_222, fLocal_225);
				}
				if (!entity::is_entity_dead(iLocal_114, 0))
				{
					entity::set_entity_coords(iLocal_114, vLocal_222, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_114, fLocal_225);
					vehicle::set_vehicle_on_ground_properly(iLocal_114, 1084227584);
					ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_114, -1);
					func_444(&iLocal_104, 14, &iLocal_114, 0);
					if (!entity::is_entity_dead(iLocal_114, 0))
					{
						entity::set_entity_coords_no_offset(iLocal_114, -1072.8f, -1703.923f, 4.138f, 0, 0, 1);
						entity::set_entity_quaternion(iLocal_114, 0.0123f, -0.0057f, 0.9998f, -0.0169f);
					}
				}
				entity::set_entity_coords(player::player_ped_id(), -1081.797f, -1699.492f, 3.5179f, 1, false, 0, 1);
				entity::set_entity_heading(player::player_ped_id(), 91.1321f);
				if (!ped::is_ped_injured(iLocal_104))
				{
					entity::set_entity_coords(iLocal_104, -1085.249f, -1703.189f, 3.4167f, 1, false, 0, 1);
					entity::set_entity_heading(iLocal_104, 327.7033f);
				}
				if (entity::does_entity_exist(iLocal_112))
				{
					vehicle::delete_vehicle(&iLocal_112);
				}
				if (entity::does_entity_exist(iLocal_113))
				{
					vehicle::delete_vehicle(&iLocal_113);
				}
				while (!func_140(0))
				{
					system::wait(0);
				}
				gameplay::clear_area(vLocal_226, 10f, 1, 0, 0, false);
				func_179(-1081.797f, -1699.492f, 3.5179f, 91.1321f, 1);
				iLocal_293 = true;
				iLocal_192 = 1;
			}
			break;
		
		case 3:
			iLocal_271 = 0;
			ai::set_scenario_type_enabled("WORLD_VEHICLE_DRIVE_SOLO", false);
			iLocal_314 = 0;
			iLocal_315 = 0;
			if (iLocal_284)
			{
				while (!func_140(1))
				{
					system::wait(0);
				}
				func_179(vLocal_229, fLocal_232, 1);
				while (!func_344(0, 1))
				{
					system::wait(0);
				}
				func_445(0, -1103.998f, -1691.691f, 3.3147f, 255.7254f);
				ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_112, -1);
				func_445(1, -1100.827f, -1695.758f, 3.3089f, 245.1632f);
				func_444(&iLocal_104, 14, &iLocal_113, -1);
				vehicle::request_vehicle_recording(iLocal_269, sLocal_267);
				vehicle::request_vehicle_recording(1, sLocal_267);
				streaming::request_anim_dict("veh@bicycle@mountain_f@front@base");
				while ((!vehicle::has_vehicle_recording_been_loaded(iLocal_269, sLocal_267) || !vehicle::has_vehicle_recording_been_loaded(1, sLocal_267)) || !streaming::has_anim_dict_loaded("veh@bicycle@mountain_f@front@base"))
				{
					system::wait(0);
				}
				iVar1 = false;
				if (!ped::is_ped_injured(iLocal_104))
				{
					while (!iVar1)
					{
						system::wait(0);
						if (!ped::is_ped_injured(iLocal_104))
						{
							if (ped::_0x7350823473013C02(iLocal_104))
							{
								ped::set_ped_in_vehicle_context(iLocal_104, gameplay::get_hash_key("MISS_FAMILY2_JIMMY_BICYCLE"));
								iVar1 = true;
							}
						}
					}
				}
				cam::set_gameplay_cam_relative_heading(0f);
				cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
			}
			iLocal_841 = 0;
			iLocal_842 = 0;
			StringCopy(&Local_843, "", 24);
			break;
		
		case 4:
			if (iLocal_284)
			{
				while (!func_344(0, 1))
				{
					system::wait(0);
				}
				func_179(vLocal_236, fLocal_240, 1);
				func_445(1, vLocal_236, fLocal_240);
				func_445(0, vLocal_233, fLocal_239);
				func_194(&iLocal_104, 14, -1859.072f, -1217.333f, 12.0174f, 24.6128f);
			}
			break;
		
		case 5:
			func_445(3, vLocal_215, fLocal_260);
			if (vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				vehicle::set_boat_anchor(iLocal_111, true);
			}
			iLocal_279 = -1;
			if (iLocal_284)
			{
				while (!func_344(1, 1))
				{
					system::wait(0);
				}
				func_179(vLocal_207, fLocal_210, 1);
				func_194(&iLocal_104, 14, -1859.072f, -1217.333f, 12.0174f, 24.6128f);
				func_445(1, vLocal_236, fLocal_240);
				func_445(0, vLocal_233, fLocal_239);
				if (vehicle::is_vehicle_driveable(iLocal_112, 0))
				{
					entity::set_entity_coords_no_offset(iLocal_112, -1867.517f, -1209.121f, 12.5769f, 0, 0, 1);
					entity::set_entity_quaternion(iLocal_112, 0.0501f, -0.0721f, 0.4606f, 0.8833f);
				}
				if (vehicle::is_vehicle_driveable(iLocal_113, 0))
				{
					entity::set_entity_coords_no_offset(iLocal_113, -1858.631f, -1214.661f, 12.5761f, 0, 0, 1);
					entity::set_entity_quaternion(iLocal_113, 0.0568f, -0.0661f, 0.6354f, 0.7672f);
				}
			}
			break;
		
		case 6:
			while (!func_344(1, 1))
			{
				system::wait(0);
			}
			if (iLocal_284)
			{
				func_179(-2059.935f, -1026.109f, 9.7454f, 71.3421f, 1);
			}
			if (!entity::does_entity_exist(iLocal_111))
			{
				func_445(3, vLocal_215, fLocal_260);
			}
			while (!func_247(0, 1))
			{
				system::wait(0);
			}
			while (!func_247(1, 1))
			{
				system::wait(0);
			}
			while (!func_262())
			{
				system::wait(0);
			}
			func_194(&iLocal_103, 15, -2059.935f, -1026.109f, 9.7454f, 71.3421f);
			func_194(&iLocal_104, 14, vLocal_193, fLocal_259);
			break;
		
		case 7:
			iLocal_270 = 0;
			iLocal_664 = ped::add_scenario_blocking_area(Vector(-10.77281f, -1509.857f, -919.2169f) + Vector(13.25f, 231f, 232f), Vector(-10.77281f, -1509.857f, -919.2169f) - Vector(13.25f, 231f, 232f), 0, 1, 1, 1);
			iLocal_665 = ped::add_scenario_blocking_area(Vector(-12.18635f, -888.8414f, -2055.108f) + Vector(14.5f, 250f, 246f), Vector(-12.18635f, -888.8414f, -2055.108f) + Vector(14.5f, 250f, 246f), 0, 1, 0, 1);
			func_443();
			if (iLocal_284)
			{
				func_240(1, 0f);
				while (!func_344(1, 1))
				{
					system::wait(0);
				}
				func_179(vLocal_215, fLocal_260, 1);
				func_445(3, vLocal_218, fLocal_221);
				func_444(&iLocal_103, 15, &iLocal_111, 0);
				iVar2 = false;
				while (!iVar2)
				{
					if (!ped::is_ped_injured(iLocal_103))
					{
						if (ped::_0x7350823473013C02(iLocal_103))
						{
							iVar2 = true;
						}
					}
					system::wait(0);
				}
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					vehicle::set_vehicle_engine_on(iLocal_111, true, 1, 0);
				}
				vehicle::set_vehicle_forward_speed(iLocal_111, 17f);
				cam::set_gameplay_cam_relative_heading(0f);
				cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
				audio::trigger_music_event("FAM2_CHASE_RT");
			}
			if (vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				vehicle::set_vehicle_doors_locked(iLocal_111, 1);
				if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
				{
					ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_111, -1);
				}
				if (!ped::is_ped_injured(iLocal_103))
				{
					if (!ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
					{
						ped::set_ped_into_vehicle(iLocal_103, iLocal_111, 0);
					}
				}
			}
			func_194(&iLocal_104, 14, -1611.595f, -1121.009f, 1.544f, 42.8275f);
			break;
		
		case 8:
			iLocal_270 = 0;
			func_442(0);
			system::settimera(0);
			if (iLocal_284)
			{
				while (!func_344(1, 1))
				{
					system::wait(0);
				}
				func_179(vLocal_326, fLocal_329, 1);
				func_445(3, vLocal_326, fLocal_329);
				func_444(&iLocal_103, 15, &iLocal_111, 0);
				iVar3 = false;
				while (!iVar3)
				{
					if (!ped::is_ped_injured(iLocal_103))
					{
						if (ped::_0x7350823473013C02(iLocal_103))
						{
							iVar3 = true;
						}
					}
					system::wait(0);
				}
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					if (!ped::is_ped_in_vehicle(player::player_ped_id(), iLocal_111, 0))
					{
						ped::set_ped_into_vehicle(player::player_ped_id(), iLocal_111, -1);
					}
					if (!ped::is_ped_injured(iLocal_103))
					{
						if (!ped::is_ped_in_vehicle(iLocal_103, iLocal_111, 0))
						{
							ped::set_ped_into_vehicle(iLocal_103, iLocal_111, 0);
						}
					}
				}
				if (vehicle::is_vehicle_driveable(iLocal_111, 0))
				{
					vehicle::set_vehicle_forward_speed(iLocal_111, 10f);
					vehicle::set_vehicle_engine_on(iLocal_111, true, 1, 0);
				}
				cam::set_gameplay_cam_relative_heading(0f);
				cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
				vehicle::set_vehicle_forward_speed(iLocal_111, 10f);
			}
			if (vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				vehicle::set_vehicle_doors_locked(iLocal_111, 1);
			}
			if (!ped::is_ped_injured(iLocal_104))
			{
				ped::set_blocking_of_non_temporary_events(iLocal_104, true);
			}
			break;
		
		case 9:
			if (iLocal_284)
			{
				while (!func_344(1, 1))
				{
					system::wait(0);
				}
				entity::set_entity_coords(player::player_ped_id(), -1623.554f, -1132.136f, 0.8638f, 1, false, 0, 1);
				entity::set_entity_heading(player::player_ped_id(), 107.3556f);
				if (!func_180())
				{
					streaming::_new_load_scene_start_safe(-1624.927f, -1136.749f, 1.045f, 200f, 2);
					system::settimera(0);
					iVar4 = gameplay::get_game_timer();
					while (!streaming::is_new_load_scene_loaded() && (gameplay::get_game_timer() - iVar4) < 10000)
					{
						system::wait(0);
					}
					streaming::new_load_scene_stop();
				}
				func_194(&iLocal_103, 15, vLocal_193 + Vector(0f, 1f, 0f), 0f);
				func_194(&iLocal_104, 14, vLocal_193, fLocal_259);
				func_445(3, vLocal_215, fLocal_260);
			}
			break;
		
		case 10:
			break;
	}
	if (iLocal_70 == 7)
	{
	}
	if (func_180())
	{
		switch (iLocal_70)
		{
			case 1:
			case 2:
			case 4:
			case 6:
				func_440(0, -1, 1);
				break;
			
			case 5:
				func_440(0, -1, 1);
				break;
			
			case 7:
				func_440(iLocal_111, -1, 1);
				break;
			
			case 8:
			case 9:
				func_440(iLocal_111, -1, 1);
				break;
		}
	}
	if (entity::does_entity_exist(iLocal_104))
	{
		if (!ped::is_ped_injured(iLocal_104))
		{
			if (!entity::does_entity_exist(Local_676[1 /*10*/]))
			{
				func_141(&Local_676, 1, iLocal_104, "JIMMY", 0, 1);
			}
		}
	}
	else if (entity::does_entity_exist(Local_676[1 /*10*/]))
	{
		func_244(&Local_676, 1);
	}
	if (entity::does_entity_exist(iLocal_103))
	{
		if (!ped::is_ped_injured(iLocal_103))
		{
			if (Local_676[2 /*10*/] == 0)
			{
				func_141(&Local_676, 2, iLocal_103, "TRACEY", 0, 1);
			}
		}
	}
	else if (Local_676[2 /*10*/] != 0)
	{
		func_244(&Local_676, 2);
	}
	if (iLocal_70 != 9)
	{
		player::set_player_control(player::player_id(), true, 0);
	}
	ui::clear_prints();
	if (iLocal_284 && iLocal_70 != 7)
	{
		ped::clear_ped_wetness(player::player_ped_id());
		cam::set_gameplay_cam_relative_heading(0f);
		cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
	}
	iLocal_283 = 1;
	iLocal_284 = 0;
}

void func_440(int iParam0, int iParam1, int iParam2)//Position - 0x3A11B
{
	if (func_206() && func_180())
	{
		while (Global_91481 != 6)
		{
			system::wait(0);
		}
		gameplay::set_game_paused(false);
		if (entity::does_entity_exist(player::player_ped_id()))
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				ped::clear_ped_wetness(player::player_ped_id());
			}
		}
		if (iParam0 != 0)
		{
			if (!ped::is_ped_injured(player::player_ped_id()))
			{
				if (entity::does_entity_exist(iParam0))
				{
					if (vehicle::is_vehicle_driveable(iParam0, 0))
					{
						if (!ped::is_ped_in_vehicle(player::player_ped_id(), iParam0, 0))
						{
							ped::set_ped_into_vehicle(player::player_ped_id(), iParam0, iParam1);
							cam::set_gameplay_cam_relative_pitch(0f, 1065353216);
							cam::set_gameplay_cam_relative_heading(0f);
							system::wait(0);
						}
					}
				}
			}
		}
		if (iParam2 == 1)
		{
			if (player::is_player_playing(player::player_id()))
			{
				player::set_player_control(player::player_id(), true, 0);
			}
		}
		graphics::_stop_all_screen_effects();
		func_441(0);
	}
}

void func_441(int iParam0)//Position - 0x3A1DF
{
	if (iParam0 == 1)
	{
		gameplay::set_bit(&(Global_91486.f_20), 13);
	}
	else
	{
		gameplay::clear_bit(&(Global_91486.f_20), 13);
	}
}

void func_442(int iParam0)//Position - 0x3A208
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < Local_882)
	{
		if (entity::does_entity_exist(Local_882[iVar0 /*8*/].f_1))
		{
			if (!iParam0)
			{
				entity::set_ped_as_no_longer_needed(&(Local_882[iVar0 /*8*/].f_1));
			}
			else
			{
				ped::delete_ped(&(Local_882[iVar0 /*8*/].f_1));
			}
		}
		if (entity::does_entity_exist(Local_882[iVar0 /*8*/]))
		{
			if (!iParam0)
			{
				entity::set_vehicle_as_no_longer_needed(&(Local_882[iVar0 /*8*/]));
			}
			else
			{
				vehicle::delete_vehicle(&(Local_882[iVar0 /*8*/]));
			}
		}
		vehicle::remove_vehicle_recording(iVar0 + 1, "fam2amb");
		iVar0++;
	}
}

void func_443()//Position - 0x3A290
{
	Local_882[0 /*8*/].f_4 = { -857.0314f, -1415.792f, 1.034999f };
	Local_882[0 /*8*/].f_2 = 0;
	Local_882[1 /*8*/].f_4 = { -1037.352f, -1272.711f, -6.625715f };
	Local_882[1 /*8*/].f_2 = 0;
}

void func_444(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x3A2DC
{
	vector3 vVar0;
	float fVar3;
	
	if (vehicle::is_vehicle_driveable(*iParam2, 0))
	{
		if (!entity::does_entity_exist(*iParam0))
		{
			vVar0 = { entity::get_entity_coords(*iParam2, 1) };
			fVar3 = entity::get_entity_heading(*iParam2);
			if (iParam1 == 15)
			{
				while (!func_95(vVar0, fVar3))
				{
					system::wait(0);
				}
			}
			else
			{
				while (!func_432(vVar0, fVar3))
				{
					system::wait(0);
				}
			}
		}
		else if (!ped::is_ped_injured(*iParam0) && vehicle::is_vehicle_driveable(*iParam2, 0))
		{
			if (!ped::is_ped_in_vehicle(*iParam0, *iParam2, 0))
			{
				ped::set_ped_into_vehicle(*iParam0, *iParam2, iParam3);
			}
		}
	}
}

void func_445(int iParam0, vector3 vParam1, float fParam4)//Position - 0x3A37B
{
	switch (iParam0)
	{
		case 2:
			if (!entity::does_entity_exist(iLocal_114))
			{
				while (!func_318(&iLocal_114, 0, vParam1, fParam4, 1, 0))
				{
					system::wait(0);
				}
				vehicle::_set_vehicle_door_breakable(iLocal_114, 0, false);
				vehicle::_set_vehicle_door_breakable(iLocal_114, 1, false);
				entity::_0x3910051CCECDB00C(iLocal_114, true);
				vehicle::set_vehicle_name_debug(iLocal_114, "Mike's Car");
			}
			else if (vehicle::is_vehicle_driveable(iLocal_114, 0))
			{
				entity::set_entity_coords(iLocal_114, vParam1, 1, false, 0, 1);
				entity::set_entity_heading(iLocal_114, fParam4);
			}
			break;
		
		case 3:
			if (!entity::does_entity_exist(iLocal_111))
			{
				streaming::request_model(joaat("seashark"));
				while (!streaming::has_model_loaded(joaat("seashark")))
				{
					system::wait(0);
				}
				iLocal_111 = vehicle::create_vehicle(joaat("seashark"), vParam1, fParam4, 1, true);
				vehicle::set_vehicle_name_debug(iLocal_111, "Mike's Seashark");
				vehicle::set_vehicle_engine_on(iLocal_111, false, 1, 0);
				vehicle::set_vehicle_colour_combination(iLocal_111, 1);
				audio::set_veh_radio_station(iLocal_111, "OFF");
				func_309(iLocal_111, 205);
			}
			else if (vehicle::is_vehicle_driveable(iLocal_111, 0))
			{
				entity::set_entity_coords(iLocal_111, vParam1, 1, false, 0, 1);
				entity::set_entity_heading(iLocal_111, fParam4);
			}
			break;
		
		case 1:
			if (!entity::does_entity_exist(iLocal_113))
			{
				streaming::request_model(joaat("cruiser"));
				while (!streaming::has_model_loaded(joaat("cruiser")))
				{
					system::wait(0);
				}
				iLocal_113 = vehicle::create_vehicle(joaat("cruiser"), vParam1, fParam4, 1, true);
				vehicle::set_vehicle_is_considered_by_player(iLocal_113, 0);
				vehicle::set_vehicle_name_debug(iLocal_113, "Jimmy's Bike");
				vehicle::set_vehicle_colour_combination(iLocal_113, 0);
			}
			else if (vehicle::is_vehicle_driveable(iLocal_113, 0))
			{
				entity::set_entity_coords(iLocal_113, vParam1, 1, false, 0, 1);
				entity::set_entity_heading(iLocal_113, fParam4);
			}
			break;
		
		case 0:
			if (!entity::does_entity_exist(iLocal_112))
			{
				streaming::request_model(joaat("cruiser"));
				while (!streaming::has_model_loaded(joaat("cruiser")))
				{
					system::wait(0);
				}
				iLocal_112 = vehicle::create_vehicle(joaat("cruiser"), vParam1, fParam4, 1, true);
				vehicle::set_vehicle_name_debug(iLocal_112, "Mike's Bike");
				entity::set_entity_proofs(iLocal_112, false, true, false, false, false, false, 0, false);
				vehicle::set_vehicle_tyres_can_burst(iLocal_112, false);
				vehicle::set_vehicle_colour_combination(iLocal_112, 1);
			}
			else if (vehicle::is_vehicle_driveable(iLocal_112, 0))
			{
				entity::set_entity_coords(iLocal_112, vParam1, 1, false, 0, 1);
				entity::set_entity_heading(iLocal_112, fParam4);
			}
			break;
	}
}

void func_446()//Position - 0x3A59B
{
	int iVar0;
	
	ai::set_scenario_type_enabled("WORLD_VEHICLE_DRIVE_SOLO", true);
	ui::_0x67EEDEA1B9BAFD94();
	if (iLocal_70 != 7)
	{
		streaming::remove_anim_dict("missfam2_tracy_jetski");
	}
	player::set_wanted_level_multiplier(0.6f);
	ped::remove_scenario_blocking_area(iLocal_664, 0);
	ped::remove_scenario_blocking_area(iLocal_665, 0);
	if ((iLocal_70 != 5 && iLocal_70 != 8) || iLocal_284)
	{
		ui::clear_prints();
	}
	gameplay::_0xDC0F817884CDD856(1, true);
	gameplay::_0xDC0F817884CDD856(7, true);
	gameplay::_0xDC0F817884CDD856(2, true);
	gameplay::_0xDC0F817884CDD856(4, true);
	gameplay::_0xDC0F817884CDD856(10, true);
	gameplay::_0xDC0F817884CDD856(9, true);
	gameplay::_0xDC0F817884CDD856(8, true);
	func_494();
	func_493();
	func_491();
	if (iLocal_70 < 6 && entity::does_entity_exist(iLocal_103))
	{
		ped::delete_ped(&iLocal_103);
	}
	if (iLocal_70 == 3 || iLocal_70 == 7)
	{
		player::set_max_wanted_level(0);
	}
	else
	{
		player::set_max_wanted_level(5);
	}
	if (entity::does_entity_exist(iLocal_138))
	{
		object::delete_object(&iLocal_138);
	}
	if (!ped::is_ped_injured(iLocal_104))
	{
		if (ped::is_ped_group_member(iLocal_104, player::get_player_group(player::player_id())))
		{
			ped::remove_ped_from_group(iLocal_104);
		}
	}
	if (!ped::is_ped_injured(iLocal_103))
	{
		if (ped::is_ped_group_member(iLocal_103, player::get_player_group(player::player_id())))
		{
			ped::remove_ped_from_group(iLocal_103);
		}
	}
	if (iLocal_284)
	{
		iVar0 = 0;
		while (iVar0 <= 1)
		{
			if (ui::does_blip_exist(uLocal_129[iVar0]))
			{
				ui::remove_blip(&(uLocal_129[iVar0]));
			}
			if (entity::does_entity_exist(iLocal_126[iVar0]))
			{
				ped::delete_ped(&(iLocal_126[iVar0]));
			}
			if (entity::does_entity_exist(iLocal_123[iVar0]))
			{
				vehicle::delete_vehicle(&(iLocal_123[iVar0]));
			}
			iVar0++;
		}
		func_442(1);
		audio::_0x149AEE66F0CB3A99(0f, 0f);
		if (audio::is_audio_scene_active("FAMILY_2_DRIVE_TO_BEACH"))
		{
			audio::stop_audio_scene("FAMILY_2_DRIVE_TO_BEACH");
		}
		if (audio::is_audio_scene_active("FAMILY_2_BIKE_RACE_JIMMY"))
		{
			audio::stop_audio_scene("FAMILY_2_BIKE_RACE_JIMMY");
		}
		if (audio::is_audio_scene_active("FAMILY_2_DIVE_INTO_WATER"))
		{
			audio::stop_audio_scene("FAMILY_2_DIVE_INTO_WATER");
		}
		if (audio::is_audio_scene_active("FAMILY_2_SWIM_TO_YACHT"))
		{
			audio::stop_audio_scene("FAMILY_2_SWIM_TO_YACHT");
		}
		if (audio::is_audio_scene_active("FAMILY_2_JETSKI_CHASE"))
		{
			audio::stop_audio_scene("FAMILY_2_JETSKI_CHASE");
		}
		if (audio::is_audio_scene_active("FAMILY_2_JETSKI_GO_TO_BEACH"))
		{
			audio::stop_audio_scene("FAMILY_2_JETSKI_GO_TO_BEACH");
		}
		audio::trigger_music_event("FAM2_STOP");
		ui::clear_prints();
		ui::clear_help(1);
		func_153();
		func_101();
		if (cutscene::is_cutscene_active())
		{
			cutscene::stop_cutscene(0);
			cutscene::remove_cutscene();
			while (cutscene::is_cutscene_active())
			{
				system::wait(0);
			}
		}
		if (vehicle::is_vehicle_driveable(iLocal_113, 0))
		{
			if (vehicle::is_playback_going_on_for_vehicle(iLocal_113))
			{
				vehicle::stop_playback_recorded_vehicle(iLocal_113);
			}
		}
		if (iLocal_70 < 4)
		{
			if (entity::does_entity_exist(iLocal_112))
			{
				entity::set_vehicle_as_no_longer_needed(&iLocal_112);
			}
		}
		if (iLocal_70 != 0)
		{
			streaming::end_srl();
		}
		streaming::remove_anim_dict("missfam2ig_3");
		iLocal_908 = 0;
	}
	if (iLocal_70 > 5)
	{
		iLocal_265 = false;
	}
	if (iLocal_70 != 3)
	{
		streaming::remove_anim_dict("veh@bicycle@mountain_f@front@base");
	}
	while (!func_197(iLocal_70))
	{
		system::wait(0);
	}
	if (!ped::is_ped_injured(iLocal_104))
	{
		ped::set_ped_config_flag(iLocal_104, 185, true);
	}
	if (iLocal_70 == 2)
	{
		func_447(1, "stage_hire_bike", 0, 0, 0, 1);
	}
	else if (iLocal_70 == 3)
	{
		func_447(1, "stage_hire_bike", 0, 0, 0, 0);
	}
	else if ((iLocal_70 == 4 || iLocal_70 == 5) || iLocal_70 == 6)
	{
		func_447(2, "stage_go_to_yacht", 0, 0, 0, 1);
	}
	else if (iLocal_70 == 7)
	{
		func_447(3, "stage_speedophile_chase", 0, 0, 0, 1);
	}
	else if (iLocal_70 == 8)
	{
		func_447(4, "stage_drive_to_beach", 1, 0, 0, 1);
		if (gameplay::is_bit_set(iLocal_87, 1))
		{
			func_447(5, "stage_drive_to_beach", 1, 0, 0, 1);
		}
		if (gameplay::is_bit_set(iLocal_87, 2))
		{
			func_447(6, "stage_drive_to_beach", 1, 0, 0, 1);
		}
		if (gameplay::is_bit_set(iLocal_87, 5))
		{
			func_447(7, "stage_drive_to_beach", 1, 0, 0, 1);
		}
		if (gameplay::is_bit_set(iLocal_87, 6))
		{
			func_447(8, "stage_drive_to_beach", 1, 0, 0, 1);
		}
	}
	iLocal_270 = 0;
	iLocal_274 = 0;
	if (iLocal_70 > 3)
	{
		func_101();
		vehicle::remove_vehicle_recording(1, sLocal_267);
		vehicle::remove_vehicle_recording(2, sLocal_267);
	}
}

void func_447(int iParam0, char* sParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0x3A948
{
	int iVar0;
	int iVar1;
	int iVar2;
	char[] cVar3[8];
	int iVar5;
	var uVar6;
	int iVar10;
	
	if (iParam3 == 1)
	{
		if (!gameplay::are_strings_equal("FinaleC2", script::get_this_script_name()))
		{
		}
	}
	iVar0 = 0;
	if (iParam3 == 1)
	{
		if (iParam0 != Global_91523)
		{
			iVar0 = 1;
		}
	}
	else if (iParam0 > Global_91523)
	{
		iVar0 = 1;
	}
	if (iVar0 == 1)
	{
		func_279(1);
		if (iParam0 <= Global_91523)
		{
		}
		iVar1 = func_489(script::get_this_script_name(), 1);
		if (iVar1 != -1 && iVar1 != 94)
		{
			Global_101652.f_8028.f_330[iVar1 /*6*/].f_1 = 0;
			iVar2 = func_487(iVar1);
			cVar3 = { Global_82607[iVar1 /*34*/].f_8 };
			if (iVar1 == 90)
			{
				switch (Global_101652.f_8028.f_99.f_205[7])
				{
					case 1:
						StringConCat(&cVar3, "A", 8);
						break;
					
					case 2:
						StringConCat(&cVar3, "B", 8);
						break;
					}
			}
			stats::playstats_mission_checkpoint(&cVar3, iVar2, Global_91523, iParam0);
		}
		else
		{
			iVar5 = func_482(script::get_this_script_name(), 1);
			if (iVar5 != -1)
			{
				Global_101652.f_17517[iVar5 /*6*/].f_4 = 0;
				MemCopy(&uVar6, {func_481(iVar5)}, 4);
				stats::playstats_mission_checkpoint(&uVar6, 0, Global_91523, iParam0);
			}
			else
			{
				iVar10 = func_480(&(Global_91486.f_3));
				if (iVar10 > -1)
				{
					Global_101652.f_23929.f_4[iVar10] = 0;
				}
			}
		}
		Global_85997 = iParam2;
		Global_91523 = iParam0;
		func_448(iParam0, sParam1, iParam4, iParam5);
		if (gameplay::are_strings_equal(sParam1, ""))
		{
		}
	}
	else if (iParam0 < Global_91523)
	{
	}
}

void func_448(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x3AABD
{
	func_449(&Global_95993, script::get_this_script_name(), iParam0, uParam1, iParam3, iParam2);
}

void func_449(var uParam0, char* sParam1, var uParam2, var uParam3, int iParam4, int iParam5)//Position - 0x3AAD9
{
	int iVar0;
	int iVar1;
	
	*uParam0 = func_135();
	uParam0->f_1 = func_404();
	gameplay::_get_weather_type_transition(&(uParam0->f_6), &(uParam0->f_7), &(uParam0->f_8));
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		func_466(&(uParam0->f_2305), 0);
		func_465(player::player_ped_id());
		func_459(player::player_ped_id(), 0);
		weapon::get_current_ped_weapon(player::player_ped_id(), &(uParam0->f_2), 1);
		if (uParam0->f_2 == 0 || uParam0->f_2 == joaat("object"))
		{
			uParam0->f_2 = joaat("weapon_unarmed");
		}
	}
	iVar1 = 0;
	while (iVar1 < 3)
	{
		uParam0->f_17[iVar1] = Global_101652.f_2079.f_539.f_294[iVar1];
		if (iVar1 == func_458())
		{
			func_87(player::player_ped_id(), &(uParam0->f_616[iVar1 /*65*/]), 1);
		}
		else
		{
			iVar0 = 0;
			while (iVar0 < 12)
			{
				uParam0->f_616[iVar1 /*65*/][iVar0] = Global_91276[iVar1 /*65*/][iVar0];
				uParam0->f_616[iVar1 /*65*/].f_13[iVar0] = Global_91276[iVar1 /*65*/].f_13[iVar0];
				iVar0++;
			}
			uParam0->f_616[iVar1 /*65*/].f_59 = Global_91276[iVar1 /*65*/].f_59;
			uParam0->f_616[iVar1 /*65*/].f_60 = Global_91276[iVar1 /*65*/].f_60;
			uParam0->f_616[iVar1 /*65*/].f_61 = Global_91276[iVar1 /*65*/].f_61;
			uParam0->f_616[iVar1 /*65*/].f_62 = Global_91276[iVar1 /*65*/].f_62;
			uParam0->f_616[iVar1 /*65*/].f_63 = Global_91276[iVar1 /*65*/].f_63;
			uParam0->f_616[iVar1 /*65*/].f_64 = Global_91276[iVar1 /*65*/].f_64;
			iVar0 = 0;
			while (iVar0 < 9)
			{
				uParam0->f_616[iVar1 /*65*/].f_39[iVar0] = Global_91276[iVar1 /*65*/].f_39[iVar0];
				uParam0->f_616[iVar1 /*65*/].f_49[iVar0] = Global_91276[iVar1 /*65*/].f_49[iVar0];
				iVar0++;
			}
		}
		iVar0 = 0;
		while (iVar0 < 44)
		{
			uParam0->f_812[iVar1 /*284*/][iVar0 /*3*/] = { Global_101652.f_2079.f_539.f_298[iVar1 /*284*/][iVar0 /*3*/] };
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 < 50)
		{
			uParam0->f_812[iVar1 /*284*/].f_133[iVar0 /*3*/] = { Global_101652.f_2079.f_539.f_298[iVar1 /*284*/].f_133[iVar0 /*3*/] };
			iVar0++;
		}
		switch (iVar1)
		{
			case 0:
				stats::stat_get_int(joaat("sp0_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp0_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp0_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp0_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
			
			case 1:
				stats::stat_get_int(joaat("sp1_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp1_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp1_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp1_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
			
			case 2:
				stats::stat_get_int(joaat("sp2_weap_purch_0"), &(uParam0->f_1665[iVar1 /*32*/][0]), -1);
				stats::stat_get_int(joaat("sp2_weap_purch_1"), &(uParam0->f_1665[iVar1 /*32*/][1]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_5[0]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_5[1]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_5[2]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_5[3]), -1);
				stats::stat_get_int(joaat("sp2_weap_addon_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_5[4]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_0"), &(uParam0->f_1665[iVar1 /*32*/].f_16[0]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_1"), &(uParam0->f_1665[iVar1 /*32*/].f_16[1]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_2"), &(uParam0->f_1665[iVar1 /*32*/].f_16[2]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_3"), &(uParam0->f_1665[iVar1 /*32*/].f_16[3]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_4"), &(uParam0->f_1665[iVar1 /*32*/].f_16[4]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_5"), &(uParam0->f_1665[iVar1 /*32*/].f_16[5]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_6"), &(uParam0->f_1665[iVar1 /*32*/].f_16[6]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_7"), &(uParam0->f_1665[iVar1 /*32*/].f_16[7]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_8"), &(uParam0->f_1665[iVar1 /*32*/].f_16[8]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_9"), &(uParam0->f_1665[iVar1 /*32*/].f_16[9]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_10"), &(uParam0->f_1665[iVar1 /*32*/].f_16[10]), -1);
				stats::stat_get_int(joaat("sp2_weap_tint_purch_11"), &(uParam0->f_1665[iVar1 /*32*/].f_16[11]), -1);
				break;
		}
		uParam0->f_9[iVar1] = Global_101652.f_19507.f_233[iVar1 /*69*/].f_1;
		uParam0->f_13[iVar1] = Global_52992[iVar1];
		uParam0->f_25[0 /*295*/][iVar1 /*98*/] = { Global_101652.f_2079.f_539.f_1635[0 /*295*/][iVar1 /*98*/] };
		uParam0->f_25[1 /*295*/][iVar1 /*98*/] = { Global_101652.f_2079.f_539.f_1635[1 /*295*/][iVar1 /*98*/] };
		iVar0 = 0;
		while (iVar0 <= 3)
		{
			uParam0->f_2259[iVar1 /*15*/][iVar0] = Global_101652.f_2079.f_493[iVar1 /*15*/][iVar0];
			uParam0->f_2259[iVar1 /*15*/].f_5[iVar0] = Global_101652.f_2079.f_493[iVar1 /*15*/].f_5[iVar0];
			uParam0->f_2259[iVar1 /*15*/].f_10[iVar0] = Global_101652.f_2079.f_493[iVar1 /*15*/].f_10[iVar0];
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= 2)
		{
			uParam0->f_1766[iVar1 /*164*/][iVar0] = Global_101652.f_2079[iVar1 /*164*/][iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_4[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_4[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_8[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_8[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_12[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_12[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_16[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_16[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_20[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_20[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_24[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_24[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_28[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_28[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_32[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_32[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_36[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_36[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_40[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_40[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_44[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_44[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_48[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_48[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_52[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_52[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_56[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_56[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_60[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_60[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_64[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_64[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_68[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_68[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_72[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_72[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_76[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_76[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_80[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_80[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_84[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_84[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_88[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_88[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_92[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_92[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_96[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_96[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_100[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_100[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_104[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_104[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_108[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_108[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_112[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_112[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_116[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_116[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_120[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_120[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_124[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_124[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_128[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_128[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_132[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_132[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_136[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_136[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_140[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_140[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_144[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_144[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_148[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_148[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_152[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_152[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_156[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_156[iVar0];
			uParam0->f_1766[iVar1 /*164*/].f_160[iVar0] = Global_101652.f_2079[iVar1 /*164*/].f_160[iVar0];
			iVar0++;
		}
		iVar1++;
	}
	stats::stat_get_int(joaat("sp0_special_ability"), &(uParam0->f_1762[0]), -1);
	stats::stat_get_int(joaat("sp1_special_ability"), &(uParam0->f_1762[1]), -1);
	stats::stat_get_int(joaat("sp2_special_ability"), &(uParam0->f_1762[2]), -1);
	uParam0->f_5 = 145;
	if (iParam4 == 1)
	{
		func_451(&(uParam0->f_2311), uParam0, iParam5, 1, 1, 0);
	}
	func_450(&(uParam0->f_2401));
	uParam3 = uParam3;
	uParam2 = uParam2;
}

bool func_450(var uParam0)//Position - 0x3B961
{
	*uParam0 = Global_87668;
	uParam0->f_1 = Global_87669;
	uParam0->f_2 = 0;
	uParam0->f_3 = 0;
	return true;
}

void func_451(var uParam0, var uParam1, int iParam2, int iParam3, int iParam4, int iParam5)//Position - 0x3B983
{
	int iVar0;
	
	if (iParam2 == 0)
	{
		iParam2 = player::player_ped_id();
	}
	if (entity::does_entity_exist(iParam2))
	{
		uParam1->f_5 = func_92(iParam2);
	}
	if (func_457(iParam2, &iVar0, iParam3, iParam5))
	{
		func_452(uParam0, uParam1, iVar0, iParam4);
	}
	else if (entity::does_entity_exist(iVar0))
	{
		if (!entity::is_entity_dead(iVar0, 0))
		{
			if (vehicle::is_vehicle_model(iVar0, joaat("skylift")) && ped::is_ped_in_vehicle(player::player_ped_id(), iVar0, 0))
			{
				func_452(uParam0, uParam1, iVar0, iParam4);
			}
		}
	}
}

bool func_452(var uParam0, var uParam1, int iParam2, int iParam3)//Position - 0x3BA0B
{
	if (vehicle::is_vehicle_driveable(iParam2, 0))
	{
		func_454(uParam0, iParam2, iParam3);
		uParam1->f_4 = iParam2;
		if (func_453(iParam2))
		{
			uParam1->f_3 = 1;
		}
		else
		{
			uParam1->f_3 = 0;
		}
		return true;
	}
	return false;
}

bool func_453(int iParam0)//Position - 0x3BA4B
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 <= 6)
	{
		if (Global_91486.f_22[iVar0] == iParam0)
		{
			return true;
		}
		iVar0++;
	}
	return false;
}

void func_454(var uParam0, int iParam1, int iParam2)//Position - 0x3BA79
{
	func_108(iParam1, &(uParam0->f_12));
	uParam0->f_7 = func_456(iParam1, 145, 0);
	uParam0->f_11 = func_420(iParam1);
	if (!uParam0->f_7)
	{
		if (!uParam0->f_10)
		{
			uParam0->f_10 = func_455(iParam1);
		}
	}
	if (iParam2 == 1)
	{
		*uParam0 = { entity::get_entity_coords(iParam1, 1) };
		uParam0->f_6 = entity::get_entity_heading(iParam1);
		uParam0->f_3 = { entity::get_entity_velocity(iParam1) };
		if (entity::is_entity_in_angled_area(iParam1, -1154.326f, -1523.871f, 3.262189f, -1158.453f, -1517.75f, 6.374244f, 13f, 0, true, 0))
		{
			*uParam0 = { -1160.095f, -1515.407f, 3.1496f };
			uParam0->f_6 = 305.6424f;
		}
		if (Global_69431 == iParam1)
		{
			uParam0->f_9 = 1;
		}
	}
	if (ped::is_ped_in_any_vehicle(player::player_ped_id(), 0))
	{
		uParam0->f_8 = 1;
	}
	else
	{
		uParam0->f_8 = 0;
	}
}

bool func_455(int iParam0)//Position - 0x3BB55
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if (entity::does_entity_exist(Global_68526.f_484[iVar0]))
		{
			if (iParam0 == Global_68526.f_484[iVar0])
			{
				return true;
			}
		}
		iVar0++;
	}
	return false;
}

bool func_456(int iParam0, int iParam1, int iParam2)//Position - 0x3BB97
{
	int iVar0;
	
	if (!entity::does_entity_exist(iParam0))
	{
		return false;
	}
	if (!vehicle::is_vehicle_driveable(iParam0, 0))
	{
		return false;
	}
	iVar0 = 0;
	while (iVar0 < 9)
	{
		if (entity::does_entity_exist(Global_89150[iVar0]))
		{
			if (Global_89150[iVar0] == iParam0)
			{
				if (iParam1 == 145 || iParam1 == Global_89160[iVar0])
				{
					if (iParam2 == 0 || entity::get_entity_model(iParam0) == func_335(iParam1, iParam2))
					{
						return true;
					}
				}
			}
		}
		iVar0++;
	}
	return false;
}

bool func_457(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x3BC25
{
	char* sVar0;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (!ped::is_ped_injured(iParam0))
		{
			if (iParam0 == player::player_ped_id())
			{
				*uParam1 = player::get_players_last_vehicle();
			}
			else
			{
				*uParam1 = ped::get_vehicle_ped_is_in(iParam0, 1);
			}
			if (entity::does_entity_exist(*uParam1))
			{
				if (vehicle::is_vehicle_driveable(*uParam1, 0))
				{
					if (iParam2 == 0 || gameplay::get_distance_between_coords(entity::get_entity_coords(*uParam1, 1), entity::get_entity_coords(iParam0, 1), 1) < 100f)
					{
						if (vehicle::is_vehicle_model(*uParam1, joaat("taxi")))
						{
							if (vehicle::get_ped_in_vehicle_seat(*uParam1, -1, 0) != iParam0 && vehicle::get_ped_in_vehicle_seat(*uParam1, -1, 0) != 0)
							{
								return false;
							}
						}
						if (func_422(*uParam1, func_135(), 1))
						{
							sVar0 = script::get_this_script_name();
							if (!gameplay::are_strings_equal(sVar0, "save_anywhere"))
							{
								return false;
							}
							else if (!ped::is_ped_in_any_vehicle(iParam0, 1))
							{
								return false;
							}
						}
						if (iParam3 == 1)
						{
							if (decorator::decor_exist_on(*uParam1, "IgnoredByQuickSave"))
							{
								if (decorator::decor_get_bool(*uParam1, "IgnoredByQuickSave"))
								{
									return false;
								}
							}
						}
						else if (vehicle::is_vehicle_model(*uParam1, joaat("blimp")))
						{
							return false;
						}
						return true;
					}
				}
			}
		}
	}
	return false;
}

var func_458()//Position - 0x3BD54
{
	func_136();
	return Global_101652.f_2079.f_539.f_3549;
}

void func_459(int iParam0, int iParam1)//Position - 0x3BD6D
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	iVar0 = func_92(iParam0);
	if (func_89(iVar0) && !ped::is_ped_injured(iParam0))
	{
		if (iParam0 == player::player_ped_id())
		{
			func_460(iParam0, &(Global_101652.f_2079.f_539.f_298[iVar0 /*284*/]));
			iVar2 = 0;
			while (iVar2 <= (8 - 1))
			{
				Global_101652.f_2079.f_539.f_1151[iVar2 /*4*/][iVar0] = ui::_0xA13E93403F26C812(iVar2);
				if (iParam1)
				{
					iVar1 = ui::_0xA48931185F0536FE();
					if (Global_101652.f_2079.f_539.f_1151[iVar2 /*4*/][iVar0] == iVar1)
					{
						Global_101652.f_2079.f_539.f_1184 = iVar2;
					}
				}
				iVar2++;
			}
			player::get_player_parachute_pack_tint_index(player::player_id(), &iVar3);
			if (iVar0 == 0)
			{
				stats::stat_set_int(joaat("sp0_parachute_current_tint"), iVar3, 1);
			}
			else if (iVar0 == 1)
			{
				stats::stat_set_int(joaat("sp1_parachute_current_tint"), iVar3, 1);
			}
			else if (iVar0 == 2)
			{
				stats::stat_set_int(joaat("sp2_parachute_current_tint"), iVar3, 1);
			}
		}
	}
}

void func_460(int iParam0, var uParam1)//Position - 0x3BE60
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	vector3 vVar4;
	int iVar7;
	int iVar8;
	struct<2> Var9;
	struct<4> Var48;
	int iVar70;
	
	if (!ped::is_ped_injured(iParam0))
	{
		iVar0 = 0;
		while (iVar0 <= (44 - 1))
		{
			(uParam1[iVar0 /*3*/])->f_1 = 0;
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= (44 - 1))
		{
			iVar3 = func_464(iVar0);
			if (iVar3 != 0)
			{
				vVar4.x = weapon::get_ped_weapontype_in_slot(iParam0, func_464(iVar0));
				vVar4.y = 0;
				vVar4.z = 0;
				if (vVar4.x != 0 && vVar4.x != joaat("weapon_unarmed"))
				{
					vVar4.y = weapon::get_ammo_in_ped_weapon(iParam0, vVar4.x);
					if (vVar4.x == joaat("gadget_parachute"))
					{
						vVar4.y = 1;
					}
					gameplay::set_bit(&(vVar4.f_2), (20 + weapon::get_ped_weapon_tint_index(iParam0, vVar4.x)));
					if (vVar4.y == -1)
					{
						if (!weapon::get_max_ammo(iParam0, vVar4.x, &(vVar4.f_1)))
						{
							vVar4.y = 0;
						}
					}
					(uParam1[iVar0 /*3*/])->f_1 = vVar4.y;
					iVar1 = 0;
					iVar2 = func_462(vVar4.x, iVar1);
					while (iVar2 != 0)
					{
						if (weapon::has_ped_got_weapon_component(iParam0, vVar4.x, iVar2))
						{
							gameplay::set_bit(&(vVar4.f_2), iVar1);
						}
						iVar1++;
						iVar2 = func_462(vVar4.x, iVar1);
					}
				}
				*(uParam1[iVar0 /*3*/]) = { vVar4 };
			}
			iVar0++;
		}
		iVar0 = 0;
		while (iVar0 <= (50 - 1))
		{
			uParam1->f_133[iVar0 /*3*/].f_1 = 0;
			iVar0++;
		}
		iVar8 = dlc1::get_num_dlc_weapons();
		iVar7 = 0;
		while (iVar7 < iVar8)
		{
			if ((dlc1::get_dlc_weapon_data(iVar7, &Var9) && !func_461(Var9.f_1)) && iVar70 < 50)
			{
				if (!dlc1::_is_dlc_data_empty(Var9))
				{
					vVar4.x = Var9.f_1;
					vVar4.y = 0;
					vVar4.z = 0;
					vVar4.y = weapon::get_ammo_in_ped_weapon(iParam0, vVar4.x);
					if (weapon::has_ped_got_weapon(iParam0, vVar4.x, 0))
					{
						gameplay::set_bit(&(vVar4.f_2), (20 + weapon::get_ped_weapon_tint_index(iParam0, vVar4.x)));
					}
					else
					{
						gameplay::set_bit(&(vVar4.f_2), 20);
					}
					if (vVar4.y == -1)
					{
						if (!weapon::get_max_ammo(iParam0, vVar4.x, &(vVar4.f_1)))
						{
							vVar4.y = 0;
						}
					}
					uParam1->f_133[iVar70 /*3*/].f_1 = vVar4.y;
					iVar1 = 0;
					while (iVar1 < dlc1::get_num_dlc_weapon_components(iVar7))
					{
						if (dlc1::get_dlc_weapon_component_data(iVar7, iVar1, &Var48))
						{
							if (weapon::has_ped_got_weapon_component(iParam0, vVar4.x, Var48.f_3))
							{
								gameplay::set_bit(&(vVar4.f_2), iVar1);
							}
						}
						iVar1++;
					}
				}
				if (vVar4.x != 0)
				{
					if (!weapon::has_ped_got_weapon(iParam0, vVar4.x, 0))
					{
						vVar4.x = 0;
						vVar4.y = 0;
					}
				}
				uParam1->f_133[iVar70 /*3*/] = { vVar4 };
				iVar70++;
			}
			iVar7++;
		}
	}
}

bool func_461(int iParam0)//Position - 0x3C0C6
{
	if (network::network_is_game_in_progress())
	{
	}
	else
	{
		switch (iParam0)
		{
			case joaat("weapon_pistol50"):
			case joaat("weapon_bullpupshotgun"):
			case joaat("weapon_assaultsmg"):
				return false;
				break;
			
			case joaat("weapon_bottle"):
			case joaat("weapon_snspistol"):
			case joaat("weapon_gusenberg"):
				return false;
				break;
			
			case joaat("weapon_heavypistol"):
			case joaat("weapon_specialcarbine"):
				return false;
				break;
			
			case joaat("weapon_bullpuprifle"):
				return false;
				break;
			
			case joaat("weapon_dagger"):
			case joaat("weapon_vintagepistol"):
				return false;
				break;
			
			case joaat("weapon_firework"):
			case joaat("weapon_musket"):
				return false;
				break;
			
			case joaat("weapon_heavyshotgun"):
			case joaat("weapon_marksmanrifle"):
				return false;
				break;
			
			case joaat("weapon_hominglauncher"):
			case joaat("weapon_proxmine"):
				return false;
				break;
			
			case joaat("weapon_combatpdw"):
			case joaat("weapon_knuckle"):
			case joaat("weapon_marksmanpistol"):
				return false;
				break;
			
			case -947031628:
			case -572349828:
			case 392730790:
			case -1523701417:
			case -2112826155:
			case -664359727:
			case -1887867191:
			case -837150131:
			case -344484024:
			case joaat("weapon_flaregun"):
			case joaat("weapon_handcuffs"):
			case joaat("weapon_snowball"):
			case joaat("weapon_garbagebag"):
			case joaat("weapon_flashlight"):
			case joaat("weapon_switchblade"):
			case joaat("weapon_revolver"):
			case joaat("weapon_dbshotgun"):
			case joaat("weapon_compactrifle"):
			case 317205821:
			case -1121678507:
			case 125959754:
			case -853065399:
			case -1169823560:
			case -1810795771:
			case 419712736:
				return true;
				break;
			}
	}
	return false;
}

int func_462(int iParam0, int iParam1)//Position - 0x3C234
{
	int iVar0;
	int iVar1;
	var uVar2;
	struct<4> Var41;
	
	iVar0 = 0;
	switch (iParam0)
	{
		case joaat("weapon_pistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_pistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_pistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_pistol_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_combatpistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatpistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatpistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 4:
					iVar0 = joaat("component_combatpistol_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_appistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_appistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_appistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 4:
					iVar0 = joaat("component_appistol_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_microsmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_microsmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_microsmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 5:
					iVar0 = joaat("component_microsmg_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_smg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_smg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_smg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_smg_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_pi_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_at_scope_macro_02");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 7:
					iVar0 = joaat("component_smg_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_assaultrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultrifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_assaultrifle_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 5:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 7:
					iVar0 = joaat("component_assaultrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_carbinerifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_carbinerifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_carbinerifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_carbinerifle_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_railcover_01");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 6:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 7:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 8:
					iVar0 = joaat("component_carbinerifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_advancedrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_advancedrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_advancedrifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_advancedrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_mg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_mg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_mg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_small_02");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 4:
					iVar0 = joaat("component_mg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_combatmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 4:
					iVar0 = joaat("component_combatmg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_pumpshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_sr_supp");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_pumpshotgun_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_assaultshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultshotgun_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultshotgun_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
			}
			break;
		
		case joaat("weapon_sniperrifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_sniperrifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_at_scope_large");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_max");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_sniperrifle_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_heavysniper"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_heavysniper_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_at_scope_large");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_max");
					break;
			}
			break;
		
		case joaat("weapon_grenadelauncher"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_at_scope_small");
					break;
			}
			break;
		
		case joaat("weapon_minigun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_minigun_clip_01");
					break;
			}
			break;
		
		case joaat("weapon_assaultsmg"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_assaultsmg_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_assaultsmg_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_macro");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 5:
					iVar0 = joaat("component_assaultsmg_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_bullpupshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 1:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
			}
			break;
		
		case joaat("weapon_pistol50"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_pistol50_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_pistol50_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_pi_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 4:
					iVar0 = joaat("component_pistol50_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_combatpdw"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_combatpdw_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_combatpdw_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_combatpdw_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
			}
			break;
		
		case joaat("weapon_sawnoffshotgun"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_sawnoffshotgun_varmod_luxe");
					break;
			}
			break;
		
		case joaat("weapon_bullpuprifle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_bullpuprifle_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_bullpuprifle_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 3:
					iVar0 = joaat("component_at_scope_small");
					break;
				
				case 4:
					iVar0 = joaat("component_at_ar_supp");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 6:
					iVar0 = joaat("component_bullpuprifle_varmod_low");
					break;
			}
			break;
		
		case joaat("weapon_snspistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_snspistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_snspistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_snspistol_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_specialcarbine"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_specialcarbine_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_specialcarbine_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_specialcarbine_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_ar_flsh");
					break;
				
				case 4:
					iVar0 = joaat("component_at_scope_medium");
					break;
				
				case 5:
					iVar0 = joaat("component_at_ar_supp_02");
					break;
				
				case 6:
					iVar0 = joaat("component_at_ar_afgrip");
					break;
				
				case 7:
					iVar0 = joaat("component_specialcarbine_varmod_lowrider");
					break;
			}
			break;
		
		case joaat("weapon_knuckle"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_knuckle_varmod_pimp");
					break;
				
				case 1:
					iVar0 = joaat("component_knuckle_varmod_ballas");
					break;
				
				case 2:
					iVar0 = joaat("component_knuckle_varmod_dollar");
					break;
				
				case 3:
					iVar0 = joaat("component_knuckle_varmod_diamond");
					break;
				
				case 4:
					iVar0 = joaat("component_knuckle_varmod_hate");
					break;
				
				case 5:
					iVar0 = joaat("component_knuckle_varmod_love");
					break;
				
				case 6:
					iVar0 = joaat("component_knuckle_varmod_player");
					break;
				
				case 7:
					iVar0 = joaat("component_knuckle_varmod_king");
					break;
				
				case 8:
					iVar0 = joaat("component_knuckle_varmod_vagos");
					break;
			}
			break;
		
		case joaat("weapon_machinepistol"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_machinepistol_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_machinepistol_clip_02");
					break;
				
				case 2:
					iVar0 = joaat("component_machinepistol_clip_03");
					break;
				
				case 3:
					iVar0 = joaat("component_at_pi_supp");
					break;
			}
			break;
		
		case joaat("weapon_switchblade"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_switchblade_varmod_var1");
					break;
				
				case 1:
					iVar0 = joaat("component_switchblade_varmod_var2");
					break;
			}
			break;
		
		case joaat("weapon_revolver"):
			switch (iParam1)
			{
				case 0:
					iVar0 = joaat("component_revolver_clip_01");
					break;
				
				case 1:
					iVar0 = joaat("component_revolver_varmod_boss");
					break;
				
				case 2:
					iVar0 = joaat("component_revolver_varmod_goon");
					break;
			}
			break;
		
		case -1121678507:
			switch (iParam1)
			{
				case 0:
					iVar0 = -2067221805;
					break;
				
				case 1:
					iVar0 = -1820405577;
					break;
			}
			break;
		
		default:
			if (iParam0 != 0)
			{
				iVar1 = func_463(iParam0, &uVar2);
				if (iVar1 != -1)
				{
					if (iParam1 < dlc1::get_num_dlc_weapon_components(iVar1))
					{
						if (dlc1::get_dlc_weapon_component_data(iVar1, iParam1, &Var41))
						{
							return Var41.f_3;
						}
					}
				}
			}
			break;
	}
	return iVar0;
}

int func_463(int iParam0, var uParam1)//Position - 0x3CD20
{
	int iVar0;
	int iVar1;
	
	iVar1 = dlc1::get_num_dlc_weapons();
	iVar0 = 0;
	while (iVar0 < iVar1)
	{
		if (dlc1::get_dlc_weapon_data(iVar0, uParam1))
		{
			if (uParam1->f_1 == iParam0)
			{
				return iVar0;
			}
		}
		iVar0++;
	}
	return -1;
}

int func_464(int iParam0)//Position - 0x3CD5B
{
	int iVar0;
	
	iVar0 = 0;
	switch (iParam0)
	{
		case 0:
			iVar0 = 1993361168;
			break;
		
		case 1:
			iVar0 = 1277010230;
			break;
		
		case 2:
			iVar0 = 932043479;
			break;
		
		case 3:
			iVar0 = -690654591;
			break;
		
		case 4:
			iVar0 = -1459198205;
			break;
		
		case 5:
			iVar0 = 195782970;
			break;
		
		case 6:
			iVar0 = -438797331;
			break;
		
		case 7:
			iVar0 = 896793492;
			break;
		
		case 8:
			iVar0 = 495159329;
			break;
		
		case 9:
			iVar0 = -1155528315;
			break;
		
		case 10:
			iVar0 = -515636489;
			break;
		
		case 11:
			iVar0 = -871913299;
			break;
		
		case 12:
			iVar0 = -1352759032;
			break;
		
		case 13:
			iVar0 = -542958961;
			break;
		
		case 14:
			iVar0 = 1682645887;
			break;
		
		case 15:
			iVar0 = -859470162;
			break;
		
		case 16:
			iVar0 = -2125426402;
			break;
		
		case 17:
			iVar0 = 2067210266;
			break;
		
		case 18:
			iVar0 = -538172856;
			break;
		
		case 19:
			iVar0 = 1783244476;
			break;
		
		case 20:
			iVar0 = 439844898;
			break;
		
		case 21:
			iVar0 = -24829327;
			break;
		
		case 22:
			iVar0 = 1949306232;
			break;
		
		case 23:
			iVar0 = -1941230881;
			break;
		
		case 24:
			iVar0 = -1033554448;
			break;
		
		case 25:
			iVar0 = 320513715;
			break;
		
		case 26:
			iVar0 = -695165975;
			break;
		
		case 27:
			iVar0 = -281028447;
			break;
		
		case 28:
			iVar0 = -686713772;
			break;
		
		case 29:
			iVar0 = 347509793;
			break;
		
		case 30:
			iVar0 = 1769089473;
			break;
		
		case 31:
			iVar0 = 189935548;
			break;
		
		case 33:
			iVar0 = 248801358;
			break;
		
		case 34:
			iVar0 = 386596758;
			break;
		
		case 35:
			iVar0 = -157212362;
			break;
		
		case 36:
			iVar0 = 436985596;
			break;
		
		case 37:
			iVar0 = -47957369;
			break;
		
		case 38:
			iVar0 = 575938238;
			break;
	}
	return iVar0;
}

void func_465(int iParam0)//Position - 0x3CFCF
{
	int iVar0;
	
	iVar0 = func_92(iParam0);
	if (func_89(iVar0) && !ped::is_ped_injured(iParam0))
	{
		Global_101652.f_2079.f_539.f_294[iVar0] = ped::get_ped_armour(iParam0);
	}
}

void func_466(var uParam0, int iParam1)//Position - 0x3D00B
{
	int iVar0;
	vector3 vVar1;
	var uVar4;
	int iVar5;
	
	*uParam0 = { entity::get_entity_coords(player::player_ped_id(), 1) };
	uParam0->f_3 = entity::get_entity_heading(player::player_ped_id());
	uParam0->f_5 = ped::get_ped_parachute_state(player::player_ped_id());
	if (player::is_player_playing(player::player_id()))
	{
		uParam0->f_4 = player::get_player_wanted_level(player::player_id());
	}
	if (system::vdist(*uParam0, 320.9934f, 265.2515f, 82.1221f) < 10f)
	{
		*uParam0 = { 301.2162f, 202.1357f, 103.3797f };
		uParam0->f_3 = 156.5144f;
	}
	else if (system::vdist(*uParam0, 377.153f, -717.567f, 10.0536f) < 10f)
	{
		*uParam0 = { 394.2567f, -713.5439f, 28.2853f };
		uParam0->f_3 = 276.6273f;
	}
	else if (system::vdist(*uParam0, -1425.564f, -244.3f, 15.8053f) < 10f)
	{
		*uParam0 = { -1423.472f, -214.2539f, 45.5004f };
		uParam0->f_3 = 353.8757f;
	}
	else if (script::_get_number_of_instances_of_streamed_script(joaat("finale_choice")) > 0)
	{
		*uParam0 = { 4.2587f, 525.0214f, 173.6281f };
		uParam0->f_3 = 203.6746f;
	}
	else if (gameplay::is_bit_set(Global_69945, 4))
	{
		*uParam0 = { 452.0255f, 5571.85f, 780.1859f };
		uParam0->f_3 = 78.9858f;
	}
	else if (gameplay::is_bit_set(Global_69945, 5))
	{
		*uParam0 = { -745.4462f, 5595.146f, 40.6594f };
		uParam0->f_3 = 261.747f;
	}
	else if (gameplay::is_bit_set(Global_69945, 6))
	{
		*uParam0 = { -1675.521f, -1125.59f, 12.091f };
		uParam0->f_3 = 271.8208f;
	}
	else if (gameplay::is_bit_set(Global_69945, 7))
	{
		*uParam0 = { -1631.219f, -1112.805f, 12.0212f };
		uParam0->f_3 = 316.8879f;
	}
	else if (interior::get_interior_from_entity(player::player_ped_id()) == interior::get_interior_at_coords_with_type(1272.659f, -1715.467f, 53.7715f, "v_lesters"))
	{
		*uParam0 = { 1276.956f, -1725.189f, 53.6551f };
		uParam0->f_3 = 204.1703f;
	}
	else if (entity::is_entity_in_angled_area(player::player_ped_id(), -415.4365f, 2068.289f, 113.3002f, -564.9516f, 1884.703f, 134.0403f, 258.75f, 0, true, 0) || entity::is_entity_in_angled_area(player::player_ped_id(), -596.4706f, 2089.921f, 125.4128f, -581.2134f, 2036.256f, 136.2836f, 9.5f, 0, true, 0))
	{
		*uParam0 = { -601.59f, 2099.197f, 128.8928f };
		uParam0->f_3 = 204.7498f;
	}
	else if (system::vdist(*uParam0, -1007.393f, -477.9584f, 52.5357f) < 8f)
	{
		*uParam0 = { -1018.376f, -483.9436f, 36.0964f };
		uParam0->f_3 = 114.7664f;
	}
	else if (system::vdist(*uParam0, 480.6662f, -1317.808f, 28.20303f) < 15f)
	{
		*uParam0 = { 497.7238f, -1310.932f, 28.2372f };
		uParam0->f_3 = 289.3663f;
	}
	else if (system::vdist(*uParam0, 2329.527f, 2571.311f, 45.6779f) < 5f)
	{
		*uParam0 = { 2316.93f, 2594.153f, 45.7199f };
		uParam0->f_3 = 348.1325f;
	}
	if (iParam1 == 1)
	{
		if (func_469(&iVar0))
		{
			if (func_468(iVar0, &vVar1, &uVar4))
			{
				vVar1.z = (vVar1.y + 1f);
				*uParam0 = { vVar1 };
				uParam0->f_3 = uVar4;
			}
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 207.4336f, -1019.795f, -100.4728f, 189.9338f, -1019.623f, -95.56883f, 17.1875f, 0, true, 0))
		{
			iVar5 = func_135();
			if (iVar5 == 0)
			{
				*uParam0 = { -65.1234f, 81.2517f, 70.5644f };
				uParam0->f_3 = 71.6237f;
			}
			else if (iVar5 == 1)
			{
				*uParam0 = { -68.5531f, -1824.377f, 25.9424f };
				uParam0->f_3 = 215.8295f;
			}
			else if (iVar5 == 2)
			{
				*uParam0 = { -220.8189f, -1162.302f, 22.0242f };
				uParam0->f_3 = 70.2711f;
			}
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 483.7175f, -1326.63f, 28.2135f, 474.9644f, -1307.998f, 34.49498f, 12f, 0, true, 0))
		{
			*uParam0 = { 495.4108f, -1306.08f, 29.2883f };
			uParam0->f_3 = 213.6273f;
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), -1146.77f, -1534.22f, 3.37f, -1158.453f, -1517.75f, 6.374244f, 13f, 0, true, 0))
		{
			*uParam0 = { -1160.095f, -1515.407f, 3.1496f };
			uParam0->f_3 = 305.6424f;
		}
		else if (entity::is_entity_in_angled_area(player::player_ped_id(), 439.5432f, -996.9769f, 24.88307f, 428.2935f, -997.0192f, 28.57458f, 8.5f, 0, true, 0))
		{
			*uParam0 = { 431.8853f, -1013.133f, 28.7907f };
			uParam0->f_3 = 186.6814f;
		}
		else if (func_467(*uParam0, "v_hospital", 307.3065f, -589.9595f, 43.302f))
		{
			*uParam0 = { 279.4137f, -585.8815f, 43.2502f };
			uParam0->f_3 = 48.8028f;
		}
	}
}

bool func_467(vector3 vParam0, char* sParam3, vector3 vParam4)//Position - 0x3D566
{
	int iVar0;
	int iVar1;
	
	if (!interior::_are_coords_colliding_with_exterior(vParam0))
	{
		iVar0 = interior::get_interior_at_coords_with_type(vParam4, sParam3);
		if (!interior::is_valid_interior(iVar0))
		{
			return false;
		}
		iVar1 = interior::get_interior_from_collision(vParam0);
		if (iVar1 == iVar0)
		{
			return true;
		}
	}
	return false;
}

int func_468(int iParam0, var uParam1, var uParam2)//Position - 0x3D5AA
{
	*uParam1 = { 0f, 0f, 0f };
	*uParam2 = 0f;
	switch (iParam0)
	{
		case 0:
			*uParam1 = { -829.842f, -191.7454f, 36.4386f };
			*uParam2 = 29.5061f;
			break;
		
		case 1:
			*uParam1 = { 129.8484f, -1716.528f, 28.0702f };
			*uParam2 = 50.3483f;
			break;
		
		case 2:
			*uParam1 = { -1296.913f, -1120.999f, 5.3951f };
			*uParam2 = 0.9933f;
			break;
		
		case 3:
			*uParam1 = { 1938.028f, 3718.736f, 31.3154f };
			*uParam2 = 118.2305f;
			break;
		
		case 4:
			*uParam1 = { 1197.866f, -469.3809f, 65.0885f };
			*uParam2 = 346.4477f;
			break;
		
		case 5:
			*uParam1 = { -32.2161f, -135.8212f, 56.0532f };
			*uParam2 = 186.0052f;
			break;
		
		case 6:
			*uParam1 = { -287.7696f, 6238.081f, 30.2902f };
			*uParam2 = 316.1349f;
			break;
		
		case 7:
			*uParam1 = { 99.2876f, -1395.16f, 28.2759f };
			*uParam2 = 320.2739f;
			break;
		
		case 8:
			*uParam1 = { 1679.445f, 4819.056f, 41.0035f };
			*uParam2 = 4.6192f;
			break;
		
		case 9:
			*uParam1 = { 411.3063f, -809.1863f, 28.1554f };
			*uParam2 = 1.8972f;
			break;
		
		case 10:
			*uParam1 = { -1088.054f, 2699.167f, 19.2748f };
			*uParam2 = 129.7382f;
			break;
		
		case 11:
			*uParam1 = { 1194.163f, 2695.644f, 36.9225f };
			*uParam2 = 1.1454f;
			break;
		
		case 12:
			*uParam1 = { -821.2829f, -1088.027f, 10.0499f };
			*uParam2 = 120.5883f;
			break;
		
		case 13:
			*uParam1 = { -3.3416f, 6521.303f, 30.2961f };
			*uParam2 = 316.4451f;
			break;
		
		case 14:
			*uParam1 = { -1208.417f, -785.9635f, 16.0139f };
			*uParam2 = 36.3181f;
			break;
		
		case 15:
			*uParam1 = { 623.1845f, 2739.191f, 40.9588f };
			*uParam2 = 3.5411f;
			break;
		
		case 16:
			*uParam1 = { 130.9555f, -198.2084f, 53.41f };
			*uParam2 = 251.3506f;
			break;
		
		case 17:
			*uParam1 = { -3164.065f, 1067.317f, 19.6778f };
			*uParam2 = 101.2229f;
			break;
		
		case 18:
			*uParam1 = { -713.2797f, -174.2767f, 35.8962f };
			*uParam2 = 29.8138f;
			break;
		
		case 19:
			*uParam1 = { -147.0616f, -306.4322f, 37.7912f };
			*uParam2 = 160.4526f;
			break;
		
		case 20:
			*uParam1 = { -1461.355f, -230.6092f, 48.3064f };
			*uParam2 = 318.7851f;
			break;
		
		case 21:
			*uParam1 = { -1347.739f, -1278.573f, 3.8952f };
			*uParam2 = 17.9365f;
			break;
		
		case 22:
			*uParam1 = { 325.6833f, 164.3263f, 102.4425f };
			*uParam2 = 68.6407f;
			break;
		
		case 23:
			*uParam1 = { 1858.774f, 3742.393f, 32.0779f };
			*uParam2 = 301.2329f;
			break;
		
		case 24:
			*uParam1 = { -286.3272f, 6202.802f, 30.3323f };
			*uParam2 = 225.1334f;
			break;
		
		case 25:
			*uParam1 = { -1161.596f, -1417.7f, 3.712f };
			*uParam2 = 246.9161f;
			break;
		
		case 26:
			*uParam1 = { 1308.952f, -1660.611f, 50.2362f };
			*uParam2 = 163.5456f;
			break;
		
		case 27:
			*uParam1 = { -3161.585f, 1074.214f, 19.6847f };
			*uParam2 = 98.6092f;
			break;
		
		case 28:
			*uParam1 = { 28.423f, -1110.814f, 28.2848f };
			*uParam2 = 85.2495f;
			break;
		
		case 29:
			*uParam1 = { 1704.966f, 3749.709f, 33.0188f };
			*uParam2 = 45.6778f;
			break;
		
		case 30:
			*uParam1 = { 223.949f, -38.7894f, 68.6483f };
			*uParam2 = 159.4265f;
			break;
		
		case 31:
			*uParam1 = { 837.7854f, -1017.963f, 26.3045f };
			*uParam2 = 181.0445f;
			break;
		
		case 32:
			*uParam1 = { -313.1914f, 6093.351f, 30.4625f };
			*uParam2 = 315.8405f;
			break;
		
		case 33:
			*uParam1 = { -663.4631f, -952.8069f, 20.3143f };
			*uParam2 = 92.6796f;
			break;
		
		case 34:
			*uParam1 = { -1323.06f, -392.8577f, 35.4596f };
			*uParam2 = 210.7398f;
			break;
		
		case 35:
			*uParam1 = { -1106.102f, 2684.35f, 18.0953f };
			*uParam2 = 127.0383f;
			break;
		
		case 36:
			*uParam1 = { -3157.932f, 1081.309f, 19.6953f };
			*uParam2 = 100.2942f;
			break;
		
		case 37:
			*uParam1 = { 2562.882f, 312.8641f, 107.4612f };
			*uParam2 = 179.205f;
			break;
		
		case 38:
			*uParam1 = { 822.48f, -2142.875f, 27.8496f };
			*uParam2 = 355.0598f;
			break;
		
		case 39:
			*uParam1 = { -1137.053f, -1993.916f, 12.1677f };
			*uParam2 = 43.1213f;
			break;
		
		case 40:
			*uParam1 = { 717.8107f, -1084.081f, 21.3094f };
			*uParam2 = 93.2649f;
			break;
		
		case 41:
			*uParam1 = { -387.6789f, -128.2568f, 37.6796f };
			*uParam2 = 119.1085f;
			break;
		
		case 42:
			*uParam1 = { 117.8835f, 6599.415f, 31.0134f };
			*uParam2 = 90.7225f;
			break;
		
		case 43:
			*uParam1 = { 1201.709f, 2664.813f, 36.8102f };
			*uParam2 = 133.9002f;
			break;
		
		case 44:
			*uParam1 = { -200.1521f, -1297.502f, 30.296f };
			*uParam2 = 269.0687f;
			break;
		
		case 45:
			*uParam1 = { 0f, 0f, 0f };
			*uParam2 = 0f;
			break;
	}
	return !func_105(*uParam1, 0f, 0f, 0f, 0);
}

bool func_469(var uParam0)//Position - 0x3DC39
{
	if (!entity::is_entity_dead(player::player_ped_id(), 0) && !ped::is_ped_injured(player::player_ped_id()))
	{
		if (func_332())
		{
			*uParam0 = func_475(entity::get_entity_coords(player::player_ped_id(), 0), 6, -1, 0, 1, -1);
			if (func_474(*uParam0) && !func_470(*uParam0))
			{
				return true;
			}
		}
	}
	return false;
}

int func_470(int iParam0)//Position - 0x3DC94
{
	return func_471(iParam0, 0, 1);
}

int func_471(int iParam0, int iParam1, int iParam2)//Position - 0x3DCA4
{
	if (iParam2)
	{
		return gameplay::is_bit_set(Global_91538.f_1308[iParam0], iParam1);
	}
	else if (network::network_is_game_in_progress())
	{
		if (func_473() == 0)
		{
			return gameplay::is_bit_set(func_20(func_472(iParam0), -1, 0), iParam1);
		}
	}
	else
	{
		return gameplay::is_bit_set(Global_101652.f_668[iParam0], iParam1);
	}
	return false;
}

int func_472(int iParam0)//Position - 0x3DD04
{
	switch (iParam0)
	{
		case 0:
			return 822;
			break;
		
		case 1:
			return 823;
			break;
		
		case 2:
			return 824;
			break;
		
		case 3:
			return 825;
			break;
		
		case 4:
			return 826;
			break;
		
		case 5:
			return 827;
			break;
		
		case 6:
			return 828;
			break;
		
		case 7:
			return 829;
			break;
		
		case 8:
			return 830;
			break;
		
		case 9:
			return 831;
			break;
		
		case 10:
			return 832;
			break;
		
		case 11:
			return 833;
			break;
		
		case 12:
			return 834;
			break;
		
		case 13:
			return 835;
			break;
		
		case 14:
			return 836;
			break;
		
		case 15:
			return 838;
			break;
		
		case 16:
			return 839;
			break;
		
		case 17:
			return 840;
			break;
		
		case 18:
			return 841;
			break;
		
		case 19:
			return 842;
			break;
		
		case 20:
			return 843;
			break;
		
		case 21:
			return 844;
			break;
		
		case 22:
			return 845;
			break;
		
		case 23:
			return 846;
			break;
		
		case 24:
			return 847;
			break;
		
		case 25:
			return 848;
			break;
		
		case 26:
			return 849;
			break;
		
		case 27:
			return 850;
			break;
		
		case 28:
			return 851;
			break;
		
		case 29:
			return 852;
			break;
		
		case 30:
			return 853;
			break;
		
		case 31:
			return 854;
			break;
		
		case 32:
			return 855;
			break;
		
		case 33:
			return 856;
			break;
		
		case 34:
			return 857;
			break;
		
		case 35:
			return 858;
			break;
		
		case 36:
			return 859;
			break;
		
		case 37:
			return 860;
			break;
		
		case 38:
			return 861;
			break;
		
		case 39:
			return 862;
			break;
		
		case 40:
			return 866;
			break;
		
		case 41:
			return 867;
			break;
		
		case 42:
			return 868;
			break;
		
		case 43:
			return 869;
			break;
		
		case 44:
			return 5847;
			break;
		
		case 45:
			return 3780;
			break;
		
		default:
			break;
	}
	return 6022;
}

var func_473()//Position - 0x3DFCB
{
	return Global_25185;
}

int func_474(int iParam0)//Position - 0x3DFD6
{
	return func_471(iParam0, 5, 1);
}

int func_475(vector3 vParam0, int iParam3, int iParam4, int iParam5, int iParam6, int iParam7)//Position - 0x3DFE6
{
	int iVar0;
	float fVar1;
	float fVar2;
	int iVar3;
	
	fVar2 = 1000000f;
	iVar3 = -1;
	iVar0 = 0;
	while (iVar0 <= 45)
	{
		if (iParam3 == 6 || iParam3 == func_479(iVar0))
		{
			if (!iParam5 || func_478(iVar0))
			{
				fVar1 = gameplay::get_distance_between_coords(vParam0, func_476(iVar0, 0), 1);
				if (((fVar1 < fVar2 && (fVar1 <= IntToFloat(iParam4) || iParam4 == -1)) && (iParam6 || iVar0 != 21)) && iVar0 != iParam7)
				{
					fVar2 = fVar1;
					iVar3 = iVar0;
				}
			}
		}
		iVar0++;
	}
	return iVar3;
}

Vector3 func_476(int iParam0, int iParam1)//Position - 0x3E088
{
	switch (iParam0)
	{
		case -1:
			return 0f, 0f, 0f;
			break;
		
		case 0:
			return -821.9946f, -187.1776f, 36.5689f;
			break;
		
		case 1:
			return 133.5702f, -1710.918f, 28.2916f;
			break;
		
		case 2:
			return -1287.082f, -1116.558f, 5.9901f;
			break;
		
		case 3:
			return 1933.119f, 3726.079f, 31.8444f;
			break;
		
		case 4:
			return 1208.333f, -470.917f, 65.208f;
			break;
		
		case 5:
			return -30.7448f, -148.4921f, 56.0765f;
			break;
		
		case 6:
			return -280.8165f, 6231.771f, 30.6955f;
			break;
		
		case 7:
			return 80.665f, -1391.669f, 28.3761f;
			break;
		
		case 8:
			return 1687.881f, 4820.55f, 41.0096f;
			break;
		
		case 9:
			return 419.531f, -807.5787f, 28.4896f;
			break;
		
		case 10:
			return -1094.049f, 2704.171f, 18.0873f;
			break;
		
		case 11:
			return 1197.972f, 2704.22f, 37.1572f;
			break;
		
		case 12:
			return -818.6218f, -1077.533f, 10.3282f;
			break;
		
		case 13:
			return -0.2361f, 6516.045f, 30.8684f;
			break;
		
		case 14:
			return -1199.809f, -776.6886f, 16.3237f;
			break;
		
		case 15:
			return 618.1857f, 2752.567f, 41.0881f;
			break;
		
		case 16:
			return 126.6853f, -212.5027f, 53.5578f;
			break;
		
		case 17:
			return -3168.966f, 1055.287f, 19.8632f;
			break;
		
		case 18:
			return -715.3598f, -155.7742f, 36.4105f;
			break;
		
		case 19:
			return -158.2199f, -304.9663f, 38.735f;
			break;
		
		case 20:
			return -1455.005f, -233.1862f, 48.7936f;
			break;
		
		case 21:
			return -1335.973f, -1278.555f, 3.8598f;
			break;
		
		case 22:
			return 321.6098f, 179.4165f, 102.5865f;
			break;
		
		case 23:
			return 1861.685f, 3750.08f, 32.0318f;
			break;
		
		case 24:
			return -290.1603f, 6199.095f, 30.4871f;
			break;
		
		case 25:
			return -1153.948f, -1425.019f, 3.9544f;
			break;
		
		case 26:
			return 1322.455f, -1651.125f, 51.1885f;
			break;
		
		case 27:
			return -3169.42f, 1074.727f, 19.8343f;
			break;
		
		case 28:
			return 17.6804f, -1114.288f, 28.797f;
			break;
		
		case 29:
			return 1697.979f, 3753.2f, 33.7053f;
			break;
		
		case 30:
			return 245.2711f, -45.8126f, 68.941f;
			break;
		
		case 31:
			return 844.1248f, -1025.571f, 27.1948f;
			break;
		
		case 32:
			return -325.8904f, 6077.026f, 30.4548f;
			break;
		
		case 33:
			return -664.2178f, -943.3646f, 20.8292f;
			break;
		
		case 34:
			return -1313.948f, -390.9637f, 35.592f;
			break;
		
		case 35:
			return -1111.238f, 2688.463f, 17.6131f;
			break;
		
		case 36:
			return -3165.231f, 1082.855f, 19.8438f;
			break;
		
		case 37:
			return 2569.612f, 302.576f, 107.7349f;
			break;
		
		case 38:
			return 811.8699f, -2149.102f, 28.6363f;
			break;
		
		case 39:
			return -1147.314f, -1992.434f, 12.1803f;
			break;
		
		case 40:
			return 724.524f, -1089.081f, 21.1692f;
			break;
		
		case 41:
			return -354.5272f, -135.4011f, 38.185f;
			break;
		
		case 42:
			return 113.2615f, 6624.28f, 30.7871f;
			break;
		
		case 43:
			return 1174.707f, 2644.45f, 36.7552f;
			break;
		
		case 44:
			if (iParam1)
			{
				return -211.5f, -1324.2f, 30.296f;
			}
			else
			{
				return -205.6654f, -1311.113f, 30.296f;
			}
			break;
		
		case 45:
			return func_477(Global_92999);
			break;
	}
	return 1000000f, 1000000f, 1000000f;
}

Vector3 func_477(int iParam0)//Position - 0x3E5A2
{
	switch (iParam0)
	{
		case 1:
			return 1060f, -2990f, -35f;
			break;
		
		case 2:
			return 1060f, -2990f, -35f;
			break;
		
		case 3:
			return 974.9542f, -3000.091f, -35f;
			break;
		
		case 6:
			return -1586.36f, -566.6f, 106.17f;
			break;
		
		case 7:
			return -1389.87f, -465.17f, 82.68f;
			break;
		
		case 8:
			return -145.81f, -590.2f, 171.13f;
			break;
		
		case 9:
			return -62.49f, -823.55f, 288.74f;
			break;
		
		case 4:
			return 1102.515f, -3158.888f, -38.5186f;
			break;
		
		case 5:
			return 1005.861f, -3156.162f, -39.907f;
			break;
		
		default:
			return 0f, 0f, -200f;
			break;
	}
	return 0f, 0f, -200f;
}

int func_478(int iParam0)//Position - 0x3E6B8
{
	return func_471(iParam0, 0, 0);
}

int func_479(int iParam0)//Position - 0x3E6C8
{
	switch (iParam0)
	{
		case -1:
			return 6;
			break;
		
		case 0:
			return 0;
			break;
		
		case 1:
			return 0;
			break;
		
		case 2:
			return 0;
			break;
		
		case 3:
			return 0;
			break;
		
		case 4:
			return 0;
			break;
		
		case 5:
			return 0;
			break;
		
		case 6:
			return 0;
			break;
		
		case 7:
			return 1;
			break;
		
		case 8:
			return 1;
			break;
		
		case 9:
			return 1;
			break;
		
		case 10:
			return 1;
			break;
		
		case 11:
			return 1;
			break;
		
		case 12:
			return 1;
			break;
		
		case 13:
			return 1;
			break;
		
		case 14:
			return 1;
			break;
		
		case 15:
			return 1;
			break;
		
		case 16:
			return 1;
			break;
		
		case 17:
			return 1;
			break;
		
		case 18:
			return 1;
			break;
		
		case 19:
			return 1;
			break;
		
		case 20:
			return 1;
			break;
		
		case 21:
			return 1;
			break;
		
		case 22:
			return 2;
			break;
		
		case 23:
			return 2;
			break;
		
		case 24:
			return 2;
			break;
		
		case 25:
			return 2;
			break;
		
		case 26:
			return 2;
			break;
		
		case 27:
			return 2;
			break;
		
		case 28:
			return 3;
			break;
		
		case 29:
			return 3;
			break;
		
		case 30:
			return 3;
			break;
		
		case 31:
			return 3;
			break;
		
		case 32:
			return 3;
			break;
		
		case 33:
			return 3;
			break;
		
		case 34:
			return 3;
			break;
		
		case 35:
			return 3;
			break;
		
		case 36:
			return 3;
			break;
		
		case 37:
			return 3;
			break;
		
		case 38:
			return 3;
			break;
		
		case 39:
			return 4;
			break;
		
		case 40:
			return 4;
			break;
		
		case 41:
			return 4;
			break;
		
		case 42:
			return 4;
			break;
		
		case 43:
			return 4;
			break;
		
		case 44:
			return 4;
			break;
		
		case 45:
			return 5;
			break;
	}
	return 6;
}

int func_480(char* sParam0)//Position - 0x3E93B
{
	if (gameplay::are_strings_equal("BailBond1", sParam0))
	{
		return 0;
	}
	else if (gameplay::are_strings_equal("BailBond2", sParam0))
	{
		return 1;
	}
	else if (gameplay::are_strings_equal("BailBond3", sParam0))
	{
		return 2;
	}
	else if (gameplay::are_strings_equal("BailBond4", sParam0))
	{
		return 3;
	}
	return -1;
}

struct<2> func_481(int iParam0)//Position - 0x3E991
{
	struct<2> Var0;
	
	StringCopy(&Var0, "", 8);
	switch (iParam0)
	{
		case 0:
			StringCopy(&Var0, "ABI1", 8);
			break;
		
		case 1:
			StringCopy(&Var0, "ABI2", 8);
			break;
		
		case 2:
			StringCopy(&Var0, "BA1", 8);
			break;
		
		case 3:
			StringCopy(&Var0, "BA2", 8);
			break;
		
		case 4:
			StringCopy(&Var0, "BA3", 8);
			break;
		
		case 5:
			StringCopy(&Var0, "BA3A", 8);
			break;
		
		case 6:
			StringCopy(&Var0, "BA3C", 8);
			break;
		
		case 7:
			StringCopy(&Var0, "BA4", 8);
			break;
		
		case 8:
			StringCopy(&Var0, "DRE1", 8);
			break;
		
		case 9:
			StringCopy(&Var0, "EPS1", 8);
			break;
		
		case 10:
			StringCopy(&Var0, "EPS2", 8);
			break;
		
		case 11:
			StringCopy(&Var0, "EPS3", 8);
			break;
		
		case 12:
			StringCopy(&Var0, "EPS4", 8);
			break;
		
		case 13:
			StringCopy(&Var0, "EPS5", 8);
			break;
		
		case 14:
			StringCopy(&Var0, "EPS6", 8);
			break;
		
		case 15:
			StringCopy(&Var0, "EPS7", 8);
			break;
		
		case 16:
			StringCopy(&Var0, "EPS8", 8);
			break;
		
		case 17:
			StringCopy(&Var0, "EXT1", 8);
			break;
		
		case 18:
			StringCopy(&Var0, "EXT2", 8);
			break;
		
		case 19:
			StringCopy(&Var0, "EXT3", 8);
			break;
		
		case 20:
			StringCopy(&Var0, "EXT4", 8);
			break;
		
		case 21:
			StringCopy(&Var0, "FAN1", 8);
			break;
		
		case 22:
			StringCopy(&Var0, "FAN2", 8);
			break;
		
		case 23:
			StringCopy(&Var0, "FAN3", 8);
			break;
		
		case 24:
			StringCopy(&Var0, "HAO1", 8);
			break;
		
		case 25:
			StringCopy(&Var0, "HUN1", 8);
			break;
		
		case 26:
			StringCopy(&Var0, "HUN2", 8);
			break;
		
		case 27:
			StringCopy(&Var0, "JOS1", 8);
			break;
		
		case 28:
			StringCopy(&Var0, "JOS2", 8);
			break;
		
		case 29:
			StringCopy(&Var0, "JOS3", 8);
			break;
		
		case 30:
			StringCopy(&Var0, "JOS4", 8);
			break;
		
		case 31:
			StringCopy(&Var0, "MAU1", 8);
			break;
		
		case 32:
			StringCopy(&Var0, "MIN1", 8);
			break;
		
		case 33:
			StringCopy(&Var0, "MIN2", 8);
			break;
		
		case 34:
			StringCopy(&Var0, "MIN3", 8);
			break;
		
		case 35:
			StringCopy(&Var0, "MRS1", 8);
			break;
		
		case 36:
			StringCopy(&Var0, "MRS2", 8);
			break;
		
		case 37:
			StringCopy(&Var0, "NI1", 8);
			break;
		
		case 38:
			StringCopy(&Var0, "NI1A", 8);
			break;
		
		case 39:
			StringCopy(&Var0, "NI1B", 8);
			break;
		
		case 40:
			StringCopy(&Var0, "NI1C", 8);
			break;
		
		case 41:
			StringCopy(&Var0, "NI1D", 8);
			break;
		
		case 42:
			StringCopy(&Var0, "NI2", 8);
			break;
		
		case 43:
			StringCopy(&Var0, "NI3", 8);
			break;
		
		case 44:
			StringCopy(&Var0, "OME1", 8);
			break;
		
		case 45:
			StringCopy(&Var0, "OME2", 8);
			break;
		
		case 46:
			StringCopy(&Var0, "PA1", 8);
			break;
		
		case 47:
			StringCopy(&Var0, "PA2", 8);
			break;
		
		case 48:
			StringCopy(&Var0, "PA3", 8);
			break;
		
		case 49:
			StringCopy(&Var0, "PA3A", 8);
			break;
		
		case 50:
			StringCopy(&Var0, "PA3B", 8);
			break;
		
		case 51:
			StringCopy(&Var0, "PA4", 8);
			break;
		
		case 52:
			StringCopy(&Var0, "RAM1", 8);
			break;
		
		case 53:
			StringCopy(&Var0, "RAM2", 8);
			break;
		
		case 54:
			StringCopy(&Var0, "RAM3", 8);
			break;
		
		case 55:
			StringCopy(&Var0, "RAM4", 8);
			break;
		
		case 56:
			StringCopy(&Var0, "RAM5", 8);
			break;
		
		case 57:
			StringCopy(&Var0, "SAS1", 8);
			break;
		
		case 58:
			StringCopy(&Var0, "TON1", 8);
			break;
		
		case 59:
			StringCopy(&Var0, "TON2", 8);
			break;
		
		case 60:
			StringCopy(&Var0, "TON3", 8);
			break;
		
		case 61:
			StringCopy(&Var0, "TON4", 8);
			break;
		
		case 62:
			StringCopy(&Var0, "TON5", 8);
			break;
		
		default:
			break;
	}
	return Var0;
}

int func_482(char* sParam0, int iParam1)//Position - 0x3EDDD
{
	int iVar0;
	char* sVar1;
	int iVar33;
	int iVar34;
	
	iVar33 = gameplay::get_hash_key(sParam0);
	iVar34 = 0;
	iVar34 = 0;
	while (iVar34 < 63)
	{
		iVar0 = iVar34;
		func_483(iVar0, &sVar1);
		if (gameplay::get_hash_key(sVar1) == iVar33)
		{
			return iVar0;
		}
		iVar34++;
	}
	if (iParam1 == 0)
	{
	}
	return -1;
}

void func_483(int iParam0, var uParam1)//Position - 0x3EE26
{
	switch (iParam0)
	{
		case 0:
			func_484(uParam1, "Abigail1", func_486(iParam0), 0, 0, 4, -1604.668f, 5239.1f, 3.01f, 66, "", 109, 0, "ambient_Diving", 0, 0, 1, 4, 1, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 1:
			func_484(uParam1, "Abigail2", func_486(iParam0), 0, 0, 4, -1592.84f, 5214.04f, 3.01f, 400, "", 110, 0, "", 0, 0, -1, 4, 1, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 2:
			func_484(uParam1, "Barry1", func_486(iParam0), 0, 1, 4, 190.26f, -956.35f, 29.63f, 381, "", 74, 0, "", 0, 1, -1, 4, 1, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 3:
			func_484(uParam1, "Barry2", func_486(iParam0), 0, 1, 4, 190.26f, -956.35f, 29.63f, 381, "", -1, 0, "", 0, 1, -1, 4, 4, 0, 2359, func_485(iParam0), 1, 1);
			break;
		
		case 4:
			func_484(uParam1, "Barry3", func_486(iParam0), 0, 1, 4, 414f, -761f, 29f, 381, "", -1, 0, "", 164, 1, -1, 0, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 5:
			func_484(uParam1, "Barry3A", func_486(iParam0), 1, 1, 0, 1199.27f, -1255.63f, 34.23f, 381, "BARSTASH", 84, 0, "", 166, 0, 7, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 6:
			func_484(uParam1, "Barry3C", func_486(iParam0), 3, 1, 0, -468.9f, -1713.06f, 18.21f, 381, "", 84, 0, "", 166, 0, 7, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 7:
			func_484(uParam1, "Barry4", func_486(iParam0), 0, 1, 4, 237.65f, -385.41f, 44.4f, 381, "", 85, 0, "postRC_Barry4", 0, 0, -1, 4, 2, 800, 2000, func_485(iParam0), 0, 0);
			break;
		
		case 8:
			func_484(uParam1, "Dreyfuss1", func_486(iParam0), 0, 2, 4, -1458.97f, 485.99f, 115.38f, 66, "LETTERS_HINT", 106, 0, "", 0, 0, -1, 4, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 9:
			func_484(uParam1, "Epsilon1", func_486(iParam0), 0, 3, 4, -1622.89f, 4204.87f, 83.3f, 66, "", 86, 0, "", 0, 1, 10, 4, 1, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 10:
			func_484(uParam1, "Epsilon2", func_486(iParam0), 0, 3, 4, 242.7f, 362.7f, 104.74f, 206, "", 87, 16, "", 0, 0, 11, 4, 1, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 11:
			func_484(uParam1, "Epsilon3", func_486(iParam0), 0, 3, 4, 1835.53f, 4705.86f, 38.1f, 206, "", 88, 16, "epsCars", 0, 0, 12, 4, 1, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 12:
			func_484(uParam1, "Epsilon4", func_486(iParam0), 0, 3, 4, 1826.13f, 4698.88f, 38.92f, 206, "", 90, 16, "postRC_Epsilon4", 0, 0, 13, 4, 1, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 13:
			func_484(uParam1, "Epsilon5", func_486(iParam0), 0, 3, 4, 637.02f, 119.7093f, 89.5f, 206, "", 89, 16, "epsRobes", 0, 0, 14, 4, 1, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 14:
			func_484(uParam1, "Epsilon6", func_486(iParam0), 0, 3, 4, -2892.93f, 3192.37f, 11.66f, 206, "", 93, 0, "", 0, 0, 15, 4, 1, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 15:
			func_484(uParam1, "Epsilon7", func_486(iParam0), 0, 3, 4, 524.43f, 3079.82f, 39.48f, 206, "", -1, 16, "epsDesert", 0, 0, 16, 4, 1, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 16:
			func_484(uParam1, "Epsilon8", func_486(iParam0), 0, 3, 4, -697.75f, 45.38f, 43.03f, 206, "", 94, 16, "epsilonTract", 0, 0, -1, 4, 1, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 17:
			func_484(uParam1, "Extreme1", func_486(iParam0), 0, 4, 4, -188.22f, 1296.1f, 302.86f, 66, "", -1, 0, "", 4, 1, 18, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 18:
			func_484(uParam1, "Extreme2", func_486(iParam0), 0, 4, 4, -954.19f, -2760.05f, 14.64f, 382, "", 96, 0, "", 171, 0, 19, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 19:
			func_484(uParam1, "Extreme3", func_486(iParam0), 0, 4, 4, -63.8f, -809.5f, 321.8f, 382, "", 97, 0, "", 0, 0, 20, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 20:
			func_484(uParam1, "Extreme4", func_486(iParam0), 0, 4, 4, 1731.41f, 96.96f, 170.39f, 382, "", 98, 16, "", 0, 0, -1, 4, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 21:
			func_484(uParam1, "Fanatic1", func_486(iParam0), 0, 5, 4, -1877.82f, -440.649f, 45.05f, 405, "", 74, 0, "", 0, 1, -1, 4, 1, 700, 2000, func_485(iParam0), 1, 0);
			break;
		
		case 22:
			func_484(uParam1, "Fanatic2", func_486(iParam0), 0, 5, 4, 809.66f, 1279.76f, 360.49f, 405, "", -1, 0, "", 0, 1, -1, 4, 4, 700, 2000, func_485(iParam0), 1, 0);
			break;
		
		case 23:
			func_484(uParam1, "Fanatic3", func_486(iParam0), 0, 5, 4, -915.6f, 6139.2f, 5.5f, 405, "", -1, 0, "", 0, 1, -1, 4, 2, 700, 2000, func_485(iParam0), 0, 1);
			break;
		
		case 24:
			func_484(uParam1, "Hao1", func_486(iParam0), 0, 6, 4, -72.29f, -1260.63f, 28.14f, 66, "", -1, 0, "controller_Races", 13, 1, -1, 4, 2, 2000, 500, func_485(iParam0), 0, 1);
			break;
		
		case 25:
			func_484(uParam1, "Hunting1", func_486(iParam0), 0, 7, 4, 1804.32f, 3931.33f, 32.82f, 66, "", -1, 0, "", 174, 1, 26, 4, 4, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 26:
			func_484(uParam1, "Hunting2", func_486(iParam0), 0, 7, 4, -684.17f, 5839.16f, 16.09f, 384, "", 99, 0, "", 7, 0, -1, 4, 4, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 27:
			func_484(uParam1, "Josh1", func_486(iParam0), 0, 8, 4, -1104.93f, 291.25f, 64.3f, 66, "", -1, 0, "forSaleSigns", 0, 1, 28, 4, 4, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 28:
			func_484(uParam1, "Josh2", func_486(iParam0), 0, 8, 4, 565.39f, -1772.88f, 29.77f, 385, "", 105, 0, "", 0, 0, 29, 4, 4, 0, 2359, func_485(iParam0), 1, 1);
			break;
		
		case 29:
			func_484(uParam1, "Josh3", func_486(iParam0), 0, 8, 4, 565.39f, -1772.88f, 29.77f, 385, "", -1, 16, "", 0, 0, 30, 4, 4, 0, 2359, func_485(iParam0), 1, 1);
			break;
		
		case 30:
			func_484(uParam1, "Josh4", func_486(iParam0), 0, 8, 4, -1104.93f, 291.25f, 64.3f, 385, "", -1, 36, "", 0, 0, -1, 4, 4, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 31:
			func_484(uParam1, "Maude1", func_486(iParam0), 0, 9, 4, 2726.1f, 4145f, 44.3f, 66, "", -1, 0, "BailBond_Launcher", 0, 1, -1, 4, 4, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 32:
			func_484(uParam1, "Minute1", func_486(iParam0), 0, 10, 4, 327.85f, 3405.7f, 35.73f, 66, "", -1, 0, "", 0, 1, 33, 4, 4, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 33:
			func_484(uParam1, "Minute2", func_486(iParam0), 0, 10, 4, 18f, 4527f, 105f, 386, "", -1, 10, "", 0, 0, 34, 4, 4, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 34:
			func_484(uParam1, "Minute3", func_486(iParam0), 0, 10, 4, -303.82f, 6211.29f, 31.05f, 386, "", -1, 10, "", 0, 0, -1, 4, 4, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 35:
			func_484(uParam1, "MrsPhilips1", func_486(iParam0), 0, 11, 4, 1972.59f, 3816.43f, 32.42f, 66, "", -1, 0, "ambient_MrsPhilips", 0, 1, -1, 4, 4, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 36:
			func_484(uParam1, "MrsPhilips2", func_486(iParam0), 0, 11, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 0, 1, -1, 4, 4, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 37:
			func_484(uParam1, "Nigel1", func_486(iParam0), 0, 12, 4, -1097.16f, 790.01f, 164.52f, 66, "", -1, 0, "", 177, 1, -1, 1, 4, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 38:
			func_484(uParam1, "Nigel1A", func_486(iParam0), 0, 12, 1, -558.65f, 284.49f, 90.86f, 149, "NIGITEMS", 100, 0, "", 0, 0, 42, 4, 4, 0, 2359, func_485(iParam0), 1, 1);
			break;
		
		case 39:
			func_484(uParam1, "Nigel1B", func_486(iParam0), 0, 12, 1, -1034.15f, 366.08f, 80.11f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_485(iParam0), 1, 1);
			break;
		
		case 40:
			func_484(uParam1, "Nigel1C", func_486(iParam0), 0, 12, 1, -623.91f, -266.17f, 37.76f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_485(iParam0), 1, 1);
			break;
		
		case 41:
			func_484(uParam1, "Nigel1D", func_486(iParam0), 0, 12, 1, -1096.85f, 67.68f, 52.95f, 149, "", 100, 0, "", 0, 0, 42, 4, 4, 700, 2000, func_485(iParam0), 1, 1);
			break;
		
		case 42:
			func_484(uParam1, "Nigel2", func_486(iParam0), 0, 12, 4, -1310.7f, -640.22f, 26.54f, 149, "", -1, 8, "", 0, 0, 43, 4, 4, 0, 2359, func_485(iParam0), 1, 1);
			break;
		
		case 43:
			func_484(uParam1, "Nigel3", func_486(iParam0), 0, 12, 4, -44.75f, -1288.67f, 28.21f, 149, "", -1, 16, "postRC_Nigel3", 0, 0, -1, 4, 4, 0, 2359, func_485(iParam0), 1, 1);
			break;
		
		case 44:
			func_484(uParam1, "Omega1", func_486(iParam0), 0, 13, 4, 2468.51f, 3437.39f, 49.9f, 66, "", -1, 0, "spaceshipParts", 0, 1, 45, 4, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 45:
			func_484(uParam1, "Omega2", func_486(iParam0), 0, 13, 4, 2319.44f, 2583.58f, 46.76f, 387, "", 107, 0, "", 0, 0, -1, 4, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 46:
			func_484(uParam1, "Paparazzo1", func_486(iParam0), 0, 14, 4, -149.75f, 285.81f, 93.67f, 66, "", -1, 0, "", 0, 1, 47, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 47:
			func_484(uParam1, "Paparazzo2", func_486(iParam0), 0, 14, 4, -70.71f, 301.43f, 106.79f, 389, "", -1, 8, "", 0, 0, 48, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 48:
			func_484(uParam1, "Paparazzo3", func_486(iParam0), 0, 14, 4, -257.22f, 292.85f, 90.63f, 389, "", -1, 8, "", 183, 1, -1, 2, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 49:
			func_484(uParam1, "Paparazzo3A", func_486(iParam0), 0, 14, 2, 305.52f, 157.19f, 102.94f, 389, "PAPPHOTO", 102, 0, "", 0, 0, 51, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 50:
			func_484(uParam1, "Paparazzo3B", func_486(iParam0), 0, 14, 2, 1040.96f, -534.42f, 60.17f, 389, "", 102, 0, "", 0, 0, 51, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 51:
			func_484(uParam1, "Paparazzo4", func_486(iParam0), 0, 14, 4, -484.2f, 229.68f, 82.21f, 389, "", -1, 8, "", 0, 1, -1, 4, 2, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 52:
			func_484(uParam1, "Rampage1", func_486(iParam0), 0, 15, 4, 908f, 3643.7f, 32.2f, 66, "", -1, 0, "", 0, 1, 54, 4, 4, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 54:
			func_484(uParam1, "Rampage3", func_486(iParam0), 0, 15, 4, 465.1f, -1849.3f, 27.8f, 84, "", -1, 0, "", 0, 1, 55, 4, 4, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 55:
			func_484(uParam1, "Rampage4", func_486(iParam0), 0, 15, 4, -161f, -1669.7f, 33f, 84, "", -1, 0, "", 0, 0, 56, 4, 4, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 56:
			func_484(uParam1, "Rampage5", func_486(iParam0), 0, 15, 4, -1298.2f, 2504.14f, 21.09f, 84, "", -1, 0, "", 0, 0, 53, 4, 4, 0, 2359, func_485(iParam0), 0, 0);
			break;
		
		case 53:
			func_484(uParam1, "Rampage2", func_486(iParam0), 0, 15, 4, 1181.5f, -400.1f, 67.5f, 84, "", -1, 0, "rampage_controller", 0, 0, -1, 4, 4, 0, 2359, func_485(iParam0), 1, 0);
			break;
		
		case 57:
			func_484(uParam1, "TheLastOne", func_486(iParam0), 0, 16, 4, -1298.98f, 4640.16f, 105.67f, 66, "", 133, 1, "", 0, 1, -1, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 58:
			func_484(uParam1, "Tonya1", func_486(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 66, "AM_H_RCFS", -1, 0, "ambient_TonyaCall", 24, 1, 59, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 59:
			func_484(uParam1, "Tonya2", func_486(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 388, "", -1, 48, "ambient_Tonya", 185, 0, 60, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 60:
			func_484(uParam1, "Tonya3", func_486(iParam0), 0, 17, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 187, 0, 61, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 61:
			func_484(uParam1, "Tonya4", func_486(iParam0), 0, 17, 4, 0f, 0f, 0f, -1, "", -1, 0, "", 0, 0, 62, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		case 62:
			func_484(uParam1, "Tonya5", func_486(iParam0), 0, 17, 4, -14.39f, -1472.69f, 29.58f, 388, "", -1, 48, "", 0, 0, -1, 4, 2, 0, 2359, func_485(iParam0), 0, 1);
			break;
		
		default:
			break;
	}
}

void func_484(var uParam0, char* sParam1, struct<2> Param2, int iParam4, int iParam5, int iParam6, vector3 vParam7, int iParam10, char* sParam11, int iParam12, int iParam13, char* sParam14, int iParam15, int iParam16, int iParam17, int iParam18, int iParam19, int iParam20, int iParam21, var uParam22, int iParam23, int iParam24)//Position - 0x3FFDB
{
	uParam0->f_4 = iParam5;
	*uParam0 = sParam1;
	uParam0->f_1 = { Param2 };
	uParam0->f_3 = iParam4;
	uParam0->f_5 = iParam6;
	uParam0->f_6 = { vParam7 };
	uParam0->f_9 = iParam10;
	StringCopy(&(uParam0->f_10), sParam11, 16);
	uParam0->f_14 = iParam12;
	uParam0->f_15 = iParam13;
	StringCopy(&(uParam0->f_16), sParam14, 24);
	uParam0->f_22 = iParam15;
	uParam0->f_23 = iParam16;
	uParam0->f_24 = iParam17;
	uParam0->f_25 = iParam18;
	uParam0->f_26 = iParam19;
	uParam0->f_27 = iParam20;
	uParam0->f_28 = iParam21;
	uParam0->f_29 = uParam22;
	uParam0->f_30 = iParam23;
	uParam0->f_31 = iParam24;
}

bool func_485(int iParam0)//Position - 0x4006D
{
	switch (iParam0)
	{
		case 0:
			return false;
			break;
		
		case 1:
			return false;
			break;
		
		case 2:
			return true;
			break;
		
		case 3:
			return true;
			break;
		
		case 4:
			return false;
			break;
		
		case 5:
			return true;
			break;
		
		case 6:
			return true;
			break;
		
		case 7:
			return false;
			break;
		
		case 8:
			return true;
			break;
		
		case 9:
			return false;
			break;
		
		case 10:
			return false;
			break;
		
		case 11:
			return false;
			break;
		
		case 12:
			return true;
			break;
		
		case 13:
			return false;
			break;
		
		case 14:
			return true;
			break;
		
		case 15:
			return false;
			break;
		
		case 16:
			return true;
			break;
		
		case 17:
			return true;
			break;
		
		case 18:
			return true;
			break;
		
		case 19:
			return true;
			break;
		
		case 20:
			return true;
			break;
		
		case 21:
			return true;
			break;
		
		case 22:
			return true;
			break;
		
		case 23:
			return true;
			break;
		
		case 24:
			return true;
			break;
		
		case 25:
			return true;
			break;
		
		case 26:
			return true;
			break;
		
		case 27:
			return false;
			break;
		
		case 28:
			return true;
			break;
		
		case 29:
			return true;
			break;
		
		case 30:
			return true;
			break;
		
		case 31:
			return false;
			break;
		
		case 32:
			return true;
			break;
		
		case 33:
			return true;
			break;
		
		case 34:
			return true;
			break;
		
		case 35:
			return false;
			break;
		
		case 36:
			return false;
			break;
		
		case 37:
			return false;
			break;
		
		case 38:
			return true;
			break;
		
		case 39:
			return true;
			break;
		
		case 40:
			return true;
			break;
		
		case 41:
			return true;
			break;
		
		case 42:
			return true;
			break;
		
		case 43:
			return true;
			break;
		
		case 44:
			return false;
			break;
		
		case 45:
			return false;
			break;
		
		case 46:
			return true;
			break;
		
		case 47:
			return true;
			break;
		
		case 48:
			return false;
			break;
		
		case 49:
			return true;
			break;
		
		case 50:
			return true;
			break;
		
		case 51:
			return true;
			break;
		
		case 52:
			return true;
			break;
		
		case 54:
			return true;
			break;
		
		case 55:
			return true;
			break;
		
		case 56:
			return true;
			break;
		
		case 53:
			return true;
			break;
		
		case 57:
			return true;
			break;
		
		case 58:
			return true;
			break;
		
		case 59:
			return true;
			break;
		
		case 60:
			return true;
			break;
		
		case 61:
			return true;
			break;
		
		case 62:
			return true;
			break;
		
		default:
			break;
	}
	return false;
}

struct<2> func_486(int iParam0)//Position - 0x403B3
{
	struct<2> Var0;
	char[] cVar2[8];
	
	StringCopy(&Var0, "", 8);
	cVar2 = { func_481(iParam0) };
	if (gameplay::is_string_null_or_empty(&cVar2))
	{
	}
	else
	{
		StringCopy(&Var0, "RC_", 8);
		StringConCat(&Var0, &cVar2, 8);
	}
	return Var0;
}

int func_487(int iParam0)//Position - 0x403EA
{
	switch (iParam0)
	{
		case 69:
		case 70:
			return func_488(Global_101652.f_8028.f_99.f_205[10]);
			break;
		
		case 74:
		case 75:
			return func_488(Global_101652.f_8028.f_99.f_205[8]);
			break;
		
		case 84:
		case 85:
			return func_488(Global_101652.f_8028.f_99.f_205[11]);
			break;
		
		case 90:
			return func_488(Global_101652.f_8028.f_99.f_205[7]);
			break;
		
		case 93:
			return func_488(Global_101652.f_8028.f_99.f_205[9]);
			break;
	}
	return 0;
}

int func_488(int iParam0)//Position - 0x404A6
{
	switch (iParam0)
	{
		case 1:
		case 3:
		case 5:
		case 6:
		case 8:
			return 0;
			break;
		
		case 2:
		case 4:
		case 7:
		case 9:
			return 1;
			break;
	}
	return -1;
}

int func_489(char* sParam0, int iParam1)//Position - 0x404FA
{
	int iVar0;
	int iVar1;
	
	iVar0 = gameplay::get_hash_key(sParam0);
	iVar1 = func_490(iVar0, 1);
	if (iVar1 == -1 && !iParam1)
	{
	}
	return iVar1;
}

int func_490(int iParam0, int iParam1)//Position - 0x40524
{
	int iVar0;
	
	iVar0 = 0;
	while (iVar0 < 94)
	{
		if (Global_82607[iVar0 /*34*/].f_6 == iParam0)
		{
			return iVar0;
		}
		iVar0++;
	}
	if (!iParam1)
	{
	}
	return -1;
}

void func_491()//Position - 0x4055A
{
	Local_666 = { func_492("FM2_GOTOL") };
	Local_668 = { func_492("FM2_GETON") };
	Local_670 = { func_492("FM2_BKIN") };
	Local_672 = { func_492("FM2_COPS") };
}

struct<2> func_492(char* sParam0)//Position - 0x40596
{
	struct<2> Var0;
	
	Var0 = sParam0;
	Var0.f_1 = 0;
	return Var0;
}

void func_493()//Position - 0x405AB
{
	ui::remove_blip(&iLocal_135);
	ui::remove_blip(&iLocal_133);
	ui::remove_blip(&iLocal_134);
	ui::remove_blip(&iLocal_135);
	ui::remove_blip(&iLocal_132);
}

void func_494()//Position - 0x405D1
{
	iLocal_289 = 0;
	iLocal_841 = 0;
	iLocal_842 = 0;
	StringCopy(&Local_843, "", 24);
	iLocal_272 = 0;
	iLocal_287 = false;
	iLocal_288 = false;
	system::settimera(0);
	system::settimerb(0);
}

void func_495()//Position - 0x40603
{
	int iVar0;
	
	if (entity::does_entity_exist(iLocal_104))
	{
		if (ped::is_ped_injured(iLocal_104))
		{
			func_103("FM2_JIMDED");
		}
		if (func_497(iLocal_104))
		{
			func_103("FM2_JIMHIT");
		}
	}
	if (entity::does_entity_exist(iLocal_103))
	{
		if (ped::is_ped_injured(iLocal_103))
		{
			func_103("FM2_TRADED");
		}
		if (func_497(iLocal_103))
		{
			func_103("FM2_TRAHIT");
		}
	}
	if (iLocal_70 == 3)
	{
		iVar0 = false;
		if (func_496(iLocal_112, &iVar0))
		{
			if (!iVar0)
			{
				func_103("FM2_BIKDED");
			}
			else
			{
				func_103("FM2_BIKSTU");
			}
		}
		if (vehicle::is_vehicle_driveable(iLocal_112, 0))
		{
			if (vehicle::is_vehicle_tyre_burst(iLocal_112, 6, 0) || vehicle::is_vehicle_tyre_burst(iLocal_112, 7, 0))
			{
				func_103("FM2_BIKDED");
			}
		}
		if (entity::is_entity_at_coord(player::player_ped_id(), -2109.599f, -998.3243f, -11.18568f, 167f, 122.5f, 32.25f, false, true, 0))
		{
			func_103("FM2_JIMAB");
		}
	}
	if (iLocal_70 == 1)
	{
		if (func_148(iLocal_104, 300f))
		{
			func_103("FM2_JIMAB");
		}
	}
	if (iLocal_70 == 7)
	{
		if (func_148(iLocal_103, 100f))
		{
			func_103("FM2_TRAAB");
		}
	}
	if (iLocal_70 == 8)
	{
		if (func_148(iLocal_103, 1125515264))
		{
			func_103("FM2_TRAAB");
		}
	}
	if (!ped::is_ped_injured(iLocal_104))
	{
		if ((fire::is_explosion_in_area(-1, entity::get_entity_coords(iLocal_104, 1) + Vector(25f, 25f, 25f), entity::get_entity_coords(iLocal_104, 1) - Vector(25f, 25f, 25f)) && !fire::is_explosion_in_area(13, entity::get_entity_coords(iLocal_104, 1) + Vector(25f, 25f, 25f), entity::get_entity_coords(iLocal_104, 1) - Vector(25f, 25f, 25f))) || gameplay::is_bullet_in_area(entity::get_entity_coords(iLocal_104, 1), 25f, 1))
		{
			func_103("FM2_JSPOOK");
		}
	}
}

bool func_496(int iParam0, int iParam1)//Position - 0x407DB
{
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (((vehicle::is_vehicle_stuck_timer_up(iParam0, 0, 7000) || vehicle::is_vehicle_stuck_timer_up(iParam0, 3, 30000)) || vehicle::is_vehicle_stuck_timer_up(iParam0, 2, 30000)) || vehicle::is_vehicle_stuck_timer_up(iParam0, 1, 40000))
			{
				if (vehicle::is_vehicle_stuck_timer_up(iParam0, 0, 7000))
				{
				}
				if (vehicle::is_vehicle_stuck_timer_up(iParam0, 3, 30000))
				{
				}
				if (vehicle::is_vehicle_stuck_timer_up(iParam0, 2, 30000))
				{
				}
				if (vehicle::is_vehicle_stuck_timer_up(iParam0, 1, 40000))
				{
				}
				*iParam1 = 1;
				return true;
			}
			if (!ped::is_ped_in_vehicle(player::player_ped_id(), iParam0, 1) && !vehicle::_0x639431E895B9AA57(player::player_ped_id(), iParam0, -1, 1, false))
			{
				if (iLocal_852 == 0)
				{
					iLocal_852 = gameplay::get_game_timer();
				}
				else if ((gameplay::get_game_timer() - iLocal_852) >= 5000)
				{
					*iParam1 = 1;
					return true;
				}
			}
			else
			{
				iLocal_852 = 0;
			}
		}
		else
		{
			return true;
		}
	}
	return false;
}

bool func_497(int iParam0)//Position - 0x408C9
{
	if (entity::does_entity_exist(iParam0) && !ped::is_ped_injured(iParam0))
	{
		if (fire::is_entity_on_fire(iParam0))
		{
			return true;
		}
	}
	return false;
}

void func_498(int iParam0, int iParam1)//Position - 0x408F4
{
	Global_89126 = iParam0;
	Global_89127 = iParam1;
}

void func_499()//Position - 0x40908
{
	int iVar0;
	int iVar1;
	
	func_527(7, 1);
	func_527(8, 1);
	func_527(9, 1);
	func_527(10, 1);
	func_527(11, 1);
	func_527(12, 1);
	func_527(13, 1);
	func_527(14, 1);
	func_527(15, 1);
	func_527(16, 1);
	func_527(17, 1);
	func_527(18, 1);
	func_527(19, 1);
	func_527(20, 1);
	func_527(21, 1);
	func_197(0);
	iLocal_71[0] = 0;
	iLocal_71[1] = 1;
	iLocal_71[2] = 2;
	iLocal_71[3] = 3;
	iLocal_71[4] = 4;
	iLocal_71[5] = 4;
	iLocal_71[6] = 5;
	iLocal_71[7] = 6;
	iLocal_71[8] = 7;
	iLocal_71[9] = 8;
	iLocal_71[10] = 9;
	ui::request_additional_text("FAMILY2", 0);
	ui::request_additional_text(cLocal_313, 6);
	ai::request_waypoint_recording("fam2Stairs");
	func_526(1);
	func_491();
	if (player::is_player_playing(player::player_id()))
	{
		if (func_206())
		{
			cutscene::remove_cutscene();
			func_405(&Local_91, 0, 0, 2000, 1, 0, 0, 1);
			func_406(500);
			gameplay::set_weather_type_now_persist("EXTRASUNNY");
			iVar1 = func_525();
			if (Global_85996 == 1)
			{
				if (iVar1 == 1 || iVar1 == 2)
				{
					iVar0 = true;
				}
				if (iVar1 < 4)
				{
					if (iVar1 == 3)
					{
						iVar1 = 8;
					}
					else
					{
						iVar1++;
					}
				}
				else
				{
					iVar1 = 9;
				}
			}
			if (iVar1 > 8)
			{
				while (!func_344(1, 1))
				{
					system::wait(0);
				}
				vLocal_637 = { -1623.554f, -1132.136f, 0.8638f };
				fLocal_640 = 107.3556f;
				streaming::request_model(joaat("seashark"));
				while (!streaming::has_model_loaded(joaat("seashark")))
				{
					system::wait(0);
				}
				iLocal_111 = vehicle::create_vehicle(joaat("seashark"), -1490.071f, -1406.383f, 1.1279f, -94.2926f, 1, true);
				entity::set_entity_coords_no_offset(iLocal_111, -1490.071f, -1406.383f, 1.1279f, 0, 0, 1);
				entity::set_entity_rotation(iLocal_111, 2.7893f, 9.6258f, -94.2926f, 2, 1);
				entity::set_entity_quaternion(iLocal_111, -0.078f, -0.0393f, 0.7289f, -0.679f);
				entity::apply_force_to_entity(iLocal_111, 0, 0f, 0f, -0.01f, 0f, 0f, 0f, 0, 1, 1, 0, 0, 1);
				func_200(9);
				iLocal_284 = 1;
			}
			else
			{
				switch (iVar1)
				{
					case 0:
						iLocal_266 = 1;
						func_200(1);
						gameplay::clear_area(vLocal_211, 100f, 1, 0, 0, false);
						vLocal_637 = { vLocal_199 };
						fLocal_640 = fLocal_202;
						break;
					
					case 1:
						iLocal_266 = 1;
						func_505(&iLocal_114, vLocal_222, fLocal_225, 0, 0, 0, 0, 1, joaat("asterope"), 0, 145, 1);
						entity::set_entity_coords(player::player_ped_id(), vLocal_226 + Vector(0f, 1f, 1f), 1, false, 0, 1);
						gameplay::clear_area(vLocal_226, 100f, 1, 0, 0, false);
						while (!func_140(0))
						{
							system::wait(0);
						}
						func_200(2);
						vLocal_637 = { -1081.797f, -1699.492f, 3.5179f };
						fLocal_640 = 91.1321f;
						break;
					
					case 2:
						iLocal_266 = 1;
						if (iVar0)
						{
							vLocal_637 = { vLocal_236 };
							fLocal_640 = fLocal_240;
							streaming::request_ipl("smBoat");
							while (!streaming::is_ipl_active("smboat"))
							{
								system::wait(0);
							}
							func_200(4);
						}
						else
						{
							if (((((func_504() == joaat("scorcher") || func_504() == joaat("bmx")) || func_504() == joaat("cruiser")) || func_504() == joaat("tribike")) || func_504() == joaat("tribike2")) || func_504() == joaat("tribike3"))
							{
								func_505(&iLocal_112, vLocal_233, fLocal_239, 1, 0, 0, 0, 1, joaat("asterope"), 0, 145, 1);
							}
							vLocal_637 = { vLocal_207 };
							fLocal_640 = fLocal_210;
							func_200(5);
						}
						break;
					
					case 3:
						iLocal_266 = 1;
						gameplay::clear_area_of_vehicles(vLocal_215, 100f, 1, 0, 0, 0, false);
						gameplay::clear_area_of_peds(vLocal_215, 100f, 0);
						if (iVar0)
						{
							vLocal_637 = { -2018.791f, -1033.807f, 1.4462f };
							fLocal_640 = 71.2179f;
							func_200(6);
						}
						else
						{
							vLocal_637 = { vLocal_218 };
							fLocal_640 = fLocal_221;
							func_200(7);
						}
						break;
					
					case 4:
						vLocal_326 = { -1937.516f, -1031.919f, 0f };
						fLocal_329 = 288.2051f;
						gameplay::set_bit(&iLocal_87, 0);
						gameplay::clear_area(vLocal_326, 500f, 1, 0, 0, false);
						func_200(8);
						break;
					
					case 5:
						vLocal_326 = { -1693.749f, -936.2038f, 0f };
						fLocal_329 = 293.6241f;
						gameplay::set_bit(&iLocal_87, 1);
						gameplay::clear_area(vLocal_326, 500f, 1, 0, 0, false);
						func_200(8);
						break;
					
					case 6:
						vLocal_326 = { -1198.648f, -992.5767f, 0f };
						fLocal_329 = 209.213f;
						gameplay::set_bit(&iLocal_87, 2);
						gameplay::clear_area(vLocal_326, 500f, 1, 0, 0, false);
						func_200(8);
						break;
					
					case 7:
						vLocal_326 = { -966.1338f, -1365.776f, 0f };
						fLocal_329 = 279.4431f;
						gameplay::set_bit(&iLocal_87, 5);
						gameplay::clear_area(vLocal_326, 500f, 1, 0, 0, false);
						func_200(8);
						break;
					
					case 8:
						vLocal_326 = { -832.9591f, -1506.537f, 0f };
						fLocal_329 = 151.4369f;
						gameplay::set_bit(&iLocal_87, 6);
						gameplay::clear_area(vLocal_326, 500f, 1, 0, 0, false);
						func_200(8);
						break;
				}
				if (iVar1 >= 4)
				{
					iLocal_266 = 1;
					vLocal_637 = { vLocal_326 };
					fLocal_640 = fLocal_329;
				}
				iLocal_284 = 1;
			}
			func_503(vLocal_637, fLocal_640, 0, 0);
		}
		ped::clear_ped_wetness(player::player_ped_id());
		func_141(&Local_676, 0, player::player_ped_id(), "MICHAEL", 0, 1);
		weapon::set_current_ped_weapon(player::player_ped_id(), joaat("weapon_unarmed"), false);
		player::set_player_control(player::player_id(), true, 0);
	}
	if (!ped::is_ped_injured(player::player_ped_id()))
	{
		func_502(player::player_ped_id(), 212);
	}
	func_501(1);
	entity::create_forced_object(-1105.241f, -1697.025f, 3.3678f, 2f, -741944541, 1);
	vehicle::set_vehicle_model_is_suppressed(joaat("tailgater"), true);
	vehicle::set_vehicle_model_is_suppressed(joaat("bmx"), true);
	ped::set_ped_model_is_suppressed(joaat("u_m_m_bikehire_01"), true);
	ped::set_create_random_cops(false);
	player::set_all_random_peds_flee(player::player_id(), 1);
	ai::assisted_movement_request_route("Family5d");
	func_500(0);
	player::set_wanted_level_multiplier(0.6f);
	pathfind::set_roads_in_area(Vector(5.785122f, -1682.939f, -1057.899f) + Vector(4f, 30f, 29f), Vector(5.785122f, -1682.939f, -1057.899f) - Vector(4f, 30f, 29f), false, 1);
	vehicle::set_all_vehicle_generators_active_in_area(Vector(6.373647f, -1688.035f, -1112.913f) + Vector(3.5f, 24.75f, 22.75f), Vector(6.373647f, -1688.035f, -1112.913f) - Vector(3.5f, 24.75f, 22.75f), false, 1);
	ped::add_relationship_group("chasing_peds", &iLocal_90);
	ped::add_relationship_group("buddies", &iLocal_144);
	ped::set_relationship_between_groups(5, iLocal_90, 1862763509);
	ped::set_relationship_between_groups(5, 1862763509, iLocal_90);
	ped::set_relationship_between_groups(5, -1533126372, iLocal_90);
	ped::set_relationship_between_groups(5, iLocal_90, -1533126372);
	ped::set_relationship_between_groups(2, iLocal_144, iLocal_90);
	ped::set_relationship_between_groups(2, iLocal_90, iLocal_144);
	ped::set_relationship_between_groups(1, iLocal_144, 1862763509);
	ped::set_relationship_between_groups(1, 1862763509, iLocal_144);
	if (func_138(0))
	{
		if (!cam::is_screen_faded_out())
		{
			cam::do_screen_fade_out(500);
		}
		while (!func_344(0, 1))
		{
			system::wait(0);
		}
		while (!func_432(vLocal_203, fLocal_206))
		{
			system::wait(0);
		}
		if (!func_180())
		{
			func_200(0);
			entity::set_entity_coords(player::player_ped_id(), -803.2507f, 172.9356f, 71.8447f, 1, false, 0, 1);
			entity::set_entity_heading(player::player_ped_id(), 108.735f);
			time::set_clock_time(10, 0, 0);
		}
		cutscene::remove_cutscene();
	}
}

void func_500(int iParam0)//Position - 0x410AC
{
	Global_89125 = iParam0;
}

void func_501(int iParam0)//Position - 0x410BA
{
	Global_68526.f_138 = iParam0;
}

void func_502(int iParam0, int iParam1)//Position - 0x410CA
{
	int iVar0;
	
	Global_55831 = iParam0;
	iVar0 = 0;
	while (iVar0 < Global_67913)
	{
		if (iParam1 == -1 || Global_67914[iVar0 /*9*/] == iParam1)
		{
			if (Global_67914[iVar0 /*9*/].f_6 != iParam0)
			{
				Global_67914[iVar0 /*9*/].f_6 = iParam0;
				Global_67914[iVar0 /*9*/].f_7 = 1;
				Global_67914[iVar0 /*9*/].f_8 = 0;
			}
		}
		iVar0++;
	}
}

void func_503(vector3 vParam0, float fParam3, int iParam4, int iParam5)//Position - 0x41135
{
	if (func_206())
	{
		gameplay::set_this_script_can_be_paused(0);
		gameplay::clear_bit(&(Global_91486.f_20), 2);
		gameplay::set_game_paused(true);
		if (player::is_player_playing(player::player_id()))
		{
			player::set_player_control(player::player_id(), false, 0);
		}
		Global_91482 = { vParam0 };
		Global_91485 = fParam3;
		Global_91481 = 1;
		if (iParam4 == 1)
		{
			gameplay::set_bit(&(Global_91486.f_20), 14);
		}
		else
		{
			gameplay::clear_bit(&(Global_91486.f_20), 14);
		}
		if (iParam5 == 1)
		{
			gameplay::set_bit(&(Global_91486.f_20), 24);
		}
		else
		{
			gameplay::clear_bit(&(Global_91486.f_20), 24);
		}
		func_441(1);
	}
}

var func_504()//Position - 0x411CA
{
	return Global_95993.f_2311.f_12.f_66;
}

void func_505(int iParam0, vector3 vParam1, float fParam4, int iParam5, int iParam6, int iParam7, int iParam8, int iParam9, int iParam10, int iParam11, int iParam12, int iParam13)//Position - 0x411DD
{
	int iVar0;
	
	iVar0 = 1;
	if (!func_206() || !func_524())
	{
		iVar0 = 0;
	}
	if (iVar0 == 1)
	{
		if (!func_521(iParam6, iParam7, iParam8, iParam13))
		{
			iVar0 = 0;
		}
	}
	if (iVar0 == 1)
	{
		func_519();
		while (!func_518())
		{
			system::wait(0);
		}
		*iParam0 = func_506(vParam1, fParam4);
	}
	else if (iParam9 == 1)
	{
		if (func_105(vParam1, 0f, 0f, 0f, 0))
		{
			vParam1 = { Global_95993.f_2311 };
			fParam4 = Global_95993.f_2311.f_6;
		}
		gameplay::clear_area(vParam1, 5f, 1, 0, 0, false);
		func_424(vParam1, 5f, 0);
		if (func_89(iParam12))
		{
			func_334(iParam12, 0);
			while (!func_318(iParam0, iParam12, vParam1, fParam4, 1, 0))
			{
				system::wait(0);
			}
		}
		else
		{
			streaming::request_model(iParam10);
			while (!streaming::has_model_loaded(iParam10))
			{
				system::wait(0);
			}
			*iParam0 = vehicle::create_vehicle(iParam10, vParam1, fParam4, 1, true);
			if (entity::does_entity_exist(*iParam0) && !entity::is_entity_dead(*iParam0, 0))
			{
				if (iParam11 == 0)
				{
					vehicle::set_vehicle_colour_combination(*iParam0, 0);
				}
				else if (iParam11 > 0)
				{
					vehicle::set_vehicle_colours(*iParam0, iParam11, iParam11);
				}
			}
			streaming::set_model_as_no_longer_needed(iParam10);
		}
	}
	if (iParam5 == 1)
	{
		if (((entity::does_entity_exist(*iParam0) && !entity::is_entity_dead(*iParam0, 0)) && entity::does_entity_exist(player::player_ped_id())) && !entity::is_entity_dead(player::player_ped_id(), 0))
		{
			ped::set_ped_into_vehicle(player::player_ped_id(), *iParam0, -1);
			vehicle::set_vehicle_on_ground_properly(*iParam0, 1084227584);
		}
	}
}

int func_506(vector3 vParam0, float fParam3)//Position - 0x41370
{
	return func_507(&(Global_95993.f_2311), vParam0, fParam3, 0);
}

int func_507(var uParam0, vector3 vParam1, float fParam4, int iParam5)//Position - 0x4138A
{
	int iVar0;
	vector3 vVar1;
	int iVar4;
	var uVar5;
	int iVar8;
	
	if (func_517(uParam0))
	{
		if (func_105(vParam1, 0f, 0f, 0f, 0))
		{
			vParam1 = { *uParam0 };
			fParam4 = uParam0->f_6;
		}
		if (uParam0->f_12.f_66 == joaat("monster") || uParam0->f_12.f_66 == joaat("marshall"))
		{
			if (object::is_point_in_angled_area(vParam1, -816.8716f, 185.6238f, 71.40275f, -807.4894f, 189.3762f, 75.27323f, 6.5f, 0, true))
			{
				vParam1 = { -850.93f, 158.82f, 65.7f };
				fParam4 = 89.5f;
			}
		}
		if (func_516(uParam0))
		{
			gameplay::clear_area(vParam1, 5f, 1, 0, 0, false);
			func_424(vParam1, 5f, 0);
			iVar0 = vehicle::create_vehicle(uParam0->f_12.f_66, vParam1, fParam4, 1, true);
			if (entity::does_entity_exist(iVar0))
			{
				vVar1 = { entity::get_entity_coords(iVar0, 1) };
				if (system::vdist2(vVar1, -1151.15f, -1530.32f, 7.48925f) <= 3f)
				{
					entity::set_entity_coords_no_offset(iVar0, vParam1, 0, 0, 1);
				}
				func_512(iVar0, &(uParam0->f_12), 0, 1);
				iVar4 = true;
				if (vehicle::is_this_model_a_boat(uParam0->f_12.f_66) || vehicle::_is_this_model_an_emergency_boat(uParam0->f_12.f_66))
				{
					if (!water::test_probe_against_water(vParam1.x, vParam1.y, (vParam1.y + 30f), vParam1.x, vParam1.y, (vParam1.y - 30f), &uVar5))
					{
						iVar4 = false;
					}
				}
				if (iVar4)
				{
					vehicle::set_vehicle_on_ground_properly(iVar0, 1084227584);
				}
				if (uParam0->f_7 == 1)
				{
					if (iParam5)
					{
						if (vehicle::is_this_model_a_car(entity::get_entity_model(iVar0)))
						{
							func_334(uParam0->f_11, 1);
						}
						else if (vehicle::is_this_model_a_bike(entity::get_entity_model(iVar0)))
						{
							func_334(uParam0->f_11, 2);
						}
					}
					vehicle::_0xAB04325045427AAE(iVar0, 0);
					vehicle::_0x428BACCDF5E26EAD(iVar0, false);
					vehicle::set_vehicle_has_strong_axles(iVar0, true);
					func_326(iVar0, uParam0->f_11);
				}
				else if ((!func_509(iVar0, uParam0->f_3, uParam0->f_8) && uParam0->f_10) && gameplay::are_strings_equal(script::get_this_script_name(), "startup_positioning"))
				{
					iVar8 = func_508(iVar0);
					if (iVar8 == -1)
					{
						uParam0->f_10 = 0;
					}
					else
					{
						func_425(iVar8);
					}
				}
				if (((Global_91486 != 13 && Global_91486 != 10) && Global_91486 != 11) && Global_91486 != 12)
				{
					if (gameplay::get_hash_key(&(Global_91486.f_3)) == Global_69514)
					{
						if (uParam0->f_12.f_66 == Global_101652.f_31373.f_69[21 /*78*/].f_66)
						{
							func_414(24, 0);
							func_425(24);
						}
					}
				}
				if (uParam0->f_9 == 1)
				{
					func_107(iVar0, uParam0->f_11);
				}
				streaming::set_model_as_no_longer_needed(uParam0->f_12.f_66);
				vVar1 = { entity::get_entity_coords(iVar0, 1) };
			}
			return iVar0;
		}
	}
	return iVar0;
}

int func_508(int iParam0)//Position - 0x4163B
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	int iVar4;
	
	iVar0 = 0;
	while (iVar0 < 68)
	{
		if ((entity::does_entity_exist(Global_68526.f_484[iVar0]) && !entity::is_entity_dead(Global_68526.f_484[iVar0], 0)) && vehicle::is_vehicle_driveable(Global_68526.f_484[iVar0], 0))
		{
			vehicle::get_vehicle_colours(iParam0, &iVar1, &iVar2);
			vehicle::get_vehicle_colours(Global_68526.f_484[iVar0], &iVar3, &iVar4);
			if (((entity::get_entity_model(iParam0) == entity::get_entity_model(Global_68526.f_484[iVar0]) && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68526.f_484[iVar0])) && iVar1 == iVar2) && iVar3 == iVar4)
			{
				return iVar0;
			}
		}
		iVar0++;
	}
	return -1;
}

bool func_509(int iParam0, vector3 vParam1, int iParam4)//Position - 0x416FE
{
	int iVar0;
	var uVar1[3];
	int iVar5;
	int iVar6;
	
	iVar0 = entity::get_entity_model(iParam0);
	switch (iVar0)
	{
		case joaat("cargobob"):
			if (func_511(iParam0, Global_68526.f_139[38], 0))
			{
				func_425(38);
				return true;
			}
			break;
		
		case 1938952078:
			if (func_511(iParam0, Global_68526.f_139[43], 1))
			{
				func_425(43);
				return true;
			}
			break;
		
		case joaat("cuban800"):
			iVar5 = ped::get_ped_nearby_vehicles(player::player_ped_id(), &uVar1);
			iVar6 = 0;
			while (iVar6 <= (iVar5 - 1))
			{
				if (func_511(iParam0, uVar1[iVar6], 1) && func_510(entity::get_entity_coords(uVar1[iVar6], 1), 2136.133f, 4780.563f, 39.9702f, 5f, 0))
				{
					if ((!iParam4 || func_105(vParam1, 0f, 0f, 0f, 0)) || gameplay::get_distance_between_coords(entity::get_entity_coords(iParam0, 1), entity::get_entity_coords(uVar1[iVar6], 1), 1) < 10f)
					{
						vehicle::delete_vehicle(&iParam0);
						return true;
					}
					else
					{
						return false;
					}
				}
				iVar6++;
			}
			break;
		
		case joaat("luxor2"):
			if ((entity::does_entity_exist(Global_68526.f_484[14]) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::is_vehicle_driveable(Global_68526.f_484[14], 0))
			{
				if (entity::get_entity_model(Global_68526.f_484[14]) == joaat("luxor2") && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68526.f_484[14]))
				{
					func_425(14);
					return true;
				}
			}
			break;
		
		case joaat("swift2"):
			if ((entity::does_entity_exist(Global_68526.f_484[20]) && vehicle::is_vehicle_driveable(iParam0, 0)) && vehicle::is_vehicle_driveable(Global_68526.f_484[20], 0))
			{
				if (entity::get_entity_model(Global_68526.f_484[20]) == joaat("swift2") && vehicle::get_vehicle_livery(iParam0) == vehicle::get_vehicle_livery(Global_68526.f_484[20]))
				{
					func_425(20);
					return true;
				}
			}
			break;
	}
	return false;
}

bool func_510(vector3 vParam0, vector3 vParam3, float fParam6, int iParam7)//Position - 0x41906
{
	if (fParam6 < 0f)
	{
		fParam6 = 0f;
	}
	if (!iParam7)
	{
		if (gameplay::absf((vParam0.x - vParam3.x)) <= fParam6)
		{
			if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
			{
				if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
				{
					return true;
				}
			}
		}
	}
	else if (gameplay::absf((vParam0.x - vParam3.x)) <= fParam6)
	{
		if (gameplay::absf((vParam0.y - vParam3.y)) <= fParam6)
		{
			return true;
		}
	}
	return false;
}

bool func_511(int iParam0, int iParam1, int iParam2)//Position - 0x41981
{
	int iVar0;
	int iVar1;
	int iVar2;
	int iVar3;
	
	if ((entity::does_entity_exist(iParam1) && !entity::is_entity_dead(iParam1, 0)) && vehicle::is_vehicle_driveable(iParam1, 0))
	{
		if (iParam2)
		{
			vehicle::get_vehicle_colours(iParam0, &iVar0, &iVar1);
			vehicle::get_vehicle_colours(iParam1, &iVar2, &iVar3);
			if (iVar0 == iVar2 && iVar1 == iVar3)
			{
				return true;
			}
		}
		else
		{
			return true;
		}
	}
	return false;
}

void func_512(int iParam0, var uParam1, int iParam2, int iParam3)//Position - 0x419E2
{
	int iVar0;
	int iVar1;
	int iVar2;
	
	if (vehicle::is_vehicle_driveable(iParam0, 0))
	{
		if (gameplay::get_hash_key(&(uParam1->f_1)) != 0)
		{
			vehicle::set_vehicle_number_plate_text(iParam0, &(uParam1->f_1));
		}
		if (*uParam1 >= 0 && *uParam1 < vehicle::get_number_of_vehicle_number_plates())
		{
			vehicle::set_vehicle_number_plate_text_index(iParam0, *uParam1);
		}
		if (uParam1->f_66 == joaat("sovereign"))
		{
			uParam1->f_5 = 111;
			uParam1->f_6 = 111;
			uParam1->f_7 = 111;
		}
		else if (uParam1->f_66 == joaat("casco"))
		{
			iVar0 = 1;
			if (gameplay::is_bit_set(uParam1->f_77, func_109(iVar0 + 1)))
			{
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), func_109(iVar0 + 1));
			}
		}
		else if (uParam1->f_66 == joaat("sandking") || uParam1->f_66 == joaat("sandking2"))
		{
			iVar1 = 1;
			if (gameplay::is_bit_set(uParam1->f_77, func_109(iVar1 + 1)))
			{
			}
			else
			{
				gameplay::set_bit(&(uParam1->f_77), func_109(iVar1 + 1));
			}
		}
		if (gameplay::is_bit_set(uParam1->f_77, 13))
		{
			vehicle::set_vehicle_custom_primary_colour(iParam0, uParam1->f_71, uParam1->f_72, uParam1->f_73);
		}
		else
		{
			vehicle::clear_vehicle_custom_primary_colour(iParam0);
		}
		if (gameplay::is_bit_set(uParam1->f_77, 12))
		{
			vehicle::set_vehicle_custom_secondary_colour(iParam0, uParam1->f_71, uParam1->f_72, uParam1->f_73);
		}
		else
		{
			vehicle::clear_vehicle_custom_secondary_colour(iParam0);
		}
		vehicle::set_vehicle_colours(iParam0, uParam1->f_5, uParam1->f_6);
		if (uParam1->f_7 < 0)
		{
			uParam1->f_7 = 0;
		}
		if (uParam1->f_8 < 0)
		{
			uParam1->f_8 = 0;
		}
		vehicle::set_vehicle_extra_colours(iParam0, uParam1->f_7, uParam1->f_8);
		if (((gameplay::is_bit_set(uParam1->f_77, 15) || func_515(iParam0)) || (((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0) && uParam1->f_9[20] > 0)) && func_514())
		{
			uParam1->f_62 = 0;
			uParam1->f_63 = 0;
			uParam1->f_64 = 0;
		}
		else if ((uParam1->f_62 == 0 && uParam1->f_63 == 0) && uParam1->f_64 == 0)
		{
			uParam1->f_62 = 255;
			uParam1->f_63 = 255;
			uParam1->f_64 = 255;
		}
		vehicle::set_vehicle_tyre_smoke_color(iParam0, uParam1->f_62, uParam1->f_63, uParam1->f_64);
		if (uParam1->f_65 == -1 && uParam1->f_66 != joaat("granger"))
		{
			vehicle::set_vehicle_window_tint(iParam0, 0);
		}
		else
		{
			vehicle::set_vehicle_window_tint(iParam0, 0);
			vehicle::set_vehicle_window_tint(iParam0, uParam1->f_65);
		}
		vehicle::set_vehicle_tyres_can_burst(iParam0, !gameplay::is_bit_set(uParam1->f_77, 9));
		if (iParam2)
		{
			vehicle::set_vehicle_doors_locked(iParam0, uParam1->f_70);
		}
		vehicle::_set_vehicle_neon_lights_colour(iParam0, uParam1->f_74, uParam1->f_75, uParam1->f_76);
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 2, gameplay::is_bit_set(uParam1->f_77, 28));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 3, gameplay::is_bit_set(uParam1->f_77, 29));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 0, gameplay::is_bit_set(uParam1->f_77, 30));
		vehicle::_set_vehicle_neon_light_enabled(iParam0, 1, gameplay::is_bit_set(uParam1->f_77, 31));
		vehicle::set_vehicle_is_stolen(iParam0, gameplay::is_bit_set(uParam1->f_77, 10));
		if (vehicle::get_vehicle_livery_count(iParam0) > 1 && uParam1->f_67 >= 0)
		{
			vehicle::set_vehicle_livery(iParam0, uParam1->f_67);
		}
		if (uParam1->f_69 > -1 && uParam1->f_69 < 255)
		{
			if (!vehicle::is_this_model_a_bicycle(entity::get_entity_model(iParam0)))
			{
				if (vehicle::is_this_model_a_bike(entity::get_entity_model(iParam0)))
				{
					if (uParam1->f_69 == 6)
					{
						func_513(iParam0, uParam1->f_69);
					}
				}
				else
				{
					func_513(iParam0, uParam1->f_69);
				}
			}
		}
		if (vehicle::is_vehicle_a_convertible(iParam0, 0))
		{
			if ((uParam1->f_68 == 0 || uParam1->f_68 == 3) || uParam1->f_68 == 5)
			{
				vehicle::raise_convertible_roof(iParam0, 1);
			}
			else
			{
				vehicle::lower_convertible_roof(iParam0, 1);
			}
		}
		if (iParam3)
		{
			func_314(&iParam0, &(uParam1->f_9), &(uParam1->f_59));
		}
		if (!vehicle::is_this_model_a_heli(uParam1->f_66) && !vehicle::is_this_model_a_boat(uParam1->f_66))
		{
			iVar2 = 0;
			while (iVar2 <= 11)
			{
				if (gameplay::is_bit_set(uParam1->f_77, func_109(iVar2 + 1)))
				{
					if (!vehicle::is_vehicle_extra_turned_on(iParam0, iVar2 + 1))
					{
						vehicle::set_vehicle_extra(iParam0, iVar2 + 1, false);
					}
				}
				else if (vehicle::is_vehicle_extra_turned_on(iParam0, iVar2 + 1))
				{
					vehicle::set_vehicle_extra(iParam0, iVar2 + 1, true);
				}
				iVar2++;
			}
		}
		if ((entity::get_entity_model(iParam0) == joaat("sheava") || entity::get_entity_model(iParam0) == joaat("omnis")) || entity::get_entity_model(iParam0) == joaat("le7b"))
		{
			if (vehicle::get_vehicle_mod(iParam0, 0) == -1)
			{
				vehicle::set_vehicle_extra(iParam0, 1, false);
			}
		}
		if (vehicle::is_this_model_a_plane(uParam1->f_66))
		{
			if (!gameplay::is_bit_set(uParam1->f_77, 23))
			{
				if (gameplay::is_bit_set(uParam1->f_77, 22))
				{
					vehicle::_set_vehicle_landing_gear(iParam0, 2);
				}
				else
				{
					vehicle::_set_vehicle_landing_gear(iParam0, 3);
				}
			}
			else
			{
				vehicle::_set_vehicle_landing_gear(iParam0, 4);
			}
		}
		if (gameplay::is_bit_set(uParam1->f_77, 27))
		{
			decorator::decor_set_bool(iParam0, "IgnoredByQuickSave", 1);
		}
		else
		{
			decorator::decor_set_bool(iParam0, "IgnoredByQuickSave", 0);
		}
	}
}

void func_513(int iParam0, int iParam1)//Position - 0x41E90
{
	int iVar0;
	int iVar1;
	
	if (vehicle::get_num_mod_kits(iParam0) > 0)
	{
		vehicle::set_vehicle_mod_kit(iParam0, 0);
		iVar0 = vehicle::get_vehicle_mod(iParam0, 24);
		iVar1 = vehicle::get_vehicle_mod_variation(iParam0, 24);
		vehicle::set_vehicle_wheel_type(iParam0, iParam1);
		if (entity::get_entity_model(iParam0) == joaat("tornado6"))
		{
			return;
		}
		if (iVar0 == -1)
		{
			vehicle::remove_vehicle_mod(iParam0, 24);
		}
		else
		{
			vehicle::set_vehicle_mod(iParam0, 24, iVar0, iVar1 == 1);
		}
	}
}

int func_514()//Position - 0x41EF5
{
	return dlc2::is_dlc_present(-1691188696);
}

int func_515(int iParam0)//Position - 0x41F06
{
	int iVar0;
	
	if (entity::does_entity_exist(iParam0))
	{
		if (vehicle::is_vehicle_driveable(iParam0, 0))
		{
			if (decorator::decor_is_registered_as_type("MPBitset", 3))
			{
				if (decorator::decor_exist_on(iParam0, "MPBitset"))
				{
					iVar0 = decorator::decor_get_int(iParam0, "MPBitset");
				}
				return gameplay::is_bit_set(iVar0, 4);
			}
		}
	}
	return false;
}

bool func_516(var uParam0)//Position - 0x41F51
{
	if (func_517(uParam0))
	{
		if (streaming::has_model_loaded(uParam0->f_12.f_66))
		{
			return true;
		}
		else
		{
			return false;
		}
		return true;
	}
	else
	{
		return false;
	}
	return true;
}

bool func_517(var uParam0)//Position - 0x41F86
{
	if (uParam0->f_12.f_66 == 0)
	{
		return false;
	}
	if (!func_114(uParam0->f_12.f_66, 0))
	{
		return false;
	}
	if (uParam0->f_12.f_66 == joaat("stunt") && func_510(*uParam0, 1694.62f, 3276.27f, 41.31f, 1056964608, 0))
	{
		return false;
	}
	return true;
}

int func_518()//Position - 0x41FE5
{
	return func_516(&(Global_95993.f_2311));
}

void func_519()//Position - 0x41FF8
{
	func_520(&(Global_95993.f_2311));
}

void func_520(var uParam0)//Position - 0x4200B
{
	if (func_517(uParam0))
	{
		streaming::request_model(uParam0->f_12.f_66);
	}
}

bool func_521(int iParam0, int iParam1, int iParam2, int iParam3)//Position - 0x42029
{
	if (vehicle::is_this_model_a_boat(Global_95993.f_2311.f_12.f_66))
	{
		return false;
	}
	if (iParam1 == 0 && vehicle::is_this_model_a_heli(Global_95993.f_2311.f_12.f_66))
	{
		return false;
	}
	if (iParam2 == 0 && func_523(Global_95993.f_2311.f_12.f_66))
	{
		return false;
	}
	if (iParam3 == 0 && vehicle::is_this_model_a_plane(Global_95993.f_2311.f_12.f_66))
	{
		return false;
	}
	if (iParam0 == 1)
	{
		if (!func_522())
		{
			return false;
		}
	}
	return true;
}

bool func_522()//Position - 0x420B7
{
	float fVar0;
	
	if (!func_524())
	{
		return false;
	}
	if ((vehicle::is_this_model_a_boat(Global_95993.f_2311.f_12.f_66) || vehicle::is_this_model_a_plane(Global_95993.f_2311.f_12.f_66)) || vehicle::is_this_model_a_train(Global_95993.f_2311.f_12.f_66))
	{
		return false;
	}
	fVar0 = vehicle::_get_vehicle_model_max_speed(Global_95993.f_2311.f_12.f_66);
	if (fVar0 < 37f)
	{
		return false;
	}
	return true;
}

bool func_523(int iParam0)//Position - 0x4212C
{
	switch (iParam0)
	{
		case joaat("police"):
		case joaat("police2"):
		case joaat("police3"):
		case joaat("police4"):
		case joaat("polmav"):
		case joaat("policeb"):
		case joaat("policet"):
		case joaat("policeold2"):
		case joaat("policeold1"):
		case joaat("sheriff"):
		case joaat("sheriff2"):
			return true;
			break;
	}
	return false;
}

int func_524()//Position - 0x42185
{
	return func_517(&(Global_95993.f_2311));
}

int func_525()//Position - 0x42198
{
	if (!Global_91486 == 10 && !Global_91486 == 9)
	{
		return 0;
	}
	return Global_91486.f_2;
}

void func_526(int iParam0)//Position - 0x421C2
{
	if (iParam0)
	{
		StringCopy(&Global_100708, script::get_this_script_name(), 24);
		Global_100702 = 1;
	}
	else
	{
		StringCopy(&Global_100708, "NULL", 24);
		Global_100702 = 0;
	}
}

void func_527(int iParam0, int iParam1)//Position - 0x421EE
{
	if (iParam1)
	{
		if (!func_471(iParam0, 2, 1))
		{
			func_529(iParam0, 2, 1);
		}
	}
	else if (func_471(iParam0, 2, 1))
	{
		func_528(iParam0, 2, 1);
	}
}

void func_528(int iParam0, int iParam1, int iParam2)//Position - 0x42225
{
	int iVar0;
	
	if (iParam2)
	{
		gameplay::clear_bit(&(Global_91538.f_1308[iParam0]), iParam1);
	}
	else if (network::network_is_game_in_progress())
	{
		if (func_473() == 0)
		{
			iVar0 = func_20(func_472(iParam0), -1, 0);
			gameplay::clear_bit(&iVar0, iParam1);
			func_371(func_472(iParam0), iVar0, -1, 1, 0);
		}
	}
	else
	{
		gameplay::clear_bit(&(Global_101652.f_668[iParam0]), iParam1);
	}
}

void func_529(int iParam0, int iParam1, int iParam2)//Position - 0x4228E
{
	int iVar0;
	
	if (iParam2)
	{
		gameplay::set_bit(&(Global_91538.f_1308[iParam0]), iParam1);
	}
	else if (network::network_is_game_in_progress())
	{
		if (func_473() == 0)
		{
			iVar0 = func_20(func_472(iParam0), -1, 0);
			gameplay::set_bit(&iVar0, iParam1);
			func_371(func_472(iParam0), iVar0, -1, 1, 0);
		}
	}
	else
	{
		gameplay::set_bit(&(Global_101652.f_668[iParam0]), iParam1);
	}
}

void func_530()//Position - 0x422F7
{
	if (entity::does_entity_exist(iLocal_104) && !ped::is_ped_injured(iLocal_104))
	{
		ai::clear_ped_tasks(iLocal_104);
	}
	if (entity::does_entity_exist(iLocal_103) && !ped::is_ped_injured(iLocal_103))
	{
		ai::clear_ped_tasks(iLocal_103);
	}
	func_526(0);
	func_498(1, 1);
	func_527(7, 0);
	func_527(8, 0);
	func_527(9, 0);
	func_527(10, 0);
	func_527(11, 0);
	func_527(12, 0);
	func_527(13, 0);
	func_527(14, 0);
	func_527(15, 0);
	func_527(16, 0);
	func_527(17, 0);
	func_527(18, 0);
	func_527(19, 0);
	func_527(20, 0);
	func_527(21, 0);
	func_531();
	entity::set_vehicle_as_no_longer_needed(&iLocal_111);
	entity::set_ped_as_no_longer_needed(&iLocal_104);
	entity::set_vehicle_as_no_longer_needed(&iLocal_112);
	entity::set_vehicle_as_no_longer_needed(&iLocal_113);
	entity::set_ped_as_no_longer_needed(&iLocal_103);
	player::set_wanted_level_multiplier(1f);
	ai::assisted_movement_remove_route("Family5d");
	func_500(1);
	pathfind::set_roads_back_to_original(Vector(5.785122f, -1682.939f, -1057.899f) + Vector(4f, 30f, 29f), Vector(5.785122f, -1682.939f, -1057.899f) - Vector(4f, 30f, 29f), 1);
	pathfind::set_ped_paths_back_to_original(Vector(5.75302f, -1325.827f, -1329.113f) + Vector(2.5f, 44f, 13.25f), Vector(5.75302f, -1325.827f, -1329.113f) - Vector(2.5f, 44f, 13.25f), 0);
	vehicle::set_all_vehicle_generators_active_in_area(Vector(6.373647f, -1688.035f, -1112.913f) + Vector(3.5f, 24.75f, 22.75f), Vector(6.373647f, -1688.035f, -1112.913f) - Vector(3.5f, 24.75f, 22.75f), true, 1);
	ai::set_scenario_type_enabled("WORLD_VEHICLE_DRIVE_SOLO", true);
	pathfind::set_ped_paths_back_to_original(Vector(4.37374f, -1694.245f, -1106.889f) + Vector(1f, 2.5f, 2.5f), Vector(4.37374f, -1694.245f, -1106.889f) - Vector(1f, 2.5f, 2.5f), 0);
	pathfind::set_ped_paths_back_to_original(Vector(4.374632f, -1691.397f, -1108.549f) + Vector(1f, 2.5f, 2.5f), Vector(4.374632f, -1691.397f, -1108.549f) - Vector(1f, 2.5f, 2.5f), 0);
	if (entity::does_entity_exist(iLocal_139))
	{
		entity::set_object_as_no_longer_needed(&iLocal_139);
	}
	if (entity::does_entity_exist(iLocal_140))
	{
		entity::set_object_as_no_longer_needed(&iLocal_140);
	}
	if (cam::does_cam_exist(iLocal_141))
	{
		cam::destroy_cam(iLocal_141, 0);
	}
	player::set_max_wanted_level(5);
	func_142(1);
	entity::remove_forced_object(-1105.241f, -1697.025f, 3.3678f, 2f, -741944541);
	audio::set_audio_flag("AvoidMissionCompleteDelay", 0);
	script::terminate_this_thread();
}

void func_531()//Position - 0x4257B
{
	Global_14611 = 0;
	func_165();
}

void func_532()//Position - 0x4258B
{
	int iVar0;
	
	if (script::has_script_loaded("buddyDeathResponse"))
	{
		system::start_new_script("buddyDeathResponse", 1424);
	}
	if (Global_101652.f_8028 || func_138(0))
	{
		if (!func_533())
		{
			iVar0 = func_137();
			if (iVar0 != -1)
			{
				if (!func_129(iVar0))
				{
					return;
				}
				gameplay::set_bit(&(Global_82571[iVar0 /*5*/].f_1), 5);
				return;
			}
		}
		else
		{
			func_134();
		}
	}
}

bool func_533()//Position - 0x425FC
{
	if (((Global_91486 == 13 || Global_91486 == 10) || Global_91486 == 11) || Global_91486 == 12)
	{
		return false;
	}
	return true;
}

void func_534(int iParam0)//Position - 0x4263A
{
	if (iParam0 != -1)
	{
		if (Global_91524 == -1)
		{
			Global_91524 = iParam0;
		}
	}
}

