// File: /workspace/github_cpp_makefile_star2_O3/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 $0x58, %rsp
cmpq $0x0, 0x10(%rdx)
je 0x2c04a
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 0x2c041
leaq 0xa0ee0(%r13), %rbx
addq $0xa0ee8, %r13          # imm = 0xA0EE8
movq %r14, -0x78(%rbp)
movq %r12, -0x38(%rbp)
movq %rbx, -0x40(%rbp)
movq %r13, -0x50(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2d2dc
cmpq %r13, %rax
je 0x2be3b
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 0x2ca74
movq (%rax), %rax
subl 0x14(%rax), %r12d
xorps %xmm0, %xmm0
cvtsi2sd %r12d, %xmm0
mulsd 0x3eae0(%rip), %xmm0    # 0x6a8d0
addsd 0x18(%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r13, %rsi
callq 0x2ca74
movsd -0x30(%rbp), %xmm1
movq (%rax), %rax
subsd 0x18(%rax), %xmm1
cmpq $0x1, %r14
movq %r13, %r12
ja 0x2bece
ucomisd 0x3f998(%rip), %xmm1    # 0x6b7c0
movq -0x50(%rbp), %r13
jbe 0x2bf4b
movq -0x40(%rbp), %rbx
jmp 0x2bf07
leaq -0x68(%rbp), %r14
movq %r14, -0x60(%rbp)
movq %r14, -0x68(%rbp)
movq $0x0, -0x58(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x8640
movq %rax, %r12
leaq 0x10(%r15), %rsi
movq %rax, %rdi
addq $0x10, %rdi
movl $0xf0, %edx
callq 0x84f0
movq %r12, %rdi
movq %r14, %rsi
callq 0x80c0
incq -0x58(%rbp)
movq -0x40(%rbp), %rdi
movq -0x38(%rbp), %rsi
callq 0x2ca74
cmpq %r14, %rax
je 0x2bea1
movq -0x68(%rbp), %rsi
movq %rax, %rdi
movq %r14, %rdx
callq 0x2d6b6
movq -0x68(%rbp), %rdi
cmpq %r14, %rdi
movq -0x50(%rbp), %r13
je 0x2bec1
movq %r14, %rbx
movq (%rdi), %r14
callq 0x85d0
movq %r14, %rdi
cmpq %rbx, %r14
jne 0x2beb1
movq -0x38(%rbp), %r12
movq -0x40(%rbp), %rbx
jmp 0x2c034
ucomisd 0x3f8ea(%rip), %xmm1    # 0x6b7c0
movq -0x50(%rbp), %r13
jbe 0x2bf66
movq -0x40(%rbp), %rbx
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2ca74
movq 0x8(%rax), %r14
decq 0x10(%rax)
movq %r14, %rdi
callq 0x8a50
movq %r14, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2ca74
movq %rax, %r14
movq (%rax), %rax
movq %rax, -0x30(%rbp)
movl $0x100, %edi            # imm = 0x100
callq 0x8640
movq %rax, %r12
leaq 0x10(%rax), %rdi
movl $0xf0, %edx
movq -0x48(%rbp), %rsi
callq 0x84f0
movq %r12, %rdi
movq -0x38(%rbp), %r12
movq -0x30(%rbp), %rsi
jmp 0x2c02b
movsd 0x3f865(%rip), %xmm0    # 0x6b7b8
ucomisd %xmm1, %xmm0
movq -0x40(%rbp), %rbx
ja 0x2bff4
jmp 0x2c034
movsd 0x3f84a(%rip), %xmm0    # 0x6b7b8
ucomisd %xmm1, %xmm0
movq -0x40(%rbp), %rbx
jbe 0x2c034
movl 0x14(%r15), %r14d
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2ca74
movq 0x8(%rax), %rax
subl 0x14(%rax), %r14d
xorps %xmm0, %xmm0
cvtsi2sd %r14d, %xmm0
mulsd 0x3e92d(%rip), %xmm0    # 0x6a8d0
addsd 0x18(%r15), %xmm0
movsd %xmm0, -0x30(%rbp)
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2ca74
movq 0x8(%rax), %rax
movsd -0x30(%rbp), %xmm0
subsd 0x18(%rax), %xmm0
ucomisd 0x3f7f1(%rip), %xmm0    # 0x6b7c0
jbe 0x2c034
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2ca74
movq 0x8(%rax), %r14
decq 0x10(%rax)
movq %r14, %rdi
callq 0x8a50
movq %r14, %rdi
callq 0x85d0
movq %rbx, %rdi
movq %r12, %rsi
callq 0x2ca74
movq %rax, %r14
movl $0x100, %edi            # imm = 0x100
callq 0x8640
movq %rax, %r12
leaq 0x10(%rax), %rdi
movl $0xf0, %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 0x2bda7
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 0x2c075
movq (%rdi), %r15
callq 0x85d0
movq %r15, %rdi
cmpq %r14, %r15
jne 0x2c065
movq %rbx, %rdi
callq 0x8b30
nop