// File: /workspace/github_cpp_makefile_star2_O1/DoubleString[P]RtConverter/src/RtConverter/RtConverter.cpp
// Function: bamboo::RtConverter::inputBrdm_R(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::list<bamboo::GLSEPH, std::allocator<bamboo::GLSEPH>>&)
void RtConverter::inputBrdm_R(string cprn,list<GLSEPH>& list_in) {
	if (list_in.size() == 0) return;
	list<GLSEPH>::iterator ephItr;
	def_lock(&_mutex);
	for (ephItr = list_in.begin(); ephItr != list_in.end(); ++ephItr) {
		map<string, list<GLSEPH> >::iterator mapItr = ephqueue_R.find(cprn);
		if (mapItr == ephqueue_R.end()) {
			list<GLSEPH> ltp;
			ltp.push_back(*ephItr);
			ephqueue_R[cprn] = ltp;
			continue;
		}
		/// only contains 1 value,adapt the position,eg: 0 pos for 2:00,1 pos for 0:00
		if ((*mapItr).second.size() < 2) {
			double dt = ((*ephItr).mjd - ephqueue_R[cprn].front().mjd) * 86400.0 +
				(*ephItr).sod - ephqueue_R[cprn].front().sod;
			if (dt > 0.01)
				ephqueue_R[cprn].push_front(*ephItr);
			else if (dt < -0.01)
				ephqueue_R[cprn].push_back(*ephItr);
			continue;
		}
		/// if contains two value,will check
		double dt = ((*ephItr).mjd - ephqueue_R[cprn].front().mjd) * 86400.0 +
			(*ephItr).sod - ephqueue_R[cprn].front().sod;
		if (dt > 0.01) {
			ephqueue_R[cprn].pop_back();
			ephqueue_R[cprn].push_front(*ephItr);
		}
		else if (dt < -0.01) {
			double dt = ((*ephItr).mjd - ephqueue_R[cprn].back().mjd) * 86400.0 +
				(*ephItr).sod - ephqueue_R[cprn].back().sod;
			if (dt > 0.01) {
				ephqueue_R[cprn].pop_back();
				ephqueue_R[cprn].push_back(*ephItr);
			}
		}
	}
	def_unlock(&_mutex);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x58, %rsp
cmpq $0x0, 0x10(%rdx)
je 0x2c80a
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
addq $0xa0f40, %rdi          # imm = 0xA0F40
movq %rdi, -0x70(%rbp)
callq 0x8910
movq (%r14), %r15
cmpq %r14, %r15
je 0x2c801
leaq 0xa0f10(%r13), %rbx
addq $0xa0f18, %r13          # imm = 0xA0F18
movq %r14, -0x78(%rbp)
movq %r12, -0x38(%rbp)
movq %rbx, -0x40(%rbp)
movq %r13, -0x50(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2dd52
cmpq %r13, %rax
je 0x2c5fb
movq %r12, %r13
movq 0x50(%rax), %r14
leaq 0x10(%r15), %rax
movq %rax, -0x48(%rbp)
movl 0x14(%r15), %r12d
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2cf7e
movq (%rax), %rax
subl 0x14(%rax), %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd 0x3e320(%rip), %xmm0    # 0x6a8d0
addsd 0x20(%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2cf7e
movsd -0x30(%rbp), %xmm1
movq (%rax), %rax
subsd 0x20(%rax), %xmm1
cmpq $0x1, %r14
movq %r13, %r12
ja 0x2c68e
ucomisd 0x3f1d8(%rip), %xmm1    # 0x6b7c0
movq -0x50(%rbp), %r13
jbe 0x2c70b
movq -0x40(%rbp), %rbx
jmp 0x2c6c7
leaq -0x68(%rbp), %r14
movq %r14, -0x60(%rbp)
movq %r14, -0x68(%rbp)
movq $0x0, -0x58(%rbp)
movl $0xa0, %edi
callq 0x8640
movq %rax, %r12
leaq 0x10(%r15), %rsi
movq %rax, %rdi
addq $0x10, %rdi
movl $0x90, %edx
callq 0x84f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x80c0
incq -0x58(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2cf7e
cmpq %r14, %rax
je 0x2c661
movq -0x68(%rbp), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x2e13c
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
movq -0x50(%rbp), %r13
je 0x2c681
movq %r14, %rbx
movq (%rdi), %r14
callq 0x85d0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2c671
movq -0x38(%rbp), %r12
movq -0x40(%rbp), %rbx
jmp 0x2c7f4
ucomisd 0x3f12a(%rip), %xmm1    # 0x6b7c0
movq -0x50(%rbp), %r13
jbe 0x2c726
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2cf7e
movq 0x8(%rax), %r14
decq 0x10(%rax)
movq %r14, %rdi
callq 0x8a60
movq %r14, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2cf7e
movq %rax, %r14
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl $0xa0, %edi
callq 0x8640
movq %rax, %r12
leaq 0x10(%rax), %rdi
movl $0x90, %edx
movq -0x48(%rbp), %rsi
callq 0x84f0
movq %r12, %rdi
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %rsi
jmp 0x2c7eb
movsd 0x3f0a5(%rip), %xmm0    # 0x6b7b8
ucomisd %xmm1, %xmm0
movq -0x40(%rbp), %rbx
ja 0x2c7b4
jmp 0x2c7f4
movsd 0x3f08a(%rip), %xmm0    # 0x6b7b8
ucomisd %xmm1, %xmm0
movq -0x40(%rbp), %rbx
jbe 0x2c7f4
movl 0x14(%r15), %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2cf7e
movq 0x8(%rax), %rax
subl 0x14(%rax), %r14d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd 0x3e16d(%rip), %xmm0    # 0x6a8d0
addsd 0x20(%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2cf7e
movq 0x8(%rax), %rax
movsd -0x30(%rbp), %xmm0
subsd 0x20(%rax), %xmm0
ucomisd 0x3f031(%rip), %xmm0    # 0x6b7c0
jbe 0x2c7f4
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2cf7e
movq 0x8(%rax), %r14
decq 0x10(%rax)
movq %r14, %rdi
callq 0x8a60
movq %r14, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2cf7e
movq %rax, %r14
movl $0xa0, %edi
callq 0x8640
movq %rax, %r12
leaq 0x10(%rax), %rdi
movl $0x90, %edx
movq -0x48(%rbp), %rsi
callq 0x84f0
movq %r12, %rdi
movq -0x38(%rbp), %r12
movq %r14, %rsi
callq 0x80c0
incq 0x10(%r14)
movq (%r15), %r15
cmpq -0x78(%rbp), %r15
jne 0x2c567
movq -0x70(%rbp), %rdi
callq 0x84b0
addq $0x58, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
je 0x2c835
movq (%rdi), %r15
callq 0x85d0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x2c825
movq %rbx, %rdi
callq 0x8b40
nop