// File: /workspace/github_cpp_makefile_star2_O3/DoubleString[P]RtConverter/src/Rnxbrd/RnxEphFileAdapter.cpp
// Function: bamboo::RnxEphFileAdapter::m_readRnxnav(char)
void RnxEphFileAdapter::m_readRnxnav(char csys) {
	// read rinex navigation file
	int i, k, isys, len, iy, im, id, ih, imin;
	double dsec, dt1, dt0,d_aode;
	char buf[2048], cline[1024], *ptr;
	list<GPSEPH>::iterator gpsItr;
	list<GLSEPH>::iterator glsItr;
	GPSEPH eph;
	GLSEPH ephr;
	ifstream in;
	string line;
	streampos pos;
	bool already;
	in.open(curFile, ios::in | ios::binary);
	if (!in.is_open()) {
		cout << "***ERROR(m_readRnxnav):can't open file " << curFile << endl;
		return;
	}
	while (getline(in, line)) {
		if (strstr(line.c_str(), "END OF HEADER"))
			break;
		if (strstr(line.c_str(), "RINEX VERSION / TYPE") != NULL) {
			sscanf(line.c_str(), "%lf", &ver);
			if (ver > 3.0) {
				if (csys == 'M' && line[40] != 'M') {
					printf(
							"###WARNING(read_rnxnav):there only broadcast for line[40]!\n");
				}
			}
		} else if (strstr(line.c_str(), "PGM / RUN BY / DATE") != NULL)
			continue;
		else if (strstr(line.c_str(), "COMMENT") != NULL)
			continue;
		else if (strstr(line.c_str(), "ION ALPHA") != NULL) {

		} else if (strstr(line.c_str(), "ION BETA") != NULL) {

		}
		//rinex 3.00 3.01 3.02
		else if (strstr(line.c_str(), "IONOSPHERIC CORR") != NULL) {
			if (!strncmp(line.c_str(), "GPS ", 4)
					|| !strncmp(line.c_str(), "GPSA", 4)) {
				i = index_string(SYS, 'G');
				k = 0;
			} else if (!strncmp(line.c_str(), "GPSB", 4)) {
				i = index_string(SYS, 'G');
				k = 1;
			} else if (!strncmp(line.c_str(), "GAL ", 4)) {
				i = index_string(SYS, 'E');
				k = 0;
			} else if (!strncmp(line.c_str(), "BDS ", 4)
					|| !strncmp(line.c_str(), "BDSA", 4)) {
				i = index_string(SYS, 'C');
				k = 0;
			} else if (!strncmp(line.c_str(), "BDSB", 4)) {
				i = index_string(SYS, 'C');
				k = 1;
			} else if (!strncmp(line.c_str(), "QZS ", 4)
					|| !strncmp(line.c_str(), "QZSA", 4)) {
				i = index_string(SYS, 'J');
				k = 0;
			} else if (!strncmp(line.c_str(), "QZSB", 4)) {
				i = index_string(SYS, 'J');
				k = 1;
			} else
				printf("###WARNING(read_rnxnav):unknown ionospheric corr!\n");
			strncpy(ionc[i][k], line.c_str(), 4);
			strcpy(buf, line.c_str());
			ptr = buf;
			while (*ptr != '\0') {
				if (*ptr == 'D')
					*ptr = 'e';
				ptr++;
			}
			sscanf(buf, "%*s%lf%lf%lf%lf", ion[i][k], ion[i][k] + 1,
					ion[i][k] + 2, ion[i][k] + 3);
		} else if (strstr(line.c_str(), "DELTA-UTC: A0,A1,T,W") != NULL) {
			i = index_string(SYS, csys);
			if (i == -1) {
				printf(
						"$$$MESSAGE(read_rnxnav):DELTA-UTC: A0,A1,T,W is only valid for single system!\n");
				continue;
			}
			strcpy(buf, line.c_str());
			ptr = buf;
			while (*ptr != '\0') {
				if (*ptr == 'D')
					*ptr = 'e';
				ptr++;
			}
			sscanf(buf, "%lf%lf%lf%lf", tim[i][0], tim[i][0] + 1, tim[i][0] + 2,
					tim[i][0] + 3);
		} else if (strstr(line.c_str(), "TIME SYSTEM CORR") != NULL) {
			if (!strncmp(line.c_str(), "GPUT", 4)) {
				i = index_string(SYS, 'G');
				k = 0;
			} else if (!strncmp(line.c_str(), "GLUT", 4)) {
				i = index_string(SYS, 'R');
				k = 0;
			} else if (!strncmp(line.c_str(), "GAUT", 4)) {
				i = index_string(SYS, 'E');
				k = 0;
			} else if (!strncmp(line.c_str(), "BDUT", 4)) {
				i = index_string(SYS, 'C');
				k = 0;
			} else if (!strncmp(line.c_str(), "SBUT", 4)) {
				i = index_string(SYS, 'S');
				k = 0;
			} else if (!strncmp(line.c_str(), "QZUT", 4)) {
				i = index_string(SYS, 'J');
				k = 0;
			} else if (!strncmp(line.c_str(), "GPGA", 4)) {
				i = index_string(SYS, 'G');
				k = 1;
			} else if (!strncmp(line.c_str(), "GLGP", 4)) {
				i = index_string(SYS, 'R');
				k = 1;
			} else if (!strncmp(line.c_str(), "QZGP", 4)) {
				i = index_string(SYS, 'J');
				k = 1;
			} else {
				printf(
						"$$$MESSAGE(read_rnxnav):unknown unknown TIME SYSTEM CORR!\n");
				continue;
			}
			strncpy(timc[i][k], line.c_str(), 4);
			strcpy(buf, line.c_str());
			ptr = buf;
			while (*ptr != '\0') {
				if (*ptr == 'D')
					*ptr = 'e';
				ptr++;
			}
			sscanf(buf, "%*5c%lf%lf%lf%lf", tim[i][k], tim[i][k] + 1,
					tim[i][k] + 2, tim[i][k] + 3);
		} else if (strstr(line.c_str(), "LEAP SECONDS") != NULL)
			sscanf(line.c_str(), "%d", &leap);
	}
	while (!in.eof()) {
		// acquire the ephemeris
		pos = in.tellg();
		getline(in, line);
		if (!len_trim(line.c_str()))
			continue;
		in.seekg(pos,ios::beg);
		if (ver < 3.0) {
			buf[0] = csys;
		} else
			buf[0] = line[0];
		switch (buf[0]) {
		case 'G':
		case 'E':
		case 'C':
		case 'J':
			isys = index_string(SYS, buf[0]);
			len = 0;
			memset(buf, 0, sizeof(char) * 2048);
			for (i = 0; i < 8; i++) {
				getline(in, line);
				strcpy(cline, line.c_str());
				if (i != 7) {
					filleph(cline, ver);
				}
				if (ver < 3) {
					if (buf[0] != csys)
						buf[0] = csys;
					strncpy(buf + 1 + len, cline, strlen(cline));
				} else
					strncpy(buf + len, cline, strlen(cline));
				len += strlen(cline);
			}
			ptr = buf;
			while (*ptr != '\0') {
				if (*ptr == '\n' || *ptr == '\r')
					*ptr = ' ';

				if (*ptr == 'D')
					*ptr = 'e';
				ptr++;
			}
			if (ver < 3.0) {
				buf[0] = csys;
				if (buf[1] == ' ')
					buf[1] = '0';
			}
			sscanf(buf,
					"%s%d%d%d%d%d%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf",
					eph.cprn, &iy, &im, &id, &ih, &imin, &dsec, &eph.a0,
					&eph.a1, &eph.a2, &d_aode, &eph.crs, &eph.dn, &eph.m0,
					&eph.cuc, &eph.e, &eph.cus, &eph.roota, &eph.toe, &eph.cic,
					&eph.omega0, &eph.cis, &eph.i0, &eph.crc, &eph.omega,
					&eph.omegadot, &eph.idot, &eph.resvd0, &eph.week,
					&eph.resvd1, &eph.accu, &eph.hlth, &eph.tgd, &eph.aodc);
			/////////////////////////// for BDS III test,must be removed //////////////////////////////////
			if (atoi(eph.cprn + 1) > 14) {
				eph.hlth = 0.0;
			}
			///////////////////////////////////////////////////////////////////////////////////////////////
			if (eph.hlth > 0 || isys == -1)
				continue;
			yr2year(iy);
			if (iy < 2000)
				continue;
			// time of clock
			eph.mjd = md_julday(iy, im, id); // TIME IN BDS TIME AND SHOULD NOT CHANGE IT INTO GPST BECAUSE THERE ARE OTHER TIME TAG IN THE EPHEMERIS
			eph.sod = ih * 3600.0 + imin * 60.0 + dsec;

			// adapter to bds
			if (eph.cprn[0] == 'C') {
				//the week in broadcast file generated by WHU is GPS week,
				//but that in IGS meraged file is BDS week
				mjd2wksow(eph.mjd, eph.sod, &k, &dt1);
				if (k != (int) eph.week)
					eph.week = 1356 + eph.week;
				eph.tgd1 = eph.aodc;
			}
			//check time
			dt0 = 0.0;
			dt1 = 0.0;
			if (mjd0 != 0) {
				dt0 = eph.mjd + eph.sod / 86400.0 - mjd0;
			}
			if (mjd1 != 0) {
				dt1 = eph.mjd + eph.sod / 86400.0 - mjd1;
			}
			if (dt0 < -1.0 / 24.0 || dt1 > 1.0 / 24.0)
				continue;
			already = false;
			for (gpsItr = this->gnssEph[isys].begin();
					gpsItr != this->gnssEph[isys].end(); gpsItr++) {
				if (strstr((*gpsItr).cprn, eph.cprn) && (*gpsItr).mjd == eph.mjd
						&& (*gpsItr).sod == eph.sod) {
					already = true;
					break;
				}
			}
			if (!already) {
				neph[isys] = neph[isys] + 1;
				eph.aode = genAode(buf[0], eph.mjd,eph.sod, eph.toe,static_cast<int>(d_aode),&eph);
				this->gnssEph[isys].push_back(eph);
			}
			break;
		case 'R':
			isys = index_string(SYS, buf[0]);
			len = 0;
			memset(buf, 0, sizeof(char) * 2048);
			for (i = 0; i < 4; i++) {
				getline(in, line);
				strcpy(cline, line.c_str());
				if (ver < 3) {
					if (buf[0] != csys)
						buf[0] = csys;
					strncpy(buf + 1 + len, cline, strlen(cline));
				} else
					strncpy(buf + len, cline, strlen(cline));
				len += strlen(cline);
			}
			ptr = buf;
			while (*ptr != '\0') {
				if (*ptr == '\n' || *ptr == '\r') {
					*ptr = ' ';
				}
				if (*ptr == 'D') {
					*ptr = 'e';
				}
				ptr++;
			}
			if (ver < 3.0) {
				buf[0] = csys;
				if (buf[1] == ' ')
					buf[1] = '0';
			}
			sscanf(buf,
					"%s%d%d%d%d%d%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf%lf",
					ephr.cprn, &iy, &im, &id, &ih, &imin, &dsec, &ephr.tau,
					&ephr.gamma, &ephr.tk, &ephr.pos[0], &ephr.vel[0],
					&ephr.acc[0], &ephr.health, &ephr.pos[1], &ephr.vel[1],
					&ephr.acc[1], &ephr.frenum, &ephr.pos[2], &ephr.vel[2],
					&ephr.acc[2], &ephr.age);

			if (ephr.health > 0.0)
				continue;
			yr2year(iy);
			if (iy < 2000)
				continue;
			ephr.mjd = md_julday(iy, im, id);
			ephr.sod = ih * 3600.0 + imin * 60.0 + dsec;
			//check time
			dt0 = 0.0;
			dt1 = 0.0;
			if (mjd0 != 0) {
				dt0 = ephr.mjd + ephr.sod / 86400.0 - mjd0;
			}
			if (mjd1 != 0) {
				dt1 = ephr.mjd + ephr.sod / 86400.0 - mjd1;
			}
			if (dt0 < -1.0 / 24.0 || dt1 > 1.0 / 24.0)
				continue;
			already = false;
			for (glsItr = this->glsEph.begin(); glsItr != this->glsEph.end();
					glsItr++) {
				if (strstr((*glsItr).cprn, ephr.cprn)
						&& (*glsItr).mjd == ephr.mjd
						&& (*glsItr).sod == ephr.sod) {
					already = true;
					break;
				}
			}
			if (!already) {
				neph[isys] = neph[isys] + 1;
				ephr.aode = genAode(buf[0], ephr.mjd,ephr.sod,0.0, ephr.aode,NULL);
				this->glsEph.push_back(ephr);
			}
			break;
		default:
			getline(in, line);
			break;
		}
	}
	in.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1038, %rsp           # imm = 0x1038
movl %esi, -0x30(%rbp)
movq %rdi, %r14
xorl %ebx, %ebx
movl %ebx, -0x1bc(%rbp)
movq %rbx, -0x1b8(%rbp)
movl %ebx, -0x24c(%rbp)
movq %rbx, -0x240(%rbp)
leaq -0x458(%rbp), %r15
movq %r15, %rdi
callq 0x8700
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
movq %rbx, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x9b0(%r14), %rbx
movq %r15, %rdi
movq %rbx, %rsi
movl $0xc, %edx
callq 0x8400
leaq -0x3e0(%rbp), %rdi
callq 0x8180
testb %al, %al
je 0x66cfc
leaq 0xdd0(%r14), %r12
leaq 0x7b8(%r14), %rax
movq %rax, -0xa8(%rbp)
leaq 0x7f0(%r14), %rax
movq %rax, -0xa0(%rbp)
leaq 0xe10(%r14), %rax
movq %rax, -0x40(%rbp)
leaq 0xdd8(%r14), %rax
movq %rax, -0x50(%rbp)
movq %r14, -0x70(%rbp)
leaq 0xfd0(%r14), %r15
leaq -0x90(%rbp), %r13
leaq -0x458(%rbp), %r14
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rdi
addq %r14, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
movq %r14, %rdi
movq %r13, %rsi
callq 0x8bd0
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x66d61
movq -0x90(%rbp), %rbx
movq %rbx, %rdi
leaq 0x52f7(%rip), %rsi      # 0x6b92b
callq 0x8160
testq %rax, %rax
jne 0x66d61
movq %rbx, %rdi
leaq 0x12ec8(%rip), %rsi     # 0x79514
callq 0x8160
testq %rax, %rax
jne 0x6680f
movq %rbx, %rdi
leaq 0x12ec5(%rip), %rsi     # 0x79529
callq 0x8160
testq %rax, %rax
jne 0x665eb
movq %rbx, %rdi
leaq 0x52bd(%rip), %rsi      # 0x6b939
callq 0x8160
testq %rax, %rax
jne 0x665eb
movq %rbx, %rdi
leaq 0x12ea9(%rip), %rsi     # 0x7953d
callq 0x8160
testq %rax, %rax
jne 0x665eb
movq %rbx, %rdi
leaq 0x12e9b(%rip), %rsi     # 0x79547
callq 0x8160
testq %rax, %rax
jne 0x665eb
movq %rbx, %rdi
leaq 0x12e8c(%rip), %rsi     # 0x79550
callq 0x8160
testq %rax, %rax
jne 0x6685b
movq %rbx, %rdi
leaq 0x12ec7(%rip), %rsi     # 0x795a3
callq 0x8160
testq %rax, %rax
jne 0x6698f
movq %rbx, %rdi
leaq 0x12ec4(%rip), %rsi     # 0x795b8
callq 0x8160
testq %rax, %rax
je 0x669da
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12eb8(%rip), %rsi     # 0x795c9
callq 0x82f0
testl %eax, %eax
je 0x66a0b
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12ea1(%rip), %rsi     # 0x795ce
callq 0x82f0
testl %eax, %eax
je 0x66a1e
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e8a(%rip), %rsi     # 0x795d3
callq 0x82f0
testl %eax, %eax
je 0x66a31
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e73(%rip), %rsi     # 0x795d8
callq 0x82f0
testl %eax, %eax
je 0x66a44
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e5c(%rip), %rsi     # 0x795dd
callq 0x82f0
testl %eax, %eax
je 0x66a57
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e45(%rip), %rsi     # 0x795e2
callq 0x82f0
testl %eax, %eax
je 0x66a6a
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e2e(%rip), %rsi     # 0x795e7
callq 0x82f0
testl %eax, %eax
je 0x66a8b
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e17(%rip), %rsi     # 0x795ec
callq 0x82f0
testl %eax, %eax
je 0x66a9e
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12e00(%rip), %rsi     # 0x795f1
callq 0x82f0
testl %eax, %eax
je 0x66ab1
leaq 0x12efc(%rip), %rdi     # 0x79701
callq 0x8970
jmp 0x665eb
movq %rbx, %rdi
leaq 0xec7a(%rip), %rsi      # 0x75493
movq %r12, %rdx
xorl %eax, %eax
callq 0x8610
cmpb $0x4d, -0x30(%rbp)
jne 0x665eb
movsd (%r12), %xmm0
ucomisd 0x40ad(%rip), %xmm0     # 0x6a8e8
jbe 0x665eb
movq -0x90(%rbp), %rax
cmpb $0x4d, 0x28(%rax)
je 0x665eb
leaq 0x12f62(%rip), %rdi     # 0x797bb
jmp 0x66805
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12cf7(%rip), %rsi     # 0x79561
callq 0x82f0
testl %eax, %eax
movq %r15, -0x38(%rbp)
je 0x66b75
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12cdc(%rip), %rsi     # 0x79566
callq 0x82f0
testl %eax, %eax
je 0x66b75
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12cc5(%rip), %rsi     # 0x7956b
callq 0x82f0
testl %eax, %eax
je 0x66c71
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12cae(%rip), %rsi     # 0x79570
callq 0x82f0
testl %eax, %eax
je 0x66caa
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12c97(%rip), %rsi     # 0x79575
callq 0x82f0
testl %eax, %eax
je 0x66c94
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12c80(%rip), %rsi     # 0x7957a
callq 0x82f0
testl %eax, %eax
je 0x66c94
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12c69(%rip), %rsi     # 0x7957f
callq 0x82f0
testl %eax, %eax
je 0x66cd6
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12c52(%rip), %rsi     # 0x79584
callq 0x82f0
testl %eax, %eax
je 0x66cc0
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12c3b(%rip), %rsi     # 0x79589
callq 0x82f0
testl %eax, %eax
je 0x66cc0
movl $0x4, %edx
movq %rbx, %rdi
leaq 0x12c24(%rip), %rsi     # 0x7958e
callq 0x82f0
testl %eax, %eax
je 0x66ce9
leaq 0x12e0b(%rip), %rdi     # 0x79789
callq 0x8970
movslq -0x2c(%rbp), %r15
movl -0x58(%rbp), %eax
jmp 0x66b90
movsbl -0x30(%rbp), %esi
leaq 0x12e5c(%rip), %rdi     # 0x797f6
callq 0x1d54b
cmpl $-0x1, %eax
je 0x66c59
movl %eax, -0x58(%rbp)
movq -0x90(%rbp), %rsi
leaq -0xc60(%rbp), %rbx
movq %rbx, %rdi
callq 0x85c0
movzbl (%rbx), %ecx
cmpl $0x44, %ecx
je 0x669d2
testl %ecx, %ecx
jne 0x669d5
jmp 0x66c1d
movb $0x65, (%rbx)
incq %rbx
jmp 0x669c1
movq %rbx, %rdi
leaq 0x12c23(%rip), %rsi     # 0x79607
callq 0x8160
testq %rax, %rax
je 0x665eb
movq %rbx, %rdi
leaq 0xf72f(%rip), %rsi      # 0x7612b
movq %r15, %rdx
xorl %eax, %eax
callq 0x8610
jmp 0x665eb
leaq 0x12de4(%rip), %rdi     # 0x797f6
movl $0x47, %esi
callq 0x1d54b
jmp 0x66a7b
leaq 0x12dd1(%rip), %rdi     # 0x797f6
movl $0x52, %esi
callq 0x1d54b
jmp 0x66a7b
leaq 0x12dbe(%rip), %rdi     # 0x797f6
movl $0x45, %esi
callq 0x1d54b
jmp 0x66a7b
leaq 0x12dab(%rip), %rdi     # 0x797f6
movl $0x43, %esi
callq 0x1d54b
jmp 0x66a7b
leaq 0x12d98(%rip), %rdi     # 0x797f6
movl $0x53, %esi
callq 0x1d54b
jmp 0x66a7b
leaq 0x12d85(%rip), %rdi     # 0x797f6
movl $0x4a, %esi
callq 0x1d54b
movq %r15, -0x38(%rbp)
movl $0x0, -0x2c(%rbp)
xorl %r15d, %r15d
jmp 0x66ad3
leaq 0x12d64(%rip), %rdi     # 0x797f6
movl $0x47, %esi
callq 0x1d54b
jmp 0x66ac2
leaq 0x12d51(%rip), %rdi     # 0x797f6
movl $0x52, %esi
callq 0x1d54b
jmp 0x66ac2
leaq 0x12d3e(%rip), %rdi     # 0x797f6
movl $0x4a, %esi
callq 0x1d54b
movq %r15, -0x38(%rbp)
movl $0x1, -0x2c(%rbp)
movl $0x1, %r15d
movl %eax, -0x58(%rbp)
movslq %eax, %r14
movq -0x50(%rbp), %rax
leaq (%rax,%r14,8), %rax
leaq (%rax,%r15,4), %rdi
movq -0x90(%rbp), %rbx
movl $0x4, %edx
movq %rbx, %rsi
callq 0x8350
leaq -0xc60(%rbp), %r13
movq %r13, %rdi
movq %rbx, %rsi
callq 0x85c0
movq %r13, %rax
leaq -0x90(%rbp), %r13
movzbl (%rax), %ecx
cmpl $0x44, %ecx
je 0x66b23
testl %ecx, %ecx
jne 0x66b26
jmp 0x66b2b
movb $0x65, (%rax)
incq %rax
jmp 0x66b15
shlq $0x6, %r14
addq -0x40(%rbp), %r14
shll $0x5, %r15d
leaq (%r14,%r15), %rdx
leaq (%r15,%r14), %rcx
addq $0x8, %rcx
leaq 0x10(%r15,%r14), %r8
leaq (%r15,%r14), %r9
addq $0x18, %r9
leaq -0xc60(%rbp), %rdi
leaq 0x12a98(%rip), %rsi     # 0x795f6
xorl %eax, %eax
callq 0x8610
leaq -0x458(%rbp), %r14
movq -0x38(%rbp), %r15
jmp 0x665eb
leaq 0x12c7a(%rip), %rdi     # 0x797f6
movl $0x47, %esi
callq 0x1d54b
movl $0x0, -0x2c(%rbp)
xorl %r15d, %r15d
movl %eax, -0x58(%rbp)
movslq %eax, %r14
movq -0xa8(%rbp), %rax
leaq (%rax,%r14,8), %rax
leaq (%rax,%r15,4), %rdi
movq -0x90(%rbp), %rbx
movl $0x4, %edx
movq %rbx, %rsi
callq 0x8350
leaq -0xc60(%rbp), %rdi
movq %rbx, %rsi
callq 0x85c0
leaq -0xc60(%rbp), %rax
movzbl (%rax), %ecx
cmpl $0x44, %ecx
je 0x66bdd
testl %ecx, %ecx
jne 0x66be0
jmp 0x66be5
movb $0x65, (%rax)
incq %rax
jmp 0x66bcf
shlq $0x6, %r14
addq -0xa0(%rbp), %r14
shlq $0x5, %r15
leaq (%r14,%r15), %rdx
leaq (%r15,%r14), %rcx
addq $0x8, %rcx
leaq 0x10(%r15,%r14), %r8
leaq 0x18(%r15,%r14), %r9
leaq -0xc60(%rbp), %rdi
leaq 0x1297b(%rip), %rsi     # 0x79593
jmp 0x66b5e
movslq -0x58(%rbp), %rax
shlq $0x6, %rax
movq -0x40(%rbp), %rsi
leaq (%rsi,%rax), %rdx
leaq (%rsi,%rax), %rcx
addq $0x8, %rcx
leaq 0x10(%rsi,%rax), %r8
leaq 0x18(%rsi,%rax), %r9
leaq -0xc60(%rbp), %rdi
leaq 0x129ad(%rip), %rsi     # 0x795fa
xorl %eax, %eax
callq 0x8610
jmp 0x665eb
leaq 0x12adb(%rip), %rdi     # 0x7973b
callq 0x8970
movl $0xffffffff, -0x58(%rbp) # imm = 0xFFFFFFFF
jmp 0x665eb
leaq 0x12b7e(%rip), %rdi     # 0x797f6
movl $0x47, %esi
callq 0x1d54b
movl $0x1, -0x2c(%rbp)
movl $0x1, %r15d
jmp 0x66b90
leaq 0x12b5b(%rip), %rdi     # 0x797f6
movl $0x43, %esi
callq 0x1d54b
jmp 0x66b86
leaq 0x12b45(%rip), %rdi     # 0x797f6
movl $0x45, %esi
callq 0x1d54b
jmp 0x66b86
leaq 0x12b2f(%rip), %rdi     # 0x797f6
movl $0x4a, %esi
callq 0x1d54b
jmp 0x66b86
leaq 0x12b19(%rip), %rdi     # 0x797f6
movl $0x43, %esi
callq 0x1d54b
jmp 0x66c82
leaq 0x12b06(%rip), %rdi     # 0x797f6
movl $0x4a, %esi
callq 0x1d54b
jmp 0x66c82
movq 0x272cd(%rip), %rdi     # 0x8dfd0
leaq 0x127e2(%rip), %rsi     # 0x794ec
movl $0x27, %edx
callq 0x8720
movq %rbx, %rdi
callq 0x8290
movq 0x272ad(%rip), %r14     # 0x8dfd0
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8720
movq (%r14), %rax
addq -0x18(%rax), %r14
movq %r14, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %esi
movq 0x27281(%rip), %rdi     # 0x8dfd0
callq 0x8050
movq %rax, %rdi
callq 0x8450
jmp 0x6779c
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x438(%rbp,%rax)
jne 0x67790
movl $0x80, %eax
leaq -0x250(%rbp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, -0x58(%rbp)
movl $0x88, %edx
addq %rdx, %rcx
movq %rcx, -0xc8(%rbp)
leaq -0x1c0(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xa8(%rbp)
addq %rcx, %rdx
movq %rdx, -0xa0(%rbp)
movq -0x70(%rbp), %rax
leaq 0x7a0(%rax), %rcx
movq %rcx, -0x38(%rbp)
leaq 0x7b0(%rax), %rcx
movq %rcx, -0xb8(%rbp)
addq $0x6f8, %rax            # imm = 0x6F8
movq %rax, -0xc0(%rbp)
leaq -0x1060(%rbp), %rbx
movq %r14, %rdi
callq 0x8b10
movq %r14, %rcx
movq %rax, %r14
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rcx, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
leaq -0x458(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8bd0
movq -0x90(%rbp), %rdi
callq 0x1d2ee
testl %eax, %eax
je 0x67770
leaq -0x458(%rbp), %rdi
movq %r14, %rsi
xorl %edx, %edx
callq 0x8870
movsd 0x3a96(%rip), %xmm0     # 0x6a8e8
ucomisd (%r12), %xmm0
movl -0x30(%rbp), %eax
ja 0x66e66
movq -0x90(%rbp), %rax
movb (%rax), %al
movb %al, -0xc60(%rbp)
movzbl %al, %ecx
addl $-0x43, %ecx
cmpl $0xf, %ecx
leaq -0x458(%rbp), %rdx
ja 0x67511
movl $0x95, %esi
btl %ecx, %esi
jae 0x6724f
movsbl %al, %esi
leaq 0x1295c(%rip), %rdi     # 0x797f6
callq 0x1d54b
movl %eax, -0x50(%rbp)
xorl %r15d, %r15d
movl $0x800, %edx            # imm = 0x800
leaq -0xc60(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x8, %r13d
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x458(%rbp), %r14
addq %r14, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
callq 0x8bd0
movq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x85c0
cmpl $0x1, %r13d
je 0x66f12
movsd (%r12), %xmm0
movq %rbx, %rdi
callq 0x1d3ae
movsd (%r12), %xmm1
movsd 0x39c8(%rip), %xmm0     # 0x6a8e8
movsd %xmm1, -0x40(%rbp)
ucomisd %xmm1, %xmm0
leaq -0xc60(%rbp), %r14
jbe 0x66f4d
leaq -0xc5f(%rbp), %r14
movl -0x30(%rbp), %eax
cmpb %al, -0xc60(%rbp)
je 0x66f4d
movl -0x30(%rbp), %eax
movb %al, -0xc60(%rbp)
movslq %r15d, %r15
addq %r15, %r14
movq %rbx, %rdi
callq 0x8290
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8350
movq %rbx, %rdi
callq 0x8290
addl %eax, %r15d
decl %r13d
jne 0x66ebe
leaq -0xc60(%rbp), %rax
movzbl (%rax), %edx
movb $0x20, %cl
cmpl $0xc, %edx
jle 0x66f9c
cmpl $0xd, %edx
je 0x66fa1
cmpl $0x44, %edx
jne 0x66fa3
movb $0x65, %cl
jmp 0x66fa1
cmpl $0xa, %edx
jne 0x66fa8
movb %cl, (%rax)
incq %rax
jmp 0x66f84
testl %edx, %edx
jne 0x66fa3
movsd 0x3934(%rip), %xmm0     # 0x6a8e8
ucomisd -0x40(%rbp), %xmm0
movl -0x50(%rbp), %r14d
jbe 0x66fd8
movl -0x30(%rbp), %eax
movb %al, -0xc60(%rbp)
cmpb $0x20, -0xc5f(%rbp)
jne 0x66fd8
movb $0x30, -0xc5f(%rbp)
leaq -0xc60(%rbp), %rdi
leaq 0x1262e(%rip), %rsi     # 0x79614
leaq -0x1c0(%rbp), %rdx
leaq -0x44(%rbp), %rcx
leaq -0x68(%rbp), %r8
leaq -0x64(%rbp), %r9
xorl %eax, %eax
leaq -0xd8(%rbp), %r10
pushq %r10
leaq -0xe8(%rbp), %r10
pushq %r10
leaq -0xf0(%rbp), %r10
pushq %r10
leaq -0xf8(%rbp), %r10
pushq %r10
leaq -0x100(%rbp), %r10
pushq %r10
leaq -0x108(%rbp), %r10
pushq %r10
leaq -0x110(%rbp), %r10
pushq %r10
leaq -0x118(%rbp), %r10
pushq %r10
leaq -0x120(%rbp), %r10
pushq %r10
leaq -0x128(%rbp), %r10
pushq %r10
leaq -0x130(%rbp), %r10
pushq %r10
pushq -0xa0(%rbp)
pushq -0xa8(%rbp)
leaq -0x148(%rbp), %r10
pushq %r10
leaq -0x150(%rbp), %r10
pushq %r10
leaq -0x158(%rbp), %r10
pushq %r10
leaq -0x160(%rbp), %r10
pushq %r10
leaq -0x168(%rbp), %r10
pushq %r10
leaq -0x170(%rbp), %r10
pushq %r10
leaq -0x178(%rbp), %r10
pushq %r10
leaq -0x180(%rbp), %r10
pushq %r10
leaq -0x188(%rbp), %r10
pushq %r10
leaq -0x190(%rbp), %r10
pushq %r10
leaq -0xd0(%rbp), %r10
pushq %r10
leaq -0x1a0(%rbp), %r10
pushq %r10
leaq -0x1a8(%rbp), %r10
pushq %r10
leaq -0x1b0(%rbp), %r10
pushq %r10
leaq -0xb0(%rbp), %r10
pushq %r10
leaq -0x5c(%rbp), %r10
pushq %r10
leaq -0x60(%rbp), %r10
pushq %r10
callq 0x8610
addq $0xf0, %rsp
leaq -0x1bf(%rbp), %rdi
callq 0x89a0
cmpl $0xe, %eax
jle 0x67129
movq $0x0, -0xf0(%rbp)
xorl %eax, %eax
jmp 0x6713c
movsd -0xf0(%rbp), %xmm0
ucomisd 0x37cf(%rip), %xmm0     # 0x6a908
seta %al
cmpl $-0x1, %r14d
je 0x67770
testb %al, %al
jne 0x67770
leaq -0x44(%rbp), %rdi
callq 0x1cf0d
movl -0x44(%rbp), %edi
cmpl $0x7d0, %edi            # imm = 0x7D0
jl 0x67770
movl -0x68(%rbp), %esi
movl -0x64(%rbp), %edx
callq 0x1c8ec
xorps %xmm0, %xmm0
cvtsi2sdl -0x60(%rbp), %xmm0
cvtsi2sdl -0x5c(%rbp), %xmm1
mulsd 0x3732(%rip), %xmm1     # 0x6a8b8
mulsd 0x3732(%rip), %xmm0     # 0x6a8c0
addsd %xmm1, %xmm0
addsd -0xb0(%rbp), %xmm0
movl %eax, -0x1bc(%rbp)
movsd %xmm0, -0x1b8(%rbp)
cmpb $0x43, -0x1c0(%rbp)
jne 0x671f4
movl %eax, %edi
leaq -0x2c(%rbp), %rsi
leaq -0x98(%rbp), %rdx
callq 0x1cf30
movsd -0x108(%rbp), %xmm0
cvttsd2si %xmm0, %eax
cmpl %eax, -0x2c(%rbp)
je 0x671e4
addsd 0x12304(%rip), %xmm0    # 0x794e0
movsd %xmm0, -0x108(%rbp)
movsd -0xd8(%rbp), %xmm0
movsd %xmm0, -0xe0(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x70(%rbp), %rcx
movl 0xdb0(%rcx), %eax
testl %eax, %eax
je 0x67544
xorps %xmm0, %xmm0
cvtsi2sdl -0x1bc(%rbp), %xmm0
movsd -0x1b8(%rbp), %xmm1
divsd 0x36a4(%rip), %xmm1     # 0x6a8d0
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %eax, %xmm0
subsd %xmm0, %xmm1
movsd 0x12295(%rip), %xmm0    # 0x794d8
ucomisd %xmm1, %xmm0
seta %al
jmp 0x67546
cmpl $0xf, %ecx
jne 0x67511
leaq 0x12597(%rip), %rdi     # 0x797f6
movl $0x52, %esi
callq 0x1d54b
movl %eax, -0x50(%rbp)
xorl %r15d, %r15d
movl $0x800, %edx            # imm = 0x800
leaq -0xc60(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
movl $0x4, %r13d
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rdi
leaq -0x458(%rbp), %r14
addq %r14, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
callq 0x8bd0
movq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x85c0
movsd (%r12), %xmm1
movsd 0x3612(%rip), %xmm0     # 0x6a8e8
movsd %xmm1, -0x40(%rbp)
ucomisd %xmm1, %xmm0
leaq -0xc60(%rbp), %r14
jbe 0x67303
leaq -0xc5f(%rbp), %r14
movl -0x30(%rbp), %eax
cmpb %al, -0xc60(%rbp)
je 0x67303
movl -0x30(%rbp), %eax
movb %al, -0xc60(%rbp)
movslq %r15d, %r15
addq %r15, %r14
movq %rbx, %rdi
callq 0x8290
movq %r14, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8350
movq %rbx, %rdi
callq 0x8290
addl %eax, %r15d
decl %r13d
jne 0x67288
leaq -0xc60(%rbp), %rax
movzbl (%rax), %edx
movb $0x20, %cl
cmpl $0xc, %edx
jle 0x67352
cmpl $0xd, %edx
je 0x67357
cmpl $0x44, %edx
jne 0x67359
movb $0x65, %cl
jmp 0x67357
cmpl $0xa, %edx
jne 0x6735e
movb %cl, (%rax)
incq %rax
jmp 0x6733a
testl %edx, %edx
jne 0x67359
movsd 0x357e(%rip), %xmm0     # 0x6a8e8
ucomisd -0x40(%rbp), %xmm0
jbe 0x6738a
movl -0x30(%rbp), %eax
movb %al, -0xc60(%rbp)
cmpb $0x20, -0xc5f(%rbp)
jne 0x6738a
movb $0x30, -0xc5f(%rbp)
leaq -0xc60(%rbp), %rdi
leaq 0x122dd(%rip), %rsi     # 0x79675
leaq -0x250(%rbp), %rdx
leaq -0x44(%rbp), %rcx
leaq -0x68(%rbp), %r8
leaq -0x64(%rbp), %r9
xorl %eax, %eax
pushq -0xc8(%rbp)
leaq -0x1e0(%rbp), %r10
pushq %r10
leaq -0x1f8(%rbp), %r10
pushq %r10
leaq -0x210(%rbp), %r10
pushq %r10
pushq -0x58(%rbp)
leaq -0x1e8(%rbp), %r10
pushq %r10
leaq -0x200(%rbp), %r10
pushq %r10
leaq -0x218(%rbp), %r10
pushq %r10
leaq -0x1d8(%rbp), %r10
pushq %r10
leaq -0x1f0(%rbp), %r10
pushq %r10
leaq -0x208(%rbp), %r10
pushq %r10
leaq -0x220(%rbp), %r10
pushq %r10
leaq -0x228(%rbp), %r10
pushq %r10
leaq -0x230(%rbp), %r10
pushq %r10
leaq -0x238(%rbp), %r10
pushq %r10
leaq -0xb0(%rbp), %r10
pushq %r10
leaq -0x5c(%rbp), %r10
pushq %r10
leaq -0x60(%rbp), %r10
pushq %r10
callq 0x8610
addq $0x90, %rsp
movsd -0x1d8(%rbp), %xmm0
ucomisd 0x34ac(%rip), %xmm0     # 0x6a908
ja 0x67770
leaq -0x44(%rbp), %rdi
callq 0x1cf0d
movl -0x44(%rbp), %edi
cmpl $0x7d0, %edi            # imm = 0x7D0
jl 0x67770
movl -0x68(%rbp), %esi
movl -0x64(%rbp), %edx
callq 0x1c8ec
movl %eax, %r15d
cvtsi2sdl -0x60(%rbp), %xmm1
xorps %xmm0, %xmm0
cvtsi2sdl -0x5c(%rbp), %xmm0
movl %eax, -0x24c(%rbp)
mulsd 0x3415(%rip), %xmm0     # 0x6a8b8
mulsd 0x3415(%rip), %xmm1     # 0x6a8c0
addsd %xmm0, %xmm1
addsd -0xb0(%rbp), %xmm1
movsd %xmm1, -0x240(%rbp)
movq $0x0, -0x98(%rbp)
movq -0x70(%rbp), %rcx
movl 0xdb0(%rcx), %eax
xorps %xmm0, %xmm0
cvtsi2sd %r15d, %xmm0
testl %eax, %eax
movsd %xmm1, -0x40(%rbp)
je 0x67678
divsd 0x33df(%rip), %xmm1     # 0x6a8d0
addsd %xmm0, %xmm1
cvtsi2sd %eax, %xmm2
subsd %xmm2, %xmm1
movsd 0x11fd3(%rip), %xmm2    # 0x794d8
ucomisd %xmm1, %xmm2
seta %al
jmp 0x6767a
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rdi
addq %rdx, %rdi
movl $0xa, %esi
callq 0x8600
movsbl %al, %edx
leaq -0x458(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8bd0
jmp 0x67770
xorl %eax, %eax
movl 0xdb4(%rcx), %ecx
testl %ecx, %ecx
je 0x6758f
xorps %xmm0, %xmm0
cvtsi2sdl -0x1bc(%rbp), %xmm0
movsd -0x1b8(%rbp), %xmm1
divsd 0x3365(%rip), %xmm1     # 0x6a8d0
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, -0x98(%rbp)
ucomisd 0x34be(%rip), %xmm1     # 0x6aa48
seta %cl
jmp 0x67591
xorl %ecx, %ecx
orb %cl, %al
testb $0x1, %al
jne 0x67770
movslq %r14d, %r15
leaq (%r15,%r15,2), %rax
movq -0xc0(%rbp), %rcx
leaq (%rcx,%rax,8), %r14
movq (%r14), %r13
movl -0x1bc(%rbp), %eax
movl %eax, -0x40(%rbp)
movsd -0x1b8(%rbp), %xmm0
movsd %xmm0, -0x50(%rbp)
cmpq %r14, %r13
je 0x67602
leaq 0x10(%r13), %rdi
leaq -0x1c0(%rbp), %rsi
callq 0x8160
testq %rax, %rax
je 0x675fc
movl -0x40(%rbp), %eax
cmpl %eax, 0x14(%r13)
jne 0x675fc
movsd 0x18(%r13), %xmm0
ucomisd -0x50(%rbp), %xmm0
jne 0x675fc
jnp 0x67770
movq (%r13), %r13
jmp 0x675c6
movq -0x70(%rbp), %rax
incl 0x6d8(%rax,%r15,4)
movsbl -0xc60(%rbp), %edi
movsd -0x158(%rbp), %xmm1
cvttsd2si -0xd0(%rbp), %edx
movl -0x40(%rbp), %esi
movsd -0x50(%rbp), %xmm0
leaq -0x1c0(%rbp), %rcx
callq 0x20828
movl %eax, -0x198(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x8640
movq %rax, %r15
movq %rax, %rdi
addq $0x10, %rdi
movl $0xf0, %edx
leaq -0x1c0(%rbp), %rsi
callq 0x84f0
movq %r15, %rdi
movq %r14, %rsi
callq 0x80c0
addq $0x10, %r14
jmp 0x6776d
xorl %eax, %eax
movl 0xdb4(%rcx), %ecx
testl %ecx, %ecx
je 0x676b5
movsd -0x40(%rbp), %xmm1
divsd 0x323f(%rip), %xmm1     # 0x6a8d0
addsd %xmm0, %xmm1
xorps %xmm0, %xmm0
cvtsi2sd %ecx, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, -0x98(%rbp)
ucomisd 0x3398(%rip), %xmm1     # 0x6aa48
seta %cl
jmp 0x676b7
xorl %ecx, %ecx
orb %cl, %al
testb $0x1, %al
jne 0x67770
movq -0x38(%rbp), %rax
movq (%rax), %r14
cmpq %rax, %r14
je 0x67700
leaq 0x10(%r14), %rdi
leaq -0x250(%rbp), %rsi
callq 0x8160
testq %rax, %rax
je 0x676f7
cmpl %r15d, 0x14(%r14)
jne 0x676f7
movsd 0x20(%r14), %xmm0
ucomisd -0x40(%rbp), %xmm0
jne 0x676f7
jnp 0x67770
movq (%r14), %r14
cmpq -0x38(%rbp), %r14
jne 0x676cd
movslq -0x50(%rbp), %rax
movq -0x70(%rbp), %rcx
incl 0x6d8(%rcx,%rax,4)
movsbl -0xc60(%rbp), %edi
movl -0x248(%rbp), %edx
xorpd %xmm1, %xmm1
movl %r15d, %esi
movsd -0x40(%rbp), %xmm0
xorl %ecx, %ecx
callq 0x20828
movl %eax, -0x248(%rbp)
movl $0xa0, %edi
callq 0x8640
movq %rax, %r14
movq %rax, %rdi
addq $0x10, %rdi
movl $0x90, %edx
leaq -0x250(%rbp), %rsi
callq 0x84f0
movq %r14, %rdi
movq -0x38(%rbp), %rsi
callq 0x80c0
movq -0xb8(%rbp), %r14
incq (%r14)
movq -0x458(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x438(%rbp,%rax)
leaq -0x458(%rbp), %r14
je 0x66de9
leaq -0x458(%rbp), %rdi
callq 0x8130
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x677b1
callq 0x85d0
leaq -0x458(%rbp), %rdi
callq 0x81a0
addq $0x1038, %rsp           # imm = 0x1038
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x677db
jmp 0x677db
jmp 0x677db
jmp 0x677db
jmp 0x677db
jmp 0x677db
movq %rax, %rbx
movq -0x90(%rbp), %rdi
leaq -0x80(%rbp), %rax
cmpq %rax, %rdi
je 0x677f3
callq 0x85d0
leaq -0x458(%rbp), %rdi
callq 0x81a0
movq %rbx, %rdi
callq 0x8b30
nop