// File: /workspace/github_cpp_makefile_star2_O3/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 0x2c380
movq %rdx, %r14
movq %rsi, %r12
movq %rdi, %r13
addq $0xa0f40, %rdi          # imm = 0xA0F40
movq %rdi, -0x70(%rbp)
callq 0x8900
movq (%r14), %r15
cmpq %r14, %r15
je 0x2c377
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 0x2d8bc
cmpq %r13, %rax
je 0x2c171
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 0x2caf4
movq (%rax), %rax
subl 0x14(%rax), %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd 0x3e7aa(%rip), %xmm0    # 0x6a8d0
addsd 0x20(%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2caf4
movsd -0x30(%rbp), %xmm1
movq (%rax), %rax
subsd 0x20(%rax), %xmm1
cmpq $0x1, %r14
movq %r13, %r12
ja 0x2c204
ucomisd 0x3f662(%rip), %xmm1    # 0x6b7c0
movq -0x50(%rbp), %r13
jbe 0x2c281
movq -0x40(%rbp), %rbx
jmp 0x2c23d
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 0x2caf4
cmpq %r14, %rax
je 0x2c1d7
movq -0x68(%rbp), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x2dc96
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
movq -0x50(%rbp), %r13
je 0x2c1f7
movq %r14, %rbx
movq (%rdi), %r14
callq 0x85d0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2c1e7
movq -0x38(%rbp), %r12
movq -0x40(%rbp), %rbx
jmp 0x2c36a
ucomisd 0x3f5b4(%rip), %xmm1    # 0x6b7c0
movq -0x50(%rbp), %r13
jbe 0x2c29c
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2caf4
movq 0x8(%rax), %r14
decq 0x10(%rax)
movq %r14, %rdi
callq 0x8a50
movq %r14, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2caf4
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 0x2c361
movsd 0x3f52f(%rip), %xmm0    # 0x6b7b8
ucomisd %xmm1, %xmm0
movq -0x40(%rbp), %rbx
ja 0x2c32a
jmp 0x2c36a
movsd 0x3f514(%rip), %xmm0    # 0x6b7b8
ucomisd %xmm1, %xmm0
movq -0x40(%rbp), %rbx
jbe 0x2c36a
movl 0x14(%r15), %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2caf4
movq 0x8(%rax), %rax
subl 0x14(%rax), %r14d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd 0x3e5f7(%rip), %xmm0    # 0x6a8d0
addsd 0x20(%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2caf4
movq 0x8(%rax), %rax
movsd -0x30(%rbp), %xmm0
subsd 0x20(%rax), %xmm0
ucomisd 0x3f4bb(%rip), %xmm0    # 0x6b7c0
jbe 0x2c36a
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2caf4
movq 0x8(%rax), %r14
decq 0x10(%rax)
movq %r14, %rdi
callq 0x8a50
movq %r14, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2caf4
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 0x2c0dd
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 0x2c3ab
movq (%rdi), %r15
callq 0x85d0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x2c39b
movq %rbx, %rdi
callq 0x8b30
nop