// File: 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
subq $0x110, %rsp            # imm = 0x110
movq %rsi, -0x90(%rbp)
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x54ac0
cmpq $0x0, %rax
jne 0x5331d
jmp 0x53824
leaq -0x20(%rbp), %rdi
callq 0x54af0
movq -0x88(%rbp), %rdi
addq $0xa0f40, %rdi          # imm = 0xA0F40
callq 0x9ad0
movq -0x18(%rbp), %rdi
callq 0x54b10
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x54b70
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x54b40
testb $0x1, %al
jne 0x53371
jmp 0x53811
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54ba0
movq -0x88(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c00
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x54bd0
testb $0x1, %al
jne 0x533bc
jmp 0x53443
leaq -0x58(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x45160
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x54c30
jmp 0x533e6
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, -0xa0(%rbp)
jmp 0x53409
movq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x54d70
jmp 0x5341b
leaq -0x58(%rbp), %rdi
callq 0x456f0
jmp 0x53803
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x456f0
jmp 0x5382d
leaq -0x38(%rbp), %rdi
callq 0x54dd0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x54ac0
cmpq $0x2, %rax
jae 0x535ad
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xb4(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54df0
movq %rax, %rcx
movl -0xb4(%rbp), %eax
subl 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0xb0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movsd -0xb0(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsd 0x10(%rax), %xmm1
movsd 0x69946(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54df0
movsd -0xa8(%rbp), %xmm0
subsd 0x10(%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movsd 0x6a26b(%rip), %xmm1    # 0xbd788
ucomisd %xmm1, %xmm0
jbe 0x5355e
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, -0xc0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x54e20
jmp 0x535a8
movsd 0x6a21a(%rip), %xmm0    # 0xbd780
ucomisd -0x70(%rbp), %xmm0
jbe 0x535a6
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, -0xc8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x54c30
jmp 0x535a8
jmp 0x53803
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xdc(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54df0
movq %rax, %rcx
movl -0xdc(%rbp), %eax
subl 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0xd8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movsd -0xd8(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsd 0x10(%rax), %xmm1
movsd 0x697fb(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54df0
movsd -0xd0(%rbp), %xmm0
subsd 0x10(%rax), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movsd 0x6a120(%rip), %xmm1    # 0xbd788
ucomisd %xmm1, %xmm0
jbe 0x536ce
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54e60
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, -0xe8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x54e20
jmp 0x53801
movsd 0x6a0aa(%rip), %xmm0    # 0xbd780
ucomisd -0x78(%rbp), %xmm0
jbe 0x537ff
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xfc(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54ea0
movq %rax, %rcx
movl -0xfc(%rbp), %eax
subl 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0xf8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movsd -0xf8(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsd 0x10(%rax), %xmm1
movsd 0x696c7(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xf0(%rbp)
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54ea0
movsd -0xf0(%rbp), %xmm0
subsd 0x10(%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd 0x69fec(%rip), %xmm1    # 0xbd788
ucomisd %xmm1, %xmm0
jbe 0x537fd
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, %rdi
callq 0x54e60
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c90
movq %rax, -0x108(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54c70
movq -0x108(%rbp), %rdi
movq %rax, %rsi
callq 0x54c30
jmp 0x537ff
jmp 0x53801
jmp 0x53803
leaq -0x20(%rbp), %rdi
callq 0x54ee0
jmp 0x5334e
movq -0x88(%rbp), %rdi
addq $0xa0f40, %rdi          # imm = 0xA0F40
callq 0x95a0
addq $0x110, %rsp            # imm = 0x110
popq %rbp
retq
movq -0x60(%rbp), %rdi
callq 0x9d20
nopw %cs:(%rax,%rax)