// File: rthoelen[P]NXCore_Kenwood/main.cc
// Function: listen_thread(void*)
void *listen_thread(void *thread_id)
{
        struct sockaddr_in remaddr;     /* remote address */
        socklen_t addrlen = sizeof(remaddr);            /* length of addresses */
        int recvlen;                    /* # bytes received */
        unsigned char buf[80];     /* receive buffer */
	int rpt_id;
	int strt_packet;

	struct sockaddr_in tport; // This is a test port to reflect what is received
	int GID, UID, RAN;

        /* create UDP socket for repeaters */

        if ((socket_00 = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
                perror("cannot create socket\n");
                return 0;
        }

        if ((socket_01 = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
                perror("cannot create socket\n");
                return 0;
        }

        /* bind the socket to any valid IP address and a specific port */

        memset((char *)&myaddr_00, 0, sizeof(myaddr_00));
        myaddr_00.sin_family = AF_INET;
        myaddr_00.sin_addr.s_addr = htonl(INADDR_ANY);
        myaddr_00.sin_port = htons(64000);

        if (bind(socket_00, (struct sockaddr *)&myaddr_00, sizeof(myaddr_00)) < 0) {
                perror("bind failed");
                return 0;
        }

        memset((char *)&myaddr_00, 0, sizeof(myaddr_00));
        myaddr_00.sin_family = AF_INET;
        myaddr_00.sin_addr.s_addr = htonl(INADDR_ANY);
        myaddr_00.sin_port = htons(64001);

        if (bind(socket_01, (struct sockaddr *)&myaddr_00, sizeof(myaddr_00)) < 0) {
                perror("bind failed");
                return 0;
        }


	// Set up the test port
	memset((char *)&tport, 0, sizeof(tport));
	tport.sin_family = AF_INET;
	tport.sin_addr.s_addr = inet_addr("127.0.0.1");
	tport.sin_port = htons(50000);

        /* now loop, receiving data and printing what we received */
        for (;;) {
                recvlen = recvfrom(socket_00, buf, 80, 0, (struct sockaddr *)&remaddr, &addrlen);

		if (recvlen == -1)
		{
			ptime();
			std::cout << "Receive socket returned error" << std::endl;
			continue;
		}

		strt_packet = 0;

		rpt_id = get_repeater_id(&remaddr);
		if ( rpt_id != -1)
		{
			buf[8] = (repeater[rpt_id].rpt_addr_00.sin_addr.s_addr) >> 24;
			buf[9] = ((repeater[rpt_id].rpt_addr_00.sin_addr.s_addr) >> 16) & 0xff;
			buf[10] = ((repeater[rpt_id].rpt_addr_00.sin_addr.s_addr) >> 8) & 0xff;
			buf[11] = (repeater[rpt_id].rpt_addr_00.sin_addr.s_addr) & 0xff;

		}

		// Detect start/stop for voice 

                if (recvlen == 47) {



			if (rpt_id == -1)
			{
				ptime();
				std::cout << " Unauthorized repeater, "
					<< inet_ntoa(remaddr.sin_addr)
					<< ", dropping packet" << std::endl;

				continue;  // Throw out packet, not in our list
			}


			// This would be a start packet
			if((buf[20] == 0x0a) && (buf[21] == 0x05) &&
				(buf[22] == 0x0a) && (buf[23] == 0x10) &&
					(buf[28] == 0x01))
			{
				GID = (buf[31] << 8) + buf[34];
				UID = (buf[29] << 8) + buf[32];
				RAN = buf[24];
				repeater[rpt_id].keydown = 0; // need to stop a shutdown transmission if receiving

				if ((UID==0) && (GID==0))
					continue;

                                if ((repeater[rpt_id].tg_network_off == GID) && (repeater[rpt_id].tg_network_off != 0))
                                {
                                        repeater[rpt_id].disable = 1;
					ptime();
                                        std::cout << "Repeater  -> " << r_list[rpt_id]
                                                << " <- disabled due to TG: " << GID << std::endl;
					continue;
                                }

                                if ((repeater[rpt_id].tg_network_on == GID) && (repeater[rpt_id].tg_network_on != 0))
                                {
                                        repeater[rpt_id].disable = 0;
					ptime();
                                        std::cout << "Repeater  ->  " << r_list[rpt_id]
                                                << " <- enabled due to TG: " << GID << std::endl;
					continue;
                                }


				if (RAN != repeater[rpt_id].rx_ran)
				{
					ptime();
					std::cout << "Repeater  ->" << r_list[rpt_id]
						<< "<-  not passing start from UID: " << UID
						<< " from TG: " << GID
						<< " because RAN: " << RAN
						<< " isn't the correct receive RAN" << std::endl;
					while(tx_sem == 1)
						usleep(1);
				
						tx_sem = 1;
						sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&tport,
		 					sizeof(tport));
						tx_sem = 0;



					repeater[rpt_id].rx_activity = 1;
					repeater[rpt_id].time_since_rx = 0;
					repeater[rpt_id].active_tg = GID;
					repeater[rpt_id].last_tg = GID;
						
					continue;
				}

				repeater[rpt_id].rx_activity = 1;
				repeater[rpt_id].active_tg = GID;
				repeater[rpt_id].busy_tg = GID;
				repeater[rpt_id].uid = UID;
				strt_packet = 1;

				ptime();
				std::cout << "Repeater  ->" << r_list[rpt_id]
					<< "<-  receiving start from UID: " << UID
					<< " from TG: " << GID
					<< " on RAN: " << RAN << std::endl;

				repeater[rpt_id].time_since_rx = 0;
			}
		
			// End, send shutdown on 64001	
			if((buf[20] == 0x0a) && (buf[21] == 0x05) &&
				(buf[22] == 0x0a) && (buf[23] == 0x10) &&
					(buf[28] == 0x08))
			{
				GID = (buf[31] << 8) + buf[34];
				UID = (buf[29] << 8) + buf[32];
				RAN = buf[24];
				if ((UID==0) && (GID==0))
					continue;

				if (repeater[rpt_id].rx_activity == 0)
					continue;

				if (RAN != repeater[rpt_id].rx_ran)
				{
					ptime();
					std::cout << "Repeater  ->" << r_list[rpt_id]
						<< "<-  not passing stop from UID: " << UID
						<< " from TG: " << GID
						<< " because RAN: " << RAN
						<< " isn't the correct receive RAN" << std::endl;

					while(tx_sem == 1)
						usleep(1);	

						tx_sem = 1;
						sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&tport,
		 					sizeof(tport));
						tx_sem = 0;

					// Special case: if no talkgroup and different RAN, assume local
					// and block network activity

					if (GID == 0)
					{
						repeater[rpt_id].rx_activity = 0;
						repeater[rpt_id].time_since_rx = 0;
						repeater[rpt_id].active_tg = GID;
						repeater[rpt_id].last_tg = repeater[rpt_id].active_tg;
					}
					continue;
				}

				repeater[rpt_id].rx_activity = 0;    // Activity on channel is over
				repeater[rpt_id].last_tg = repeater[rpt_id].active_tg;
	
				repeater[rpt_id].time_since_rx = 0;
				ptime();
				std::cout << "Repeater  ->" << r_list[rpt_id]
					<< "<-  receiving stop from UID: " << UID
					<< " from TG: " << GID << std::endl;
			}	


                        if(repeater[rpt_id].disable)
                                continue;
				
			// Need to put GID back if not a start packet

			GID = repeater[rpt_id].active_tg;

			while(tx_sem == 1)
				usleep(1);
			
				tx_sem = 1;
				sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&tport,
		 			sizeof(tport));
				tx_sem = 0;

			snd_packet(buf, recvlen, GID, rpt_id, strt_packet);

				
		}
                
		if ((recvlen == 59) || (recvlen == 53)) {

                        if(repeater[rpt_id].disable)
                                continue;

			if (rpt_id == -1)
			{
				if(debug)
				{
					ptime();
					std::cout << "Unauthorized repeater, " 
						<< inet_ntoa(remaddr.sin_addr) 
						<< ", dropping packet" << std::endl;
				}	

				continue;  // Throw out packet, not in our list
			}	

			// Heartbeat packet from another repeater, bounce back
			// but then continue 
			if ((buf[0] == 0x00) && (buf[1] == 0x00) && (buf[21] == 0x99))
			{
				
				while(tx_sem==1)
					usleep(1);
				tx_sem=1;

				buf[21] = 0x98; // return code so we don't loop

				sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&repeater[rpt_id].rpt_addr_00,
		 			sizeof(repeater[rpt_id].rpt_addr_00));
				tx_sem=0;
				continue; 
			}

			// If we receive a reply, ignore it

			if ((buf[0] == 0x00) && (buf[1] == 0x00) && (buf[21] == 0x98))
				continue;
		

			// Special case where we don't get start packet, if there is activity in 2 seconds
			// and talkgroup matches, just start letting packets through

			// Commenting all this out, causing problems
			//

			//if((repeater[rpt_id].time_since_rx < 2)&&(repeater[rpt_id].time_since_rx > 1)&&(repeater[rpt_id].rx_activity == 0))
			//{
			//		std::cout << "Repeater ->" << r_list[rpt_id] << "<-  Sending non-IDed data through since rx was close enough, TG: "
			//			<< repeater[rpt_id].active_tg << std::endl;
			//	repeater[rpt_id].rx_activity = 1;
			//	strt_packet=1;
			//}

			repeater[rpt_id].keydown = 0; // need to prevent transmitting shutdown if receive activity

			if (repeater[rpt_id].rx_activity == 0)
			{
				if(debug)
				{
					ptime();
					std::cout << "Not sending vocoder packet from Repeater " 
						<< rpt_id << " due to rx_flag not set" << std::endl;
				}

				continue;
			}


			repeater[rpt_id].time_since_rx = 0;	
			GID = repeater[rpt_id].active_tg;

			// send packet to repeaters that can receive it


			while(tx_sem==1)
				usleep(1);
			tx_sem=1;
			sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&tport,
		 		sizeof(tport));
			tx_sem=0;

			snd_packet(buf, recvlen, GID, rpt_id, strt_packet);
		}

		if ((recvlen == 43) && (repeater[rpt_id].disable != 1)&&(repeater[rpt_id].msg_flag ==1))
		{

			GID = (buf[26] << 8) + buf[25];
			UID = (buf[24] << 8) + buf[23];
			RAN = buf[20];

			if (RAN != repeater[rpt_id].rx_ran)
			{
				ptime();
				std::cout << "Repeater  ->" << r_list[rpt_id]
					<< "<-  not passing messaging datagram from UID: " << UID
					<< " from TG: " << GID
					<< " because RAN: " << RAN
					<< " isn't the correct receive RAN" << std::endl;
				while(tx_sem == 1)
					usleep(1);
				
					tx_sem = 1;
					sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&tport,
		 				sizeof(tport));
					tx_sem = 0;

				repeater[rpt_id].rx_activity=0;
				continue;
			}
			// handle start of message

			if((buf[17]==0x06)&&(buf[18]==0x18)&&(buf[21]==0x20))
			{

				repeater[rpt_id].rx_activity = 1;
				repeater[rpt_id].active_tg = GID;
				repeater[rpt_id].busy_tg = GID;
				repeater[rpt_id].uid = UID;
				strt_packet = 1;

				ptime();
				std::cout << "Repeater  ->" << r_list[rpt_id]
					<< "<-  receiving message start from UID: " << UID
					<< " from TG: " << GID
					<< " on RAN: " << RAN << std::endl;

				repeater[rpt_id].time_since_rx = 0;
			}
	
			if((buf[17]==0x01)&&(buf[18]==0x18))
			{

				repeater[rpt_id].rx_activity = 1;
				GID = repeater[rpt_id].active_tg;
				UID = repeater[rpt_id].uid;

				ptime();
				std::cout << "Repeater  ->" << r_list[rpt_id]
					<< "<-  receiving message data from UID: " << UID
					<< " from TG: " << GID
					<< " on RAN: " << RAN << std::endl;

				repeater[rpt_id].time_since_rx = 0;
			}
	

			if((buf[17]==0x06)&&(buf[18]==0x18)&&((buf[21]==0x10)||buf[19]==0x08))
			{
				repeater[rpt_id].rx_activity = 0;    // Activity on channel is over
				repeater[rpt_id].last_tg = repeater[rpt_id].active_tg;
	
				repeater[rpt_id].time_since_rx = 0;
				ptime();
				std::cout << "Repeater  ->" << r_list[rpt_id]
					<< "<-  receiving message stop from UID: " << UID
					<< " from TG: " << GID << std::endl;

				repeater[rpt_id].time_since_rx = 0;	
				GID = repeater[rpt_id].active_tg;
			}

			// send packet to repeaters that can receive it


			while(tx_sem==1)
				usleep(1);
			tx_sem=1;
			sendto(socket_00, buf, recvlen, 0, (struct sockaddr *)&tport,
		 		sizeof(tport));
			tx_sem=0;

			snd_packet(buf, recvlen, GID, rpt_id, strt_packet);

		}
		
        }	
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x110, %rsp            # imm = 0x110
movq %rdi, -0x10(%rbp)
movl $0x10, -0x24(%rbp)
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x50f0
movl %eax, 0x249d2(%rip)     # 0x2a54c
cmpl $0x0, %eax
jge 0x5b98
leaq 0x174b1(%rip), %rdi     # 0x1d037
callq 0x53f0
movq $0x0, -0x8(%rbp)
jmp 0x70e9
movl $0x2, %esi
xorl %edx, %edx
movl %esi, %edi
callq 0x50f0
movl %eax, 0x249a4(%rip)     # 0x2a550
cmpl $0x0, %eax
jge 0x5bca
leaq 0x1747f(%rip), %rdi     # 0x1d037
callq 0x53f0
movq $0x0, -0x8(%rbp)
jmp 0x70e9
leaq 0x2498b(%rip), %rdi     # 0x2a55c
xorl %esi, %esi
movl $0x10, %edx
callq 0x5250
movw $0x2, 0x24976(%rip)     # 0x2a55c
xorl %edi, %edi
callq 0x5390
movl %eax, 0x2496d(%rip)     # 0x2a560
movl $0xfa00, %edi           # imm = 0xFA00
callq 0x5080
movw %ax, 0x2495a(%rip)      # 0x2a55e
movl 0x24942(%rip), %edi     # 0x2a54c
leaq 0x2494b(%rip), %rsi     # 0x2a55c
movl $0x10, %edx
callq 0x50a0
cmpl $0x0, %eax
jge 0x5c39
leaq 0x17426(%rip), %rdi     # 0x1d04d
callq 0x53f0
movq $0x0, -0x8(%rbp)
jmp 0x70e9
leaq 0x2491c(%rip), %rdi     # 0x2a55c
xorl %esi, %esi
movl $0x10, %edx
callq 0x5250
movw $0x2, 0x24907(%rip)     # 0x2a55c
xorl %edi, %edi
callq 0x5390
movl %eax, 0x248fe(%rip)     # 0x2a560
movl $0xfa01, %edi           # imm = 0xFA01
callq 0x5080
movw %ax, 0x248eb(%rip)      # 0x2a55e
movl 0x248d7(%rip), %edi     # 0x2a550
leaq 0x248dc(%rip), %rsi     # 0x2a55c
movl $0x10, %edx
callq 0x50a0
cmpl $0x0, %eax
jge 0x5ca8
leaq 0x173b7(%rip), %rdi     # 0x1d04d
callq 0x53f0
movq $0x0, -0x8(%rbp)
jmp 0x70e9
leaq -0x98(%rbp), %rdi
xorl %esi, %esi
movl $0x10, %edx
callq 0x5250
movw $0x2, -0x98(%rbp)
leaq 0x1738e(%rip), %rdi     # 0x1d059
callq 0x54a0
movl %eax, -0x94(%rbp)
movl $0xc350, %edi           # imm = 0xC350
callq 0x5080
movw %ax, -0x96(%rbp)
movl 0x2485f(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movl $0x50, %edx
xorl %ecx, %ecx
leaq -0x20(%rbp), %r8
leaq -0x24(%rbp), %r9
callq 0x53a0
movl %eax, -0x28(%rbp)
cmpl $-0x1, -0x28(%rbp)
jne 0x5d37
callq 0x5a80
movq 0x242b6(%rip), %rdi     # 0x29fd0
leaq 0x17342(%rip), %rsi     # 0x1d063
callq 0x5480
movq %rax, %rdi
movq 0x24288(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x5ce7
movl $0x0, -0x88(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x5af0
movl %eax, -0x84(%rbp)
cmpl $-0x1, -0x84(%rbp)
je 0x5ded
movq 0x247bc(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
shrl $0x18, %eax
movb %al, -0x78(%rbp)
movq 0x2479b(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
shrl $0x10, %eax
andl $0xff, %eax
movb %al, -0x77(%rbp)
movq 0x24775(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
shrl $0x8, %eax
andl $0xff, %eax
movb %al, -0x76(%rbp)
movq 0x2474f(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4(%rax), %eax
andl $0xff, %eax
movb %al, -0x75(%rbp)
cmpl $0x2f, -0x28(%rbp)
jne 0x67f7
cmpl $-0x1, -0x84(%rbp)
jne 0x5e65
callq 0x5a80
movq 0x241c4(%rip), %rdi     # 0x29fd0
leaq 0x1726e(%rip), %rsi     # 0x1d081
callq 0x5480
movq %rax, -0xb8(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xa8(%rbp)
movl -0xa8(%rbp), %edi
callq 0x51c0
movq -0xb8(%rbp), %rdi
movq %rax, %rsi
callq 0x5480
movq %rax, %rdi
leaq 0x1724e(%rip), %rsi     # 0x1d09a
callq 0x5480
movq %rax, %rdi
movq 0x2415d(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x5ce7
movzbl -0x6c(%rbp), %eax
cmpl $0xa, %eax
jne 0x63ce
movzbl -0x6b(%rbp), %eax
cmpl $0x5, %eax
jne 0x63ce
movzbl -0x6a(%rbp), %eax
cmpl $0xa, %eax
jne 0x63ce
movzbl -0x69(%rbp), %eax
cmpl $0x10, %eax
jne 0x63ce
movzbl -0x64(%rbp), %eax
cmpl $0x1, %eax
jne 0x63ce
movzbl -0x61(%rbp), %eax
shll $0x8, %eax
movzbl -0x5e(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x9c(%rbp)
movzbl -0x63(%rbp), %eax
shll $0x8, %eax
movzbl -0x60(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0xa0(%rbp)
movzbl -0x68(%rbp), %eax
movl %eax, -0xa4(%rbp)
movq 0x24643(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x74(%rax)
cmpl $0x0, -0xa0(%rbp)
jne 0x5f0c
cmpl $0x0, -0x9c(%rbp)
jne 0x5f0c
jmp 0x5ce7
movq 0x2460d(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x84(%rax), %eax
cmpl -0x9c(%rbp), %eax
jne 0x5fec
movq 0x245e3(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x84(%rax)
je 0x5fec
movq 0x245be(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x7c(%rax)
callq 0x5a80
movq 0x2404a(%rip), %rdi     # 0x29fd0
leaq 0x1711f(%rip), %rsi     # 0x1d0ac
callq 0x5480
movq %rax, -0xc0(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x24589(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x170f5(%rip), %rsi     # 0x1d0ba
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x23fd6(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x5ce7
movq 0x2452d(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x80(%rax), %eax
cmpl -0x9c(%rbp), %eax
jne 0x60cc
movq 0x24503(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x80(%rax)
je 0x60cc
movq 0x244de(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x7c(%rax)
callq 0x5a80
movq 0x23f6a(%rip), %rdi     # 0x29fd0
leaq 0x17066(%rip), %rsi     # 0x1d0d3
callq 0x5480
movq %rax, -0xc8(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x244a9(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x1703d(%rip), %rsi     # 0x1d0e2
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x23ef6(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x5ce7
movl -0xa4(%rbp), %eax
movq 0x24447(%rip), %rcx     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x49(%rcx), %ecx
cmpl %ecx, %eax
je 0x627c
callq 0x5a80
movq 0x23ece(%rip), %rdi     # 0x29fd0
leaq 0x171d2(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0xd0(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x2440d(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xd0(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x16fb9(%rip), %rsi     # 0x1d0fa
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16fbd(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16fab(%rip), %rsi     # 0x1d126
callq 0x5480
movq %rax, %rdi
movl -0xa4(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16f9d(%rip), %rsi     # 0x1d135
callq 0x5480
movq %rax, %rdi
movq 0x23e11(%rip), %rsi     # 0x29fb8
callq 0x54e0
cmpl $0x1, 0x243a1(%rip)     # 0x2a554
jne 0x61c1
movl $0x1, %edi
callq 0x5660
jmp 0x61ac
movl $0x1, 0x24389(%rip)     # 0x2a554
movl 0x2437b(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x98(%rbp), %r8
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x2435d(%rip)     # 0x2a554
movq 0x24322(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x38(%rax)
movq 0x24303(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movl -0x9c(%rbp), %ecx
movq 0x242de(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4c(%rax)
movl -0x9c(%rbp), %ecx
movq 0x242bd(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x50(%rax)
jmp 0x5ce7
movq 0x2429d(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x38(%rax)
movl -0x9c(%rbp), %ecx
movq 0x24278(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4c(%rax)
movl -0x9c(%rbp), %ecx
movq 0x24257(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x40(%rax)
movl -0xa0(%rbp), %ecx
movq 0x24236(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x68(%rax)
movl $0x1, -0x88(%rbp)
callq 0x5a80
movq 0x23cbc(%rip), %rdi     # 0x29fd0
leaq 0x16fc0(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0xd8(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x241fb(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xd8(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x16e01(%rip), %rsi     # 0x1d154
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16dab(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16de6(%rip), %rsi     # 0x1d173
callq 0x5480
movq %rax, %rdi
movl -0xa4(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x23c0e(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq 0x2416a(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movzbl -0x6c(%rbp), %eax
cmpl $0xa, %eax
jne 0x6749
movzbl -0x6b(%rbp), %eax
cmpl $0x5, %eax
jne 0x6749
movzbl -0x6a(%rbp), %eax
cmpl $0xa, %eax
jne 0x6749
movzbl -0x69(%rbp), %eax
cmpl $0x10, %eax
jne 0x6749
movzbl -0x64(%rbp), %eax
cmpl $0x8, %eax
jne 0x6749
movzbl -0x61(%rbp), %eax
shll $0x8, %eax
movzbl -0x5e(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x9c(%rbp)
movzbl -0x63(%rbp), %eax
shll $0x8, %eax
movzbl -0x60(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0xa0(%rbp)
movzbl -0x68(%rbp), %eax
movl %eax, -0xa4(%rbp)
cmpl $0x0, -0xa0(%rbp)
jne 0x6456
cmpl $0x0, -0x9c(%rbp)
jne 0x6456
jmp 0x5ce7
movq 0x240c3(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x38(%rax)
jne 0x6479
jmp 0x5ce7
movl -0xa4(%rbp), %eax
movq 0x2409a(%rip), %rcx     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x49(%rcx), %ecx
cmpl %ecx, %eax
je 0x664b
callq 0x5a80
movq 0x23b21(%rip), %rdi     # 0x29fd0
leaq 0x16e25(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0xe0(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x24060(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xe0(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x16c8f(%rip), %rsi     # 0x1d17d
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16c10(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16bfe(%rip), %rsi     # 0x1d126
callq 0x5480
movq %rax, %rdi
movl -0xa4(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16bf0(%rip), %rsi     # 0x1d135
callq 0x5480
movq %rax, %rdi
movq 0x23a64(%rip), %rsi     # 0x29fb8
callq 0x54e0
cmpl $0x1, 0x23ff4(%rip)     # 0x2a554
jne 0x656e
movl $0x1, %edi
callq 0x5660
jmp 0x6559
movl $0x1, 0x23fdc(%rip)     # 0x2a554
movl 0x23fce(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x98(%rbp), %r8
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x23fb0(%rip)     # 0x2a554
cmpl $0x0, -0x9c(%rbp)
jne 0x6646
movq 0x23f68(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x38(%rax)
movq 0x23f49(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movl -0x9c(%rbp), %ecx
movq 0x23f24(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4c(%rax)
movq 0x23f09(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %ecx
movq 0x23eee(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x50(%rax)
jmp 0x5ce7
movq 0x23ece(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x38(%rax)
movq 0x23eaf(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %ecx
movq 0x23e94(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x50(%rax)
movq 0x23e79(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
callq 0x5a80
movq 0x23905(%rip), %rdi     # 0x29fd0
leaq 0x16c09(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0xe8(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x23e44(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x16a93(%rip), %rsi     # 0x1d19d
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x169f4(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x23874(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq 0x23dd0(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x7c(%rax)
je 0x676c
jmp 0x5ce7
movq 0x23dad(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x1, 0x23dc0(%rip)     # 0x2a554
jne 0x67a2
movl $0x1, %edi
callq 0x5660
jmp 0x678d
movl $0x1, 0x23da8(%rip)     # 0x2a554
movl 0x23d9a(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x98(%rbp), %r8
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x23d7c(%rip)     # 0x2a554
leaq -0x80(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x9c(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x88(%rbp), %r8d
callq 0x7100
cmpl $0x3b, -0x28(%rbp)
je 0x6807
cmpl $0x35, -0x28(%rbp)
jne 0x6a80
movq 0x23d12(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x7c(%rax)
je 0x682a
jmp 0x5ce7
cmpl $-0x1, -0x84(%rbp)
jne 0x68a1
cmpl $0x0, 0x23cf2(%rip)     # 0x2a52c
je 0x689c
callq 0x5a80
movq 0x23788(%rip), %rdi     # 0x29fd0
leaq 0x16833(%rip), %rsi     # 0x1d082
callq 0x5480
movq %rax, -0xf0(%rbp)
movl -0x1c(%rbp), %eax
movl %eax, -0xac(%rbp)
movl -0xac(%rbp), %edi
callq 0x51c0
movq -0xf0(%rbp), %rdi
movq %rax, %rsi
callq 0x5480
movq %rax, %rdi
leaq 0x16812(%rip), %rsi     # 0x1d09a
callq 0x5480
movq %rax, %rdi
movq 0x23721(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x5ce7
movzbl -0x80(%rbp), %eax
cmpl $0x0, %eax
jne 0x6925
movzbl -0x7f(%rbp), %eax
cmpl $0x0, %eax
jne 0x6925
movzbl -0x6b(%rbp), %eax
cmpl $0x99, %eax
jne 0x6925
jmp 0x68c0
cmpl $0x1, 0x23c8d(%rip)     # 0x2a554
jne 0x68d5
movl $0x1, %edi
callq 0x5660
jmp 0x68c0
movl $0x1, 0x23c75(%rip)     # 0x2a554
movb $-0x68, -0x6b(%rbp)
movl 0x23c63(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
movq 0x23c28(%rip), %r8      # 0x2a520
movslq -0x84(%rbp), %rax
imulq $0x90, %rax, %rax
addq %rax, %r8
xorl %ecx, %ecx
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x23c34(%rip)     # 0x2a554
jmp 0x5ce7
movzbl -0x80(%rbp), %eax
cmpl $0x0, %eax
jne 0x6947
movzbl -0x7f(%rbp), %eax
cmpl $0x0, %eax
jne 0x6947
movzbl -0x6b(%rbp), %eax
cmpl $0x98, %eax
jne 0x6947
jmp 0x5ce7
movq 0x23bd2(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x74(%rax)
movq 0x23bb3(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x0, 0x38(%rax)
jne 0x69d6
cmpl $0x0, 0x23ba1(%rip)     # 0x2a52c
je 0x69d1
callq 0x5a80
movq 0x23637(%rip), %rdi     # 0x29fd0
leaq 0x1681b(%rip), %rsi     # 0x1d1bb
callq 0x5480
movq %rax, %rdi
movl -0x84(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16828(%rip), %rsi     # 0x1d1e5
callq 0x5480
movq %rax, %rdi
movq 0x235ec(%rip), %rsi     # 0x29fb8
callq 0x54e0
jmp 0x5ce7
movq 0x23b43(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movq 0x23b24(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %eax
movl %eax, -0x9c(%rbp)
cmpl $0x1, 0x23b37(%rip)     # 0x2a554
jne 0x6a2b
movl $0x1, %edi
callq 0x5660
jmp 0x6a16
movl $0x1, 0x23b1f(%rip)     # 0x2a554
movl 0x23b11(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x98(%rbp), %r8
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x23af3(%rip)     # 0x2a554
leaq -0x80(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x9c(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x88(%rbp), %r8d
callq 0x7100
cmpl $0x2b, -0x28(%rbp)
jne 0x70e4
movq 0x23a8f(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x7c(%rax)
je 0x70e4
movq 0x23a6d(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
cmpl $0x1, 0x88(%rax)
jne 0x70e4
movzbl -0x66(%rbp), %eax
shll $0x8, %eax
movzbl -0x67(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0x9c(%rbp)
movzbl -0x68(%rbp), %eax
shll $0x8, %eax
movzbl -0x69(%rbp), %ecx
addl %ecx, %eax
movl %eax, -0xa0(%rbp)
movzbl -0x6c(%rbp), %eax
movl %eax, -0xa4(%rbp)
movl -0xa4(%rbp), %eax
movq 0x23a12(%rip), %rcx     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rcx
movzbl 0x49(%rcx), %ecx
cmpl %ecx, %eax
je 0x6c50
callq 0x5a80
movq 0x23499(%rip), %rdi     # 0x29fd0
leaq 0x1679d(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0xf8(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x239d8(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0xf8(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x16687(%rip), %rsi     # 0x1d1fd
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16588(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16576(%rip), %rsi     # 0x1d126
callq 0x5480
movq %rax, %rdi
movl -0xa4(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16568(%rip), %rsi     # 0x1d135
callq 0x5480
movq %rax, %rdi
movq 0x233dc(%rip), %rsi     # 0x29fb8
callq 0x54e0
cmpl $0x1, 0x2396c(%rip)     # 0x2a554
jne 0x6bf6
movl $0x1, %edi
callq 0x5660
jmp 0x6be1
movl $0x1, 0x23954(%rip)     # 0x2a554
movl 0x23946(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x98(%rbp), %r8
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x23928(%rip)     # 0x2a554
movq 0x238ed(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x38(%rax)
jmp 0x5ce7
movzbl -0x6f(%rbp), %eax
cmpl $0x6, %eax
jne 0x6dc9
movzbl -0x6e(%rbp), %eax
cmpl $0x18, %eax
jne 0x6dc9
movzbl -0x6b(%rbp), %eax
cmpl $0x20, %eax
jne 0x6dc9
movq 0x238a2(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x38(%rax)
movl -0x9c(%rbp), %ecx
movq 0x2387d(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x4c(%rax)
movl -0x9c(%rbp), %ecx
movq 0x2385c(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x40(%rax)
movl -0xa0(%rbp), %ecx
movq 0x2383b(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x68(%rax)
movl $0x1, -0x88(%rbp)
callq 0x5a80
movq 0x232c1(%rip), %rdi     # 0x29fd0
leaq 0x165c5(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0x100(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x23800(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0x100(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x164dd(%rip), %rsi     # 0x1d22b
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x163b0(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x163eb(%rip), %rsi     # 0x1d173
callq 0x5480
movq %rax, %rdi
movl -0xa4(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x23213(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq 0x2376f(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movzbl -0x6f(%rbp), %eax
cmpl $0x1, %eax
jne 0x6f0a
movzbl -0x6e(%rbp), %eax
cmpl $0x18, %eax
jne 0x6f0a
movq 0x23736(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x1, 0x38(%rax)
movq 0x23717(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %eax
movl %eax, -0x9c(%rbp)
movq 0x236f6(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x68(%rax), %eax
movl %eax, -0xa0(%rbp)
callq 0x5a80
movq 0x23180(%rip), %rdi     # 0x29fd0
leaq 0x16484(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0x108(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x236bf(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0x108(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x163c3(%rip), %rsi     # 0x1d252
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x1626f(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x162aa(%rip), %rsi     # 0x1d173
callq 0x5480
movq %rax, %rdi
movl -0xa4(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x230d2(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq 0x2362e(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movzbl -0x6f(%rbp), %eax
cmpl $0x6, %eax
jne 0x7078
movzbl -0x6e(%rbp), %eax
cmpl $0x18, %eax
jne 0x7078
movzbl -0x6b(%rbp), %eax
cmpl $0x10, %eax
je 0x6f3a
movzbl -0x6d(%rbp), %eax
cmpl $0x8, %eax
jne 0x7078
movq 0x235df(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x38(%rax)
movq 0x235c0(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %ecx
movq 0x235a5(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rdx
imulq $0x90, %rdx, %rdx
addq %rdx, %rax
movl %ecx, 0x50(%rax)
movq 0x2358a(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
callq 0x5a80
movq 0x23016(%rip), %rdi     # 0x29fd0
leaq 0x1631a(%rip), %rsi     # 0x1d2db
callq 0x5480
movq %rax, -0x110(%rbp)
movslq -0x84(%rbp), %rsi
leaq 0x23555(%rip), %rdi     # 0x2a530
callq 0xa010
movq -0x110(%rbp), %rdi
movq %rax, %rsi
callq 0x5430
movq %rax, %rdi
leaq 0x1627f(%rip), %rsi     # 0x1d278
callq 0x5480
movq %rax, %rdi
movl -0xa0(%rbp), %esi
callq 0x5740
movq %rax, %rdi
leaq 0x16105(%rip), %rsi     # 0x1d11b
callq 0x5480
movq %rax, %rdi
movl -0x9c(%rbp), %esi
callq 0x5740
movq %rax, %rdi
movq 0x22f85(%rip), %rsi     # 0x29fb8
callq 0x54e0
movq 0x234e1(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl $0x0, 0x28(%rax)
movq 0x234c2(%rip), %rax     # 0x2a520
movslq -0x84(%rbp), %rcx
imulq $0x90, %rcx, %rcx
addq %rcx, %rax
movl 0x4c(%rax), %eax
movl %eax, -0x9c(%rbp)
jmp 0x707a
cmpl $0x1, 0x234d3(%rip)     # 0x2a554
jne 0x708f
movl $0x1, %edi
callq 0x5660
jmp 0x707a
movl $0x1, 0x234bb(%rip)     # 0x2a554
movl 0x234ad(%rip), %edi     # 0x2a54c
leaq -0x80(%rbp), %rsi
movslq -0x28(%rbp), %rdx
xorl %ecx, %ecx
leaq -0x98(%rbp), %r8
movl $0x10, %r9d
callq 0x5090
movl $0x0, 0x2348f(%rip)     # 0x2a554
leaq -0x80(%rbp), %rdi
movl -0x28(%rbp), %esi
movl -0x9c(%rbp), %edx
movl -0x84(%rbp), %ecx
movl -0x88(%rbp), %r8d
callq 0x7100
jmp 0x5ce7
movq -0x8(%rbp), %rax
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
nopw %cs:(%rax,%rax)