// File: 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
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 0x54680
cmpq $0x0, %rax
jne 0x52dbd
jmp 0x532c4
leaq -0x20(%rbp), %rdi
callq 0x546b0
movq -0x88(%rbp), %rdi
addq $0xa0f40, %rdi          # imm = 0xA0F40
callq 0x9ad0
movq -0x18(%rbp), %rdi
callq 0x546d0
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x18(%rbp), %rdi
callq 0x54730
movq %rax, -0x30(%rbp)
leaq -0x20(%rbp), %rdi
leaq -0x30(%rbp), %rsi
callq 0x54700
testb $0x1, %al
jne 0x52e11
jmp 0x532b1
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54760
movq -0x88(%rbp), %rdi
movq %rax, -0x38(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x547c0
movq %rax, -0x40(%rbp)
leaq -0x38(%rbp), %rdi
leaq -0x40(%rbp), %rsi
callq 0x54790
testb $0x1, %al
jne 0x52e5c
jmp 0x52ee3
leaq -0x58(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x45140
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0x98(%rbp), %rdi
movq %rax, %rsi
callq 0x547f0
jmp 0x52e86
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, -0xa0(%rbp)
jmp 0x52ea9
movq -0xa0(%rbp), %rdi
leaq -0x58(%rbp), %rsi
callq 0x54930
jmp 0x52ebb
leaq -0x58(%rbp), %rdi
callq 0x45710
jmp 0x532a3
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0x60(%rbp)
movl %eax, -0x64(%rbp)
leaq -0x58(%rbp), %rdi
callq 0x45710
jmp 0x532cd
leaq -0x38(%rbp), %rdi
callq 0x54990
movq %rax, %rdi
addq $0x20, %rdi
callq 0x54680
cmpq $0x2, %rax
jae 0x5304d
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xb4(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x549b0
movq %rax, %rcx
movl -0xb4(%rbp), %eax
subl 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0xb0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movsd -0xb0(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsd 0x8(%rax), %xmm1
movsd 0x69ea6(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xa8(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x549b0
movsd -0xa8(%rbp), %xmm0
subsd 0x8(%rax), %xmm0
movsd %xmm0, -0x70(%rbp)
movsd -0x70(%rbp), %xmm0
movsd 0x6a7cb(%rip), %xmm1    # 0xbd788
ucomisd %xmm1, %xmm0
jbe 0x52ffe
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, -0xc0(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0xc0(%rbp), %rdi
movq %rax, %rsi
callq 0x549e0
jmp 0x53048
movsd 0x6a77a(%rip), %xmm0    # 0xbd780
ucomisd -0x70(%rbp), %xmm0
jbe 0x53046
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, -0xc8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0xc8(%rbp), %rdi
movq %rax, %rsi
callq 0x547f0
jmp 0x53048
jmp 0x532a3
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xdc(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x549b0
movq %rax, %rcx
movl -0xdc(%rbp), %eax
subl 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0xd8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movsd -0xd8(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsd 0x8(%rax), %xmm1
movsd 0x69d5b(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xd0(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x549b0
movsd -0xd0(%rbp), %xmm0
subsd 0x8(%rax), %xmm0
movsd %xmm0, -0x78(%rbp)
movsd -0x78(%rbp), %xmm0
movsd 0x6a680(%rip), %xmm1    # 0xbd788
ucomisd %xmm1, %xmm0
jbe 0x5316e
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x54a20
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, -0xe8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0xe8(%rbp), %rdi
movq %rax, %rsi
callq 0x549e0
jmp 0x532a1
movsd 0x6a60a(%rip), %xmm0    # 0xbd780
ucomisd -0x78(%rbp), %xmm0
jbe 0x5329f
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movl 0x4(%rax), %eax
movl %eax, -0xfc(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x54a60
movq %rax, %rcx
movl -0xfc(%rbp), %eax
subl 0x4(%rcx), %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, -0xf8(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movsd -0xf8(%rbp), %xmm0
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
movsd 0x8(%rax), %xmm1
movsd 0x69c27(%rip), %xmm2    # 0xbce20
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd %xmm0, -0xf0(%rbp)
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x54a60
movsd -0xf0(%rbp), %xmm0
subsd 0x8(%rax), %xmm0
movsd %xmm0, -0x80(%rbp)
movsd -0x80(%rbp), %xmm0
movsd 0x6a54c(%rip), %xmm1    # 0xbd788
ucomisd %xmm1, %xmm0
jbe 0x5329d
movq -0x90(%rbp), %rsi
movq -0x88(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, %rdi
callq 0x54a20
movq -0x88(%rbp), %rdi
movq -0x90(%rbp), %rsi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54850
movq %rax, -0x108(%rbp)
leaq -0x20(%rbp), %rdi
callq 0x54830
movq -0x108(%rbp), %rdi
movq %rax, %rsi
callq 0x547f0
jmp 0x5329f
jmp 0x532a1
jmp 0x532a3
leaq -0x20(%rbp), %rdi
callq 0x54aa0
jmp 0x52dee
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)