// File: DoubleString[P]RtConverter/src/RtConverter/RtConverter.cpp
// Function: bamboo::RtConverter::routineEph()
void RtConverter::routineEph() {
	time_t now;
	int nbyte;
	char cmd[256];
	unsigned char buff[1024];
	sprintf(cmd, ":%d", port);
	strinit(&svr);
	stropen(&svr, STR_TCPSVR, STR_MODE_RW, cmd);
	while (true) {
		/// here to sending the ephemeris
		def_lock(&_mutex);
		std::map<string, list<GPSEPH> >::iterator mapItr_G;
		std::map<string, list<GLSEPH> >::iterator mapItr_R;
		for (mapItr_G = ephqueue_G.begin(); mapItr_G != ephqueue_G.end(); ++mapItr_G) {
			list<GPSEPH>::iterator ephItr;
			for (ephItr = (*mapItr_G).second.begin(); ephItr != (*mapItr_G).second.end(); ++ephItr) {
				memset(buff, 0, sizeof(buff));
				makeupEphBuffer_G(*ephItr, (char*)buff, nbyte);
				strwrite(&svr, buff, nbyte);
			}
		}
		for (mapItr_R = ephqueue_R.begin(); mapItr_R != ephqueue_R.end(); ++mapItr_R) {
			list<GLSEPH>::iterator ephItr;
			for (ephItr = (*mapItr_R).second.begin(); ephItr != (*mapItr_R).second.end(); ++ephItr) {
				memset(buff, 0, sizeof(buff));
				makeupEphBuffer_R(*ephItr, (char*)buff, nbyte);
				strwrite(&svr, buff, nbyte);
			}
		}
		def_unlock(&_mutex);
		sleepms(5000);
	}
	strclose(&svr);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x590, %rsp            # imm = 0x590
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x588(%rbp)
leaq -0x120(%rbp), %rdi
movl 0x8(%rax), %edx
leaq 0x6b59d(%rip), %rsi     # 0xbdc58
movb $0x0, %al
callq 0x9150
movq -0x588(%rbp), %rdi
addq $0x10, %rdi
callq 0x9d310
movq -0x588(%rbp), %rdi
addq $0x10, %rdi
leaq -0x120(%rbp), %rcx
movl $0x3, %edx
movl %edx, %esi
callq 0x9d3f0
movq -0x588(%rbp), %rdi
addq $0xa0f40, %rdi          # imm = 0xA0F40
callq 0x9ad0
leaq -0x528(%rbp), %rdi
callq 0x54f00
leaq -0x530(%rbp), %rdi
callq 0x54f20
movq -0x588(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x54f40
movq %rax, -0x538(%rbp)
movq -0x538(%rbp), %rax
movq %rax, -0x528(%rbp)
movq -0x588(%rbp), %rdi
addq $0xa0ee0, %rdi          # imm = 0xA0EE0
callq 0x547c0
movq %rax, -0x540(%rbp)
leaq -0x528(%rbp), %rdi
leaq -0x540(%rbp), %rsi
callq 0x54f70
testb $0x1, %al
jne 0x52779
jmp 0x52861
leaq -0x548(%rbp), %rdi
callq 0x546b0
leaq -0x528(%rbp), %rdi
callq 0x54990
movq %rax, %rdi
addq $0x20, %rdi
callq 0x546d0
movq %rax, -0x550(%rbp)
movq -0x550(%rbp), %rax
movq %rax, -0x548(%rbp)
leaq -0x528(%rbp), %rdi
callq 0x54990
movq %rax, %rdi
addq $0x20, %rdi
callq 0x54730
movq %rax, -0x558(%rbp)
leaq -0x548(%rbp), %rdi
leaq -0x558(%rbp), %rsi
callq 0x54700
testb $0x1, %al
jne 0x527ea
jmp 0x5284e
leaq -0x520(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x93d0
leaq -0x548(%rbp), %rdi
callq 0x54830
movq -0x588(%rbp), %rdi
movq %rax, %rsi
leaq -0x520(%rbp), %rdx
leaq -0x14(%rbp), %rcx
callq 0x53840
movq -0x588(%rbp), %rdi
addq $0x10, %rdi
leaq -0x520(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xa09c0
leaq -0x548(%rbp), %rdi
callq 0x54aa0
jmp 0x527b2
jmp 0x52850
leaq -0x528(%rbp), %rdi
callq 0x54fa0
jmp 0x52743
movq -0x588(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54fd0
movq %rax, -0x560(%rbp)
movq -0x560(%rbp), %rax
movq %rax, -0x530(%rbp)
movq -0x588(%rbp), %rdi
addq $0xa0f10, %rdi          # imm = 0xA0F10
callq 0x54c00
movq %rax, -0x568(%rbp)
leaq -0x530(%rbp), %rdi
leaq -0x568(%rbp), %rsi
callq 0x55000
testb $0x1, %al
jne 0x528bf
jmp 0x529a7
leaq -0x570(%rbp), %rdi
callq 0x54af0
leaq -0x530(%rbp), %rdi
callq 0x54dd0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x54b10
movq %rax, -0x578(%rbp)
movq -0x578(%rbp), %rax
movq %rax, -0x570(%rbp)
leaq -0x530(%rbp), %rdi
callq 0x54dd0
movq %rax, %rdi
addq $0x20, %rdi
callq 0x54b70
movq %rax, -0x580(%rbp)
leaq -0x570(%rbp), %rdi
leaq -0x580(%rbp), %rsi
callq 0x54b40
testb $0x1, %al
jne 0x52930
jmp 0x52994
leaq -0x520(%rbp), %rdi
xorl %esi, %esi
movl $0x400, %edx            # imm = 0x400
callq 0x93d0
leaq -0x570(%rbp), %rdi
callq 0x54c70
movq -0x588(%rbp), %rdi
movq %rax, %rsi
leaq -0x520(%rbp), %rdx
leaq -0x14(%rbp), %rcx
callq 0x53bf0
movq -0x588(%rbp), %rdi
addq $0x10, %rdi
leaq -0x520(%rbp), %rsi
movl -0x14(%rbp), %edx
callq 0xa09c0
leaq -0x570(%rbp), %rdi
callq 0x54ee0
jmp 0x528f8
jmp 0x52996
leaq -0x530(%rbp), %rdi
callq 0x55030
jmp 0x52889
movq -0x588(%rbp), %rdi
addq $0xa0f40, %rdi          # imm = 0xA0F40
callq 0x95a0
movl $0x1388, %edi           # imm = 0x1388
callq 0x8f910
jmp 0x526f0
nopl (%rax)