// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/Rnxobs/RtRinexStream.cpp
// Function: bamboo::RtRinexStream::m_routinue()
void RtRinexStream::m_routinue() {
	time_t tt;
	/// open first
	int curmjd,mjd,isat;
	double sod;
	list<string>::iterator sitr;
	list<RtConverter*>::iterator convItr;
	vector<RnxobsFile_sat*>::iterator rnxItr;
	RnxobsFile_sat* rnx;
	list<GPSEPH> eph_g;
	list<GLSEPH> eph_r;
	for (sitr = configs_sav.post_stalist.begin(); sitr != configs_sav.post_stalist.end(); sitr++) {
		rnx = new RnxobsFile_sat(*sitr);
		m_rnxs.push_back(rnx);
	}
	mOacs = new RnxEphFileAdapter();
	mjd = configs_sav.mjd0;
	sod = configs_sav.sod0;
	while (lcont) {
		time(&tt);
		if (tt - lastCheck > 5) {
			lastCheck = tt;
			m_adaptConfigures();
		}
		/// open observation here
		for (rnxItr = m_rnxs.begin(); rnxItr != m_rnxs.end(); rnxItr++) {
			if (!(*rnxItr)->v_isOpen()) {
				(*rnxItr)->v_openRnx(toString(mjd) + ":" + toString(sod));
			}
			(*rnxItr)->v_readEpoch(mjd, sod);
		}
		/// open brdm here 
		if(!mOacs->v_isOpen())
			mOacs->v_openRnxEph(toString(mjd) + ":" + toString(sod));
		/// will update to the main thread
		RtConvItem curitem = m_makeupItems(mjd,sod,m_rnxs);
		for (convItr = m_svrs.begin(); convItr != m_svrs.end(); convItr++) {
			if(((*convItr)->getType() == RtConverter::ConvType::obsbnc || (*convItr)->getType() == RtConverter::ConvType::obsbin) && curitem.obslist.size() > 0)
				(*convItr)->inputObs(curitem);
		}
		/// got brdm here
		for (isat = 0; isat < configs_sav.nprn; isat++) {
			if (configs_sav.cprn[isat][0] == 'R') {
				eph_r.clear();
				if (m_makeupEph_R(eph_r,configs_sav.cprn[isat], mjd, sod)) {
					for (convItr = m_svrs.begin(); convItr != m_svrs.end(); convItr++) {
						if ((*convItr)->getType() == RtConverter::ConvType::eph) 
							(*convItr)->inputBrdm_R(configs_sav.cprn[isat],eph_r);
					}
				}
			}
			else {
				eph_g.clear();
				if (m_makeupEph_G(eph_g,configs_sav.cprn[isat], mjd, sod)) {
					for (convItr = m_svrs.begin(); convItr != m_svrs.end(); convItr++) {
						if ((*convItr)->getType() == RtConverter::ConvType::eph)
							(*convItr)->inputBrdm_G(configs_sav.cprn[isat],eph_g);
					}
				}
			}
		}
		curmjd = mjd;
		timinc(mjd, sod, configs_sav.dintv, &mjd, &sod);
		if (curmjd != mjd) {
			for (rnxItr = m_rnxs.begin(); rnxItr != m_rnxs.end();rnxItr++) {
				(*rnxItr)->v_closeRnx();
				(*rnxItr)->v_closeOutFile();
			}
			mOacs->v_closeRnxEph();
		}
		if ((mjd - configs_sav.mjd1) * 86400.0 + sod - configs_sav.sod1 >= 0.0)
			break;
		sleepms(NINT(configs_sav.dintv * 1000/configs_sav.speed));
	}
	for (rnxItr = m_rnxs.begin(); rnxItr != m_rnxs.end(); rnxItr++) {
		delete (*rnxItr);
	}
	m_rnxs.clear();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x1c8, %rsp            # imm = 0x1C8
leaq -0x78(%rbp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
movq %rdi, -0x38(%rbp)
leaq -0x60(%rbp), %rax
movq %rax, 0x8(%rax)
movq %rax, (%rax)
andq $0x0, 0x10(%rax)
leaq 0x67aed(%rip), %r15     # 0x89b60
leaq -0x1f0(%rbp), %r14
leaq -0x80(%rbp), %rbx
movq %r15, %r13
movq (%r13), %r13
cmpq %r15, %r13
je 0x220c8
movl $0xba48, %edi           # imm = 0xBA48
callq 0x8630
movq %rax, %r12
leaq 0x10(%r13), %rsi
movq %r14, %rdi
callq 0x8870
movq %r12, %rdi
movq %r14, %rsi
callq 0x1f554
movq %r12, -0x80(%rbp)
movq %r14, %rdi
callq 0x82c0
movq -0x38(%rbp), %rdi
movq %rbx, %rsi
callq 0x22d2e
jmp 0x22081
movl $0xfd8, %edi            # imm = 0xFD8
callq 0x8630
movq %rax, %r14
movq %rax, %rdi
callq 0x5c634
movq -0x38(%rbp), %rax
movq %r14, 0x18(%rax)
movq %rax, %r14
movl 0x65e7a(%rip), %eax     # 0x87f68
leaq -0x2c(%rbp), %rcx
movl %eax, (%rcx)
movsd 0x65e7c(%rip), %xmm0    # 0x87f78
leaq -0x40(%rbp), %rax
movsd %xmm0, (%rax)
leaq 0x28(%r14), %rbx
leaq -0x110(%rbp), %r12
cmpb $0x1, 0x20(%r14)
jne 0x22512
leaq -0x88(%rbp), %rdi
callq 0x85b0
movq -0x88(%rbp), %rax
movq %rax, %rcx
subq 0x40(%r14), %rcx
cmpq $0x6, %rcx
jl 0x22146
movq %rax, 0x40(%r14)
movq %r14, %rdi
callq 0x2266c
movq (%r14), %r14
movq -0x38(%rbp), %rax
cmpq 0x8(%rax), %r14
je 0x2220e
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x28(%rax)
testl %eax, %eax
jne 0x221f4
movq (%r14), %r15
movq %r12, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x22d52
leaq -0xd0(%rbp), %rdi
movq %r12, %rsi
leaq 0x4d038(%rip), %rdx     # 0x6f1c0
callq 0xe884
leaq -0xf0(%rbp), %r12
movq %r12, %rdi
leaq -0x40(%rbp), %rsi
callq 0x22dc5
leaq -0x1d0(%rbp), %r13
movq %r13, %rdi
leaq -0xd0(%rbp), %rsi
movq %r12, %rdx
callq 0x21cbd
movq (%r15), %rax
movq %r15, %rdi
movq %r13, %rsi
callq *0x10(%rax)
movq %r13, %rdi
callq 0x82c0
leaq -0xf0(%rbp), %rdi
callq 0x82c0
leaq -0xd0(%rbp), %rdi
callq 0x82c0
leaq -0x110(%rbp), %r12
movq %r12, %rdi
callq 0x82c0
movq (%r14), %rdi
movq (%rdi), %rax
leaq -0x2c(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq *0x18(%rax)
addq $0x8, %r14
jmp 0x22149
movq -0x38(%rbp), %r14
movq 0x18(%r14), %rdi
movq (%rdi), %rax
callq *0x38(%rax)
testb %al, %al
jne 0x222b2
movq %r12, %r15
movq 0x18(%r14), %r12
movq %r15, %rdi
leaq -0x2c(%rbp), %rsi
callq 0x22d52
leaq -0xd0(%rbp), %rdi
movq %r15, %rsi
leaq 0x4cf78(%rip), %rdx     # 0x6f1c0
callq 0xe884
leaq -0xf0(%rbp), %r13
movq %r13, %rdi
leaq -0x40(%rbp), %rsi
callq 0x22dc5
leaq -0x1b0(%rbp), %r15
movq %r15, %rdi
leaq -0xd0(%rbp), %rsi
movq %r13, %rdx
callq 0x21cbd
movq (%r12), %rax
movq %r12, %rdi
movq %r15, %rsi
callq *0x40(%rax)
movq %r15, %rdi
callq 0x82c0
leaq -0xf0(%rbp), %rdi
callq 0x82c0
leaq -0xd0(%rbp), %rdi
callq 0x82c0
leaq -0x110(%rbp), %rdi
callq 0x82c0
movl -0x2c(%rbp), %edx
movsd -0x40(%rbp), %xmm0
leaq -0xd0(%rbp), %rdi
movq %r14, %rcx
callq 0x22892
movq %rbx, %r14
movq (%r14), %r14
cmpq %rbx, %r14
je 0x222f6
movq 0x10(%r14), %rdi
cmpl $0x1, 0x4(%rdi)
ja 0x222cc
cmpq $0x0, -0x90(%rbp)
je 0x222cc
leaq -0xd0(%rbp), %rsi
callq 0x26a60
jmp 0x222cc
xorl %ecx, %ecx
leaq -0x150(%rbp), %r15
leaq -0x130(%rbp), %r13
movslq 0x65ca7(%rip), %rax     # 0x87fb4
cmpq %rax, %rcx
jge 0x2242e
movq %rcx, -0x48(%rbp)
movq %rcx, %rax
shlq $0x5, %rax
leaq 0x65c40(%rip), %rcx     # 0x87f68
leaq (%rax,%rcx), %r12
addq $0x6b0, %r12            # imm = 0x6B0
movq (%r12), %rax
cmpb $0x52, (%rax)
jne 0x223b1
leaq -0x60(%rbp), %rdi
callq 0x22e3a
movq %r15, %rdi
movq %r12, %rsi
callq 0x8870
movl -0x2c(%rbp), %ecx
movsd -0x40(%rbp), %xmm0
movq -0x38(%rbp), %rdi
leaq -0x60(%rbp), %rsi
movq %r15, %rdx
callq 0x22b64
movq %r15, %rdi
movq %rbx, %r13
callq 0x82c0
movq (%r13), %r13
cmpq %rbx, %r13
je 0x22422
movq 0x10(%r13), %r15
cmpl $0x2, 0x4(%r15)
jne 0x22373
leaq -0x190(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x8870
movq %r15, %rdi
movq %r14, %rsi
leaq -0x60(%rbp), %rdx
callq 0x27472
movq %r14, %rdi
jmp 0x2236e
leaq -0x78(%rbp), %rdi
callq 0x22e5c
movq %r13, %rdi
movq %r12, %rsi
callq 0x8870
movl -0x2c(%rbp), %ecx
movsd -0x40(%rbp), %xmm0
movq -0x38(%rbp), %rdi
leaq -0x78(%rbp), %rsi
movq %r13, %rdx
callq 0x22bec
movq %r13, %rdi
movq %rbx, %r13
callq 0x82c0
movq (%r13), %r13
cmpq %rbx, %r13
je 0x22422
movq 0x10(%r13), %r15
cmpl $0x2, 0x4(%r15)
jne 0x223e8
leaq -0x170(%rbp), %r14
movq %r14, %rdi
movq %r12, %rsi
callq 0x8870
movq %r15, %rdi
movq %r14, %rsi
leaq -0x78(%rbp), %rdx
callq 0x27210
movq %r14, %rdi
jmp 0x223e3
movq -0x48(%rbp), %rcx
incq %rcx
jmp 0x222f8
movl -0x2c(%rbp), %r12d
movsd -0x40(%rbp), %xmm0
movsd 0x65b51(%rip), %xmm1    # 0x87f90
movl %r12d, %edi
leaq -0x2c(%rbp), %rsi
leaq -0x40(%rbp), %rdx
callq 0x19d26
movq -0x38(%rbp), %r14
cmpl -0x2c(%rbp), %r12d
je 0x22490
movq (%r14), %r14
movq -0x38(%rbp), %rax
cmpq 0x8(%rax), %r14
je 0x2247e
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x20(%rax)
movq (%r14), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
addq $0x8, %r14
jmp 0x2245c
movq -0x38(%rbp), %r14
movq 0x18(%r14), %rdi
movq (%rdi), %rax
callq *0x48(%rax)
movl -0x2c(%rbp), %r12d
subl 0x65ad5(%rip), %r12d    # 0x87f6c
cvtsi2sd %r12d, %xmm0
mulsd 0x3e41c(%rip), %xmm0    # 0x608c0
addsd -0x40(%rbp), %xmm0
subsd 0x65acf(%rip), %xmm0    # 0x87f80
xorpd %xmm2, %xmm2
ucomisd %xmm2, %xmm0
jae 0x22506
movsd 0x65acd(%rip), %xmm0    # 0x87f90
mulsd 0x3ef9d(%rip), %xmm0    # 0x61468
cvtsi2sdl 0x65a9d(%rip), %xmm1 # 0x87f70
divsd %xmm1, %xmm0
xorl %eax, %eax
ucomisd %xmm2, %xmm0
seta %al
leaq 0x3f551(%rip), %rcx     # 0x61a38
addsd (%rcx,%rax,8), %xmm0
cvttsd2si %xmm0, %edi
callq 0x47c59
leaq -0xb8(%rbp), %rdi
callq 0x23a3a
jmp 0x22108
leaq -0xb8(%rbp), %rdi
callq 0x23a3a
movq (%r14), %rbx
cmpq 0x8(%r14), %rbx
je 0x2252f
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x22529
movq (%rdi), %rax
callq *0x8(%rax)
addq $0x8, %rbx
jmp 0x22515
movq (%r14), %rax
cmpq %rax, %rbx
je 0x2253b
movq %rax, 0x8(%r14)
leaq -0x60(%rbp), %rdi
callq 0x23ad2
leaq -0x78(%rbp), %rdi
callq 0x23af6
addq $0x1c8, %rsp            # imm = 0x1C8
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq %r14, %rdi
jmp 0x225a4
jmp 0x2264f
movq %rax, %rbx
leaq -0x1b0(%rbp), %rdi
jmp 0x225c2
jmp 0x225ce
jmp 0x225df
jmp 0x225f0
jmp 0x2264f
jmp 0x2264f
jmp 0x2264f
movq %rax, %rbx
jmp 0x225a1
movq %rax, %rbx
leaq -0x1f0(%rbp), %rdi
callq 0x82c0
movq %r12, %rdi
callq 0x85d0
jmp 0x22652
jmp 0x2263e
jmp 0x2264f
movq %rax, %rbx
leaq -0x1d0(%rbp), %rdi
callq 0x82c0
jmp 0x225d1
jmp 0x2264f
movq %rax, %rbx
leaq -0xf0(%rbp), %rdi
callq 0x82c0
jmp 0x225e2
movq %rax, %rbx
leaq -0xd0(%rbp), %rdi
callq 0x82c0
jmp 0x225f3
movq %rax, %rbx
leaq -0x110(%rbp), %rdi
callq 0x82c0
jmp 0x22652
movq %rax, %rbx
leaq -0x170(%rbp), %rdi
jmp 0x22633
jmp 0x2263e
movq %rax, %rbx
leaq -0x190(%rbp), %rdi
jmp 0x22633
jmp 0x2263e
movq %rax, %rbx
leaq -0x130(%rbp), %rdi
jmp 0x22633
movq %rax, %rbx
leaq -0x150(%rbp), %rdi
callq 0x82c0
jmp 0x22641
jmp 0x2263e
jmp 0x2263e
movq %rax, %rbx
leaq -0xb8(%rbp), %rdi
callq 0x23a3a
jmp 0x22652
movq %rax, %rbx
leaq -0x60(%rbp), %rdi
callq 0x23ad2
leaq -0x78(%rbp), %rdi
callq 0x23af6
movq %rbx, %rdi
callq 0x8b30