// File: /workspace/github_c_makefile_star2_O3/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 0x2fc8c(%rip), %r12     # 0x68600
leaq 0x1f412(%rip), %rdi     # 0x57d8d
leaq 0x1af64(%rip), %r14     # 0x538e6
leaq 0x1f424(%rip), %r13     # 0x57dad
leaq 0x1d008(%rip), %r8      # 0x55998
movq %r14, %rsi
movl $0x6c, %edx
movq %r13, %rcx
xorl %eax, %eax
callq *0x8(%r12)
xorl %edi, %edi
callq 0x18df0
movl %eax, %edi
callq 0x189f0
leaq 0x1f403(%rip), %rdi     # 0x57dba
leaq 0x2272e(%rip), %r15     # 0x5b0ec
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x300ae(%rip), %rcx     # 0x68a80
movq %rax, (%rcx)
leaq 0x1f3e4(%rip), %rdi     # 0x57dc0
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fa18(%rip), %rcx     # 0x68408
movq %rax, (%rcx)
leaq 0x1f3cc(%rip), %rdi     # 0x57dc6
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x3008a(%rip), %rcx     # 0x68a98
movq %rax, (%rcx)
leaq 0x1f3b4(%rip), %rdi     # 0x57dcc
leaq 0x1f3ba(%rip), %rsi     # 0x57dd9
xorl %edx, %edx
callq *0x120(%r12)
movq 0x30388(%rip), %rcx     # 0x68db8
movq %rax, (%rcx)
leaq 0x1f3a3(%rip), %rdi     # 0x57ddd
leaq 0x1962f(%rip), %rsi     # 0x52070
xorl %edx, %edx
callq *0x120(%r12)
movq 0x300f6(%rip), %rcx     # 0x68b48
movq %rax, (%rcx)
leaq 0x1f38e(%rip), %rdi     # 0x57dea
leaq 0x1f396(%rip), %rsi     # 0x57df9
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fefc(%rip), %rcx     # 0x68970
movq %rax, (%rcx)
leaq 0x1f380(%rip), %rdi     # 0x57dfe
leaq 0x1f384(%rip), %rsi     # 0x57e09
xorl %edx, %edx
callq *0x120(%r12)
movq 0x3052a(%rip), %rcx     # 0x68fc0
movq %rax, (%rcx)
leaq 0x1f36d(%rip), %rdi     # 0x57e0d
movq %r15, %rsi
movl $0x8, %edx
callq *0x120(%r12)
movq 0x30201(%rip), %rcx     # 0x68cb8
movq %rax, (%rcx)
movq 0x120(%r12), %rbx
leaq 0x19dbd(%rip), %rdi     # 0x52886
movl $0x6c, %esi
xorl %eax, %eax
callq 0x19340
leaq 0x1f33b(%rip), %rbp     # 0x57e17
movq %rbp, %rdi
movq %rax, %rsi
movl $0x4, %edx
callq *%rbx
movq 0x128(%r12), %rbx
leaq 0x1f328(%rip), %rdi     # 0x57e20
movl $0x6c, %esi
movq %r13, %rdx
xorl %eax, %eax
callq 0x19340
movq %rbp, %rdi
movq %rax, %rsi
callq *%rbx
leaq 0x1f310(%rip), %rdi     # 0x57e26
movq %r15, %rsi
movl $0x14, %edx
callq *0x120(%r12)
movq 0x2fecb(%rip), %rcx     # 0x689f8
movq %rax, (%rcx)
leaq 0x1f2f6(%rip), %rdi     # 0x57e2d
movq %r14, %rsi
movl $0x14, %edx
callq *0x120(%r12)
leaq 0x1f2e8(%rip), %rdi     # 0x57e36
leaq 0x1ce43(%rip), %rsi     # 0x55998
movl $0x14, %edx
callq *0x120(%r12)
leaq 0x1f2d6(%rip), %rdi     # 0x57e3f
leaq 0x1a230(%rip), %rsi     # 0x52da0
movl $0x14, %edx
callq *0x120(%r12)
movq 0x2f9ac(%rip), %rcx     # 0x68530
movq %rax, (%rcx)
leaq 0x1f2bc(%rip), %rdi     # 0x57e4a
leaq 0x1f2d7(%rip), %rsi     # 0x57e6c
movl $0x4, %edx
callq *0x120(%r12)
movq 0x3038f(%rip), %rcx     # 0x68f38
movq %rax, (%rcx)
leaq 0x1a99b(%rip), %rdi     # 0x5354e
movq %r15, %rsi
movl $0x10, %edx
callq *0x120(%r12)
movq 0x302f6(%rip), %rcx     # 0x68ec0
movq %rax, (%rcx)
leaq 0x1f5ac(%rip), %rdi     # 0x58180
movq %r15, %rsi
movl $0x10, %edx
callq *0x120(%r12)
movq 0x30375(%rip), %rcx     # 0x68f60
movq %rax, (%rcx)
leaq 0x1f263(%rip), %rdi     # 0x57e58
leaq 0x19468(%rip), %r13     # 0x52064
movq %r13, %rsi
movl $0x10, %edx
callq *0x120(%r12)
movq 0x2fb25(%rip), %rcx     # 0x68738
movq %rax, (%rcx)
leaq 0x1f241(%rip), %rdi     # 0x57e5e
leaq 0x1f246(%rip), %rsi     # 0x57e6a
movl $0x10, %edx
callq *0x120(%r12)
movq 0x2f870(%rip), %rcx     # 0x684a8
movq %rax, (%rcx)
leaq 0x198d5(%rip), %rdi     # 0x52517
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2f9bf(%rip), %rcx     # 0x68618
movq %rax, (%rcx)
leaq 0x198db(%rip), %rdi     # 0x5253e
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x30186(%rip), %rcx     # 0x68e00
movq %rax, (%rcx)
leaq 0x198ac(%rip), %rdi     # 0x52530
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2fa15(%rip), %rcx     # 0x686b0
movq %rax, (%rcx)
leaq 0x1f1ca(%rip), %rdi     # 0x57e6f
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2f994(%rip), %rcx     # 0x68650
movq %rax, (%rcx)
leaq 0x1f253(%rip), %rdi     # 0x57f19
leaq 0x1b278(%rip), %rbx     # 0x53f45
movq %rbx, %rsi
movl $0x2, %edx
callq *0x120(%r12)
movq 0x2fb74(%rip), %rcx     # 0x68858
movq %rax, (%rcx)
leaq 0x1f18a(%rip), %rdi     # 0x57e78
movq %rbx, %rsi
movl $0x2, %edx
callq *0x120(%r12)
movq 0x2ff23(%rip), %rcx     # 0x68c28
movq %rax, (%rcx)
leaq 0x1e5c7(%rip), %rdi     # 0x572d6
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x3004a(%rip), %rcx     # 0x68d70
movq %rax, (%rcx)
leaq 0x1f15b(%rip), %rdi     # 0x57e8b
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x3008c(%rip), %rcx     # 0x68dd0
movq %rax, (%rcx)
leaq 0x1f147(%rip), %rdi     # 0x57e95
movq %r15, %rsi
movl $0x1, %edx
callq *0x120(%r12)
movq 0x2f7e3(%rip), %rcx     # 0x68548
movq %rax, (%rcx)
leaq 0x1f135(%rip), %rdi     # 0x57ea4
leaq 0x1f138(%rip), %r13     # 0x57eae
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f8ce(%rip), %rcx     # 0x68658
movq %rax, (%rcx)
leaq 0x1f120(%rip), %rdi     # 0x57eb4
leaq 0x1f122(%rip), %rbp     # 0x57ebd
movq %rbp, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x30139(%rip), %rcx     # 0x68ee8
movq %rax, (%rcx)
leaq 0x1f10a(%rip), %rdi     # 0x57ec3
movq %rbp, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fd13(%rip), %rcx     # 0x68ae0
movq %rax, (%rcx)
leaq 0x1f0f3(%rip), %rdi     # 0x57eca
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fc4d(%rip), %rcx     # 0x68a38
movq %rax, (%rcx)
leaq 0x1f0df(%rip), %rdi     # 0x57ed4
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fe5f(%rip), %rcx     # 0x68c68
movq %rax, (%rcx)
leaq 0x1f0ca(%rip), %rdi     # 0x57edd
leaq 0x19dd5(%rip), %r13     # 0x52bef
movq %r13, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2f62f(%rip), %rcx     # 0x68460
movq %rax, (%rcx)
leaq 0x196e8(%rip), %rdi     # 0x52523
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2fd06(%rip), %rcx     # 0x68b58
movq %rax, (%rcx)
leaq 0x19901(%rip), %rdi     # 0x5275d
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2fb25(%rip), %rcx     # 0x68998
movq %rax, (%rcx)
leaq 0x1f066(%rip), %rdi     # 0x57ee3
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f6af(%rip), %rcx     # 0x68540
movq %rax, (%rcx)
leaq 0x1f052(%rip), %rdi     # 0x57eed
leaq 0x1f054(%rip), %rsi     # 0x57ef6
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2fd3a(%rip), %rcx     # 0x68bf0
movq %rax, (%rcx)
leaq 0x1f03d(%rip), %rdi     # 0x57efd
leaq 0x1f03b(%rip), %rsi     # 0x57f02
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2ffd5(%rip), %rbp     # 0x68eb0
movq %rax, (%rbp)
leaq 0x1e43c(%rip), %rdi     # 0x57322
movq %r15, %rsi
movl $0x4, %edx
callq *0x120(%r12)
movq 0x2f9fb(%rip), %rcx     # 0x688f8
movq %rax, (%rcx)
leaq 0x1f001(%rip), %rdi     # 0x57f08
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f6f5(%rip), %rcx     # 0x68610
movq %rax, (%rcx)
leaq 0x1efef(%rip), %rdi     # 0x57f14
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fb1f(%rip), %rcx     # 0x68a58
movq %rax, (%rcx)
leaq 0x1efdf(%rip), %rdi     # 0x57f22
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f4e9(%rip), %rcx     # 0x68440
movq %rax, (%rcx)
leaq 0x1ca9f(%rip), %rdi     # 0x55a00
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fc2b(%rip), %rcx     # 0x68ba0
movq %rax, (%rcx)
leaq 0x1efb1(%rip), %rdi     # 0x57f30
leaq 0x1efb6(%rip), %rsi     # 0x57f3c
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fa91(%rip), %rcx     # 0x68a28
movq %rax, (%rcx)
leaq 0x1efac(%rip), %rdi     # 0x57f4d
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fd5b(%rip), %rcx     # 0x68d10
movq %rax, (%rcx)
leaq 0x1ef97(%rip), %rdi     # 0x57f56
movq %r13, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f8dd(%rip), %rcx     # 0x688b0
movq %rax, (%rcx)
leaq 0x1ef88(%rip), %rdi     # 0x57f65
leaq 0x1f09f(%rip), %rsi     # 0x58083
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fd93(%rip), %rcx     # 0x68d88
movq %rax, (%rcx)
leaq 0x1ef70(%rip), %rdi     # 0x57f6f
leaq 0x194bd(%rip), %rsi     # 0x524c3
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f929(%rip), %rcx     # 0x68940
movq %rax, (%rcx)
leaq 0x1ef5a(%rip), %rdi     # 0x57f7b
leaq 0x1ef60(%rip), %rsi     # 0x57f88
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f71f(%rip), %r13     # 0x68758
movq %rax, (%r13)
leaq 0x1ef50(%rip), %rdi     # 0x57f94
leaq 0x1ef53(%rip), %rsi     # 0x57f9e
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f63c(%rip), %rcx     # 0x68698
movq %rax, (%rcx)
leaq 0x1ef42(%rip), %rdi     # 0x57fa8
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f58e(%rip), %rcx     # 0x68608
movq %rax, (%rcx)
leaq 0x1ef2f(%rip), %rdi     # 0x57fb3
movq %r15, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2f790(%rip), %rcx     # 0x68828
movq %rax, (%rcx)
xorl %eax, %eax
callq 0x192c0
movq %r12, %rdi
movq %r14, %rsi
callq 0x19580
leaq 0x1ef09(%rip), %rdi     # 0x57fbd
movq %rbx, %rsi
xorl %edx, %edx
callq *0x120(%r12)
movq 0x2fbc8(%rip), %rcx     # 0x68c90
movq %rax, (%rcx)
callq 0x18ca0
movq 0x2fc69(%rip), %r14     # 0x68d40
movq %r14, %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
xorl %eax, %eax
callq 0x18e10
leaq 0x200(%r14), %rdi
movl $0x200, %esi            # imm = 0x200
movq %rbx, %rdx
xorl %eax, %eax
callq 0x18e10
movq 0x2f3a2(%rip), %rax     # 0x684a8
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movl %eax, 0x614(%r14)
imull $0x4a8, %eax, %edi      # imm = 0x4A8
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r12)
movq 0x2f429(%rip), %rcx     # 0x68558
movq %rax, (%rcx)
movq 0x2f9cf(%rip), %r15     # 0x68b08
movq %rax, 0x80(%r15)
movl 0x614(%r14), %eax
movl %eax, 0x90(%r15)
movq 0x2f3db(%rip), %rax     # 0x68530
movq (%rax), %rax
cvttss2si 0x20(%rax), %eax
movl %eax, 0x610(%r14)
imull $0x9140, %eax, %edi     # imm = 0x9140
movl $0x2fd, %esi            # imm = 0x2FD
callq *0x108(%r12)
movq %rax, 0x408(%r14)
movl 0x610(%r14), %eax
incl %eax
movl %eax, 0x8c(%r15)
movq 0x2fc43(%rip), %rbx     # 0x68dd8
cmpl $0x0, (%rbx)
jne 0x393e7
movq (%rbp), %rax
movq 0x8(%rax), %rdx
movq (%r13), %rax
movq 0x8(%rax), %rcx
leaq 0x1a7d5(%rip), %rsi     # 0x5398a
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x196f0
leaq 0x190b3(%rip), %rsi     # 0x5227e
movq %r14, %rdi
callq 0x19470
testq %rax, %rax
jne 0x391f4
leaq 0x1eda9(%rip), %rdi     # 0x57f88
leaq 0x19098(%rip), %rsi     # 0x5227e
callq 0x19470
testq %rax, %rax
je 0x393af
movq %rax, %r14
movl $0x0, (%rbx)
leaq 0x50(%rsp), %rdi
movl $0xff, %esi
movq %rax, %rdx
callq 0x18a00
testq %rax, %rax
je 0x39351
leaq 0x50(%rsp), %r12
movq 0x2f5a4(%rip), %rbx     # 0x687c8
movl $0x64, %edi
movl $0x2fd, %esi            # imm = 0x2FD
movq 0x2f3cb(%rip), %rax     # 0x68600
callq *0x108(%rax)
movq %rax, %r15
movl $0x0, 0x8(%rsp)
movl $0x63, 0xc(%rsp)
movq %r12, %rdi
leaq 0x19ac4(%rip), %rsi     # 0x52d1c
movq %rax, %rdx
leaq 0x8(%rsp), %rcx
leaq 0xc(%rsp), %r8
xorl %eax, %eax
callq 0x18fe0
cmpl $0x3, %eax
je 0x392a8
movq %r12, %rdi
leaq 0x1ed4d(%rip), %rsi     # 0x57fc8
movq %r15, %rdx
leaq 0x8(%rsp), %rcx
xorl %eax, %eax
callq 0x18fe0
cmpl $0x2, %eax
je 0x392a8
movq %r12, %rdi
leaq 0x19714(%rip), %rsi     # 0x529ad
movq %r15, %rdx
xorl %eax, %eax
callq 0x18fe0
cmpl $0x1, %eax
jne 0x3931a
cmpb $0x0, (%r15)
je 0x392d9
callq 0x19a20
movq %rax, %rbp
xorl %r13d, %r13d
movq (%rbp), %rax
movsbq (%r15,%r13), %rcx
movb (%rax,%rcx,4), %al
movb %al, (%r15,%r13)
incq %r13
movq %r15, %rdi
callq 0x18680
cmpq %rax, %r13
jb 0x392b9
movq 0x2faf8(%rip), %rsi     # 0x68dd8
movslq (%rsi), %rax
leaq (%rax,%rax,2), %rcx
movq %r15, (%rbx,%rcx,8)
movl 0x8(%rsp), %edx
movl %edx, 0x8(%rbx,%rcx,8)
movl 0xc(%rsp), %edx
movl %edx, 0xc(%rbx,%rcx,8)
incl %eax
movl %eax, (%rsi)
movq %r12, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x18a00
testq %rax, %rax
jne 0x39224
jmp 0x39351
movups 0x1ecad(%rip), %xmm0    # 0x57fce
movaps %xmm0, 0x50(%rsp)
movabsq $0x7473696c70616d, %rax # imm = 0x7473696C70616D
movq %rax, 0x5d(%rsp)
movq %r12, %rdi
xorl %eax, %eax
movq 0x2f2bf(%rip), %r13     # 0x68600
callq *0x8(%r13)
movq %r15, %rdi
callq *0x110(%r13)
jmp 0x392ff
movq 0x2fa80(%rip), %rbx     # 0x68dd8
movl (%rbx), %r15d
leal -0x1(%r15), %edx
movq 0x2f462(%rip), %rdi     # 0x687c8
xorl %esi, %esi
callq 0x19560
leaq 0x1ec6f(%rip), %rsi     # 0x57fe3
leaq 0x50(%rsp), %r12
movq %r12, %rdi
movl %r15d, %edx
xorl %eax, %eax
callq 0x196f0
movq %r12, %rdi
xorl %eax, %eax
movq 0x2f26e(%rip), %rcx     # 0x68600
callq *0x8(%rcx)
movq %r14, %rdi
callq 0x185a0
movl (%rbx), %edi
testl %edi, %edi
je 0x393d9
callq 0x193b0
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
jmp 0x393de
leaq 0x1ec45(%rip), %rsi     # 0x57ffb
leaq 0x50(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x196f0
movq %r14, %rdi
xorl %eax, %eax
movq 0x2f22a(%rip), %rcx     # 0x68600
callq *0x8(%rcx)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
movl %eax, (%rbx)
movq 0x2fac9(%rip), %rbp     # 0x68eb0
movq (%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1ec32(%rip), %rsi     # 0x58028
leaq 0x10(%rsp), %r14
movq %r14, %rdi
xorl %eax, %eax
callq 0x196f0
leaq 0x18e72(%rip), %rsi     # 0x5227e
movq %r14, %rdi
callq 0x19470
testq %rax, %rax
je 0x39425
movq %rax, %r14
movq 0x2f965(%rip), %r13     # 0x68d88
jmp 0x3944b
leaq 0x1ebff(%rip), %rdi     # 0x5802b
leaq 0x18e4b(%rip), %rsi     # 0x5227e
callq 0x19470
testq %rax, %rax
movq 0x2f946(%rip), %r13     # 0x68d88
je 0x395a0
movq %rax, %r14
leaq 0x50(%rsp), %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x18a00
testq %rax, %rax
je 0x394a0
movq 0x2f8b7(%rip), %rbx     # 0x68d20
xorl %r15d, %r15d
leaq 0x50(%rsp), %r12
movq 0x60(%rsp), %rax
movq %rax, 0x10(%rbx)
movaps 0x50(%rsp), %xmm0
movups %xmm0, (%rbx)
incq %r15
movq %r12, %rdi
movl $0xff, %esi
movq %r14, %rdx
callq 0x18a00
addq $0x19, %rbx
testq %rax, %rax
jne 0x39471
jmp 0x394a3
xorl %r15d, %r15d
leaq (%r15,%r15,4), %rax
leaq (%rax,%rax,4), %rax
movq 0x2f86e(%rip), %rcx     # 0x68d20
movb $0x0, (%rcx,%rax)
movq %r14, %rdi
callq 0x185a0
leaq 0x1eb6f(%rip), %rsi     # 0x58034
leaq 0x50(%rsp), %r14
leaq 0x10(%rsp), %rcx
movq %r14, %rdi
movq %r15, %rdx
xorl %eax, %eax
callq 0x196f0
movq %r14, %rdi
xorl %eax, %eax
movq 0x2f118(%rip), %rcx     # 0x68600
callq *0x8(%rcx)
movq (%r13), %rax
testq %rax, %rax
je 0x3951a
movq 0x8(%rax), %rcx
cmpb $0x0, (%rcx)
je 0x3951a
movq (%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1a47e(%rip), %rsi     # 0x5398a
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x196f0
jmp 0x39535
movq (%rbp), %rax
movq 0x8(%rax), %rdx
leaq 0x1eb57(%rip), %rsi     # 0x58080
leaq 0x10(%rsp), %rdi
xorl %eax, %eax
callq 0x196f0
leaq 0x18d42(%rip), %rsi     # 0x5227e
leaq 0x10(%rsp), %rdi
callq 0x19470
testq %rax, %rax
jne 0x39563
leaq 0x1eb31(%rip), %rdi     # 0x58083
leaq 0x18d25(%rip), %rsi     # 0x5227e
callq 0x19470
testq %rax, %rax
je 0x39587
movq %rax, %rbx
movq 0x2f133(%rip), %rdi     # 0x686a0
movl $0x3e8, %esi            # imm = 0x3E8
movl $0x1, %edx
movq %rax, %rcx
callq 0x183f0
movq %rbx, %rdi
callq 0x185a0
xorl %eax, %eax
callq 0x18830
addq $0x258, %rsp            # imm = 0x258
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x1eaa4(%rip), %rsi     # 0x5804b
leaq 0x50(%rsp), %r14
leaq 0x10(%rsp), %rdx
movq %r14, %rdi
xorl %eax, %eax
callq 0x196f0
movq %r14, %rdi
xorl %eax, %eax
movq 0x2f039(%rip), %rcx     # 0x68600
callq *0x8(%rcx)
movq 0x2f74f(%rip), %rax     # 0x68d20
movups 0x1ea95(%rip), %xmm0    # 0x5806d
movaps %xmm0, (%rax)
movl $0x2e656c, 0xf(%rax)    # imm = 0x2E656C
movb $0x0, 0x19(%rax)
jmp 0x394eb