// File: rthoelen[P]NXCore_Icom/main.cc
// Function: main
int main(int argc, char *argv[])
{
    int i, j, 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;
	}

	// 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;

	std::cout << version << std::endl;
	std::cout << copyright << std::endl << std::endl;
	
	// Split by space or tab
	boost::split(elems, s, boost::is_any_of("\t "), boost::token_compress_on);


	r_list = elems;

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

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


	/* For Icom we don't need this (at least yet)

	unsigned int tempaddr;

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

	*/

	tx_busy_sem = 0;

	// 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_00.sin_family = AF_INET;
		repeater[i].rpt_addr_00.sin_port = htons(41300);

		std::cout << std::endl << std::endl;
		std::cout << "Repeater " << elems[i] << " address: " << inet_ntoa(repeater[i].rpt_addr_00.sin_addr) << std::endl << std::endl;

		freeaddrinfo(result);
		// 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 = (unsigned int *)calloc(tg_elems.size()+1,sizeof(int));
		std::cout << "Talkgroups " << tg_elems.size() << std::endl; 
		std::cout << "Repeater " << elems[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 = (unsigned 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].tx_hold_time = pt.get<int>(elems[i] + ".tx_hold_time");
		repeater[i].time_since_tx = repeater[i].tx_hold_time;
		repeater[i].stealth = pt.get<int>(elems[i] + ".stealth");
		repeater[i].tx_otaa = pt.get<int>(elems[i] + ".tx_otaa");

		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;
		}	
		
		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;
		}	
		

	}


	// start the thread

	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)
                {
                        for (i = 0; i < 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;
					freeaddrinfo(result);
                                }
                        }
                counter = 0;
                }

	}
	pthread_exit(NULL);
	free(repeater);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x820, %rsp            # imm = 0x820
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0x80(%rbp), %rdi
callq 0x9040
leaq -0xa1(%rbp), %rdi
movq %rdi, -0x6d8(%rbp)
callq 0x56a0
movq -0x6d8(%rbp), %rdx
leaq 0x14d36(%rip), %rsi     # 0x1c299
leaq -0xa0(%rbp), %rdi
callq 0x93e0
jmp 0x7571
leaq -0xc0(%rbp), %rdi
movq %rdi, -0x6e0(%rbp)
callq 0x5780
movq -0x6e0(%rbp), %rdx
leaq -0xa0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
callq 0x90d0
jmp 0x759d
leaq -0xc0(%rbp), %rdi
callq 0x55b0
leaq -0xa0(%rbp), %rdi
callq 0x5240
leaq -0xa1(%rbp), %rdi
callq 0x5470
jmp 0x76ab
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x7604
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0xc0(%rbp), %rdi
callq 0x55b0
leaq -0xa0(%rbp), %rdi
callq 0x5240
leaq -0xa1(%rbp), %rdi
callq 0x5470
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x8ded
movq -0xb0(%rbp), %rdi
callq 0x5150
movq %rax, -0xc8(%rbp)
movq 0x21993(%rip), %rdi     # 0x28fd0
leaq 0x14c60(%rip), %rsi     # 0x1c2a4
callq 0x53f0
movq %rax, -0x6e8(%rbp)
jmp 0x7652
movq -0x6e8(%rbp), %rdi
movq 0x21958(%rip), %rsi     # 0x28fb8
callq 0x5450
movq %rax, -0x6f0(%rbp)
jmp 0x766e
movq -0x6f0(%rbp), %rdi
movq 0x2193c(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x7683
movl $0x1, %edi
callq 0x54d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
callq 0x5630
jmp 0x76a6
jmp 0x8ded
cmpl $0x1, -0x8(%rbp)
jle 0x76d6
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
leaq 0x14bfb(%rip), %rsi     # 0x1c2bb
callq 0x5590
cmpl $0x0, %eax
jne 0x76d4
movl $0x1, 0x21dc8(%rip)     # 0x2949c
jmp 0x76d6
leaq 0x14be1(%rip), %rsi     # 0x1c2be
leaq -0x118(%rbp), %rdi
movl $0x2e, %edx
callq 0x94f0
jmp 0x76f0
leaq -0xe8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x118(%rbp), %rdx
callq 0x94a0
jmp 0x7709
leaq -0x118(%rbp), %rdi
callq 0x9580
leaq -0x140(%rbp), %rdi
callq 0x5580
leaq -0x158(%rbp), %rdi
callq 0x8fa0
leaq -0x170(%rbp), %rdi
callq 0x8fa0
movq 0x21890(%rip), %rdi     # 0x28fd0
leaq 0x21c99(%rip), %rsi     # 0x293e0
callq 0x53f0
movq %rax, -0x6f8(%rbp)
jmp 0x7755
movq -0x6f8(%rbp), %rdi
movq 0x21855(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x776a
movq 0x2185f(%rip), %rdi     # 0x28fd0
leaq 0x21c98(%rip), %rsi     # 0x29410
callq 0x53f0
movq %rax, -0x700(%rbp)
jmp 0x7786
movq -0x700(%rbp), %rdi
movq 0x21824(%rip), %rsi     # 0x28fb8
callq 0x5450
movq %rax, -0x708(%rbp)
jmp 0x77a2
movq -0x708(%rbp), %rdi
movq 0x21808(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x77b7
leaq 0x14b0a(%rip), %rsi     # 0x1c2c8
leaq -0x188(%rbp), %rdi
callq 0x9670
jmp 0x77cc
leaq -0x158(%rbp), %rdi
leaq -0xe8(%rbp), %rsi
leaq -0x188(%rbp), %rdx
xorl %ecx, %ecx
callq 0x95a0
jmp 0x77ea
leaq -0x188(%rbp), %rdi
callq 0x96c0
leaq 0x21c83(%rip), %rdi     # 0x29480
leaq -0x158(%rbp), %rsi
callq 0x9710
jmp 0x780b
leaq -0x158(%rbp), %rdi
callq 0x9960
movl %eax, 0x21c7b(%rip)     # 0x29498
movq 0x217ac(%rip), %rdi     # 0x28fd0
leaq 0x14aa0(%rip), %rsi     # 0x1c2cb
callq 0x53f0
movq %rax, -0x710(%rbp)
jmp 0x7839
movq -0x710(%rbp), %rdi
movl 0x21c52(%rip), %esi     # 0x29498
callq 0x5680
movq %rax, -0x718(%rbp)
jmp 0x7854
movq -0x718(%rbp), %rdi
movq 0x21756(%rip), %rsi     # 0x28fb8
callq 0x5450
movq %rax, -0x720(%rbp)
jmp 0x7870
movq -0x720(%rbp), %rdi
movq 0x2173a(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x7885
movslq 0x21c0c(%rip), %rdi     # 0x29498
movl $0x70, %esi
callq 0x5290
movq %rax, 0x21bdb(%rip)     # 0x29478
movl $0x0, 0x21bfd(%rip)     # 0x294a4
leaq -0x1a8(%rbp), %rdi
callq 0x5580
movl $0x0, -0x14(%rbp)
movslq -0x14(%rbp), %rax
movq %rax, -0x728(%rbp)
leaq -0x158(%rbp), %rdi
callq 0x9960
movq %rax, %rcx
movq -0x728(%rbp), %rax
cmpq %rcx, %rax
jae 0x8c03
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x56d0
jmp 0x7905
leaq 0x149d1(%rip), %rsi     # 0x1c2dd
leaq -0x1a8(%rbp), %rdi
callq 0x5740
jmp 0x791a
xorps %xmm0, %xmm0
movaps %xmm0, -0x30(%rbp)
movaps %xmm0, -0x40(%rbp)
movaps %xmm0, -0x50(%rbp)
movl $0x2, -0x4c(%rbp)
leaq -0x1f8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x794a
leaq -0x1c8(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x1f8(%rbp), %rdx
callq 0x94a0
jmp 0x7963
leaq -0x1c8(%rbp), %rdi
movq %rdi, -0x738(%rbp)
callq 0x52b0
movq -0x738(%rbp), %rdi
movl %eax, -0x1c(%rbp)
callq 0x5240
leaq -0x1f8(%rbp), %rdi
callq 0x9580
movl -0x1c(%rbp), %eax
incl %eax
movslq %eax, %rsi
movl $0x1, %edi
callq 0x5290
movq %rax, %rdx
movq 0x21acb(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq %rdx, 0x10(%rax,%rcx)
movq 0x21ab7(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x10(%rax,%rcx), %rax
movq %rax, -0x730(%rbp)
leaq -0x250(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x79ef
leaq -0x220(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x250(%rbp), %rdx
callq 0x94a0
jmp 0x7a08
leaq -0x220(%rbp), %rdi
movq %rdi, -0x748(%rbp)
callq 0x5160
movq -0x730(%rbp), %rdi
movq %rax, %rsi
movl -0x1c(%rbp), %eax
incl %eax
movslq %eax, %rdx
callq 0x5360
movq -0x748(%rbp), %rdi
callq 0x5240
leaq -0x250(%rbp), %rdi
callq 0x9580
movq 0x21a27(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x10(%rax,%rcx), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x5510
movl %eax, -0x73c(%rbp)
jmp 0x7a77
movl -0x73c(%rbp), %eax
cmpl $-0x1, %eax
jne 0x7c58
movq 0x21543(%rip), %rdi     # 0x28fd0
leaq 0x14852(%rip), %rsi     # 0x1c2e6
callq 0x53f0
movq %rax, -0x750(%rbp)
jmp 0x7aa2
leaq -0x2a8(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x7abc
leaq -0x278(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x2a8(%rbp), %rdx
callq 0x94a0
jmp 0x7ad5
movq -0x750(%rbp), %rdi
leaq -0x278(%rbp), %rsi
callq 0x53b0
movq %rax, -0x758(%rbp)
jmp 0x7af1
movq -0x758(%rbp), %rdi
leaq 0x147f8(%rip), %rsi     # 0x1c2f7
callq 0x53f0
movq %rax, -0x760(%rbp)
jmp 0x7b0d
movq -0x760(%rbp), %rdi
movq 0x2149d(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x7b22
leaq -0x278(%rbp), %rdi
callq 0x5240
leaq -0x2a8(%rbp), %rdi
callq 0x9580
movl $0x1, %edi
callq 0x54d0
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8ded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x118(%rbp), %rdi
callq 0x9580
jmp 0x8ded
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8dbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x188(%rbp), %rdi
callq 0x96c0
jmp 0x8dbd
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x1f8(%rbp), %rdi
callq 0x9580
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x250(%rbp), %rdi
callq 0x9580
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x7c47
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x278(%rbp), %rdi
callq 0x5240
leaq -0x2a8(%rbp), %rdi
callq 0x9580
jmp 0x8db1
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %edx
movq 0x2180e(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl %edx, 0x4(%rax,%rcx)
movq 0x217fb(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movw $0x2, (%rax,%rcx)
movl $0xa154, %edi           # imm = 0xA154
callq 0x5080
movw %ax, %dx
movq 0x217d9(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movw %dx, 0x2(%rax,%rcx)
movq 0x2131d(%rip), %rdi     # 0x28fd0
movq 0x212fe(%rip), %rsi     # 0x28fb8
callq 0x5450
movq %rax, -0x768(%rbp)
jmp 0x7cc8
movq -0x768(%rbp), %rdi
movq 0x212e2(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x7cdd
movq 0x212ec(%rip), %rdi     # 0x28fd0
leaq 0x14616(%rip), %rsi     # 0x1c301
callq 0x53f0
movq %rax, -0x770(%rbp)
jmp 0x7cf9
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq -0x770(%rbp), %rdi
movq %rax, %rsi
callq 0x53b0
movq %rax, -0x778(%rbp)
jmp 0x7d21
movq -0x778(%rbp), %rdi
leaq 0x145dc(%rip), %rsi     # 0x1c30b
callq 0x53f0
movq %rax, -0x780(%rbp)
jmp 0x7d3d
movq 0x21734(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl 0x4(%rax,%rcx), %eax
movl %eax, -0x2b0(%rbp)
movl -0x2b0(%rbp), %edi
callq 0x51a0
movq -0x780(%rbp), %rdi
movq %rax, %rsi
callq 0x53f0
movq %rax, -0x788(%rbp)
jmp 0x7d79
movq -0x788(%rbp), %rdi
movq 0x21231(%rip), %rsi     # 0x28fb8
callq 0x5450
movq %rax, -0x790(%rbp)
jmp 0x7d95
movq -0x790(%rbp), %rdi
movq 0x21215(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x7daa
movq -0x58(%rbp), %rdi
callq 0x5540
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x56d0
jmp 0x7dd4
leaq 0x1453b(%rip), %rsi     # 0x1c316
leaq -0x1a8(%rbp), %rdi
callq 0x5740
jmp 0x7de9
leaq -0x300(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x7e03
leaq -0x2d0(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x300(%rbp), %rdx
callq 0x94a0
jmp 0x7e1c
leaq -0x2d0(%rbp), %rdi
callq 0x5160
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x5570
jmp 0x7e39
leaq -0x2d0(%rbp), %rdi
callq 0x5240
leaq -0x300(%rbp), %rdi
callq 0x9580
leaq 0x14470(%rip), %rsi     # 0x1c2c8
leaq -0x320(%rbp), %rdi
callq 0x9670
jmp 0x7e66
leaq -0x170(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x320(%rbp), %rdx
xorl %ecx, %ecx
callq 0x95a0
jmp 0x7e84
leaq -0x320(%rbp), %rdi
callq 0x96c0
leaq -0x170(%rbp), %rdi
callq 0x9960
movq %rax, %rdi
incq %rdi
movl $0x4, %esi
callq 0x5290
movq %rax, %rdx
movq 0x215c2(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq %rdx, 0x40(%rax,%rcx)
movq 0x21106(%rip), %rdi     # 0x28fd0
leaq 0x14474(%rip), %rsi     # 0x1c345
callq 0x53f0
movq %rax, -0x798(%rbp)
jmp 0x7edf
leaq -0x170(%rbp), %rdi
callq 0x9960
movq -0x798(%rbp), %rdi
movq %rax, %rsi
callq 0x50e0
movq %rax, -0x7a0(%rbp)
jmp 0x7f03
movq -0x7a0(%rbp), %rdi
movq 0x210a7(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x7f18
movq 0x210b1(%rip), %rdi     # 0x28fd0
leaq 0x143db(%rip), %rsi     # 0x1c301
callq 0x53f0
movq %rax, -0x7a8(%rbp)
jmp 0x7f34
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq -0x7a8(%rbp), %rdi
movq %rax, %rsi
callq 0x53b0
movq %rax, -0x7b0(%rbp)
jmp 0x7f5c
movq -0x7b0(%rbp), %rdi
leaq 0x143b5(%rip), %rsi     # 0x1c31f
callq 0x53f0
jmp 0x7f71
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rax
movq %rax, -0x7b8(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x9960
movq %rax, %rcx
movq -0x7b8(%rbp), %rax
cmpq %rcx, %rax
jae 0x809a
movslq -0x18(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x9020
movq %rax, %rdi
callq 0x5160
movq %rax, %rdi
callq 0x5600
movl %eax, %edx
movq 0x214ad(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x40(%rax,%rcx), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20fea(%rip), %rdi     # 0x28fd0
leaq 0x142dc(%rip), %rsi     # 0x1c2c9
callq 0x53f0
movq %rax, -0x7c0(%rbp)
jmp 0x7ffb
movq -0x7c0(%rbp), %rdi
movq 0x2146f(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x40(%rax,%rcx), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x5560
jmp 0x8024
jmp 0x8026
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x7f78
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8066
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x2d0(%rbp), %rdi
callq 0x5240
leaq -0x300(%rbp), %rdi
callq 0x9580
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x320(%rbp), %rdi
callq 0x96c0
jmp 0x8db1
movq 0x20f2f(%rip), %rdi     # 0x28fd0
movq 0x20f10(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x80af
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq -0x1a8(%rbp), %rdi
callq 0x56d0
jmp 0x80d0
leaq 0x14257(%rip), %rsi     # 0x1c32e
leaq -0x1a8(%rbp), %rdi
callq 0x5740
jmp 0x80e5
leaq -0x370(%rbp), %rdi
leaq -0x1a8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x80ff
leaq -0x340(%rbp), %rdi
leaq -0x80(%rbp), %rsi
leaq -0x370(%rbp), %rdx
callq 0x94a0
jmp 0x8118
leaq -0x340(%rbp), %rdi
callq 0x5160
movq %rax, %rsi
leaq -0x140(%rbp), %rdi
callq 0x5570
jmp 0x8135
leaq -0x340(%rbp), %rdi
callq 0x5240
leaq -0x370(%rbp), %rdi
callq 0x9580
leaq 0x141e4(%rip), %rsi     # 0x1c338
leaq -0x390(%rbp), %rdi
callq 0x99d0
jmp 0x8162
leaq -0x170(%rbp), %rdi
leaq -0x140(%rbp), %rsi
leaq -0x390(%rbp), %rdx
xorl %ecx, %ecx
callq 0x95a0
jmp 0x8180
leaq -0x390(%rbp), %rdi
callq 0x96c0
leaq -0x170(%rbp), %rdi
callq 0x9960
movq %rax, %rdi
incq %rdi
movl $0x4, %esi
callq 0x5290
movq %rax, %rdx
movq 0x212c6(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq %rdx, 0x48(%rax,%rcx)
movq 0x20e0a(%rip), %rdi     # 0x28fd0
leaq 0x1416f(%rip), %rsi     # 0x1c33c
callq 0x53f0
movq %rax, -0x7c8(%rbp)
jmp 0x81db
leaq -0x170(%rbp), %rdi
callq 0x9960
movq -0x7c8(%rbp), %rdi
movq %rax, %rsi
callq 0x50e0
movq %rax, -0x7d0(%rbp)
jmp 0x81ff
movq -0x7d0(%rbp), %rdi
movq 0x20dab(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x8214
movq 0x20db5(%rip), %rdi     # 0x28fd0
leaq 0x140df(%rip), %rsi     # 0x1c301
callq 0x53f0
movq %rax, -0x7d8(%rbp)
jmp 0x8230
movq -0x7d8(%rbp), %rdi
movl -0x14(%rbp), %esi
callq 0x5680
movq %rax, -0x7e0(%rbp)
jmp 0x8248
movq -0x7e0(%rbp), %rdi
leaq 0x140fb(%rip), %rsi     # 0x1c351
callq 0x53f0
jmp 0x825d
movl $0x0, -0x18(%rbp)
movslq -0x18(%rbp), %rax
movq %rax, -0x7e8(%rbp)
leaq -0x170(%rbp), %rdi
callq 0x9960
movq %rax, %rcx
movq -0x7e8(%rbp), %rax
cmpq %rcx, %rax
jae 0x8386
movslq -0x18(%rbp), %rsi
leaq -0x170(%rbp), %rdi
callq 0x9020
movq %rax, %rdi
callq 0x5160
movq %rax, %rdi
callq 0x5600
movl %eax, %edx
movq 0x211c1(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x48(%rax,%rcx), %rax
movslq -0x18(%rbp), %rcx
movl %edx, (%rax,%rcx,4)
movq 0x20cfe(%rip), %rdi     # 0x28fd0
leaq 0x13ff0(%rip), %rsi     # 0x1c2c9
callq 0x53f0
movq %rax, -0x7f0(%rbp)
jmp 0x82e7
movq -0x7f0(%rbp), %rdi
movq 0x21183(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x48(%rax,%rcx), %rax
movslq -0x18(%rbp), %rcx
movl (%rax,%rcx,4), %esi
callq 0x5560
jmp 0x8310
jmp 0x8312
movl -0x18(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x18(%rbp)
jmp 0x8264
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8352
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x340(%rbp), %rdi
callq 0x5240
leaq -0x370(%rbp), %rdi
callq 0x9580
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x390(%rbp), %rdi
callq 0x96c0
jmp 0x8db1
movq 0x20c43(%rip), %rdi     # 0x28fd0
movq 0x20c24(%rip), %rsi     # 0x28fb8
callq 0x5450
movq %rax, -0x7f8(%rbp)
jmp 0x83a2
movq -0x7f8(%rbp), %rdi
movq 0x20c08(%rip), %rsi     # 0x28fb8
callq 0x5450
jmp 0x83b7
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13f9c(%rip), %rdx     # 0x1c36d
leaq -0x3e0(%rbp), %rdi
callq 0x9a50
jmp 0x83df
leaq -0x3c0(%rbp), %rdi
leaq -0x3e0(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x83f9
leaq -0x80(%rbp), %rdi
leaq -0x3c0(%rbp), %rsi
callq 0x9a20
movl %eax, -0x7fc(%rbp)
jmp 0x8411
movl -0x7fc(%rbp), %eax
movb %al, %dl
movq 0x21058(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movb %dl, 0x34(%rax,%rcx)
leaq -0x3c0(%rbp), %rdi
callq 0x9580
leaq -0x3e0(%rbp), %rdi
callq 0x5240
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13f17(%rip), %rdx     # 0x1c375
leaq -0x438(%rbp), %rdi
callq 0x9a50
jmp 0x846c
leaq -0x418(%rbp), %rdi
leaq -0x438(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x8486
leaq -0x80(%rbp), %rdi
leaq -0x418(%rbp), %rsi
callq 0x9a20
movl %eax, -0x800(%rbp)
jmp 0x849e
movl -0x800(%rbp), %eax
movb %al, %dl
movq 0x20fcb(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movb %dl, 0x35(%rax,%rcx)
leaq -0x418(%rbp), %rdi
callq 0x9580
leaq -0x438(%rbp), %rdi
callq 0x5240
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13e92(%rip), %rdx     # 0x1c37d
leaq -0x490(%rbp), %rdi
callq 0x9a50
jmp 0x84f9
leaq -0x470(%rbp), %rdi
leaq -0x490(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x8513
leaq -0x80(%rbp), %rdi
leaq -0x470(%rbp), %rsi
callq 0x9a20
movl %eax, -0x804(%rbp)
jmp 0x852b
movl -0x804(%rbp), %edx
movq 0x20f40(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl %edx, 0x20(%rax,%rcx)
leaq -0x470(%rbp), %rdi
callq 0x9580
leaq -0x490(%rbp), %rdi
callq 0x5240
movq 0x20f15(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl 0x20(%rax,%rcx), %edx
movl %edx, 0x18(%rax,%rcx)
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13dfe(%rip), %rdx     # 0x1c38b
leaq -0x4e8(%rbp), %rdi
callq 0x9a50
jmp 0x859b
leaq -0x4c8(%rbp), %rdi
leaq -0x4e8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x85b5
leaq -0x80(%rbp), %rdi
leaq -0x4c8(%rbp), %rsi
callq 0x9a20
movl %eax, -0x808(%rbp)
jmp 0x85cd
movl -0x808(%rbp), %edx
movq 0x20e9e(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl %edx, 0x24(%rax,%rcx)
leaq -0x4c8(%rbp), %rdi
callq 0x9580
leaq -0x4e8(%rbp), %rdi
callq 0x5240
movq 0x20e73(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl 0x24(%rax,%rcx), %edx
movl %edx, 0x1c(%rax,%rcx)
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13d6a(%rip), %rdx     # 0x1c399
leaq -0x540(%rbp), %rdi
callq 0x9a50
jmp 0x863d
leaq -0x520(%rbp), %rdi
leaq -0x540(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x8657
leaq -0x80(%rbp), %rdi
leaq -0x520(%rbp), %rsi
callq 0x9a20
movl %eax, -0x80c(%rbp)
jmp 0x866f
movl -0x80c(%rbp), %edx
movq 0x20dfc(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl %edx, 0x58(%rax,%rcx)
leaq -0x520(%rbp), %rdi
callq 0x9580
leaq -0x540(%rbp), %rdi
callq 0x5240
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13ce8(%rip), %rdx     # 0x1c3a2
leaq -0x598(%rbp), %rdi
callq 0x9a50
jmp 0x86c8
leaq -0x578(%rbp), %rdi
leaq -0x598(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x86e2
leaq -0x80(%rbp), %rdi
leaq -0x578(%rbp), %rsi
callq 0x9a20
movl %eax, -0x810(%rbp)
jmp 0x86fa
movl -0x810(%rbp), %edx
movq 0x20d71(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl %edx, 0x5c(%rax,%rcx)
leaq -0x578(%rbp), %rdi
callq 0x9580
leaq -0x598(%rbp), %rdi
callq 0x5240
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13c66(%rip), %rdx     # 0x1c3ab
leaq -0x5f0(%rbp), %rdi
callq 0x9a50
jmp 0x8753
leaq -0x5d0(%rbp), %rdi
leaq -0x5f0(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x876d
leaq -0x80(%rbp), %rdi
leaq -0x5d0(%rbp), %rsi
callq 0x9a20
movl %eax, -0x814(%rbp)
jmp 0x8785
movl -0x814(%rbp), %ecx
movq 0x20ce6(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rdx
imulq $0x70, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x6c(%rax)
leaq -0x5d0(%rbp), %rdi
callq 0x9580
leaq -0x5f0(%rbp), %rdi
callq 0x5240
jmp 0x89e7
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x87ef
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x3c0(%rbp), %rdi
callq 0x9580
leaq -0x3e0(%rbp), %rdi
callq 0x5240
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8832
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x418(%rbp), %rdi
callq 0x9580
leaq -0x438(%rbp), %rdi
callq 0x5240
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8875
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x470(%rbp), %rdi
callq 0x9580
leaq -0x490(%rbp), %rdi
callq 0x5240
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x88b8
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x4c8(%rbp), %rdi
callq 0x9580
leaq -0x4e8(%rbp), %rdi
callq 0x5240
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x88fb
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x520(%rbp), %rdi
callq 0x9580
leaq -0x540(%rbp), %rdi
callq 0x5240
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x893e
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x578(%rbp), %rdi
callq 0x9580
leaq -0x598(%rbp), %rdi
callq 0x5240
jmp 0x8db1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x89a1
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8995
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x5d0(%rbp), %rdi
callq 0x9580
leaq -0x5f0(%rbp), %rdi
callq 0x5240
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x8db1
movq -0xb0(%rbp), %rdi
callq 0x5150
movq %rax, -0x600(%rbp)
movq 0x20aaa(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl $0x0, 0x6c(%rax,%rcx)
callq 0x5630
jmp 0x89e5
jmp 0x89e7
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x139b4(%rip), %rdx     # 0x1c3b5
leaq -0x650(%rbp), %rdi
callq 0x9a50
jmp 0x8a0f
leaq -0x630(%rbp), %rdi
leaq -0x650(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x8a29
leaq -0x80(%rbp), %rdi
leaq -0x630(%rbp), %rsi
callq 0x9a20
movl %eax, -0x818(%rbp)
jmp 0x8a41
movl -0x818(%rbp), %edx
movq 0x20a2a(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl %edx, 0x68(%rax,%rcx)
leaq -0x630(%rbp), %rdi
callq 0x9580
leaq -0x650(%rbp), %rdi
callq 0x5240
movslq -0x14(%rbp), %rsi
leaq -0x158(%rbp), %rdi
callq 0x9020
movq %rax, %rsi
leaq 0x13939(%rip), %rdx     # 0x1c3c5
leaq -0x6a8(%rbp), %rdi
callq 0x9a50
jmp 0x8a9a
leaq -0x688(%rbp), %rdi
leaq -0x6a8(%rbp), %rsi
movl $0x2e, %edx
callq 0x9980
jmp 0x8ab4
leaq -0x80(%rbp), %rdi
leaq -0x688(%rbp), %rsi
callq 0x9a20
movl %eax, -0x81c(%rbp)
jmp 0x8acc
movl -0x81c(%rbp), %ecx
movq 0x2099f(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rdx
imulq $0x70, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x64(%rax)
leaq -0x688(%rbp), %rdi
callq 0x9580
leaq -0x6a8(%rbp), %rdi
callq 0x5240
jmp 0x8bf3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8b96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8b4a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x630(%rbp), %rdi
callq 0x9580
leaq -0x650(%rbp), %rdi
callq 0x5240
jmp 0x8b96
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
jmp 0x8b8a
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xb0(%rbp)
movl %eax, -0xb4(%rbp)
leaq -0x688(%rbp), %rdi
callq 0x9580
leaq -0x6a8(%rbp), %rdi
callq 0x5240
movl -0xb4(%rbp), %eax
movl $0x1, %ecx
cmpl %ecx, %eax
jne 0x8db1
movq -0xb0(%rbp), %rdi
callq 0x5150
movq %rax, -0x6b8(%rbp)
movq 0x208b5(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl $0x0, 0x68(%rax,%rcx)
movq 0x2089e(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movl $0x0, 0x64(%rax,%rcx)
callq 0x5630
jmp 0x8bf1
jmp 0x8bf3
jmp 0x8bf5
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x78ba
leaq -0x6c0(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x31f5(%rip), %rdx     # 0x5a20
movq %rcx, %rsi
callq 0x56f0
cmpl $0x0, %eax
je 0x8c50
movq 0x203af(%rip), %rax     # 0x28fd8
movq (%rax), %rdi
leaq 0x137a1(%rip), %rsi     # 0x1c3d4
movb $0x0, %al
callq 0x55d0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6cc(%rbp)
jmp 0x8d60
leaq -0x6c8(%rbp), %rdi
xorl %eax, %eax
movl %eax, %ecx
leaq -0x1982(%rip), %rdx     # 0x72e0
movq %rcx, %rsi
callq 0x56f0
cmpl $0x0, %eax
je 0x8c9d
movq 0x20362(%rip), %rax     # 0x28fd8
movq (%rax), %rdi
leaq 0x13754(%rip), %rsi     # 0x1c3d4
movb $0x0, %al
callq 0x55d0
movl $0x1, -0x4(%rbp)
movl $0x1, -0x6cc(%rbp)
jmp 0x8d60
movl $0x0, -0x6d0(%rbp)
jmp 0x8ca9
movl $0xa, %edi
callq 0x5310
jmp 0x8cb5
movl -0x6d0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x6d0(%rbp)
cmpl $0x5a, -0x6d0(%rbp)
jle 0x8d5b
movl $0x0, -0x14(%rbp)
movl -0x14(%rbp), %eax
cmpl 0x207b7(%rip), %eax     # 0x29498
jge 0x8d51
movq 0x2078e(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rcx
imulq $0x70, %rcx, %rcx
movq 0x10(%rax,%rcx), %rdi
xorl %eax, %eax
movl %eax, %esi
leaq -0x50(%rbp), %rdx
leaq -0x58(%rbp), %rcx
callq 0x5510
movl %eax, -0x820(%rbp)
jmp 0x8d10
movl -0x820(%rbp), %eax
cmpl $0x0, %eax
jne 0x8d44
movq -0x58(%rbp), %rax
movq 0x18(%rax), %rax
movl 0x4(%rax), %ecx
movq 0x2074b(%rip), %rax     # 0x29478
movslq -0x14(%rbp), %rdx
imulq $0x70, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4(%rax)
movq -0x58(%rbp), %rdi
callq 0x5540
jmp 0x8d46
movl -0x14(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x14(%rbp)
jmp 0x8cd8
movl $0x0, -0x6d0(%rbp)
jmp 0x8ca7
leaq -0x1a8(%rbp), %rdi
callq 0x5240
leaq -0x170(%rbp), %rdi
callq 0x8fc0
leaq -0x158(%rbp), %rdi
callq 0x8fc0
leaq -0x140(%rbp), %rdi
callq 0x5240
leaq -0xe8(%rbp), %rdi
callq 0x5240
leaq -0x80(%rbp), %rdi
callq 0x9ad0
movl -0x4(%rbp), %eax
addq $0x820, %rsp            # imm = 0x820
popq %rbp
retq
leaq -0x1a8(%rbp), %rdi
callq 0x5240
leaq -0x170(%rbp), %rdi
callq 0x8fc0
leaq -0x158(%rbp), %rdi
callq 0x8fc0
leaq -0x140(%rbp), %rdi
callq 0x5240
leaq -0xe8(%rbp), %rdi
callq 0x5240
leaq -0x80(%rbp), %rdi
callq 0x9ad0
movq -0xb0(%rbp), %rdi
callq 0x5690
movq %rax, %rdi
callq 0x9490
nopw (%rax,%rax)