// File: /workspace/github_c_makefile_star2_O2/QwazyWabbitWOS[P]lmctf60/g_save.c
// Function: InitGame
void InitGame(void)
{

#ifdef	_WIN32
	_CrtMemCheckpoint(&startup1);
#endif
	// CTF CODE -- LM_JORM
	FILE* file;
	char		line[MAX_INFO_STRING];
	char		fname[MAX_QPATH];
	size_t		i;

	// END CTF CODE -- LM_JORM

	gi.dprintf("==== InitGame %s %d-%s %s ====\n", GAMEVERSION, LMCTF_REVISION, LMCTF_VERSION, __DATE__);

	// seed the random number generator
	srand((unsigned)time(NULL));

	gun_x = gi.cvar("gun_x", "0", 0);
	gun_y = gi.cvar("gun_y", "0", 0);
	gun_z = gi.cvar("gun_z", "0", 0);

	//FIXME: sv_ prefix is wrong for these
	sv_rollspeed = gi.cvar("sv_rollspeed", "200", 0);
	sv_rollangle = gi.cvar("sv_rollangle", "2", 0);
	sv_maxvelocity = gi.cvar("sv_maxvelocity", "2000", 0);
	sv_gravity = gi.cvar("sv_gravity", "800", 0);

	// noset vars
	dedicated = gi.cvar("dedicated", "0", CVAR_NOSET);

	gi.cvar("revision", va("%d", LMCTF_REVISION), CVAR_SERVERINFO);
	gi.cvar_set("revision", va("%d-%s", LMCTF_REVISION, LMCTF_VERSION));

	// latched vars
	sv_cheats = gi.cvar("cheats", "0", CVAR_SERVERINFO | CVAR_LATCH);
	gi.cvar("gamename", GAMEVERSION, CVAR_SERVERINFO | CVAR_LATCH);
	gi.cvar("gamedate", __DATE__, CVAR_SERVERINFO | CVAR_LATCH);

	maxclients = gi.cvar("maxclients", "4", CVAR_SERVERINFO | CVAR_LATCH);
	//maxspectators = gi.cvar ("maxspectators", "4", CVAR_SERVERINFO);
	//-bat
	maxspectators = gi.cvar("maxspectators", "24", CVAR_SERVERINFO);
	deathmatch = gi.cvar("deathmatch", "0", CVAR_LATCH);
	coop = gi.cvar("coop", "0", CVAR_LATCH);
	skill = gi.cvar("skill", "1", CVAR_LATCH);
	maxentities = gi.cvar("maxentities", "1024", CVAR_LATCH);

	// change anytime vars
	dmflags = gi.cvar("dmflags", "0", CVAR_SERVERINFO);
	fraglimit = gi.cvar("fraglimit", "0", CVAR_SERVERINFO);
	timelimit = gi.cvar("timelimit", "0", CVAR_SERVERINFO);
	railtime = gi.cvar("railtime", "0", CVAR_SERVERINFO);
	password = gi.cvar("password", "", CVAR_USERINFO);
	spectator_password = gi.cvar("spectator_password", "", CVAR_USERINFO);
	needpass = gi.cvar("needpass", "0", CVAR_SERVERINFO);
	filterban = gi.cvar("filterban", "1", 0);

	g_select_empty = gi.cvar("g_select_empty", "0", CVAR_ARCHIVE);

	run_pitch = gi.cvar("run_pitch", "0.002", 0);
	run_roll = gi.cvar("run_roll", "0.005", 0);
	bob_up = gi.cvar("bob_up", "0.005", 0);
	bob_pitch = gi.cvar("bob_pitch", "0.002", 0);
	bob_roll = gi.cvar("bob_roll", "0.002", 0);

	runes = gi.cvar("runes", "15", CVAR_SERVERINFO); // CTF CODE -- LM_CTF
	ctfflags = gi.cvar("ctfflags", "0", CVAR_SERVERINFO); // CTF CODE -- LM_CTF
	refset = gi.cvar("refset", "0", CVAR_SERVERINFO); // CTF CODE -- LM_CTF
	logrename = gi.cvar("logrename", "", 0); // CTF CODE -- LM_CTF
	hostname = gi.cvar("hostname", "noname", CVAR_SERVERINFO); // CTF CODE -- LM_CTF
	gamedir = gi.cvar("game", "lmctf", CVAR_SERVERINFO); // CTF CODE -- LM_CTF
	skinset = gi.cvar("skinset", "0", CVAR_SERVERINFO); // CTF CODE -- LM_CTF
#ifdef OLDOBSERVERCODE
	autoobserve = gi.cvar("autoobserve", "0", CVAR_USERINFO); // CTF CODE -- LM_CTF
#endif
	refpassword = gi.cvar("refpassword", "", 0); // CTF CODE -- LM_CTF
	rconpassword = gi.cvar("rcon_password", "", 0); // CTF CODE -- LM_CTF
	disabled_weps = gi.cvar("disabled_weps", "0", 0);
	fastswitch = gi.cvar("fastswitch", "0", 0);
	mod_website = gi.cvar("mod_website", "http://lmctf.com", 0);
	autolock = gi.cvar("autolock", "0", 0);
	countdown_time = gi.cvar("countdown_time", "15", 0);


#ifdef ZBOT
	use_zbotdetect = gi.cvar("use_zbotdetect", "0", CVAR_SERVERINFO);
#endif

	//configuration files
	motd_file = gi.cvar("motd_file", "motd.txt", 0); //CTF CODE -- LM_CTF
	server_file = gi.cvar("server_file", "server.cfg", 0); //CTF CODE -- LM_CTF
	maplist_file = gi.cvar("maplist_file", "maplist.txt", 0);  //CTF CODE -- LM_CTF
	skin_file = gi.cvar("skin_file", "skins.ini", 0);
	skin_debug = gi.cvar("skin_debug", "0", 0);	// for debugging team skins in SkinsReadFile
	flag_init = gi.cvar("flag_init", "0", 0);	// flag spawning frame initialization.



	//logging startup after vars initialized
	ctf_SetLogName();
	sl_Logging(&gi, GAMEVERSION);	// StdLog - Mark Davies (Only required to set patch name)

	// dm map list
	sv_maplist = gi.cvar("sv_maplist", "", 0);

	// items
	InitItems();

	Com_sprintf(game.helpmessage1, sizeof(game.helpmessage1), "");

	Com_sprintf(game.helpmessage2, sizeof(game.helpmessage2), "");

	// initialize all entities for this game
	game.maxentities = maxentities->value;
	g_edicts = gi.TagMalloc(game.maxentities * sizeof(g_edicts[0]), TAG_GAME);
	globals.edicts = g_edicts;
	globals.max_edicts = game.maxentities;

	// initialize all clients for this game
	game.maxclients = maxclients->value;
	game.clients = gi.TagMalloc(game.maxclients * sizeof(game.clients[0]), TAG_GAME);
	globals.num_edicts = game.maxclients + 1;


	// CTF CODE -- LM_JORM
	if (!maplistindex) // Have we done this before?
	{
		//		sprintf (fname, "%s/maplist.txt", gamedir->string);
		sprintf(fname, "%s/%s", gamedir->string, maplist_file->string);
		file = fopen(fname, "r");
		if (!file)
			file = fopen("maplist.txt", "r");

		if (file)
		{
			// If there is a maplist file, read it
			//   And use it for our list of maps.

			maplistindex = 0;
			while (fgets(line, 255, file))
			{
				char* tempname = gi.TagMalloc(100, TAG_GAME);
				int tempmin = 0;
				int tempmax = 99;
				if (sscanf(line, "%s %d %d", tempname, &tempmin, &tempmax) != 3) {
					if (sscanf(line, "%s %d", tempname, &tempmin) != 2) {
						if (sscanf(line, "%s", tempname) != 1) {
							sprintf(line, "Bad entry in maplist");
							gi.dprintf(line);
							gi.TagFree(tempname);
							continue;
						}
					}
				}
				//, maplist[maplistindex]))
				// convert to lower case for subsequent comparisons
				for (i = 0; i < strlen(tempname); i++)
					tempname[i] = tolower(tempname[i]);
				maplist[maplistindex].mapname = tempname;
				maplist[maplistindex].minplayers = tempmin;
				maplist[maplistindex].maxplayers = tempmax;

				maplistindex++;

			}
			SortMaplist(maplist, 0, maplistindex - 1);
			//maplist[maplistindex][0] = 0; // Blank last entry
			sprintf(line, "%d entries in maplist.\n", maplistindex);
			gi.dprintf(line);
			fclose(file);
			if (maplistindex)  // Did we read anything?
			{
				Randomize_Map_List(maplistindex);
				maplistindex = -1; // This means first time through the list
			}
			else
				maplistindex = -2; // Not going to use it

		}
		else
		{
			sprintf(line, "Can't find %s.  Reverting to standard maps.\n", fname);
			gi.dprintf(line);
			maplistindex = -2; // Not going to use it
		}
	}


	// Reading the help text file

	sprintf(fname, "%s/help.txt", gamedir->string);
	file = fopen(fname, "r");
	if (!file)
		file = fopen("help.txt", "r");

	if (file)
	{
		// If there is a help file, read it

		i = 0;
		while (fgets(line, 255, file))
		{
			// Nul termination is guaranteed from fgets.
			memcpy(helptext[i], line, 24);
			i++;
		}
		helptext[i][0] = 0; // Blank last entry
		fclose(file);
		sprintf(line, "Read %zu lines of %s.\n", i, fname);
		gi.dprintf(line);
	}
	else
	{
		sprintf(line, "Can't find %s.  You get no help!\n", fname);
		gi.dprintf(line);
		strcpy(helptext[0], "No help available."); // Not going to use it
		helptext[1][0] = 0;
	}

	if (motd_file && strcmp(motd_file->string, "") != 0)
		sprintf(fname, "%s/%s", gamedir->string, motd_file->string);
	else
		sprintf(fname, "%s/motd.txt", gamedir->string);
	file = fopen(fname, "r");
	if (!file)
		file = fopen("motd.txt", "r");
	if (file)
	{
		size_t count = fread(motd, sizeof motd, 1, file);
		if (count)
			; // don't worry, be happy
		fclose(file);
	}

	SkinsReadFile(); // READ our skins.ini


	// END CTF CODE -- LM_JORM

}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x258, %rsp            # imm = 0x258
movq 0x30cd4(%rip), %r15     # 0x66600
leaq 0x1e43a(%rip), %rdi     # 0x53d6d
leaq 0x19fac(%rip), %rsi     # 0x4f8e6
leaq 0x1e44c(%rip), %rcx     # 0x53d8d
leaq 0x1c030(%rip), %r8      # 0x51978
pushq $0x6c
popq %r14
movl %r14d, %edx
xorl %eax, %eax
callq *0x8(%r15)
xorl %edi, %edi
callq 0x18f10
movl %eax, %edi
callq 0x18a90
leaq 0x1e430(%rip), %rdi     # 0x53d9a
leaq 0x2173b(%rip), %r13     # 0x570ac
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x310fc(%rip), %rcx     # 0x66a80
movq %rax, (%rcx)
leaq 0x1e412(%rip), %rdi     # 0x53da0
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30a67(%rip), %rcx     # 0x66408
movq %rax, (%rcx)
leaq 0x1e3fb(%rip), %rdi     # 0x53da6
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x310da(%rip), %rcx     # 0x66a98
movq %rax, (%rcx)
leaq 0x1e3e4(%rip), %rdi     # 0x53dac
leaq 0x1e3ea(%rip), %rsi     # 0x53db9
xorl %edx, %edx
callq *0x120(%r15)
movq 0x313d9(%rip), %rcx     # 0x66db8
movq %rax, (%rcx)
leaq 0x1e3d4(%rip), %rdi     # 0x53dbd
leaq 0x18680(%rip), %rsi     # 0x4e070
xorl %edx, %edx
callq *0x120(%r15)
movq 0x31148(%rip), %rcx     # 0x66b48
movq %rax, (%rcx)
leaq 0x1e3c0(%rip), %rdi     # 0x53dca
leaq 0x1e3c8(%rip), %rsi     # 0x53dd9
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30f4f(%rip), %rcx     # 0x66970
movq %rax, (%rcx)
leaq 0x1e3b3(%rip), %rdi     # 0x53dde
leaq 0x1e3b7(%rip), %rsi     # 0x53de9
xorl %edx, %edx
callq *0x120(%r15)
movq 0x3157e(%rip), %rcx     # 0x66fc0
movq %rax, (%rcx)
leaq 0x1e3a1(%rip), %rdi     # 0x53ded
pushq $0x8
popq %rdx
movq %r13, %rsi
callq *0x120(%r15)
movq 0x31258(%rip), %rcx     # 0x66cb8
movq %rax, (%rcx)
movq 0x120(%r15), %rbx
leaq 0x18e15(%rip), %rdi     # 0x4e886
movl %r14d, %esi
xorl %eax, %eax
callq 0x194e0
leaq 0x1e375(%rip), %r12     # 0x53df7
pushq $0x4
popq %rbp
movq %r12, %rdi
movq %rax, %rsi
movl %ebp, %edx
callq *%rbx
movq 0x128(%r15), %rbx
leaq 0x1e363(%rip), %rdi     # 0x53e00
movl %r14d, %esi
leaq 0x1e2e6(%rip), %rdx     # 0x53d8d
xorl %eax, %eax
callq 0x194e0
movq %r12, %rdi
movq %rax, %rsi
callq *%rbx
leaq 0x1e349(%rip), %rdi     # 0x53e06
pushq $0x14
popq %r14
movq %r13, %rsi
movl %r14d, %edx
callq *0x120(%r15)
movq 0x30f23(%rip), %rcx     # 0x669f8
movq %rax, (%rcx)
leaq 0x1e32e(%rip), %rdi     # 0x53e0d
leaq 0x19e00(%rip), %rsi     # 0x4f8e6
movl %r14d, %edx
callq *0x120(%r15)
leaq 0x1e31f(%rip), %rdi     # 0x53e16
leaq 0x1be7a(%rip), %rsi     # 0x51978
movl %r14d, %edx
callq *0x120(%r15)
leaq 0x1e310(%rip), %rdi     # 0x53e1f
leaq 0x1928a(%rip), %rsi     # 0x4eda0
movl %r14d, %edx
callq *0x120(%r15)
movq 0x30a09(%rip), %rcx     # 0x66530
movq %rax, (%rcx)
leaq 0x1e2f9(%rip), %rdi     # 0x53e2a
leaq 0x1e314(%rip), %rsi     # 0x53e4c
movl %ebp, %edx
callq *0x120(%r15)
movq 0x313f0(%rip), %rcx     # 0x66f38
movq %rax, (%rcx)
leaq 0x199fc(%rip), %rdi     # 0x4f54e
pushq $0x10
popq %r12
movq %r13, %rsi
movl %r12d, %edx
callq *0x120(%r15)
movq 0x31356(%rip), %rcx     # 0x66ec0
movq %rax, (%rcx)
leaq 0x1e5ec(%rip), %rdi     # 0x54160
movq %r13, %rsi
movl %r12d, %edx
callq *0x120(%r15)
movq 0x313d8(%rip), %rcx     # 0x66f60
movq %rax, (%rcx)
leaq 0x1e2a6(%rip), %rdi     # 0x53e38
leaq 0x184cb(%rip), %r14     # 0x4e064
movq %r14, %rsi
movl %r12d, %edx
callq *0x120(%r15)
movq 0x30b8b(%rip), %rcx     # 0x66738
movq %rax, (%rcx)
leaq 0x1e287(%rip), %rdi     # 0x53e3e
leaq 0x1e28c(%rip), %rsi     # 0x53e4a
movl %r12d, %edx
callq *0x120(%r15)
movq 0x308d9(%rip), %rcx     # 0x664a8
movq %rax, (%rcx)
leaq 0x1893e(%rip), %rdi     # 0x4e517
movq %r13, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x30a2c(%rip), %rcx     # 0x66618
movq %rax, (%rcx)
leaq 0x18948(%rip), %rdi     # 0x4e53e
movq %r13, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x311f7(%rip), %rcx     # 0x66e00
movq %rax, (%rcx)
leaq 0x1891d(%rip), %rdi     # 0x4e530
movq %r13, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x30a8a(%rip), %rcx     # 0x666b0
movq %rax, (%rcx)
leaq 0x1e21f(%rip), %rdi     # 0x53e4f
movq %r13, %rsi
movq %r13, %rbx
movl %ebp, %edx
callq *0x120(%r15)
movq 0x30a0a(%rip), %rcx     # 0x66650
movq %rax, (%rcx)
leaq 0x1e2a9(%rip), %rdi     # 0x53ef9
leaq 0x1a2ee(%rip), %r12     # 0x4ff45
pushq $0x2
popq %r13
movq %r12, %rsi
movl %r13d, %edx
callq *0x120(%r15)
movq 0x30be9(%rip), %rcx     # 0x66858
movq %rax, (%rcx)
leaq 0x1e1df(%rip), %rdi     # 0x53e58
movq %r12, %rsi
movl %r13d, %edx
callq *0x120(%r15)
movq 0x30f9b(%rip), %rcx     # 0x66c28
movq %rax, (%rcx)
leaq 0x1d61f(%rip), %rdi     # 0x532b6
movq %rbx, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x310c6(%rip), %rcx     # 0x66d70
movq %rax, (%rcx)
leaq 0x1e1b7(%rip), %rdi     # 0x53e6b
movq %r14, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x31109(%rip), %rcx     # 0x66dd0
movq %rax, (%rcx)
leaq 0x1e1a4(%rip), %rdi     # 0x53e75
pushq $0x1
popq %rdx
movq %rbx, %rsi
callq *0x120(%r15)
movq 0x30863(%rip), %rcx     # 0x66548
movq %rax, (%rcx)
leaq 0x1e195(%rip), %rdi     # 0x53e84
leaq 0x1e198(%rip), %r14     # 0x53e8e
movq %r14, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x3094f(%rip), %rcx     # 0x66658
movq %rax, (%rcx)
leaq 0x1e181(%rip), %rdi     # 0x53e94
leaq 0x1e183(%rip), %r13     # 0x53e9d
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x311bb(%rip), %rcx     # 0x66ee8
movq %rax, (%rcx)
leaq 0x1e16c(%rip), %rdi     # 0x53ea3
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30d96(%rip), %rcx     # 0x66ae0
movq %rax, (%rcx)
leaq 0x1e156(%rip), %rdi     # 0x53eaa
movq %r14, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30cd1(%rip), %rcx     # 0x66a38
movq %rax, (%rcx)
leaq 0x1e143(%rip), %rdi     # 0x53eb4
movq %r14, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30ee4(%rip), %rcx     # 0x66c68
movq %rax, (%rcx)
leaq 0x1e12f(%rip), %rdi     # 0x53ebd
leaq 0x18e5a(%rip), %r13     # 0x4ebef
movq %r13, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x306b8(%rip), %rcx     # 0x66460
movq %rax, (%rcx)
leaq 0x18771(%rip), %rdi     # 0x4e523
movq %rbx, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x30d93(%rip), %rcx     # 0x66b58
movq %rax, (%rcx)
leaq 0x1898e(%rip), %rdi     # 0x4e75d
movq %rbx, %rsi
movl %ebp, %edx
callq *0x120(%r15)
movq 0x30bb6(%rip), %rcx     # 0x66998
movq %rax, (%rcx)
leaq 0x1e0d7(%rip), %rdi     # 0x53ec3
movq %r12, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30741(%rip), %rcx     # 0x66540
movq %rax, (%rcx)
leaq 0x1e0c4(%rip), %rdi     # 0x53ecd
leaq 0x1e0c6(%rip), %rsi     # 0x53ed6
movl %ebp, %edx
callq *0x120(%r15)
movq 0x30dd0(%rip), %rcx     # 0x66bf0
movq %rax, (%rcx)
leaq 0x1e0b3(%rip), %rdi     # 0x53edd
leaq 0x1e0b1(%rip), %rsi     # 0x53ee2
movl %ebp, %edx
callq *0x120(%r15)
movq 0x3106f(%rip), %rcx     # 0x66eb0
movq %rax, (%rcx)
leaq 0x1d4b7(%rip), %rdi     # 0x53302
movq %rbx, %rsi
movl %ebp, %edx
movq %rcx, %rbp
callq *0x120(%r15)
movq 0x30a97(%rip), %rcx     # 0x668f8
movq %rax, (%rcx)
leaq 0x1e07d(%rip), %rdi     # 0x53ee8
movq %r12, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30792(%rip), %rcx     # 0x66610
movq %rax, (%rcx)
leaq 0x1e06c(%rip), %rdi     # 0x53ef4
movq %r12, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30bbd(%rip), %rcx     # 0x66a58
movq %rax, (%rcx)
leaq 0x1e05d(%rip), %rdi     # 0x53f02
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30588(%rip), %rcx     # 0x66440
movq %rax, (%rcx)
leaq 0x1bb1e(%rip), %rdi     # 0x519e0
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30ccb(%rip), %rcx     # 0x66ba0
movq %rax, (%rcx)
leaq 0x1e031(%rip), %rdi     # 0x53f10
leaq 0x1e036(%rip), %rsi     # 0x53f1c
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30b32(%rip), %rcx     # 0x66a28
movq %rax, (%rcx)
leaq 0x1e02d(%rip), %rdi     # 0x53f2d
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30dfd(%rip), %rcx     # 0x66d10
movq %rax, (%rcx)
leaq 0x1e019(%rip), %rdi     # 0x53f36
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30980(%rip), %rcx     # 0x668b0
movq %rax, (%rcx)
leaq 0x1e00b(%rip), %rdi     # 0x53f45
leaq 0x1e122(%rip), %rsi     # 0x54063
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30e37(%rip), %rcx     # 0x66d88
movq %rax, (%rcx)
leaq 0x1dff4(%rip), %rdi     # 0x53f4f
leaq 0x18561(%rip), %rsi     # 0x4e4c3
xorl %edx, %edx
callq *0x120(%r15)
movq 0x309ce(%rip), %rcx     # 0x66940
movq %rax, (%rcx)
leaq 0x1dfdf(%rip), %rdi     # 0x53f5b
leaq 0x1dfe5(%rip), %rsi     # 0x53f68
xorl %edx, %edx
callq *0x120(%r15)
movq 0x307c5(%rip), %r13     # 0x66758
movq %rax, (%r13)
leaq 0x1dfd6(%rip), %rdi     # 0x53f74
leaq 0x1dfd9(%rip), %rsi     # 0x53f7e
xorl %edx, %edx
callq *0x120(%r15)
movq 0x306e3(%rip), %rcx     # 0x66698
movq %rax, (%rcx)
leaq 0x1dfc9(%rip), %rdi     # 0x53f88
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30636(%rip), %rcx     # 0x66608
movq %rax, (%rcx)
leaq 0x1dfb7(%rip), %rdi     # 0x53f93
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30839(%rip), %rcx     # 0x66828
movq %rax, (%rcx)
xorl %eax, %eax
callq 0x19440
movq %r15, %rdi
leaq 0x198e3(%rip), %rsi     # 0x4f8e6
callq 0x19740
leaq 0x1df8e(%rip), %rdi     # 0x53f9d
movq %r12, %rsi
xorl %edx, %edx
callq *0x120(%r15)
movq 0x30c6e(%rip), %rcx     # 0x66c90
movq %rax, (%rcx)
callq 0x18d80
movq 0x30d0f(%rip), %r14     # 0x66d40
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdx
xorl %eax, %eax
callq 0x18f30
leaq 0x200(%r14), %rdi
movl $0x200, %esi            # imm = 0x200
movq %r12, %rdx
xorl %eax, %eax
callq 0x18f30
movq 0x30448(%rip), %rax     # 0x664a8
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movl %eax, 0x614(%r14)
imull $0x4a8, %eax, %edi      # imm = 0x4A8
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r15)
movq 0x304d0(%rip), %rcx     # 0x66558
movq %rax, (%rcx)
movq 0x30a76(%rip), %rbx     # 0x66b08
movq %rax, 0x80(%rbx)
movl 0x614(%r14), %eax
movl %eax, 0x90(%rbx)
movq 0x30483(%rip), %rax     # 0x66530
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movl %eax, 0x610(%r14)
imull $0x9140, %eax, %edi     # imm = 0x9140
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r15)
movq %rax, 0x408(%r14)
movl 0x610(%r14), %eax
incl %eax
movl %eax, 0x8c(%rbx)
movq 0x30ced(%rip), %rbx     # 0x66dd8
cmpl $0x0, (%rbx)
jne 0x362e8
movq (%rbp), %rax
movq 0x8(%rax), %rdx
movq (%r13), %rax
movq 0x8(%rax), %rcx
leaq 0x1987f(%rip), %rsi     # 0x4f98a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x198c0
leaq 0x1815d(%rip), %rsi     # 0x4e27e
movq %r14, %rdi
callq 0x19620
testq %rax, %rax
jne 0x3614a
leaq 0x1de33(%rip), %rdi     # 0x53f68
leaq 0x18142(%rip), %rsi     # 0x4e27e
callq 0x19620
testq %rax, %rax
je 0x364c0
movq %rax, %r14
andl $0x0, (%rbx)
leaq 0x50(%rsp), %r15
leaq 0xc(%rsp), %r13
movq 0x30667(%rip), %rbp     # 0x667c8
movq %r15, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x18aa0
testq %rax, %rax
je 0x36281
pushq $0x64
popq %rdi
movl $0x2fd, %esi            # imm = 0x2FD
movq 0x30477(%rip), %rax     # 0x66600
callq *0x108(%rax)
movq %rax, %r12
andl $0x0, 0xc(%rsp)
movl $0x63, 0x8(%rsp)
movq %r15, %rdi
leaq 0x18b73(%rip), %rsi     # 0x4ed1c
movq %rax, %rdx
movq %r13, %rcx
leaq 0x8(%rsp), %r8
xorl %eax, %eax
callq 0x19110
cmpl $0x3, %eax
je 0x361f5
movq %r15, %rdi
leaq 0x1ddde(%rip), %rsi     # 0x53fa8
movq %r12, %rdx
movq %r13, %rcx
xorl %eax, %eax
callq 0x19110
cmpl $0x2, %eax
je 0x361f5
movq %r15, %rdi
leaq 0x187c7(%rip), %rsi     # 0x4e9ad
movq %r12, %rdx
xorl %eax, %eax
callq 0x19110
cmpl $0x1, %eax
jne 0x36249
xorl %ebx, %ebx
movq %r12, %rdi
callq 0x186c0
cmpq %rax, %rbx
jae 0x3621d
callq 0x19c00
movq (%rax), %rax
movsbq (%r12,%rbx), %rcx
movb (%rax,%rcx,4), %al
movb %al, (%r12,%rbx)
incq %rbx
jmp 0x361f7
movq 0x30bb4(%rip), %rsi     # 0x66dd8
movslq (%rsi), %rax
imulq $0x18, %rax, %rcx
movq %r12, (%rbp,%rcx)
movl 0xc(%rsp), %edx
movl %edx, 0x8(%rbp,%rcx)
movl 0x8(%rsp), %edx
movl %edx, 0xc(%rbp,%rcx)
incl %eax
movl %eax, (%rsi)
jmp 0x36161
movups 0x1dd5e(%rip), %xmm0    # 0x53fae
movaps %xmm0, 0x50(%rsp)
movabsq $0x7473696c70616d, %rax # imm = 0x7473696C70616D
movq %rax, 0x5d(%rsp)
movq %r15, %rdi
xorl %eax, %eax
movq 0x30390(%rip), %rbx     # 0x66600
callq *0x8(%rbx)
movq %r12, %rdi
callq *0x110(%rbx)
jmp 0x36161
movq 0x30b50(%rip), %rbx     # 0x66dd8
movl (%rbx), %r15d
leal -0x1(%r15), %edx
movq 0x30532(%rip), %rdi     # 0x667c8
xorl %esi, %esi
callq 0x19710
leaq 0x1dd1f(%rip), %rsi     # 0x53fc3
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x198c0
movq %r12, %rdi
xorl %eax, %eax
movq 0x3033e(%rip), %rcx     # 0x66600
callq *0x8(%rcx)
movq %r14, %rdi
callq 0x185e0
movl (%rbx), %edi
testl %edi, %edi
je 0x362dc
callq 0x19550
pushq $-0x1
jmp 0x362de
pushq $-0x2
popq %rax
movq 0x30bca(%rip), %rbp     # 0x66eb0
movl %eax, (%rbx)
movq (%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1dd11(%rip), %rsi     # 0x54008
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x198c0
leaq 0x17f71(%rip), %rsi     # 0x4e27e
movq %r14, %rdi
callq 0x19620
testq %rax, %rax
je 0x36326
movq %rax, %r14
movq 0x30a64(%rip), %r13     # 0x66d88
jmp 0x3634c
leaq 0x1dcde(%rip), %rdi     # 0x5400b
leaq 0x17f4a(%rip), %rsi     # 0x4e27e
callq 0x19620
testq %rax, %rax
movq 0x30a45(%rip), %r13     # 0x66d88
je 0x36475
movq %rax, %r14
movq 0x309cd(%rip), %rbx     # 0x66d20
xorl %r15d, %r15d
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x18aa0
testq %rax, %rax
je 0x3638a
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rbx)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rbx)
incq %r15
addq $0x19, %rbx
jmp 0x3635b
movb $0x0, (%rbx)
movq %r14, %rdi
callq 0x185e0
leaq 0x1dc78(%rip), %rsi     # 0x54014
leaq 0x50(%rsp), %r14
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x198c0
movq %r14, %rdi
xorl %eax, %eax
movq 0x30241(%rip), %rcx     # 0x66600
callq *0x8(%rcx)
movq (%r13), %rax
testq %rax, %rax
je 0x363f1
movq 0x8(%rax), %rcx
cmpb $0x0, (%rcx)
je 0x363f1
movq (%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x195a7(%rip), %rsi     # 0x4f98a
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x198c0
jmp 0x3640c
movq (%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1dc60(%rip), %rsi     # 0x54060
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x198c0
leaq 0x17e6b(%rip), %rsi     # 0x4e27e
leaq 0x10(%rsp), %rdi
callq 0x19620
testq %rax, %rax
jne 0x3643a
leaq 0x1dc3a(%rip), %rdi     # 0x54063
leaq 0x17e4e(%rip), %rsi     # 0x4e27e
callq 0x19620
testq %rax, %rax
je 0x3645c
movq %rax, %rbx
movq 0x3025c(%rip), %rdi     # 0x666a0
pushq $0x1
popq %rdx
movl $0x3e8, %esi            # imm = 0x3E8
movq %rax, %rcx
callq 0x18420
movq %rbx, %rdi
callq 0x185e0
xorl %eax, %eax
callq 0x18890
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1dbaf(%rip), %rsi     # 0x5402b
leaq 0x50(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x198c0
movq %r14, %rdi
xorl %eax, %eax
movq 0x30164(%rip), %rcx     # 0x66600
callq *0x8(%rcx)
movq 0x3087a(%rip), %rax     # 0x66d20
movups 0x1dba0(%rip), %xmm0    # 0x5404d
movaps %xmm0, (%rax)
movl $0x2e656c, 0xf(%rax)    # imm = 0x2E656C
movb $0x0, 0x19(%rax)
jmp 0x363c2
leaq 0x1db14(%rip), %rsi     # 0x53fdb
leaq 0x50(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x198c0
movq %r14, %rdi
xorl %eax, %eax
movq 0x30119(%rip), %rcx     # 0x66600
callq *0x8(%rcx)
pushq $-0x2
popq %rax
jmp 0x362e6