// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]RtConverter/src/RtConverter/RtConverter.cpp
// Function: bamboo::RtConverter::inputBrdm_G(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, std::__cxx11::list<bamboo::GPSEPH, std::allocator<bamboo::GPSEPH>>&)
void RtConverter::inputBrdm_G(string cprn, list<GPSEPH>& list_in) {
	if (list_in.size() == 0) return;
	list<GPSEPH>::iterator ephItr;
	def_lock(&_mutex);
	for (ephItr = list_in.begin(); ephItr != list_in.end(); ++ephItr) {
		map<string, list<GPSEPH> >::iterator mapItr = ephqueue_G.find(cprn);
		if (mapItr == ephqueue_G.end()) {
			list<GPSEPH> ltp;
			ltp.push_back(*ephItr);
			ephqueue_G[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_G[cprn].front().mjd) * 86400.0 +
				(*ephItr).sod - ephqueue_G[cprn].front().sod;
			if (dt > 0.01)
				ephqueue_G[cprn].push_front(*ephItr);
			else if(dt < -0.01)
				ephqueue_G[cprn].push_back(*ephItr);
			continue;
		}
		/// if contains two value,will check
		double dt = ((*ephItr).mjd - ephqueue_G[cprn].front().mjd) * 86400.0 +
			(*ephItr).sod - ephqueue_G[cprn].front().sod;
		if (dt > 0.01) {
			ephqueue_G[cprn].pop_back();
			ephqueue_G[cprn].push_front(*ephItr);
		}else if (dt < -0.01) {
			double dt = ((*ephItr).mjd - ephqueue_G[cprn].back().mjd) * 86400.0 +
				(*ephItr).sod - ephqueue_G[cprn].back().sod;
			if (dt > 0.01) {
				ephqueue_G[cprn].pop_back();
				ephqueue_G[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 0x2744f
movq %rdx, %r13
movq %rsi, %r14
movq %rdi, %r12
addq $0xa0f40, %rdi          # imm = 0xA0F40
movq %rdi, -0x70(%rbp)
callq 0x8900
leaq 0xa0ee0(%r12), %r15
addq $0xa0ee8, %r12          # imm = 0xA0EE8
movq %r13, %rbx
movq %r12, -0x38(%rbp)
movq %r15, -0x30(%rbp)
movq %r13, -0x50(%rbp)
movq (%rbx), %rbx
cmpq %r13, %rbx
je 0x27446
movq %r15, %rdi
movq %r14, %rsi
callq 0x2871e
cmpq %r12, %rax
je 0x272f7
movq 0x50(%rax), %r13
leaq 0x10(%rbx), %rax
movq %rax, -0x40(%rbp)
movl 0x14(%rbx), %r12d
movq %r15, %rdi
movq %r14, %rsi
callq 0x27d40
movq (%rax), %rax
subl 0x14(%rax), %r12d
cvtsi2sd %r12d, %xmm0
mulsd 0x39612(%rip), %xmm0    # 0x608c0
addsd 0x18(%rbx), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r15, %rdi
movq %r14, %r12
movq %r14, %rsi
callq 0x27d40
movsd -0x48(%rbp), %xmm1
movq (%rax), %rax
subsd 0x18(%rax), %xmm1
cmpq $0x1, %r13
ja 0x27336
ucomisd 0x3a4d7(%rip), %xmm1    # 0x617b8
movq -0x50(%rbp), %r13
jbe 0x2737e
movq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r12, %r14
jmp 0x27361
leaq -0x68(%rbp), %rdi
movq %rdi, -0x60(%rbp)
movq %rdi, -0x68(%rbp)
andq $0x0, -0x58(%rbp)
leaq 0x10(%rbx), %rsi
callq 0x27d30
movq %r15, %rdi
movq %r14, %rsi
callq 0x27d40
movq %rax, %rdi
leaq -0x68(%rbp), %rsi
callq 0x27daa
leaq -0x68(%rbp), %rdi
callq 0x23af6
jmp 0x27263
ucomisd 0x3a47a(%rip), %xmm1    # 0x617b8
movq -0x50(%rbp), %r13
jbe 0x273a0
movq -0x30(%rbp), %r15
movq %r15, %rdi
movq %r12, %r14
movq %r12, %rsi
callq 0x27d40
movq %rax, %rdi
callq 0x27de0
movq %r15, %rdi
movq %r12, %rsi
callq 0x27d40
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x27dd0
movq -0x38(%rbp), %r12
jmp 0x27263
movsd 0x3a42a(%rip), %xmm0    # 0x617b0
ucomisd %xmm1, %xmm0
movq %r12, %r14
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %r15
jbe 0x27263
jmp 0x2742a
movsd 0x3a408(%rip), %xmm0    # 0x617b0
ucomisd %xmm1, %xmm0
movq %r12, %r14
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %r15
jbe 0x27263
movl 0x14(%rbx), %r15d
movq -0x30(%rbp), %rdi
movq %r14, %rsi
callq 0x27d40
movq 0x8(%rax), %rax
subl 0x14(%rax), %r15d
cvtsi2sd %r15d, %xmm0
movq -0x30(%rbp), %r15
mulsd 0x394da(%rip), %xmm0    # 0x608c0
addsd 0x18(%rbx), %xmm0
movsd %xmm0, -0x48(%rbp)
movq %r15, %rdi
movq %r14, %rsi
callq 0x27d40
movq 0x8(%rax), %rax
movsd -0x48(%rbp), %xmm0
subsd 0x18(%rax), %xmm0
ucomisd 0x3a3a7(%rip), %xmm0    # 0x617b8
jbe 0x27263
movq %r15, %rdi
movq %r14, %rsi
callq 0x27d40
movq %rax, %rdi
callq 0x27de0
movq %r15, %rdi
movq %r14, %rsi
callq 0x27d40
movq %rax, %rdi
movq -0x40(%rbp), %rsi
callq 0x27d30
jmp 0x27263
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 0x23af6
movq %rbx, %rdi
callq 0x8b30