// File: /workspace/github_cpp_makefile_star2_O2/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 $0x1028, %rsp           # imm = 0x1028
andl $0x0, -0x1b4(%rbp)
andq $0x0, -0x1b0(%rbp)
movl %esi, -0x30(%rbp)
andl $0x0, -0x244(%rbp)
movq %rdi, %r13
andq $0x0, -0x238(%rbp)
leaq -0x450(%rbp), %r14
movq %r14, %rdi
callq 0x86e0
leaq -0x80(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq 0x9b0(%r13), %rbx
pushq $0xc
popq %rdx
movq %r14, %rdi
movq %rbx, %rsi
callq 0x8400
leaq -0x3d8(%rbp), %rdi
callq 0x8190
testb %al, %al
je 0x5d014
leaq 0xdd0(%r13), %r15
leaq 0x7b8(%r13), %rax
movq %rax, -0xa8(%rbp)
leaq 0x7f0(%r13), %rax
movq %rax, -0x68(%rbp)
leaq 0xe10(%r13), %rax
movq %rax, -0x38(%rbp)
leaq 0xdd8(%r13), %rax
movq %rax, -0xb0(%rbp)
leaq 0xfd0(%r13), %rax
movq %rax, -0xa0(%rbp)
leaq -0x90(%rbp), %r12
movq %r13, -0x60(%rbp)
leaq -0x450(%rbp), %rdi
movq %r12, %rsi
callq 0x8120
movq (%rax), %rcx
movq -0x18(%rcx), %rcx
testb $0x5, 0x20(%rax,%rcx)
jne 0x5d03f
movq -0x90(%rbp), %r14
movq %r14, %rdi
leaq 0x4f67(%rip), %rsi      # 0x6191b
callq 0x8170
testq %rax, %rax
jne 0x5d03f
movq %r14, %rdi
leaq 0x12b18(%rip), %rsi     # 0x6f4e4
callq 0x8170
testq %rax, %rax
jne 0x5cb78
movq %r14, %rdi
leaq 0x12b15(%rip), %rsi     # 0x6f4f9
callq 0x8170
testq %rax, %rax
jne 0x5c982
movq %r14, %rdi
leaq 0x4f31(%rip), %rsi      # 0x61929
callq 0x8170
testq %rax, %rax
jne 0x5c982
movq %r14, %rdi
leaq 0x12b01(%rip), %rsi     # 0x6f50d
callq 0x8170
testq %rax, %rax
jne 0x5c982
movq %r14, %rdi
leaq 0x12af3(%rip), %rsi     # 0x6f517
callq 0x8170
testq %rax, %rax
jne 0x5c982
movq %r14, %rdi
leaq 0x12ae4(%rip), %rsi     # 0x6f520
callq 0x8170
testq %rax, %rax
jne 0x5cbc3
movq %r14, %rdi
leaq 0x12b1f(%rip), %rsi     # 0x6f573
callq 0x8170
testq %rax, %rax
jne 0x5cce3
movq %r14, %rdi
leaq 0x12b1c(%rip), %rsi     # 0x6f588
callq 0x8170
testq %rax, %rax
je 0x5cd2e
movq %r14, %rdi
leaq 0x12b15(%rip), %rsi     # 0x6f599
pushq $0x4
popq %rbx
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cd63
movq %r14, %rdi
leaq 0x12afd(%rip), %rsi     # 0x6f59e
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cd74
movq %r14, %rdi
leaq 0x12ae8(%rip), %rsi     # 0x6f5a3
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cd85
movq %r14, %rdi
leaq 0x12ad3(%rip), %rsi     # 0x6f5a8
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cd96
movq %r14, %rdi
leaq 0x12abe(%rip), %rsi     # 0x6f5ad
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cda7
movq %r14, %rdi
leaq 0x12aa9(%rip), %rsi     # 0x6f5b2
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cdb8
movq %r14, %rdi
leaq 0x12a94(%rip), %rsi     # 0x6f5b7
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cdcf
movq %r14, %rdi
leaq 0x12a7f(%rip), %rsi     # 0x6f5bc
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cde0
movq %r14, %rdi
leaq 0x12a6a(%rip), %rsi     # 0x6f5c1
movq %rbx, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cdf1
leaq 0x12b63(%rip), %rdi     # 0x6f6d1
callq 0x8970
jmp 0x5c982
movq %r14, %rdi
leaq 0xe927(%rip), %rsi      # 0x6b4a9
movq %r15, %rdx
xorl %eax, %eax
callq 0x8600
cmpb $0x4d, -0x30(%rbp)
jne 0x5c982
movsd (%r15), %xmm0
ucomisd 0x3d35(%rip), %xmm0     # 0x608d8
jbe 0x5c982
movq -0x90(%rbp), %rax
cmpb $0x4d, 0x28(%rax)
je 0x5c982
leaq 0x12bca(%rip), %rdi     # 0x6f78b
jmp 0x5cb6e
movq %r14, %rdi
leaq 0x12964(%rip), %rsi     # 0x6f531
pushq $0x4
popq %r13
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cea5
movq %r14, %rdi
leaq 0x1294b(%rip), %rsi     # 0x6f536
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cea5
movq %r14, %rdi
leaq 0x12936(%rip), %rsi     # 0x6f53b
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cf98
movq %r14, %rdi
leaq 0x12921(%rip), %rsi     # 0x6f540
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cfca
movq %r14, %rdi
leaq 0x1290c(%rip), %rsi     # 0x6f545
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cfb6
movq %r14, %rdi
leaq 0x128f7(%rip), %rsi     # 0x6f54a
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cfb6
movq %r14, %rdi
leaq 0x128e2(%rip), %rsi     # 0x6f54f
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cff2
movq %r14, %rdi
leaq 0x128cd(%rip), %rsi     # 0x6f554
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cfde
movq %r14, %rdi
leaq 0x128b8(%rip), %rsi     # 0x6f559
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5cfde
movq %r14, %rdi
leaq 0x128a3(%rip), %rsi     # 0x6f55e
movq %r13, %rdx
callq 0x8300
testl %eax, %eax
je 0x5d003
leaq 0x12a87(%rip), %rdi     # 0x6f759
callq 0x8970
movslq -0x2c(%rbp), %rbx
movl -0x58(%rbp), %eax
jmp 0x5ceba
movsbl -0x30(%rbp), %esi
leaq 0x12ad8(%rip), %rdi     # 0x6f7c6
callq 0x1a5f7
movl %eax, %r14d
cmpl $-0x1, %eax
je 0x5cf81
movq -0x90(%rbp), %rsi
leaq -0xc50(%rbp), %rbx
movq %rbx, %rdi
callq 0x85c0
movzbl (%rbx), %ecx
cmpl $0x44, %ecx
je 0x5cd26
testl %ecx, %ecx
jne 0x5cd29
jmp 0x5cf42
movb $0x65, (%rbx)
incq %rbx
jmp 0x5cd15
movq %r14, %rdi
leaq 0x1289f(%rip), %rsi     # 0x6f5d7
callq 0x8170
testq %rax, %rax
je 0x5c982
movq %r14, %rdi
leaq 0xf41b(%rip), %rsi      # 0x6c16b
movq -0xa0(%rbp), %rdx
xorl %eax, %eax
callq 0x8600
jmp 0x5c982
leaq 0x12a5c(%rip), %rdi     # 0x6f7c6
pushq $0x47
popq %rsi
callq 0x1a5f7
jmp 0x5cdc7
leaq 0x12a4b(%rip), %rdi     # 0x6f7c6
pushq $0x52
popq %rsi
callq 0x1a5f7
jmp 0x5cdc7
leaq 0x12a3a(%rip), %rdi     # 0x6f7c6
pushq $0x45
popq %rsi
callq 0x1a5f7
jmp 0x5cdc7
leaq 0x12a29(%rip), %rdi     # 0x6f7c6
pushq $0x43
popq %rsi
callq 0x1a5f7
jmp 0x5cdc7
leaq 0x12a18(%rip), %rdi     # 0x6f7c6
pushq $0x53
popq %rsi
callq 0x1a5f7
jmp 0x5cdc7
leaq 0x12a07(%rip), %rdi     # 0x6f7c6
pushq $0x4a
popq %rsi
callq 0x1a5f7
andl $0x0, -0x2c(%rbp)
xorl %ebx, %ebx
jmp 0x5ce0a
leaq 0x129f0(%rip), %rdi     # 0x6f7c6
pushq $0x47
popq %rsi
callq 0x1a5f7
jmp 0x5ce00
leaq 0x129df(%rip), %rdi     # 0x6f7c6
pushq $0x52
popq %rsi
callq 0x1a5f7
jmp 0x5ce00
leaq 0x129ce(%rip), %rdi     # 0x6f7c6
pushq $0x4a
popq %rsi
callq 0x1a5f7
movl $0x1, -0x2c(%rbp)
pushq $0x1
popq %rbx
movl %eax, -0x58(%rbp)
movslq %eax, %r13
movq -0xb0(%rbp), %rax
leaq (%rax,%r13,8), %rax
leaq (%rax,%rbx,4), %rdi
movq -0x90(%rbp), %r14
movq %r14, %rsi
pushq $0x4
popq %rdx
callq 0x8360
leaq -0xc50(%rbp), %r12
movq %r12, %rdi
movq %r14, %rsi
callq 0x85c0
movq %r12, %rax
leaq -0x90(%rbp), %r12
movzbl (%rax), %ecx
cmpl $0x44, %ecx
je 0x5ce5b
testl %ecx, %ecx
jne 0x5ce5e
jmp 0x5ce63
movb $0x65, (%rax)
incq %rax
jmp 0x5ce4d
shlq $0x6, %r13
addq -0x38(%rbp), %r13
shll $0x5, %ebx
leaq (%rbx,%r13), %rdx
leaq (%rbx,%r13), %rcx
addq $0x8, %rcx
leaq 0x10(%rbx,%r13), %r8
leaq (%rbx,%r13), %r9
addq $0x18, %r9
leaq -0xc50(%rbp), %rdi
leaq 0x12731(%rip), %rsi     # 0x6f5c6
xorl %eax, %eax
callq 0x8600
movq -0x60(%rbp), %r13
jmp 0x5c982
leaq 0x1291a(%rip), %rdi     # 0x6f7c6
pushq $0x47
popq %rsi
callq 0x1a5f7
andl $0x0, -0x2c(%rbp)
xorl %ebx, %ebx
movl %eax, -0x58(%rbp)
movslq %eax, %r13
movq -0xa8(%rbp), %rax
leaq (%rax,%r13,8), %rax
leaq (%rax,%rbx,4), %rdi
movq -0x90(%rbp), %r14
movq %r14, %rsi
pushq $0x4
popq %rdx
callq 0x8360
leaq -0xc50(%rbp), %rdi
movq %r14, %rsi
callq 0x85c0
leaq -0xc50(%rbp), %rax
movzbl (%rax), %ecx
cmpl $0x44, %ecx
je 0x5cf05
testl %ecx, %ecx
jne 0x5cf08
jmp 0x5cf0d
movb $0x65, (%rax)
incq %rax
jmp 0x5cef7
shlq $0x6, %r13
addq -0x68(%rbp), %r13
shlq $0x5, %rbx
leaq (%rbx,%r13), %rdx
leaq (%rbx,%r13), %rcx
addq $0x8, %rcx
leaq 0x10(%rbx,%r13), %r8
leaq 0x18(%rbx,%r13), %r9
leaq -0xc50(%rbp), %rdi
leaq 0x12626(%rip), %rsi     # 0x6f563
jmp 0x5ce95
movl %r14d, -0x58(%rbp)
movslq %r14d, %rax
shlq $0x6, %rax
movq -0x38(%rbp), %rsi
leaq (%rsi,%rax), %rdx
leaq (%rsi,%rax), %rcx
addq $0x8, %rcx
leaq 0x10(%rsi,%rax), %r8
leaq 0x18(%rsi,%rax), %r9
leaq -0xc50(%rbp), %rdi
leaq 0x12655(%rip), %rsi     # 0x6f5ca
xorl %eax, %eax
callq 0x8600
jmp 0x5c982
leaq 0x12783(%rip), %rdi     # 0x6f70b
callq 0x8970
pushq $-0x1
popq %rax
movl %eax, -0x58(%rbp)
jmp 0x5c982
leaq 0x12827(%rip), %rdi     # 0x6f7c6
pushq $0x47
popq %rsi
callq 0x1a5f7
movl $0x1, -0x2c(%rbp)
pushq $0x1
popq %rbx
jmp 0x5ceba
leaq 0x12809(%rip), %rdi     # 0x6f7c6
pushq $0x43
popq %rsi
callq 0x1a5f7
jmp 0x5ceb4
leaq 0x127f5(%rip), %rdi     # 0x6f7c6
pushq $0x45
popq %rsi
callq 0x1a5f7
jmp 0x5ceb4
leaq 0x127e1(%rip), %rdi     # 0x6f7c6
pushq $0x4a
popq %rsi
callq 0x1a5f7
jmp 0x5ceb4
leaq 0x127cd(%rip), %rdi     # 0x6f7c6
pushq $0x43
popq %rsi
callq 0x1a5f7
jmp 0x5cfa7
leaq 0x127bc(%rip), %rdi     # 0x6f7c6
pushq $0x4a
popq %rsi
callq 0x1a5f7
jmp 0x5cfa7
movq 0x28fad(%rip), %rdi     # 0x85fc8
leaq 0x1249a(%rip), %rsi     # 0x6f4bc
callq 0x8610
movq %rax, %rdi
movq %rbx, %rsi
callq 0x8610
movq %rax, %rdi
callq 0x8310
jmp 0x5d943
movl $0x80, %eax
leaq -0x248(%rbp), %rcx
leaq (%rcx,%rax), %rdx
movq %rdx, -0xa0(%rbp)
movl $0x88, %edx
addq %rdx, %rcx
movq %rcx, -0x58(%rbp)
leaq -0x1b8(%rbp), %rcx
addq %rcx, %rax
movq %rax, -0xb0(%rbp)
addq %rcx, %rdx
movq %rdx, -0xa8(%rbp)
leaq 0x7a0(%r13), %rax
movq %rax, -0x68(%rbp)
leaq 0x6f8(%r13), %rax
movq %rax, -0xc0(%rbp)
leaq -0x1050(%rbp), %rbx
movq -0x450(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x430(%rbp,%rax)
jne 0x5d937
leaq -0x450(%rbp), %r14
movq %r14, %rdi
callq 0x8b10
movq %rax, %r12
movq %r14, %rdi
leaq -0x90(%rbp), %rsi
callq 0x8120
movq -0x90(%rbp), %rdi
callq 0x1a3ea
testl %eax, %eax
je 0x5d09d
leaq -0x450(%rbp), %rdi
movq %r12, %rsi
xorl %edx, %edx
callq 0x8860
movsd 0x37d8(%rip), %xmm0     # 0x608d8
ucomisd (%r15), %xmm0
movl -0x30(%rbp), %eax
ja 0x5d113
movq -0x90(%rbp), %rax
movb (%rax), %al
movb %al, -0xc50(%rbp)
movzbl %al, %ecx
addl $-0x43, %ecx
cmpl $0xf, %ecx
leaq -0x450(%rbp), %rdi
ja 0x5d580
movl $0x95, %edx
btl %ecx, %edx
jae 0x5d4bf
movsbl %al, %esi
leaq 0x1267f(%rip), %rdi     # 0x6f7c6
callq 0x1a5f7
movl %eax, -0x38(%rbp)
xorl %r13d, %r13d
movl $0x800, %edx            # imm = 0x800
leaq -0xc50(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
pushq $0x8
popq %r12
movl %r12d, %r14d
subl $0x1, %r14d
jb 0x5d20b
leaq -0x450(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8120
movq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x85c0
cmpl $0x1, %r12d
je 0x5d1ab
movsd (%r15), %xmm0
movq %rbx, %rdi
callq 0x1a49e
movsd 0x3725(%rip), %xmm0     # 0x608d8
ucomisd (%r15), %xmm0
leaq -0xc50(%rbp), %r12
jbe 0x5d1dc
leaq -0xc4f(%rbp), %r12
movl -0x30(%rbp), %eax
cmpb %al, -0xc50(%rbp)
je 0x5d1dc
movl -0x30(%rbp), %eax
movb %al, -0xc50(%rbp)
movslq %r13d, %r13
addq %r13, %r12
movq %rbx, %rdi
callq 0x8290
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8360
movq %rbx, %rdi
callq 0x8290
addl %eax, %r13d
movl %r14d, %r12d
jmp 0x5d16c
leaq -0xc50(%rbp), %rax
movzbl (%rax), %ecx
movb $0x20, %dl
cmpl $0xa, %ecx
je 0x5d22e
cmpl $0xd, %ecx
je 0x5d22e
cmpl $0x44, %ecx
je 0x5d22c
testl %ecx, %ecx
jne 0x5d230
jmp 0x5d235
movb $0x65, %dl
movb %dl, (%rax)
incq %rax
jmp 0x5d212
movsd 0x369b(%rip), %xmm0     # 0x608d8
ucomisd (%r15), %xmm0
jbe 0x5d25d
movl -0x30(%rbp), %eax
movb %al, -0xc50(%rbp)
cmpb $0x20, -0xc4f(%rbp)
jne 0x5d25d
movb $0x30, -0xc4f(%rbp)
leaq -0xc50(%rbp), %rdi
leaq 0x12379(%rip), %rsi     # 0x6f5e4
leaq -0x1b8(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x4c(%rbp), %r8
leaq -0x48(%rbp), %r9
xorl %eax, %eax
leaq -0xd0(%rbp), %r10
pushq %r10
leaq -0xe0(%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
pushq -0xa8(%rbp)
pushq -0xb0(%rbp)
leaq -0x140(%rbp), %r10
pushq %r10
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 -0xc8(%rbp), %r10
pushq %r10
leaq -0x198(%rbp), %r10
pushq %r10
leaq -0x1a0(%rbp), %r10
pushq %r10
leaq -0x1a8(%rbp), %r10
pushq %r10
leaq -0xb8(%rbp), %r10
pushq %r10
leaq -0x40(%rbp), %r10
pushq %r10
leaq -0x44(%rbp), %r10
pushq %r10
callq 0x8600
addq $0xf0, %rsp
leaq -0x1b7(%rbp), %rdi
callq 0x8990
cmpl $0xe, %eax
jle 0x5d3ab
andq $0x0, -0xe8(%rbp)
xorl %eax, %eax
jmp 0x5d3be
movsd -0xe8(%rbp), %xmm0
ucomisd 0x353d(%rip), %xmm0     # 0x608f8
seta %al
cmpl $-0x1, -0x38(%rbp)
je 0x5d09d
testb %al, %al
jne 0x5d09d
leaq -0x3c(%rbp), %rdi
callq 0x1a0a1
movl -0x3c(%rbp), %edi
cmpl $0x7d0, %edi            # imm = 0x7D0
jl 0x5d09d
movl -0x4c(%rbp), %esi
movl -0x48(%rbp), %edx
callq 0x19b34
cvtsi2sdl -0x44(%rbp), %xmm0
cvtsi2sdl -0x40(%rbp), %xmm1
mulsd 0x34a3(%rip), %xmm1     # 0x608a8
mulsd 0x34a3(%rip), %xmm0     # 0x608b0
addsd %xmm1, %xmm0
addsd -0xb8(%rbp), %xmm0
movl %eax, -0x1b4(%rbp)
movsd %xmm0, -0x1b0(%rbp)
cmpb $0x43, -0x1b8(%rbp)
jne 0x5d470
movl %eax, %edi
leaq -0x2c(%rbp), %rsi
leaq -0x70(%rbp), %rdx
callq 0x1a0c4
movsd -0x100(%rbp), %xmm0
cvttsd2si %xmm0, %eax
cmpl %eax, -0x2c(%rbp)
je 0x5d460
addsd 0x12058(%rip), %xmm0    # 0x6f4b0
movsd %xmm0, -0x100(%rbp)
movsd -0xd0(%rbp), %xmm0
movsd %xmm0, -0xd8(%rbp)
andq $0x0, -0x70(%rbp)
movq -0x60(%rbp), %rcx
movl 0xdb0(%rcx), %eax
testl %eax, %eax
je 0x5d75e
cvtsi2sdl -0x1b4(%rbp), %xmm0
movsd -0x1b0(%rbp), %xmm1
divsd 0x3421(%rip), %xmm1     # 0x608c0
addsd %xmm0, %xmm1
cvtsi2sd %eax, %xmm0
subsd %xmm0, %xmm1
movsd 0x11ff5(%rip), %xmm0    # 0x6f4a8
ucomisd %xmm1, %xmm0
seta %al
jmp 0x5d760
cmpl $0xf, %ecx
jne 0x5d580
leaq 0x122f7(%rip), %rdi     # 0x6f7c6
pushq $0x52
popq %rsi
callq 0x1a5f7
movl %eax, -0x98(%rbp)
xorl %r14d, %r14d
movl $0x800, %edx            # imm = 0x800
leaq -0xc50(%rbp), %rdi
xorl %esi, %esi
callq 0x8390
pushq $0x4
popq %r13
subl $0x1, %r13d
jb 0x5d591
leaq -0x450(%rbp), %rdi
leaq -0x90(%rbp), %rsi
callq 0x8120
movq -0x90(%rbp), %rsi
movq %rbx, %rdi
callq 0x85c0
movsd 0x33ad(%rip), %xmm0     # 0x608d8
ucomisd (%r15), %xmm0
leaq -0xc50(%rbp), %r12
jbe 0x5d554
leaq -0xc4f(%rbp), %r12
movl -0x30(%rbp), %eax
cmpb %al, -0xc50(%rbp)
je 0x5d554
movl -0x30(%rbp), %eax
movb %al, -0xc50(%rbp)
movslq %r14d, %r14
addq %r14, %r12
movq %rbx, %rdi
callq 0x8290
movq %r12, %rdi
movq %rbx, %rsi
movq %rax, %rdx
callq 0x8360
movq %rbx, %rdi
callq 0x8290
addl %eax, %r14d
jmp 0x5d4f7
leaq -0x90(%rbp), %rsi
callq 0x8120
jmp 0x5d09d
leaq -0xc50(%rbp), %rax
movzbl (%rax), %ecx
movb $0x20, %dl
cmpl $0xa, %ecx
je 0x5d5b4
cmpl $0xd, %ecx
je 0x5d5b4
cmpl $0x44, %ecx
je 0x5d5b2
testl %ecx, %ecx
jne 0x5d5b6
jmp 0x5d5bb
movb $0x65, %dl
movb %dl, (%rax)
incq %rax
jmp 0x5d598
movsd 0x3315(%rip), %xmm0     # 0x608d8
ucomisd (%r15), %xmm0
jbe 0x5d5e3
movl -0x30(%rbp), %eax
movb %al, -0xc50(%rbp)
cmpb $0x20, -0xc4f(%rbp)
jne 0x5d5e3
movb $0x30, -0xc4f(%rbp)
leaq -0xc50(%rbp), %rdi
leaq 0x12054(%rip), %rsi     # 0x6f645
leaq -0x248(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x4c(%rbp), %r8
leaq -0x48(%rbp), %r9
xorl %eax, %eax
pushq -0x58(%rbp)
leaq -0x1d8(%rbp), %r10
pushq %r10
leaq -0x1f0(%rbp), %r10
pushq %r10
leaq -0x208(%rbp), %r10
pushq %r10
pushq -0xa0(%rbp)
leaq -0x1e0(%rbp), %r10
pushq %r10
leaq -0x1f8(%rbp), %r10
pushq %r10
leaq -0x210(%rbp), %r10
pushq %r10
leaq -0x1d0(%rbp), %r10
pushq %r10
leaq -0x1e8(%rbp), %r10
pushq %r10
leaq -0x200(%rbp), %r10
pushq %r10
leaq -0x218(%rbp), %r10
pushq %r10
leaq -0x220(%rbp), %r10
pushq %r10
leaq -0x228(%rbp), %r10
pushq %r10
leaq -0x230(%rbp), %r10
pushq %r10
leaq -0xb8(%rbp), %r10
pushq %r10
leaq -0x40(%rbp), %r10
pushq %r10
leaq -0x44(%rbp), %r10
pushq %r10
callq 0x8600
addq $0x90, %rsp
movsd -0x1d0(%rbp), %xmm0
ucomisd 0x3243(%rip), %xmm0     # 0x608f8
ja 0x5d09d
leaq -0x3c(%rbp), %rdi
callq 0x1a0a1
movl -0x3c(%rbp), %edi
cmpl $0x7d0, %edi            # imm = 0x7D0
jl 0x5d09d
movl -0x4c(%rbp), %esi
movl -0x48(%rbp), %edx
callq 0x19b34
movl %eax, %r12d
cvtsi2sdl -0x44(%rbp), %xmm1
movl %eax, -0x244(%rbp)
cvtsi2sdl -0x40(%rbp), %xmm0
mulsd 0x31af(%rip), %xmm0     # 0x608a8
mulsd 0x31af(%rip), %xmm1     # 0x608b0
addsd %xmm0, %xmm1
addsd -0xb8(%rbp), %xmm1
movsd %xmm1, -0x238(%rbp)
andq $0x0, -0x70(%rbp)
movq -0x60(%rbp), %rcx
movl 0xdb0(%rcx), %eax
cvtsi2sd %r12d, %xmm0
testl %eax, %eax
movsd %xmm1, -0x38(%rbp)
je 0x5d86b
divsd 0x3182(%rip), %xmm1     # 0x608c0
addsd %xmm0, %xmm1
cvtsi2sd %eax, %xmm2
subsd %xmm2, %xmm1
movsd 0x11d56(%rip), %xmm2    # 0x6f4a8
ucomisd %xmm1, %xmm2
seta %al
jmp 0x5d86d
xorl %eax, %eax
movl 0xdb4(%rcx), %ecx
testl %ecx, %ecx
je 0x5d7a0
cvtsi2sdl -0x1b4(%rbp), %xmm0
movsd -0x1b0(%rbp), %xmm1
divsd 0x313e(%rip), %xmm1     # 0x608c0
addsd %xmm0, %xmm1
cvtsi2sd %ecx, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, -0x70(%rbp)
ucomisd 0x329d(%rip), %xmm1     # 0x60a38
seta %cl
jmp 0x5d7a2
xorl %ecx, %ecx
orb %cl, %al
testb $0x1, %al
jne 0x5d09d
movslq -0x38(%rbp), %rcx
movq %rcx, -0x98(%rbp)
imulq $0x18, %rcx, %r14
addq -0xc0(%rbp), %r14
movl -0x1b4(%rbp), %r13d
movsd -0x1b0(%rbp), %xmm0
movsd %xmm0, -0x38(%rbp)
movq %r14, %r12
movq (%r12), %r12
cmpq %r14, %r12
je 0x5d814
leaq 0x10(%r12), %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x8170
testq %rax, %rax
je 0x5d7d9
cmpl %r13d, 0x14(%r12)
jne 0x5d7d9
movsd 0x18(%r12), %xmm0
ucomisd -0x38(%rbp), %xmm0
jne 0x5d7d9
jp 0x5d7d9
jmp 0x5d09d
movq -0x60(%rbp), %rax
movq -0x98(%rbp), %rcx
incl 0x6d8(%rax,%rcx,4)
movsbl -0xc50(%rbp), %edi
movsd -0x150(%rbp), %xmm1
cvttsd2si -0xc8(%rbp), %edx
movl %r13d, %esi
movsd -0x38(%rbp), %xmm0
leaq -0x1b8(%rbp), %rcx
callq 0x1d04a
movl %eax, -0x190(%rbp)
movq %r14, %rdi
leaq -0x1b8(%rbp), %rsi
callq 0x27d30
jmp 0x5d09d
xorl %eax, %eax
movl 0xdb4(%rcx), %ecx
testl %ecx, %ecx
je 0x5d8a2
movsd -0x38(%rbp), %xmm1
divsd 0x303c(%rip), %xmm1     # 0x608c0
addsd %xmm0, %xmm1
cvtsi2sd %ecx, %xmm0
subsd %xmm0, %xmm1
movsd %xmm1, -0x70(%rbp)
ucomisd 0x319b(%rip), %xmm1     # 0x60a38
seta %cl
jmp 0x5d8a4
xorl %ecx, %ecx
orb %cl, %al
testb $0x1, %al
jne 0x5d09d
movq -0x68(%rbp), %r14
movq (%r14), %r14
cmpq -0x68(%rbp), %r14
je 0x5d8ea
leaq 0x10(%r14), %rdi
leaq -0x248(%rbp), %rsi
callq 0x8170
testq %rax, %rax
je 0x5d8b2
cmpl %r12d, 0x14(%r14)
jne 0x5d8b2
movsd 0x20(%r14), %xmm0
ucomisd -0x38(%rbp), %xmm0
jne 0x5d8b2
jp 0x5d8b2
jmp 0x5d09d
movslq -0x98(%rbp), %rax
movq -0x60(%rbp), %rcx
incl 0x6d8(%rcx,%rax,4)
movsbl -0xc50(%rbp), %edi
movl -0x240(%rbp), %edx
xorpd %xmm1, %xmm1
movl %r12d, %esi
movsd -0x38(%rbp), %xmm0
xorl %ecx, %ecx
callq 0x1d04a
movl %eax, -0x240(%rbp)
movq -0x68(%rbp), %rdi
leaq -0x248(%rbp), %rsi
callq 0x27dee
jmp 0x5d09d
leaq -0x450(%rbp), %rdi
callq 0x8130
leaq -0x90(%rbp), %rdi
callq 0x82c0
leaq -0x450(%rbp), %rdi
callq 0x81d0
addq $0x1028, %rsp           # imm = 0x1028
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
jmp 0x5d979
jmp 0x5d979
jmp 0x5d979
jmp 0x5d979
jmp 0x5d979
jmp 0x5d979
movq %rax, %rbx
leaq -0x90(%rbp), %rdi
callq 0x82c0
leaq -0x450(%rbp), %rdi
callq 0x81d0
movq %rbx, %rdi
callq 0x8b30