// File: rthoelen[P]NXCore_Kenwood/main.cc
// Function: main
int main(int argc, char *argv[])
{
	unsigned int i, j;
	int len;
	struct addrinfo hints, *result;

	boost::property_tree::ptree pt;

	try {

	boost::property_tree::ini_parser::read_ini("NXCore.ini", pt);

	}
	catch(const boost::property_tree::ptree_error  &e)
	{
		std::cout << "Config file not found!" << std::endl << std::endl;
		exit(1);
	}


	if(argc > 1)
		if (strcmp(argv[1], "-d") == 0)
			debug = 1;

	// Print out version and copyright info
	std::cout << version << std::endl;
	std::cout << copyright << std::endl << std::endl;

	// Get list of repeaters

	std::string s = pt.get<std::string>("repeaters");
	std::string tg;

	std::vector<std::string> elems;
	std::vector<std::string> tg_elems;

	// Split by space or tab
	boost::split(elems, s, boost::is_any_of("\t ,"), boost::token_compress_on);

	repeater_count = elems.size();
	std::cout << "Repeater Count:  " << repeater_count << std::endl << std::endl;

	r_list = elems;

	repeater = (struct rpt *)calloc(repeater_count, sizeof(struct rpt));


	tempaddr = inet_addr(pt.get<std::string>("nodeip").c_str());

	up_packet[4] = (tempaddr >> 24);
	up_packet[5] = (tempaddr >> 16) & 0xff;
	up_packet[6] = (tempaddr >> 8) & 0xff;
	up_packet[7] = (tempaddr & 0xff);

	down_packet[4] = (tempaddr >> 24);
	down_packet[5] = (tempaddr >> 16) & 0xff;
	down_packet[6] = (tempaddr >> 8) & 0xff;
	down_packet[7] = (tempaddr & 0xff);


	// Start populating structure
	std::string key;

	for(i = 0; i < elems.size(); i++)
	{

		key.assign(elems[i]);
		key.append(".address");

		memset(&hints,0, sizeof(hints));
		hints.ai_family = AF_INET;

		
		len = pt.get<std::string>(key).size();
		repeater[i].hostname = (char *)calloc(1, len+1);
		memcpy(repeater[i].hostname, (char *)pt.get<std::string>(key).c_str(),len+1);

		if(getaddrinfo(repeater[i].hostname, NULL, &hints, &result) == -1)
		{
			std::cout << "Error resolving " << pt.get<std::string>(key) << ", exiting" << std::endl;
			exit(1);
		}	
	
		repeater[i].rpt_addr_00.sin_addr.s_addr = ((struct sockaddr_in *)(result->ai_addr))->sin_addr.s_addr;
		repeater[i].rpt_addr_01.sin_addr.s_addr = ((struct sockaddr_in *)(result->ai_addr))->sin_addr.s_addr;
		repeater[i].rpt_addr_00.sin_family = AF_INET;
		repeater[i].rpt_addr_01.sin_family = AF_INET;
		repeater[i].rpt_addr_00.sin_port = htons(64000);
		repeater[i].rpt_addr_01.sin_port = htons(64001);
		
		freeaddrinfo(result);
		std::cout << std::endl << std::endl;
		std::cout << "Repeater " << r_list[i] << " address: " 
			<< inet_ntoa(repeater[i].rpt_addr_00.sin_addr) << std::endl << std::endl;

		// Parse out the talkgroups

		key.assign(elems[i]);
		key.append(".tg_list");
		tg = pt.get<std::string>(key).c_str();

		boost::split(tg_elems, tg, boost::is_any_of("\t ,"), boost::token_compress_on);
	
		repeater[i].tg_list = (int *)calloc(tg_elems.size()+1,sizeof(int));
		std::cout << "Talkgroups " << tg_elems.size() << std::endl; 
		std::cout << "Repeater " << r_list[i] << "  Talkgroups: ";

		for(j = 0; j < tg_elems.size(); j++)
		{
			repeater[i].tg_list[j] = atoi(tg_elems[j].c_str());
			std::cout << " " << repeater[i].tg_list[j];

		}
		std::cout << std::endl;

		// Do the same for the tactical list

		key.assign(elems[i]);
		key.append(".tac_list");
		tg = pt.get<std::string>(key).c_str();

		boost::split(tg_elems, tg, boost::is_any_of("\t ,"), boost::token_compress_on);
	
		repeater[i].tac_list = (int *)calloc(tg_elems.size()+1,sizeof(int));
		std::cout << "Tactical Talkgroups " << tg_elems.size() << std::endl; 
		std::cout << "Repeater " << i << "  Tactical Talkgroup List: ";

		for(j = 0; j < tg_elems.size(); j++)
		{
			repeater[i].tac_list[j] = atoi(tg_elems[j].c_str());
			std::cout << " " << repeater[i].tac_list[j];

		}


		std::cout << std::endl << std::endl;
		repeater[i].tx_ran = pt.get<int>(elems[i] + ".tx_ran");
		repeater[i].rx_ran = pt.get<int>(elems[i] + ".rx_ran");
		repeater[i].hold_time = pt.get<int>(elems[i] + ".rx_hold_time");
		repeater[i].time_since_rx = repeater[i].hold_time;
		repeater[i].stealth = pt.get<int>(elems[i] + ".stealth");
		repeater[i].tx_hold_time = pt.get<int>(elems[i] + ".tx_hold_time");
		repeater[i].time_since_tx = repeater[i].tx_hold_time;
		repeater[i].tx_otaa = pt.get<int>(elems[i] + ".tx_otaa");

                try {
                        repeater[i].tg_network_off = pt.get<int>(elems[i] + ".tg_network_off");
                        repeater[i].tg_network_on = pt.get<int>(elems[i] + ".tg_network_on");
                }
                catch(const boost::property_tree::ptree_error &e)
                {
                        repeater[i].tg_network_off = 0;
                        repeater[i].tg_network_on = 0;
                }
		
		try {
			repeater[i].msg_flag = pt.get<int>(elems[i] + ".msg_flag");
		}
		catch(const boost::property_tree::ptree_error &e)
		{
			repeater[i].msg_flag = 0;
		}

	}

	//

	tx_sem = 0;
	tx_busy_sem = 0;

	// start the threads


	pthread_t l_thread;
	pthread_t t_thread;

	if(pthread_create(&l_thread, NULL, listen_thread, (void *)0))  {
		fprintf(stderr, "Problem creating thread.  Exiting\n");
		return 1; 
	}
	
	if(pthread_create(&t_thread, NULL, timing_thread, (void *)0))  {
		fprintf(stderr, "Problem creating thread.  Exiting\n");
		return 1; 
	}

	int counter = 0;


	while(1==1)
	{
	
		sleep(10);
		counter++;

		if (counter > 90)
		{
			while(tx_sem==1)
				usleep(1);
			tx_sem = 1;
		
			for (i = 0; i < (unsigned int)repeater_count; i++)
			{
                       		if(getaddrinfo(repeater[i].hostname, NULL, &hints, &result) == 0)
                        	{
                                	repeater[i].rpt_addr_00.sin_addr.s_addr = ((struct sockaddr_in *)(result->ai_addr))->sin_addr.s_addr;
                                	repeater[i].rpt_addr_01.sin_addr.s_addr = ((struct sockaddr_in *)(result->ai_addr))->sin_addr.s_addr;
				freeaddrinfo(result);
                        	}
			}
			tx_sem = 0;
		counter = 0;
		}

	}
	pthread_exit(NULL);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x880, %rsp            # imm = 0x880
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x80(%rbp), %rdi
callq 0xa030
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x730(%rbp)
callq 0x5760
movq -0x730(%rbp), %rdx
leaq 0x15374(%rip), %rsi     # 0x1d377
leaq -0xa0(%rbp), %rdi
callq 0xa3d0
jmp 0x8011
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x5840
movq -0x738(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0xa0c0
jmp 0x803d
leaq -0xc0(%rbp), %rdi
callq 0x5650
leaq -0xa0(%rbp), %rdi
callq 0x5290
leaq -0xa1(%rbp), %rdi
callq 0x5500
jmp 0x814b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x80a4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x5650
leaq -0xa0(%rbp), %rdi
callq 0x5290
leaq -0xa1(%rbp), %rdi
callq 0x5500
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x9ad2
movq -0xb0(%rbp), %rdi
callq 0x5160
movq %rax, -0xc8(%rbp)
movq 0x21ef3(%rip), %rdi     # 0x29fd0
leaq 0x1529e(%rip), %rsi     # 0x1d382
callq 0x5480
movq %rax, -0x740(%rbp)
jmp 0x80f2
movq -0x740(%rbp), %rdi
movq 0x21eb8(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq %rax, -0x748(%rbp)
jmp 0x810e
movq -0x748(%rbp), %rdi
movq 0x21e9c(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8123
movl $0x1, %edi
callq 0x5560
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
callq 0x56e0
jmp 0x8146
jmp 0x9ad2
cmpl $0x1, -0x8(%rbp)
jle 0x8176
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x15239(%rip), %rsi     # 0x1d399
callq 0x5630
cmpl $0x0, %eax
jne 0x8174
movl $0x1, 0x223b8(%rip)     # 0x2a52c
jmp 0x8176
movq 0x21e53(%rip), %rdi     # 0x29fd0
leaq 0x222bc(%rip), %rsi     # 0x2a440
callq 0x5480
movq %rax, -0x750(%rbp)
jmp 0x8192
movq -0x750(%rbp), %rdi
movq 0x21e18(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x81a7
movq 0x21e22(%rip), %rdi     # 0x29fd0
leaq 0x222bb(%rip), %rsi     # 0x2a470
callq 0x5480
movq %rax, -0x758(%rbp)
jmp 0x81c3
movq -0x758(%rbp), %rdi
movq 0x21de7(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq %rax, -0x760(%rbp)
jmp 0x81df
movq -0x760(%rbp), %rdi
movq 0x21dcb(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x81f4
leaq 0x151a1(%rip), %rsi     # 0x1d39c
leaq -0x118(%rbp), %rdi
movl $0x2e, %edx
callq 0xa4e0
jmp 0x820e
leaq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0xa490
jmp 0x8227
leaq -0x118(%rbp), %rdi
callq 0xa570
leaq -0x140(%rbp), %rdi
callq 0x5610
leaq -0x158(%rbp), %rdi
callq 0x9c80
leaq -0x170(%rbp), %rdi
callq 0x9c80
leaq 0x15148(%rip), %rsi     # 0x1d3a6
leaq -0x188(%rbp), %rdi
callq 0xa660
jmp 0x826c
leaq -0x158(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x188(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa590
jmp 0x828a
leaq -0x188(%rbp), %rdi
callq 0xa6b0
leaq -0x158(%rbp), %rdi
callq 0xa700
movl %eax, 0x22280(%rip)     # 0x2a528
movq 0x21d21(%rip), %rdi     # 0x29fd0
leaq 0x150f4(%rip), %rsi     # 0x1d3aa
callq 0x5480
movq %rax, -0x768(%rbp)
jmp 0x82c4
movq -0x768(%rbp), %rdi
movl 0x22257(%rip), %esi     # 0x2a528
callq 0x5740
movq %rax, -0x770(%rbp)
jmp 0x82df
movq -0x770(%rbp), %rdi
movq 0x21ccb(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq %rax, -0x778(%rbp)
jmp 0x82fb
movq -0x778(%rbp), %rdi
movq 0x21caf(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8310
leaq 0x22219(%rip), %rdi     # 0x2a530
leaq -0x158(%rbp), %rsi
callq 0xa720
jmp 0x8325
movslq 0x221fc(%rip), %rdi     # 0x2a528
movl $0x90, %esi
callq 0x52f0
movq %rax, 0x221e3(%rip)     # 0x2a520
leaq 0x15078(%rip), %rsi     # 0x1d3bc
leaq -0x1d8(%rbp), %rdi
movl $0x2e, %edx
callq 0xa4e0
jmp 0x8357
leaq -0x1a8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x1d8(%rbp), %rdx
callq 0xa490
jmp 0x8370
leaq -0x1a8(%rbp), %rdi
callq 0x5170
movq %rax, %rdi
callq 0x54a0
movl %eax, 0x221be(%rip)     # 0x2a548
leaq -0x1a8(%rbp), %rdi
callq 0x5290
leaq -0x1d8(%rbp), %rdi
callq 0xa570
movl 0x221a0(%rip), %eax     # 0x2a548
shrl $0x18, %eax
movb %al, 0x220f3(%rip)      # 0x2a4a4
movl 0x22191(%rip), %eax     # 0x2a548
shrl $0x10, %eax
andl $0xff, %eax
movb %al, 0x220e0(%rip)      # 0x2a4a5
movl 0x2217d(%rip), %eax     # 0x2a548
shrl $0x8, %eax
andl $0xff, %eax
movb %al, 0x220cd(%rip)      # 0x2a4a6
movl 0x22169(%rip), %eax     # 0x2a548
andl $0xff, %eax
movb %al, 0x220bd(%rip)      # 0x2a4a7
movl 0x22158(%rip), %eax     # 0x2a548
shrl $0x18, %eax
movb %al, 0x220cb(%rip)      # 0x2a4c4
movl 0x22149(%rip), %eax     # 0x2a548
shrl $0x10, %eax
andl $0xff, %eax
movb %al, 0x220b8(%rip)      # 0x2a4c5
movl 0x22135(%rip), %eax     # 0x2a548
shrl $0x8, %eax
andl $0xff, %eax
movb %al, 0x220a5(%rip)      # 0x2a4c6
movl 0x22121(%rip), %eax     # 0x2a548
andl $0xff, %eax
movb %al, 0x22095(%rip)      # 0x2a4c7
leaq -0x200(%rbp), %rdi
callq 0x5610
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x780(%rbp)
leaq -0x158(%rbp), %rdi
callq 0xa700
movq %rax, %rcx
movq -0x780(%rbp), %rax
cmpq %rcx, %rax
jae 0x9879
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq -0x200(%rbp), %rdi
callq 0x5790
jmp 0x8490
leaq 0x14f2c(%rip), %rsi     # 0x1d3c3
leaq -0x200(%rbp), %rdi
callq 0x5800
jmp 0x84a5
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movl $0x2, -0x4c(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x84d5
leaq -0x220(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0xa490
jmp 0x84ee
leaq -0x220(%rbp), %rdi
movq %rdi, -0x790(%rbp)
callq 0x5310
movq -0x790(%rbp), %rdi
movl %eax, -0x1c(%rbp)
callq 0x5290
leaq -0x250(%rbp), %rdi
callq 0xa570
movl -0x1c(%rbp), %eax
incl %eax
movslq %eax, %rsi
movl $0x1, %edi
callq 0x52f0
movq %rax, %rdx
movq 0x21fe8(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq %rdx, 0x20(%rax,%rcx)
movq 0x21fd1(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x20(%rax,%rcx), %rax
movq %rax, -0x788(%rbp)
leaq -0x2a8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x8580
leaq -0x278(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0xa490
jmp 0x8599
leaq -0x278(%rbp), %rdi
movq %rdi, -0x7a0(%rbp)
callq 0x5170
movq -0x788(%rbp), %rdi
movq %rax, %rsi
movl -0x1c(%rbp), %eax
incl %eax
movslq %eax, %rdx
callq 0x53e0
movq -0x7a0(%rbp), %rdi
callq 0x5290
leaq -0x2a8(%rbp), %rdi
callq 0xa570
movq 0x21f3e(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x20(%rax,%rcx), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x55a0
movl %eax, -0x794(%rbp)
jmp 0x860b
movl -0x794(%rbp), %eax
cmpl $-0x1, %eax
jne 0x880f
movq 0x219af(%rip), %rdi     # 0x29fd0
leaq 0x14da4(%rip), %rsi     # 0x1d3cc
callq 0x5480
movq %rax, -0x7a8(%rbp)
jmp 0x8636
leaq -0x300(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x8650
leaq -0x2d0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0xa490
jmp 0x8669
movq -0x7a8(%rbp), %rdi
leaq -0x2d0(%rbp), %rsi
callq 0x5430
movq %rax, -0x7b0(%rbp)
jmp 0x8685
movq -0x7b0(%rbp), %rdi
leaq 0x14d4a(%rip), %rsi     # 0x1d3dd
callq 0x5480
movq %rax, -0x7b8(%rbp)
jmp 0x86a1
movq -0x7b8(%rbp), %rdi
movq 0x21909(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x86b6
leaq -0x2d0(%rbp), %rdi
callq 0x5290
leaq -0x300(%rbp), %rdi
callq 0xa570
movl $0x1, %edi
callq 0x5560
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x118(%rbp), %rdi
callq 0xa570
jmp 0x9ad2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9aa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x188(%rbp), %rdi
callq 0xa6b0
jmp 0x9aa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1d8(%rbp), %rdi
callq 0xa570
jmp 0x9aa2
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x250(%rbp), %rdi
callq 0xa570
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x2a8(%rbp), %rdi
callq 0xa570
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x87fe
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x5290
leaq -0x300(%rbp), %rdi
callq 0xa570
jmp 0x9a96
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edx
movq 0x21cff(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x4(%rax,%rcx)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edx
movq 0x21cde(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x14(%rax,%rcx)
movq 0x21cc8(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movw $0x2, (%rax,%rcx)
movq 0x21cb0(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movw $0x2, 0x10(%rax,%rcx)
movl $0xfa00, %edi           # imm = 0xFA00
callq 0x5080
movw %ax, %dx
movq 0x21c8a(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movw %dx, 0x2(%rax,%rcx)
movl $0xfa01, %edi           # imm = 0xFA01
callq 0x5080
movw %ax, %dx
movq 0x21c66(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movw %dx, 0x12(%rax,%rcx)
movq -0x58(%rbp), %rdi
callq 0x55d0
movq 0x216f6(%rip), %rdi     # 0x29fd0
movq 0x216d7(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq %rax, -0x7c0(%rbp)
jmp 0x88ef
movq -0x7c0(%rbp), %rdi
movq 0x216bb(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8904
movq 0x216c5(%rip), %rdi     # 0x29fd0
leaq 0x148c9(%rip), %rsi     # 0x1d1db
callq 0x5480
movq %rax, -0x7c8(%rbp)
jmp 0x8920
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq 0x21c04(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0x7c8(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, -0x7d0(%rbp)
jmp 0x8949
movq -0x7d0(%rbp), %rdi
leaq 0x14a90(%rip), %rsi     # 0x1d3e7
callq 0x5480
movq %rax, -0x7d8(%rbp)
jmp 0x8965
movq 0x21bb4(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl 0x4(%rax,%rcx), %eax
movl %eax, -0x308(%rbp)
movl -0x308(%rbp), %edi
callq 0x51c0
movq -0x7d8(%rbp), %rdi
movq %rax, %rsi
callq 0x5480
movq %rax, -0x7e0(%rbp)
jmp 0x89a4
movq -0x7e0(%rbp), %rdi
movq 0x21606(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq %rax, -0x7e8(%rbp)
jmp 0x89c0
movq -0x7e8(%rbp), %rdi
movq 0x215ea(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x89d5
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq -0x200(%rbp), %rdi
callq 0x5790
jmp 0x89f7
leaq 0x149f4(%rip), %rsi     # 0x1d3f2
leaq -0x200(%rbp), %rdi
callq 0x5800
jmp 0x8a0c
leaq -0x358(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x8a26
leaq -0x328(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x358(%rbp), %rdx
callq 0xa490
jmp 0x8a3f
leaq -0x328(%rbp), %rdi
callq 0x5170
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x5600
jmp 0x8a5c
leaq -0x328(%rbp), %rdi
callq 0x5290
leaq -0x358(%rbp), %rdi
callq 0xa570
leaq 0x1492b(%rip), %rsi     # 0x1d3a6
leaq -0x378(%rbp), %rdi
callq 0xa660
jmp 0x8a89
leaq -0x170(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x378(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa590
jmp 0x8aa7
leaq -0x378(%rbp), %rdi
callq 0xa6b0
leaq -0x170(%rbp), %rdi
callq 0xa700
movq %rax, %rdi
incq %rdi
movl $0x4, %esi
callq 0x52f0
movq %rax, %rdx
movq 0x21a47(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq %rdx, 0x58(%rax,%rcx)
movq 0x214e0(%rip), %rdi     # 0x29fd0
leaq 0x14926(%rip), %rsi     # 0x1d41d
callq 0x5480
movq %rax, -0x7f0(%rbp)
jmp 0x8b05
leaq -0x170(%rbp), %rdi
callq 0xa700
movq -0x7f0(%rbp), %rdi
movq %rax, %rsi
callq 0x50e0
movq %rax, -0x7f8(%rbp)
jmp 0x8b29
movq -0x7f8(%rbp), %rdi
movq 0x21481(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8b3e
movq 0x2148b(%rip), %rdi     # 0x29fd0
leaq 0x1468f(%rip), %rsi     # 0x1d1db
callq 0x5480
movq %rax, -0x800(%rbp)
jmp 0x8b5a
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq 0x219ca(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0x800(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, -0x808(%rbp)
jmp 0x8b83
movq -0x808(%rbp), %rdi
leaq 0x1486a(%rip), %rsi     # 0x1d3fb
callq 0x5480
jmp 0x8b98
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq %rax, -0x810(%rbp)
leaq -0x170(%rbp), %rdi
callq 0xa700
movq %rax, %rcx
movq -0x810(%rbp), %rax
cmpq %rcx, %rax
jae 0x8cc5
movl -0x18(%rbp), %eax
movl %eax, %esi
leaq -0x170(%rbp), %rdi
callq 0xa010
movq %rax, %rdi
callq 0x5170
movq %rax, %rdi
callq 0x56a0
movl %eax, %edx
movq 0x2192e(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x58(%rax,%rcx), %rax
movl -0x18(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq 0x213c1(%rip), %rdi     # 0x29fd0
leaq 0x147a4(%rip), %rsi     # 0x1d3ba
callq 0x5480
movq %rax, -0x818(%rbp)
jmp 0x8c24
movq -0x818(%rbp), %rdi
movq 0x218ee(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x58(%rax,%rcx), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %esi
callq 0x5740
jmp 0x8c4f
jmp 0x8c51
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8b9f
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8c91
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x328(%rbp), %rdi
callq 0x5290
leaq -0x358(%rbp), %rdi
callq 0xa570
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x378(%rbp), %rdi
callq 0xa6b0
jmp 0x9a96
movq 0x21304(%rip), %rdi     # 0x29fd0
movq 0x212e5(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8cda
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq -0x200(%rbp), %rdi
callq 0x5790
jmp 0x8cfc
leaq 0x14707(%rip), %rsi     # 0x1d40a
leaq -0x200(%rbp), %rdi
callq 0x5800
jmp 0x8d11
leaq -0x3c8(%rbp), %rdi
leaq -0x200(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x8d2b
leaq -0x398(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x3c8(%rbp), %rdx
callq 0xa490
jmp 0x8d44
leaq -0x398(%rbp), %rdi
callq 0x5170
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x5600
jmp 0x8d61
leaq -0x398(%rbp), %rdi
callq 0x5290
leaq -0x3c8(%rbp), %rdi
callq 0xa570
leaq 0x14626(%rip), %rsi     # 0x1d3a6
leaq -0x3e8(%rbp), %rdi
callq 0xa660
jmp 0x8d8e
leaq -0x170(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x3e8(%rbp), %rdx
xorl %ecx, %ecx
callq 0xa590
jmp 0x8dac
leaq -0x3e8(%rbp), %rdi
callq 0xa6b0
leaq -0x170(%rbp), %rdi
callq 0xa700
movq %rax, %rdi
incq %rdi
movl $0x4, %esi
callq 0x52f0
movq %rax, %rdx
movq 0x21742(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq %rdx, 0x60(%rax,%rcx)
movq 0x211db(%rip), %rdi     # 0x29fd0
leaq 0x14618(%rip), %rsi     # 0x1d414
callq 0x5480
movq %rax, -0x820(%rbp)
jmp 0x8e0a
leaq -0x170(%rbp), %rdi
callq 0xa700
movq -0x820(%rbp), %rdi
movq %rax, %rsi
callq 0x50e0
movq %rax, -0x828(%rbp)
jmp 0x8e2e
movq -0x828(%rbp), %rdi
movq 0x2117c(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8e43
movq 0x21186(%rip), %rdi     # 0x29fd0
leaq 0x1438a(%rip), %rsi     # 0x1d1db
callq 0x5480
movq %rax, -0x830(%rbp)
jmp 0x8e5f
movq -0x830(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x55f0
movq %rax, -0x838(%rbp)
jmp 0x8e77
movq -0x838(%rbp), %rdi
leaq 0x145a4(%rip), %rsi     # 0x1d429
callq 0x5480
jmp 0x8e8c
movl $0x0, -0x18(%rbp)
movl -0x18(%rbp), %eax
movq %rax, -0x840(%rbp)
leaq -0x170(%rbp), %rdi
callq 0xa700
movq %rax, %rcx
movq -0x840(%rbp), %rax
cmpq %rcx, %rax
jae 0x8fb9
movl -0x18(%rbp), %eax
movl %eax, %esi
leaq -0x170(%rbp), %rdi
callq 0xa010
movq %rax, %rdi
callq 0x5170
movq %rax, %rdi
callq 0x56a0
movl %eax, %edx
movq 0x2163a(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x60(%rax,%rcx), %rax
movl -0x18(%rbp), %ecx
movl %edx, (%rax,%rcx,4)
movq 0x210cd(%rip), %rdi     # 0x29fd0
leaq 0x144b0(%rip), %rsi     # 0x1d3ba
callq 0x5480
movq %rax, -0x848(%rbp)
jmp 0x8f18
movq -0x848(%rbp), %rdi
movq 0x215fa(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x60(%rax,%rcx), %rax
movl -0x18(%rbp), %ecx
movl (%rax,%rcx,4), %esi
callq 0x5740
jmp 0x8f43
jmp 0x8f45
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8e93
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8f85
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x398(%rbp), %rdi
callq 0x5290
leaq -0x3c8(%rbp), %rdi
callq 0xa570
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x3e8(%rbp), %rdi
callq 0xa6b0
jmp 0x9a96
movq 0x21010(%rip), %rdi     # 0x29fd0
movq 0x20ff1(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq %rax, -0x850(%rbp)
jmp 0x8fd5
movq -0x850(%rbp), %rdi
movq 0x20fd5(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x8fea
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x14440(%rip), %rdx     # 0x1d445
leaq -0x438(%rbp), %rdi
callq 0xa9f0
jmp 0x9013
leaq -0x418(%rbp), %rdi
leaq -0x438(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x902d
leaq -0x80(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x854(%rbp)
jmp 0x9045
movl -0x854(%rbp), %eax
movb %al, %dl
movq 0x214cc(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movb %dl, 0x48(%rax,%rcx)
leaq -0x418(%rbp), %rdi
callq 0xa570
leaq -0x438(%rbp), %rdi
callq 0x5290
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x143b7(%rip), %rdx     # 0x1d44d
leaq -0x490(%rbp), %rdi
callq 0xa9f0
jmp 0x90a4
leaq -0x470(%rbp), %rdi
leaq -0x490(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x90be
leaq -0x80(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x858(%rbp)
jmp 0x90d6
movl -0x858(%rbp), %eax
movb %al, %dl
movq 0x2143b(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movb %dl, 0x49(%rax,%rcx)
leaq -0x470(%rbp), %rdi
callq 0xa570
leaq -0x490(%rbp), %rdi
callq 0x5290
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x1432e(%rip), %rdx     # 0x1d455
leaq -0x4e8(%rbp), %rdi
callq 0xa9f0
jmp 0x9135
leaq -0x4c8(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x914f
leaq -0x80(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x85c(%rbp)
jmp 0x9167
movl -0x85c(%rbp), %edx
movq 0x213ac(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x30(%rax,%rcx)
leaq -0x4c8(%rbp), %rdi
callq 0xa570
leaq -0x4e8(%rbp), %rdi
callq 0x5290
movq 0x2137e(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl 0x30(%rax,%rcx), %edx
movl %edx, 0x28(%rax,%rcx)
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x14293(%rip), %rdx     # 0x1d463
leaq -0x540(%rbp), %rdi
callq 0xa9f0
jmp 0x91de
leaq -0x520(%rbp), %rdi
leaq -0x540(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x91f8
leaq -0x80(%rbp), %rdi
leaq -0x520(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x860(%rbp)
jmp 0x9210
movl -0x860(%rbp), %edx
movq 0x21303(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x44(%rax,%rcx)
leaq -0x520(%rbp), %rdi
callq 0xa570
leaq -0x540(%rbp), %rdi
callq 0x5290
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x1420d(%rip), %rdx     # 0x1d46c
leaq -0x598(%rbp), %rdi
callq 0xa9f0
jmp 0x926d
leaq -0x578(%rbp), %rdi
leaq -0x598(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x9287
leaq -0x80(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x864(%rbp)
jmp 0x929f
movl -0x864(%rbp), %edx
movq 0x21274(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x34(%rax,%rcx)
leaq -0x578(%rbp), %rdi
callq 0xa570
leaq -0x598(%rbp), %rdi
callq 0x5290
movq 0x21246(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl 0x34(%rax,%rcx), %edx
movl %edx, 0x2c(%rax,%rcx)
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x14172(%rip), %rdx     # 0x1d47a
leaq -0x5f0(%rbp), %rdi
callq 0xa9f0
jmp 0x9316
leaq -0x5d0(%rbp), %rdi
leaq -0x5f0(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x9330
leaq -0x80(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x868(%rbp)
jmp 0x9348
movl -0x868(%rbp), %edx
movq 0x211cb(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x70(%rax,%rcx)
leaq -0x5d0(%rbp), %rdi
callq 0xa570
leaq -0x5f0(%rbp), %rdi
callq 0x5290
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x140ec(%rip), %rdx     # 0x1d483
leaq -0x648(%rbp), %rdi
callq 0xa9f0
jmp 0x93a5
leaq -0x628(%rbp), %rdi
leaq -0x648(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x93bf
leaq -0x80(%rbp), %rdi
leaq -0x628(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x86c(%rbp)
jmp 0x93d7
movl -0x86c(%rbp), %edx
movq 0x2113c(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl %edx, 0x84(%rax,%rcx)
leaq -0x628(%rbp), %rdi
callq 0xa570
leaq -0x648(%rbp), %rdi
callq 0x5290
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x1406a(%rip), %rdx     # 0x1d493
leaq -0x6a0(%rbp), %rdi
callq 0xa9f0
jmp 0x9437
leaq -0x680(%rbp), %rdi
leaq -0x6a0(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x9451
leaq -0x80(%rbp), %rdi
leaq -0x680(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x870(%rbp)
jmp 0x9469
movl -0x870(%rbp), %ecx
movq 0x210aa(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %edx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x80(%rax)
leaq -0x680(%rbp), %rdi
callq 0xa570
leaq -0x6a0(%rbp), %rdi
callq 0x5290
jmp 0x9733
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x94d8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x418(%rbp), %rdi
callq 0xa570
leaq -0x438(%rbp), %rdi
callq 0x5290
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x951b
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x470(%rbp), %rdi
callq 0xa570
leaq -0x490(%rbp), %rdi
callq 0x5290
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x955e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0xa570
leaq -0x4e8(%rbp), %rdi
callq 0x5290
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x95a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x520(%rbp), %rdi
callq 0xa570
leaq -0x540(%rbp), %rdi
callq 0x5290
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x95e4
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x578(%rbp), %rdi
callq 0xa570
leaq -0x598(%rbp), %rdi
callq 0x5290
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9627
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x5d0(%rbp), %rdi
callq 0xa570
leaq -0x5f0(%rbp), %rdi
callq 0x5290
jmp 0x9a96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x96ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x967e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x628(%rbp), %rdi
callq 0xa570
leaq -0x648(%rbp), %rdi
callq 0x5290
jmp 0x96ca
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x96be
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x680(%rbp), %rdi
callq 0xa570
leaq -0x6a0(%rbp), %rdi
callq 0x5290
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x9a96
movq -0xb0(%rbp), %rdi
callq 0x5160
movq %rax, -0x6b0(%rbp)
movq 0x20e29(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl $0x0, 0x84(%rax,%rcx)
movq 0x20e0c(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl $0x0, 0x80(%rax,%rcx)
callq 0x56e0
jmp 0x9731
jmp 0x9733
movl -0x14(%rbp), %eax
movl %eax, %esi
leaq -0x158(%rbp), %rdi
callq 0xa010
movq %rax, %rsi
leaq 0x13d54(%rip), %rdx     # 0x1d4a2
leaq -0x700(%rbp), %rdi
callq 0xa9f0
jmp 0x975c
leaq -0x6e0(%rbp), %rdi
leaq -0x700(%rbp), %rsi
movl $0x2e, %edx
callq 0xa970
jmp 0x9776
leaq -0x80(%rbp), %rdi
leaq -0x6e0(%rbp), %rsi
callq 0xa9c0
movl %eax, -0x874(%rbp)
jmp 0x978e
movl -0x874(%rbp), %ecx
movq 0x20d85(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %edx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x88(%rax)
leaq -0x6e0(%rbp), %rdi
callq 0xa570
leaq -0x700(%rbp), %rdi
callq 0x5290
jmp 0x9869
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x981d
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x9811
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x6e0(%rbp), %rdi
callq 0xa570
leaq -0x700(%rbp), %rdi
callq 0x5290
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x9a96
movq -0xb0(%rbp), %rdi
callq 0x5160
movq %rax, -0x710(%rbp)
movq 0x20cd6(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movl $0x0, 0x88(%rax,%rcx)
callq 0x56e0
jmp 0x9867
jmp 0x9869
jmp 0x986b
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8445
movl $0x0, 0x20cd1(%rip)     # 0x2a554
movl $0x0, 0x20ccb(%rip)     # 0x2a558
leaq -0x718(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x3d4f(%rip), %rdx     # 0x5b50
movq %rcx, %rsi
callq 0x57b0
cmpl $0x0, %eax
je 0x98da
movq 0x20725(%rip), %rax     # 0x29fd8
movq (%rax), %rdi
leaq 0x13bef(%rip), %rsi     # 0x1d4ac
movb $0x0, %al
callq 0x5670
movl $0x1, -0x4(%rbp)
movl $0x1, -0x724(%rbp)
jmp 0x9a45
leaq -0x720(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x1dac(%rip), %rdx     # 0x7b40
movq %rcx, %rsi
callq 0x57b0
cmpl $0x0, %eax
je 0x9927
movq 0x206d8(%rip), %rax     # 0x29fd8
movq (%rax), %rdi
leaq 0x13ba2(%rip), %rsi     # 0x1d4ac
movb $0x0, %al
callq 0x5670
movl $0x1, -0x4(%rbp)
movl $0x1, -0x724(%rbp)
jmp 0x9a45
movl $0x0, -0x728(%rbp)
jmp 0x9933
movl $0xa, %edi
callq 0x5380
jmp 0x993f
movl -0x728(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x728(%rbp)
cmpl $0x5a, -0x728(%rbp)
jle 0x9a40
jmp 0x995d
cmpl $0x1, 0x20bf0(%rip)     # 0x2a554
jne 0x9974
movl $0x1, %edi
callq 0x5660
jmp 0x9972
jmp 0x995d
movl $0x1, 0x20bd6(%rip)     # 0x2a554
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x20b9a(%rip), %eax     # 0x2a528
jae 0x9a2c
movq 0x20b85(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %ecx
leaq (%rcx,%rcx,8), %rcx
shlq $0x4, %rcx
movq 0x20(%rax,%rcx), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x55a0
movl %eax, -0x878(%rbp)
jmp 0x99c4
movl -0x878(%rbp), %eax
cmpl $0x0, %eax
jne 0x9a1c
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %ecx
movq 0x20b3f(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %edx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %ecx
movq 0x20b1d(%rip), %rax     # 0x2a520
movl -0x14(%rbp), %edx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x14(%rax)
movq -0x58(%rbp), %rdi
callq 0x55d0
jmp 0x9a1e
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x9985
movl $0x0, 0x20b1e(%rip)     # 0x2a554
movl $0x0, -0x728(%rbp)
jmp 0x9931
leaq -0x200(%rbp), %rdi
callq 0x5290
leaq -0x170(%rbp), %rdi
callq 0x9ca0
leaq -0x158(%rbp), %rdi
callq 0x9ca0
leaq -0x140(%rbp), %rdi
callq 0x5290
leaq -0xe8(%rbp), %rdi
callq 0x5290
leaq -0x80(%rbp), %rdi
callq 0xaa70
movl -0x4(%rbp), %eax
addq $0x880, %rsp            # imm = 0x880
popq %rbp
retq
leaq -0x200(%rbp), %rdi
callq 0x5290
leaq -0x170(%rbp), %rdi
callq 0x9ca0
leaq -0x158(%rbp), %rdi
callq 0x9ca0
leaq -0x140(%rbp), %rdi
callq 0x5290
leaq -0xe8(%rbp), %rdi
callq 0x5290
leaq -0x80(%rbp), %rdi
callq 0xaa70
movq -0xb0(%rbp), %rdi
callq 0x5750
movq %rax, %rdi
callq 0xa480
nop