// File: /workspace/github_cpp_makefile_star2_O2/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 $0x48, %rsp
cmpq $0x0, 0x10(%rdx)
je 0x276b1
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
addq $0xa0f40, %rdi          # imm = 0xA0F40
movq %rdi, -0x70(%rbp)
callq 0x8900
leaq 0xa0f10(%r12), %r15
addq $0xa0f18, %r12          # imm = 0xA0F18
movq %r13, %rbx
movq %r12, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %r13, -0x50(%rbp)
movq (%rbx), %rbx
cmpq %r13, %rbx
je 0x276a8
movq %r15, %rdi
movq %r14, %rsi
callq 0x28e1e
cmpq %r12, %rax
je 0x27559
movq 0x50(%rax), %r13
leaq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
movl 0x14(%rbx), %r12d
movq %r15, %rdi
movq %r14, %rsi
callq 0x27dfe
movq (%rax), %rax
subl 0x14(%rax), %r12d
cvtsi2sd %r12d, %xmm0
mulsd 0x393b0(%rip), %xmm0    # 0x608c0
addsd 0x20(%rbx), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r15, %rdi
movq %r14, %r12
movq %r14, %rsi
callq 0x27dfe
movsd -0x48(%rbp), %xmm1
movq (%rax), %rax
subsd 0x20(%rax), %xmm1
cmpq $0x1, %r13
ja 0x27598
ucomisd 0x3a275(%rip), %xmm1    # 0x617b8
movq -0x50(%rbp), %r13
jbe 0x275e0
movq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r12, %r14
jmp 0x275c3
leaq -0x68(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq %rdi, -0x68(%rbp)
andq $0x0, -0x58(%rbp)
leaq 0x10(%rbx), %rsi
callq 0x27dee
movq %r15, %rdi
movq %r14, %rsi
callq 0x27dfe
movq %rax, %rdi
leaq -0x68(%rbp), %rsi
callq 0x27e68
leaq -0x68(%rbp), %rdi
callq 0x23ad2
jmp 0x274c5
ucomisd 0x3a218(%rip), %xmm1    # 0x617b8
movq -0x50(%rbp), %r13
jbe 0x27602
movq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x27dfe
movq %rax, %rdi
callq 0x27e9e
movq %r15, %rdi
movq %r12, %rsi
callq 0x27dfe
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x27e8e
movq -0x38(%rbp), %r12
jmp 0x274c5
movsd 0x3a1c8(%rip), %xmm0    # 0x617b0
ucomisd %xmm1, %xmm0
movq %r12, %r14
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %r15
jbe 0x274c5
jmp 0x2768c
movsd 0x3a1a6(%rip), %xmm0    # 0x617b0
ucomisd %xmm1, %xmm0
movq %r12, %r14
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %r15
jbe 0x274c5
movl 0x14(%rbx), %r15d
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x27dfe
movq 0x8(%rax), %rax
subl 0x14(%rax), %r15d
cvtsi2sd %r15d, %xmm0
movq -0x30(%rbp), %r15
mulsd 0x39278(%rip), %xmm0    # 0x608c0
addsd 0x20(%rbx), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x27dfe
movq 0x8(%rax), %rax
movsd -0x48(%rbp), %xmm0
subsd 0x20(%rax), %xmm0
ucomisd 0x3a145(%rip), %xmm0    # 0x617b8
jbe 0x274c5
movq %r15, %rdi
movq %r14, %rsi
callq 0x27dfe
movq %rax, %rdi
callq 0x27e9e
movq %r15, %rdi
movq %r14, %rsi
callq 0x27dfe
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x27dee
jmp 0x274c5
movq -0x70(%rbp), %rdi
callq 0x84b0
addq $0x48, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rax, %rbx
leaq -0x68(%rbp), %rdi
callq 0x23ad2
movq %rbx, %rdi
callq 0x8b30