// File: lotuskip[P]yuxtapa/client/settings.cpp
// Function: Config::read_config(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>> const&)
void Config::read_config(const string &servername)
{
	// figure out config  directory of current user:
	string s;
	confdir_str = s = get_conf_dir();
	s += "client.conf";

	ifstream file(s.c_str());
	string keyw;
	char ch;
	string first_server = "";
	while(file)
	{
		// This is very crude parsing; if the file is not right it probably is read all wrong
		getline(file, s);
		if(s.empty() || s[0] == '#')
			continue;
		stringstream ss(s, ios_base::in);
		ss >> keyw;
		if(keyw == "nick")
		{
			keyw = s;
			keyw.erase(0, keyw.find(' '));
			trim_str(keyw);
			if(!keyw.empty())
			{
				if(num_syms(keyw) > MAX_NICK_LEN)
				{
					del_syms(keyw, MAX_NICK_LEN);
					cerr << "Warning: nick given in config file is too long.";
				}
				nick = keyw;
				continue;
			}
		}
		else if(keyw == "server")
		{
			ss >> keyw; // server name
			string tmp = "";
			ss >> tmp; // server IP
			if(!keyw.empty() && !tmp.empty())
			{
				/* if a server was given, we only match against it;
				 * otherwise pick first server */
				if(first_server.empty())
					first_server = tmp;
				if(serverip.empty() && servername == keyw)
					serverip = tmp;
				continue;
			}
		}
		else if(keyw == "key")
		{
			keyw = ss.str();
			if(keyw.size() < 6) // must be at least "key XY"
			{
				cerr << "Faulty line in config: \'" << keyw << "\'." << endl;
				continue;
			}
			keyw = keyw.substr(4); // drop "key "; leaving keyw.size() >= 2
			// Check for ^[x]: ("^XA", for instance)
			if(keyw[0] == '^' && keyw.size() > 2)
			{
				if(!isalpha(keyw[1]))
				{
					cerr << str_ctrl_error << endl;
					continue;
				} // else:
				ch = toupper(keyw[1]) - CTRL_ADD;
				keyw.erase(0,1); // remove '^', forcing the replacement to be at index 1
			}
			else
				ch = keyw[0];
			e_Key_binding kb = convert_key(ch);
			if(kb != MAX_KEY_BINDING)
			{
				// The replacement could also be ^[x]:
				if(keyw[1] == '^' && keyw.size() > 2)
				{
					if(!isalpha(keyw[2]))
					{
						cerr << str_ctrl_error << endl;
						continue;
					} // else:
					ch = toupper(keyw[2]) - CTRL_ADD;
				}
				else if((ch = keyw[1]) == '?')
				{
					// '?' is reserved for help view!
					cerr << "Config error: key '?' is reserved!" << endl;
					continue;
				}
				key_bindings[kb] = ch;
			}
			else
			{
				fill_kph(ch);
				cerr << "Unknown original keybinding \'"
					<< keyplaceholder << "\' in config." << endl;
			}
			continue;
		}
		else if(keyw == "anim")
		{
			keyw = s;
			keyw.erase(0, keyw.find(' '));
			if(!keyw.empty())
				keyw.erase(0, 1);
			if(num_syms(keyw) < MIN_ANIM_LEN || num_syms(keyw) > MAX_ANIM_LEN)
				cerr << "Warning, an animation of invalid length ignored." << endl;
			else
				anim = keyw;
			continue;
		}
		else if(keyw == "alias")
		{
			ss >> keyw; // alias string
			string tmps = s;
			tmps.erase(0, tmps.find(' ', 6)); // get rid of "alias [key]"
			if(!tmps.empty())
			{
				tmps.erase(0,1);
				aliases[keyw] = tmps;
				continue;
			}
		}
		else if(keyw == "qshout")
		{
			short sh;
			ss >> sh;
			if(sh < 1 || sh > MAX_QUICK_SHOUTS)
				cerr << "Invalid quick shout index: " << sh << endl;
			else
			{
				qshout[sh-1] = ss.str();
				qshout[sh-1].erase(0, 8 + int(sh > 9)); // 8 if sh is single-digit, 9 if not
				if(qshout[sh-1].empty())
				{
					cerr << "Config warning: empty \'qshout " << sh << "\'?" << endl;
					continue;
				}
				qshout[sh-1].erase(0,1); // remove ' '
				if(num_syms(qshout[sh-1]) > MSG_WIN_X-3) // -3 is for the "!: " prefix
				{
					cerr << "Quick shout " << sh << " is too long!" << endl;
					del_syms(qshout[sh-1], MSG_WIN_X-3);
				}
			}
			continue;
		}
		else if(keyw == "ouch")
		{
			ouch_str = ss.str();
			if(ouch_str.size() < 5)
			{
				cerr << "Config warning: \'ouch\' without content?" << endl;
				continue;
			}
			ouch_str.erase(0, 5); // erase "ouch "
			if(num_syms(ouch_str) >= MSG_WIN_X)
			{
				cerr << "The ouch string in the config is too long!" << endl;
				del_syms(ouch_str, MSG_WIN_X);
			}
			continue;
		}
		else if(keyw == "ouch_on")
		{
			ss >> ouching;
			continue;
		}
		else if(keyw == "stored_chat_msgs")
		{
			ss >> stored_msgs;
			if(stored_msgs < 0 || stored_msgs > 1000)
			{
				cerr << "Warning: invalid stored_chat_msgs setting." << endl;
				stored_msgs = DEFAULT_STORED_MSGS;
			}
			continue;
		}
		else if(keyw == "actperturn")
		{
			ss >> actperturn;
			continue;
		}
		// if here, not all is okay:
		cerr << "Warning, could not parse the following line in config file:"
			<< endl << "\"" << s << "\"" << endl;
	}
	file.close();

	// everything extracted (or failed altogether), check:
	if(serverip.empty()) // no match for desired server
	{
		if(!servername.empty()) // some server *was* requested
			serverip = servername; // try to connect to it "as-is"
		else if(first_server.empty()) // no server given in file, either?
		{
			cerr << "Warning, no server given in config, defaulting to localhost!" << endl;
			serverip = "127.0.0.1:12360";
		}
		else // No server requested; use first one found in config
			serverip = first_server;
	}
	// check for key-binding conflicts:
	keyw = key_bindings; // tmp copy
	sort(keyw.begin(), keyw.end());
	unique(keyw.begin(), keyw.end());
	if(keyw.size() < key_bindings.size())
	{
		cerr << "Config resulted in key binding conflicts; reverting to original keys." << endl;
		key_bindings = default_key_bds;
	}
	// check that ouching is off if ouch string is empty:
	if(ouch_str.empty() && ouching)
	{
		ouching = false;
		cerr << "Config error: the ouch feature requires you to define a non-empty message!" << endl;
	}
	// Read stored messages to prev_strs if file exists
	ifstream cmfile((confdir_str + "chatmemory").c_str());
	if(cmfile)
	{
		while(getline(cmfile, s) && !s.empty())
			prev_strs.push_back(s);
	}
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x9b0, %rsp            # imm = 0x9B0
movq %rdi, -0x8(%rbp)
leaq -0x28(%rbp), %rdi
callq 0x56f0
leaq -0x48(%rbp), %rdi
callq 0x1ac40
jmp 0x148c3
leaq -0x28(%rbp), %rdi
leaq -0x48(%rbp), %rsi
callq 0x5600
movq %rax, %rsi
leaq 0x15dc6(%rip), %rdi     # 0x2a6a0
callq 0x5060
jmp 0x148e1
leaq -0x48(%rbp), %rdi
callq 0x5968
leaq 0x7f67(%rip), %rsi      # 0x1c858
leaq -0x28(%rbp), %rdi
callq 0x5480
jmp 0x148fc
leaq -0x28(%rbp), %rdi
callq 0x5200
movq %rax, %rsi
leaq -0x260(%rbp), %rdi
movl $0x8, %edx
callq 0x5880
jmp 0x1491b
leaq -0x280(%rbp), %rdi
callq 0x56f0
leaq -0x2a9(%rbp), %rdi
movq %rdi, -0x770(%rbp)
callq 0x5840
movq -0x770(%rbp), %rdx
leaq 0x7b41(%rip), %rsi      # 0x1c489
leaq -0x2a8(%rbp), %rdi
callq 0xa030
jmp 0x14956
leaq -0x2a9(%rbp), %rdi
callq 0x5540
movq -0x260(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x260(%rbp,%rax), %rdi
callq 0x5640
movb %al, -0x771(%rbp)
jmp 0x14982
movb -0x771(%rbp), %al
testb $0x1, %al
jne 0x14991
jmp 0x15a41
leaq -0x260(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x50d0
jmp 0x149a3
leaq -0x28(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x149d5
xorl %eax, %eax
movl %eax, %esi
leaq -0x28(%rbp), %rdi
callq 0x5930
movq %rax, -0x780(%rbp)
jmp 0x149c6
movq -0x780(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x23, %eax
jne 0x14a30
jmp 0x14962
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x15e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x48(%rbp), %rdi
callq 0x5968
jmp 0x15e07
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x2a9(%rbp), %rdi
callq 0x5540
jmp 0x15def
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x15de3
leaq -0x438(%rbp), %rdi
leaq -0x28(%rbp), %rsi
movl $0x8, %edx
callq 0x5790
jmp 0x14a47
leaq -0x438(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x5650
jmp 0x14a5c
leaq 0x7e01(%rip), %rsi      # 0x1c864
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x781(%rbp)
jmp 0x14a77
movb -0x781(%rbp), %al
testb $0x1, %al
jne 0x14a86
jmp 0x14b7b
leaq -0x280(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5060
jmp 0x14a98
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x790(%rbp)
leaq -0x280(%rbp), %rdi
movq %rdi, -0x798(%rbp)
movl $0x20, %esi
callq 0x56b0
movq -0x798(%rbp), %rdi
movq -0x790(%rbp), %rsi
movq %rax, %rdx
callq 0x5120
jmp 0x14ad3
leaq -0x280(%rbp), %rdi
callq 0x1b2d0
jmp 0x14ae1
leaq -0x280(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x14b76
leaq -0x280(%rbp), %rdi
callq 0x1a800
movw %ax, -0x79a(%rbp)
jmp 0x14b0a
movw -0x79a(%rbp), %ax
cwtl
cmpl $0xa, %eax
jle 0x14b52
leaq -0x280(%rbp), %rdi
movl $0xa, %esi
callq 0x1a970
jmp 0x14b2a
movq 0x134b7(%rip), %rdi     # 0x27fe8
leaq 0x7d31(%rip), %rsi      # 0x1c869
callq 0x54b0
jmp 0x14b3f
jmp 0x14b52
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
jmp 0x15a30
leaq 0x1591f(%rip), %rdi     # 0x2a478
leaq -0x280(%rbp), %rsi
callq 0x5060
jmp 0x14b67
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
jmp 0x15966
leaq 0x7d17(%rip), %rsi      # 0x1c899
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x79b(%rbp)
jmp 0x14b96
movb -0x79b(%rbp), %al
testb $0x1, %al
jne 0x14ba5
jmp 0x14d0b
leaq -0x438(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x5650
jmp 0x14bba
leaq -0x461(%rbp), %rdi
movq %rdi, -0x7a8(%rbp)
callq 0x5840
movq -0x7a8(%rbp), %rdx
leaq 0x78ae(%rip), %rsi      # 0x1c489
leaq -0x460(%rbp), %rdi
callq 0xa030
jmp 0x14be9
leaq -0x461(%rbp), %rdi
callq 0x5540
leaq -0x438(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x5650
jmp 0x14c0a
leaq -0x280(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x14ce0
leaq -0x460(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x14ce0
leaq -0x2a8(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x14c44
jmp 0x14c95
leaq -0x2a8(%rbp), %rdi
leaq -0x460(%rbp), %rsi
callq 0x5060
jmp 0x14c59
jmp 0x14c95
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x461(%rbp), %rdi
callq 0x5540
jmp 0x15a30
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x5968
jmp 0x15a30
leaq 0x1583c(%rip), %rdi     # 0x2a4d8
callq 0x57f0
testb $0x1, %al
jne 0x14ca7
jmp 0x14cd4
movq -0x8(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0xde70
testb $0x1, %al
jne 0x14cbd
jmp 0x14cd4
leaq 0x15814(%rip), %rdi     # 0x2a4d8
leaq -0x460(%rbp), %rsi
callq 0x5060
jmp 0x14cd2
jmp 0x14cd4
movl $0x2, -0x43c(%rbp)
jmp 0x14cea
movl $0x0, -0x43c(%rbp)
leaq -0x460(%rbp), %rdi
callq 0x5968
movl -0x43c(%rbp), %eax
testl %eax, %eax
jne 0x15a0e
jmp 0x14d06
jmp 0x15964
leaq 0x7b8e(%rip), %rsi      # 0x1c8a0
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x7a9(%rbp)
jmp 0x14d26
movb -0x7a9(%rbp), %al
testb $0x1, %al
jne 0x14d35
jmp 0x151aa
leaq -0x488(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x54a0
jmp 0x14d4a
leaq -0x280(%rbp), %rdi
leaq -0x488(%rbp), %rsi
callq 0x5600
leaq -0x488(%rbp), %rdi
callq 0x5968
leaq -0x280(%rbp), %rdi
callq 0x5350
cmpq $0x6, %rax
jae 0x14df3
movq 0x13266(%rip), %rdi     # 0x27fe8
leaq 0x7b1b(%rip), %rsi      # 0x1c8a4
callq 0x54b0
movq %rax, -0x7b8(%rbp)
jmp 0x14d97
movq -0x7b8(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x5430
movq %rax, -0x7c0(%rbp)
jmp 0x14db3
movq -0x7c0(%rbp), %rdi
leaq 0x7afc(%rip), %rsi      # 0x1c8bd
callq 0x54b0
movq %rax, -0x7c8(%rbp)
jmp 0x14dcf
movq -0x7c8(%rbp), %rdi
movq 0x131c3(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x14de4
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq -0x4a8(%rbp), %rdi
leaq -0x280(%rbp), %rsi
movl $0x4, %edx
movq $-0x1, %rcx
callq 0x54e0
jmp 0x14e14
leaq -0x280(%rbp), %rdi
movq %rdi, -0x7d8(%rbp)
leaq -0x4a8(%rbp), %rsi
movq %rsi, -0x7e0(%rbp)
callq 0x5600
movq -0x7e0(%rbp), %rdi
callq 0x5968
movq -0x7d8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %esi
callq 0x5930
movq %rax, -0x7d0(%rbp)
jmp 0x14e5a
movq -0x7d0(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5e, %eax
jne 0x14f3b
leaq -0x280(%rbp), %rdi
callq 0x5350
cmpq $0x2, %rax
jbe 0x14f3b
leaq -0x280(%rbp), %rdi
movl $0x1, %esi
callq 0x5930
movq %rax, -0x7e8(%rbp)
jmp 0x14e9d
movq -0x7e8(%rbp), %rax
movsbl (%rax), %edi
callq 0x57b0
cmpl $0x0, %eax
jne 0x14ef1
movq 0x13130(%rip), %rdi     # 0x27fe8
leaq 0x15599(%rip), %rsi     # 0x2a458
callq 0x5430
movq %rax, -0x7f0(%rbp)
jmp 0x14ecd
movq -0x7f0(%rbp), %rdi
movq 0x130c5(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x14ee2
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq -0x280(%rbp), %rdi
movl $0x1, %esi
callq 0x5930
movq %rax, -0x7f8(%rbp)
jmp 0x14f0b
movq -0x7f8(%rbp), %rax
movsbl (%rax), %edi
callq 0x58a0
addb $-0x40, %al
movb %al, -0x281(%rbp)
xorl %eax, %eax
movl %eax, %esi
leaq -0x280(%rbp), %rdi
movl $0x1, %edx
callq 0x5120
jmp 0x14f39
jmp 0x14f63
xorl %eax, %eax
movl %eax, %esi
leaq -0x280(%rbp), %rdi
callq 0x5930
movq %rax, -0x800(%rbp)
jmp 0x14f54
movq -0x800(%rbp), %rax
movb (%rax), %al
movb %al, -0x281(%rbp)
movsbl -0x281(%rbp), %edi
callq 0x15e20
movl %eax, -0x804(%rbp)
jmp 0x14f77
movl -0x804(%rbp), %eax
movl %eax, -0x4ac(%rbp)
cmpl $0x1b, -0x4ac(%rbp)
je 0x15122
leaq -0x280(%rbp), %rdi
movl $0x1, %esi
callq 0x5930
movq %rax, -0x810(%rbp)
jmp 0x14faa
movq -0x810(%rbp), %rax
movsbl (%rax), %eax
cmpl $0x5e, %eax
jne 0x15075
leaq -0x280(%rbp), %rdi
callq 0x5350
cmpq $0x2, %rax
jbe 0x15075
leaq -0x280(%rbp), %rdi
movl $0x2, %esi
callq 0x5930
movq %rax, -0x818(%rbp)
jmp 0x14fed
movq -0x818(%rbp), %rax
movsbl (%rax), %edi
callq 0x57b0
cmpl $0x0, %eax
jne 0x15041
movq 0x12fe0(%rip), %rdi     # 0x27fe8
leaq 0x15449(%rip), %rsi     # 0x2a458
callq 0x5430
movq %rax, -0x820(%rbp)
jmp 0x1501d
movq -0x820(%rbp), %rdi
movq 0x12f75(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15032
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq -0x280(%rbp), %rdi
movl $0x2, %esi
callq 0x5930
movq %rax, -0x828(%rbp)
jmp 0x1505b
movq -0x828(%rbp), %rax
movsbl (%rax), %edi
callq 0x58a0
subl $0x40, %eax
movb %al, -0x281(%rbp)
jmp 0x150e8
leaq -0x280(%rbp), %rdi
movl $0x1, %esi
callq 0x5930
movq %rax, -0x830(%rbp)
jmp 0x1508f
movq -0x830(%rbp), %rax
movb (%rax), %al
movb %al, -0x281(%rbp)
movsbl %al, %eax
cmpl $0x3f, %eax
jne 0x150e6
movq 0x12f3b(%rip), %rdi     # 0x27fe8
leaq 0x780c(%rip), %rsi      # 0x1c8c0
callq 0x54b0
movq %rax, -0x838(%rbp)
jmp 0x150c2
movq -0x838(%rbp), %rdi
movq 0x12ed0(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x150d7
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
jmp 0x150e8
movb -0x281(%rbp), %al
movb %al, -0x841(%rbp)
movl -0x4ac(%rbp), %eax
movl %eax, %esi
leaq 0x153b5(%rip), %rdi     # 0x2a4b8
callq 0x5930
movq %rax, -0x840(%rbp)
jmp 0x15111
movq -0x840(%rbp), %rax
movb -0x841(%rbp), %cl
movb %cl, (%rax)
jmp 0x1519b
movsbl -0x281(%rbp), %edi
callq 0x15e70
jmp 0x15130
movq 0x12eb1(%rip), %rdi     # 0x27fe8
leaq 0x77a5(%rip), %rsi      # 0x1c8e3
callq 0x54b0
movq %rax, -0x850(%rbp)
jmp 0x1514c
movq -0x850(%rbp), %rdi
leaq 0x133c6(%rip), %rsi     # 0x28520
callq 0x54b0
movq %rax, -0x858(%rbp)
jmp 0x15168
movq -0x858(%rbp), %rdi
leaq 0x778b(%rip), %rsi      # 0x1c901
callq 0x54b0
movq %rax, -0x860(%rbp)
jmp 0x15184
movq -0x860(%rbp), %rdi
movq 0x12e0e(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15199
jmp 0x1519b
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x775d(%rip), %rsi      # 0x1c90e
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x861(%rbp)
jmp 0x151c5
movb -0x861(%rbp), %al
testb $0x1, %al
jne 0x151d4
jmp 0x152e7
leaq -0x280(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5060
jmp 0x151e6
xorl %eax, %eax
movl %eax, %edx
movq %rdx, -0x870(%rbp)
leaq -0x280(%rbp), %rdi
movq %rdi, -0x878(%rbp)
movl $0x20, %esi
callq 0x56b0
movq -0x878(%rbp), %rdi
movq -0x870(%rbp), %rsi
movq %rax, %rdx
callq 0x5120
jmp 0x15221
leaq -0x280(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x1524a
xorl %eax, %eax
movl %eax, %esi
leaq -0x280(%rbp), %rdi
movl $0x1, %edx
callq 0x5120
jmp 0x15248
jmp 0x1524a
leaq -0x280(%rbp), %rdi
callq 0x1a800
movw %ax, -0x87a(%rbp)
jmp 0x1525f
movw -0x87a(%rbp), %ax
cwtl
cmpl $0x2, %eax
jl 0x1528e
leaq -0x280(%rbp), %rdi
callq 0x1a800
movw %ax, -0x87c(%rbp)
jmp 0x15281
movw -0x87c(%rbp), %ax
cwtl
cmpl $0xf, %eax
jle 0x152c1
movq 0x12d53(%rip), %rdi     # 0x27fe8
leaq 0x7677(%rip), %rsi      # 0x1c913
callq 0x54b0
movq %rax, -0x888(%rbp)
jmp 0x152aa
movq -0x888(%rbp), %rdi
movq 0x12ce8(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x152bf
jmp 0x152d8
leaq 0x151d0(%rip), %rdi     # 0x2a498
leaq -0x280(%rbp), %rsi
callq 0x5060
jmp 0x152d6
jmp 0x152d8
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x7656(%rip), %rsi      # 0x1c944
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x889(%rbp)
jmp 0x15302
movb -0x889(%rbp), %al
testb $0x1, %al
jne 0x15311
jmp 0x15416
leaq -0x438(%rbp), %rdi
leaq -0x280(%rbp), %rsi
callq 0x5650
jmp 0x15326
leaq -0x4d0(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5220
jmp 0x15338
leaq -0x4d0(%rbp), %rdi
movq %rdi, -0x898(%rbp)
movl $0x20, %esi
movl $0x6, %edx
callq 0x56b0
movq -0x898(%rbp), %rdi
movq %rax, %rdx
xorl %eax, %eax
movl %eax, %esi
callq 0x5120
jmp 0x1536a
leaq -0x4d0(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x153eb
xorl %eax, %eax
movl %eax, %esi
leaq -0x4d0(%rbp), %rdi
movl $0x1, %edx
callq 0x5120
jmp 0x15391
leaq 0x15328(%rip), %rdi     # 0x2a6c0
leaq -0x280(%rbp), %rsi
callq 0x163a0
movq %rax, -0x8a0(%rbp)
jmp 0x153ad
movq -0x8a0(%rbp), %rdi
leaq -0x4d0(%rbp), %rsi
callq 0x5060
jmp 0x153c2
movl $0x2, -0x43c(%rbp)
jmp 0x153f5
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x5968
jmp 0x15a30
movl $0x0, -0x43c(%rbp)
leaq -0x4d0(%rbp), %rdi
callq 0x5968
movl -0x43c(%rbp), %eax
testl %eax, %eax
jne 0x15a0e
jmp 0x15411
jmp 0x1595e
leaq 0x752d(%rip), %rsi      # 0x1c94a
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x8a1(%rbp)
jmp 0x15431
movb -0x8a1(%rbp), %al
testb $0x1, %al
jne 0x15440
jmp 0x156e1
leaq -0x438(%rbp), %rdi
leaq -0x4d2(%rbp), %rsi
callq 0x5090
jmp 0x15455
movswl -0x4d2(%rbp), %eax
cmpl $0x1, %eax
jl 0x1546d
movswl -0x4d2(%rbp), %eax
cmpl $0xc, %eax
jle 0x154bf
movq 0x12b74(%rip), %rdi     # 0x27fe8
leaq 0x74d6(%rip), %rsi      # 0x1c951
callq 0x54b0
movq %rax, -0x8b0(%rbp)
jmp 0x15489
movq -0x8b0(%rbp), %rdi
movswl -0x4d2(%rbp), %esi
callq 0x5450
movq %rax, -0x8b8(%rbp)
jmp 0x154a5
movq -0x8b8(%rbp), %rdi
movq 0x12aed(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x154ba
jmp 0x156d2
leaq -0x4f8(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x54a0
jmp 0x154d4
movswq -0x4d2(%rbp), %rax
shlq $0x5, %rax
leaq 0x15019(%rip), %rcx     # 0x2a500
movq %rcx, -0x8c0(%rbp)
leaq -0x20(%rax,%rcx), %rdi
leaq -0x4f8(%rbp), %rsi
movq %rsi, -0x8c8(%rbp)
callq 0x5600
movq -0x8c8(%rbp), %rdi
callq 0x5968
movq -0x8c0(%rbp), %rdx
movswq -0x4d2(%rbp), %rcx
movl %ecx, %eax
shlq $0x5, %rcx
leaq -0x20(%rcx,%rdx), %rdi
subl $0xa, %eax
setge %al
movzbl %al, %eax
orl $0x8, %eax
movl %eax, %edx
xorl %eax, %eax
movl %eax, %esi
callq 0x5120
jmp 0x15545
movswl -0x4d2(%rbp), %eax
subl $0x1, %eax
cltq
leaq 0x14fa8(%rip), %rdi     # 0x2a500
shlq $0x5, %rax
addq %rax, %rdi
callq 0x57f0
testb $0x1, %al
jne 0x1556a
jmp 0x155e2
movq 0x12a77(%rip), %rdi     # 0x27fe8
leaq 0x73f5(%rip), %rsi      # 0x1c96d
callq 0x54b0
movq %rax, -0x8d0(%rbp)
jmp 0x15586
movq -0x8d0(%rbp), %rdi
movswl -0x4d2(%rbp), %esi
callq 0x5450
movq %rax, -0x8d8(%rbp)
jmp 0x155a2
movq -0x8d8(%rbp), %rdi
leaq 0x73dc(%rip), %rsi      # 0x1c98c
callq 0x54b0
movq %rax, -0x8e0(%rbp)
jmp 0x155be
movq -0x8e0(%rbp), %rdi
movq 0x129d4(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x155d3
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
movswq -0x4d2(%rbp), %rax
shlq $0x5, %rax
leaq 0x14f0b(%rip), %rcx     # 0x2a500
leaq -0x20(%rax,%rcx), %rdi
xorl %eax, %eax
movl %eax, %esi
movl $0x1, %edx
callq 0x5120
jmp 0x1560a
movswq -0x4d2(%rbp), %rax
shlq $0x5, %rax
leaq 0x14ee3(%rip), %rcx     # 0x2a500
leaq -0x20(%rax,%rcx), %rdi
callq 0x1a800
movw %ax, -0x8e2(%rbp)
jmp 0x15630
movw -0x8e2(%rbp), %ax
cwtl
cmpl $0x36, %eax
jle 0x156d0
movq 0x129a0(%rip), %rdi     # 0x27fe8
leaq 0x7340(%rip), %rsi      # 0x1c98f
callq 0x54b0
movq %rax, -0x8f0(%rbp)
jmp 0x1565d
movq -0x8f0(%rbp), %rdi
movswl -0x4d2(%rbp), %esi
callq 0x5450
movq %rax, -0x8f8(%rbp)
jmp 0x15679
movq -0x8f8(%rbp), %rdi
leaq 0x735f(%rip), %rsi      # 0x1c9e6
callq 0x54b0
movq %rax, -0x900(%rbp)
jmp 0x15695
movq -0x900(%rbp), %rdi
movq 0x128fd(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x156aa
movswq -0x4d2(%rbp), %rax
shlq $0x5, %rax
leaq 0x14e43(%rip), %rcx     # 0x2a500
leaq -0x20(%rax,%rcx), %rdi
movl $0x36, %esi
callq 0x1a970
jmp 0x156ce
jmp 0x156d0
jmp 0x156d2
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x72b4(%rip), %rsi      # 0x1c99c
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x901(%rbp)
jmp 0x156fc
movb -0x901(%rbp), %al
testb $0x1, %al
jne 0x1570b
jmp 0x1581f
leaq -0x518(%rbp), %rdi
leaq -0x438(%rbp), %rsi
callq 0x54a0
jmp 0x15720
leaq 0x14f59(%rip), %rdi     # 0x2a680
leaq -0x518(%rbp), %rsi
callq 0x5600
leaq -0x518(%rbp), %rdi
callq 0x5968
leaq 0x14f3a(%rip), %rdi     # 0x2a680
callq 0x5350
cmpq $0x5, %rax
jae 0x15791
movq 0x12890(%rip), %rdi     # 0x27fe8
leaq 0x7242(%rip), %rsi      # 0x1c9a1
callq 0x54b0
movq %rax, -0x910(%rbp)
jmp 0x1576d
movq -0x910(%rbp), %rdi
movq 0x12825(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15782
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x14ee8(%rip), %rdi     # 0x2a680
xorl %eax, %eax
movl %eax, %esi
movl $0x5, %edx
callq 0x5120
jmp 0x157a8
leaq 0x14ed1(%rip), %rdi     # 0x2a680
callq 0x1a800
movw %ax, -0x912(%rbp)
jmp 0x157bd
movw -0x912(%rbp), %ax
cwtl
cmpl $0x39, %eax
jl 0x15810
movq 0x12817(%rip), %rdi     # 0x27fe8
leaq 0x71f1(%rip), %rsi      # 0x1c9c9
callq 0x54b0
movq %rax, -0x920(%rbp)
jmp 0x157e6
movq -0x920(%rbp), %rdi
movq 0x127ac(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x157fb
leaq 0x14e7e(%rip), %rdi     # 0x2a680
movl $0x39, %esi
callq 0x1a970
jmp 0x1580e
jmp 0x15810
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x71ce(%rip), %rsi      # 0x1c9f4
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x921(%rbp)
jmp 0x1583a
movb -0x921(%rbp), %al
testb $0x1, %al
jne 0x15846
jmp 0x1586a
leaq 0x14ea3(%rip), %rsi     # 0x2a6f0
leaq -0x438(%rbp), %rdi
callq 0x5410
jmp 0x1585b
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x718b(%rip), %rsi      # 0x1c9fc
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x922(%rbp)
jmp 0x15885
movb -0x922(%rbp), %al
testb $0x1, %al
jne 0x15891
jmp 0x15909
leaq 0x12c8c(%rip), %rsi     # 0x28524
leaq -0x438(%rbp), %rdi
callq 0x5090
jmp 0x158a6
movswl 0x12c77(%rip), %eax     # 0x28524
cmpl $0x0, %eax
jl 0x158c0
movswl 0x12c6b(%rip), %eax     # 0x28524
cmpl $0x3e8, %eax            # imm = 0x3E8
jle 0x158fa
movq 0x12721(%rip), %rdi     # 0x27fe8
leaq 0x713f(%rip), %rsi      # 0x1ca0d
callq 0x54b0
movq %rax, -0x930(%rbp)
jmp 0x158dc
movq -0x930(%rbp), %rdi
movq 0x126b6(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x158f1
movw $0x64, 0x12c2a(%rip)    # 0x28524
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
leaq 0x7128(%rip), %rsi      # 0x1ca38
leaq -0x280(%rbp), %rdi
callq 0xc3b0
movb %al, -0x931(%rbp)
jmp 0x15924
movb -0x931(%rbp), %al
testb $0x1, %al
jne 0x15930
jmp 0x15954
leaq 0x14dba(%rip), %rsi     # 0x2a6f1
leaq -0x438(%rbp), %rdi
callq 0x5410
jmp 0x15945
movl $0x2, -0x43c(%rbp)
jmp 0x15a0e
jmp 0x15956
jmp 0x15958
jmp 0x1595a
jmp 0x1595c
jmp 0x1595e
jmp 0x15960
jmp 0x15962
jmp 0x15964
jmp 0x15966
movq 0x1267b(%rip), %rdi     # 0x27fe8
leaq 0x70cf(%rip), %rsi      # 0x1ca43
callq 0x54b0
movq %rax, -0x940(%rbp)
jmp 0x15982
movq -0x940(%rbp), %rdi
movq 0x12610(%rip), %rsi     # 0x27fa0
callq 0x5510
movq %rax, -0x948(%rbp)
jmp 0x1599e
movq -0x948(%rbp), %rdi
leaq 0x70d3(%rip), %rsi      # 0x1ca7f
callq 0x54b0
movq %rax, -0x950(%rbp)
jmp 0x159ba
movq -0x950(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x5430
movq %rax, -0x958(%rbp)
jmp 0x159d3
movq -0x958(%rbp), %rdi
leaq 0x709e(%rip), %rsi      # 0x1ca7f
callq 0x54b0
movq %rax, -0x960(%rbp)
jmp 0x159ef
movq -0x960(%rbp), %rdi
movq 0x125a3(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15a04
movl $0x0, -0x43c(%rbp)
leaq -0x438(%rbp), %rdi
callq 0x5390
movl -0x43c(%rbp), %eax
testl %eax, %eax
je 0x15a2b
jmp 0x15a26
jmp 0x14962
jmp 0x14962
leaq -0x438(%rbp), %rdi
callq 0x5390
jmp 0x15de3
leaq -0x260(%rbp), %rdi
callq 0x50e0
jmp 0x15a4f
leaq 0x14a82(%rip), %rdi     # 0x2a4d8
callq 0x57f0
testb $0x1, %al
jne 0x15a64
jmp 0x15afa
movq -0x8(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x15a85
movq -0x8(%rbp), %rsi
leaq 0x14a5c(%rip), %rdi     # 0x2a4d8
callq 0x5060
jmp 0x15a83
jmp 0x15af8
leaq -0x2a8(%rbp), %rdi
callq 0x57f0
testb $0x1, %al
jne 0x15a97
jmp 0x15adf
movq 0x1254a(%rip), %rdi     # 0x27fe8
leaq 0x6fdc(%rip), %rsi      # 0x1ca81
callq 0x54b0
movq %rax, -0x968(%rbp)
jmp 0x15ab3
movq -0x968(%rbp), %rdi
movq 0x124df(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15ac8
leaq 0x14a09(%rip), %rdi     # 0x2a4d8
leaq 0x6fe8(%rip), %rsi      # 0x1cabe
callq 0x56d0
jmp 0x15add
jmp 0x15af6
leaq 0x149f2(%rip), %rdi     # 0x2a4d8
leaq -0x2a8(%rbp), %rsi
callq 0x5060
jmp 0x15af4
jmp 0x15af6
jmp 0x15af8
jmp 0x15afa
leaq 0x149b7(%rip), %rsi     # 0x2a4b8
leaq -0x280(%rbp), %rdi
callq 0x5060
jmp 0x15b0f
leaq -0x280(%rbp), %rdi
movq %rdi, -0x970(%rbp)
callq 0x5400
movq -0x970(%rbp), %rdi
movq %rax, -0x520(%rbp)
callq 0x52c0
movq %rax, -0x528(%rbp)
movq -0x520(%rbp), %rdi
movq -0x528(%rbp), %rsi
callq 0x16480
jmp 0x15b51
leaq -0x280(%rbp), %rdi
movq %rdi, -0x980(%rbp)
callq 0x5400
movq -0x980(%rbp), %rdi
movq %rax, -0x530(%rbp)
callq 0x52c0
movq %rax, -0x538(%rbp)
movq -0x530(%rbp), %rdi
movq -0x538(%rbp), %rsi
callq 0x164c0
movq %rax, -0x978(%rbp)
jmp 0x15b9a
movq -0x978(%rbp), %rax
movq %rax, -0x540(%rbp)
leaq -0x280(%rbp), %rdi
callq 0x5350
movq %rax, -0x988(%rbp)
leaq 0x148f6(%rip), %rdi     # 0x2a4b8
callq 0x5350
movq %rax, %rcx
movq -0x988(%rbp), %rax
cmpq %rcx, %rax
jae 0x15c1e
movq 0x1240b(%rip), %rdi     # 0x27fe8
leaq 0x6eea(%rip), %rsi      # 0x1cace
callq 0x54b0
movq %rax, -0x990(%rbp)
jmp 0x15bf2
movq -0x990(%rbp), %rdi
movq 0x123a0(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15c07
leaq 0x148aa(%rip), %rdi     # 0x2a4b8
leaq 0x147e3(%rip), %rsi     # 0x2a3f8
callq 0x5060
jmp 0x15c1c
jmp 0x15c1e
leaq 0x14a5b(%rip), %rdi     # 0x2a680
callq 0x57f0
testb $0x1, %al
jne 0x15c30
jmp 0x15c73
testb $0x1, 0x14ab9(%rip)     # 0x2a6f0
je 0x15c73
movb $0x0, 0x14ab0(%rip)     # 0x2a6f0
movq 0x123a1(%rip), %rdi     # 0x27fe8
leaq 0x6ec6(%rip), %rsi      # 0x1cb14
callq 0x54b0
movq %rax, -0x998(%rbp)
jmp 0x15c5c
movq -0x998(%rbp), %rdi
movq 0x12336(%rip), %rsi     # 0x27fa0
callq 0x5510
jmp 0x15c71
jmp 0x15c73
leaq 0x14a26(%rip), %rsi     # 0x2a6a0
leaq 0x6ede(%rip), %rdx      # 0x1cb5f
leaq -0x768(%rbp), %rdi
callq 0x16500
jmp 0x15c8f
leaq -0x768(%rbp), %rdi
callq 0x5200
movq %rax, %rsi
leaq -0x748(%rbp), %rdi
movl $0x8, %edx
callq 0x5880
jmp 0x15cb1
leaq -0x768(%rbp), %rdi
callq 0x5968
movq -0x748(%rbp), %rax
movq -0x18(%rax), %rax
leaq -0x748(%rbp,%rax), %rdi
callq 0x5640
movb %al, -0x999(%rbp)
jmp 0x15cdd
movb -0x999(%rbp), %al
testb $0x1, %al
jne 0x15cec
jmp 0x15da1
jmp 0x15cee
leaq -0x748(%rbp), %rdi
leaq -0x28(%rbp), %rsi
callq 0x50d0
movq %rax, -0x9a8(%rbp)
jmp 0x15d07
movq -0x9a8(%rbp), %rdi
movq (%rdi), %rax
movq -0x18(%rax), %rax
addq %rax, %rdi
callq 0x5640
movb %al, -0x9a9(%rbp)
jmp 0x15d25
movb -0x9a9(%rbp), %cl
xorl %eax, %eax
testb $0x1, %cl
movb %al, -0x9aa(%rbp)
jne 0x15d3a
jmp 0x15d4b
leaq -0x28(%rbp), %rdi
callq 0x57f0
xorb $-0x1, %al
movb %al, -0x9aa(%rbp)
movb -0x9aa(%rbp), %al
testb $0x1, %al
jne 0x15d57
jmp 0x15d9f
leaq 0x1328a(%rip), %rdi     # 0x28fe8
leaq -0x28(%rbp), %rsi
callq 0xd530
jmp 0x15d69
jmp 0x15cee
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x768(%rbp), %rdi
callq 0x5968
jmp 0x15de3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x50(%rbp)
movl %eax, -0x54(%rbp)
leaq -0x748(%rbp), %rdi
callq 0x5150
jmp 0x15de3
jmp 0x15da1
leaq -0x748(%rbp), %rdi
callq 0x5150
leaq -0x2a8(%rbp), %rdi
callq 0x5968
leaq -0x280(%rbp), %rdi
callq 0x5968
leaq -0x260(%rbp), %rdi
callq 0x5150
leaq -0x28(%rbp), %rdi
callq 0x5968
addq $0x9b0, %rsp            # imm = 0x9B0
popq %rbp
retq
leaq -0x2a8(%rbp), %rdi
callq 0x5968
leaq -0x280(%rbp), %rdi
callq 0x5968
leaq -0x260(%rbp), %rdi
callq 0x5150
leaq -0x28(%rbp), %rdi
callq 0x5968
movq -0x50(%rbp), %rdi
callq 0x5830
nopl (%rax)