// File: DoubleString[P]RtConverter/src/RtConverter/RtConverter.cpp
// Function: bamboo::RtConverter::makeupEphBuffer_G(bamboo::GPSEPH&, char*, int&)
void RtConverter::makeupEphBuffer_G(GPSEPH& gpsEph, char* buffin, int& nbyte) {
	int iy, im, id, ih, imin, isys;
	double sec;
	isys = index_string(SYS, gpsEph.cprn[0]);
	mjd2date(gpsEph.mjd, gpsEph.sod, &iy, &im, &id, &ih, &imin, &sec);
	sprintf(buffin + strlen(buffin),"%3s %04d %02d %02d %02d %02d %02d%19.12e%19.12e%19.12e\r\n", gpsEph.cprn, iy, im, id, ih, imin, (int)sec, gpsEph.a0,
		gpsEph.a1, gpsEph.a2);
	sprintf(buffin + strlen(buffin),"    %19.12e%19.12e%19.12e%19.12e\r\n",(double)gpsEph.aode, gpsEph.crs, gpsEph.dn, gpsEph.m0);
	sprintf(buffin + strlen(buffin),"    %19.12e%19.12e%19.12e%19.12e\r\n", gpsEph.cuc, gpsEph.e, gpsEph.cus, gpsEph.roota);
	sprintf(buffin + strlen(buffin),"    %19.12e%19.12e%19.12e%19.12e\r\n", gpsEph.toe, gpsEph.cic, gpsEph.omega0, gpsEph.cis);
	sprintf(buffin + strlen(buffin),"    %19.12e%19.12e%19.12e%19.12e\r\n", gpsEph.i0, gpsEph.crc, gpsEph.omega, gpsEph.omegadot);
	sprintf(buffin + strlen(buffin),"    %19.12e%19.12e%19.12e%19.12e\r\n", gpsEph.idot, gpsEph.resvd0, gpsEph.week, gpsEph.resvd1);
	sprintf(buffin + strlen(buffin),"    %19.12e%19.12e%19.12e%19.12e\r\n", gpsEph.accu, gpsEph.hlth, gpsEph.tgd, SYS[isys] == 'C' ? gpsEph.tgd1 : gpsEph.aodc);
	if (SYS[isys] == 'E')
		sprintf(buffin + strlen(buffin), "    %19.12e\r\n",9.999e8);
	else
		sprintf(buffin + strlen(buffin), "    %19.12e%19.12e\r\n", 0.0, 0.0);
	nbyte = strlen(buffin);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xd0, %rsp
movq %rdi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
movq %rdx, -0x18(%rbp)
movq %rcx, -0x20(%rbp)
movq -0x10(%rbp), %rax
movsbl (%rax), %esi
leaq 0x6a4cf(%rip), %rdi     # 0xbdd38
callq 0x340b0
movl %eax, -0x38(%rbp)
movq -0x10(%rbp), %rax
movl 0x4(%rax), %edi
movsd 0x8(%rax), %xmm0
movq %rsp, %rax
leaq -0x40(%rbp), %rcx
movq %rcx, (%rax)
leaq -0x24(%rbp), %rsi
leaq -0x28(%rbp), %rdx
leaq -0x2c(%rbp), %rcx
leaq -0x30(%rbp), %r8
leaq -0x34(%rbp), %r9
callq 0x33420
movq -0x18(%rbp), %rdi
movq %rdi, -0x98(%rbp)
callq 0x92e0
movq -0x98(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rdx
movl -0x24(%rbp), %ecx
movl -0x28(%rbp), %r8d
movl -0x2c(%rbp), %r9d
movl -0x30(%rbp), %esi
movl -0x34(%rbp), %r10d
cvttsd2si -0x40(%rbp), %r11d
movsd 0x10(%rdx), %xmm0
movsd 0x18(%rdx), %xmm1
movsd 0x20(%rdx), %xmm2
movq %rsp, %rax
movl %r11d, 0x10(%rax)
movl %r10d, 0x8(%rax)
movl %esi, (%rax)
leaq 0x6a3c0(%rip), %rsi     # 0xbdcb9
movb $0x3, %al
callq 0x9150
movq -0x18(%rbp), %rdi
movq %rdi, -0x90(%rbp)
callq 0x92e0
movq -0x90(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rax
movl 0x28(%rax), %eax
cvtsi2sd %rax, %xmm0
movq -0x10(%rbp), %rax
movsd 0x30(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x38(%rax), %xmm2
movq -0x10(%rbp), %rax
movsd 0x40(%rax), %xmm3
leaq 0x6a3aa(%rip), %rsi     # 0xbdcf2
movb $0x4, %al
callq 0x9150
movq -0x18(%rbp), %rax
movq %rax, -0x88(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0x88(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rax
movsd 0x48(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x50(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x58(%rax), %xmm2
movq -0x10(%rbp), %rax
movsd 0x60(%rax), %xmm3
leaq 0x6a35a(%rip), %rsi     # 0xbdcf2
movb $0x4, %al
callq 0x9150
movq -0x18(%rbp), %rax
movq %rax, -0x80(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0x80(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rax
movsd 0x68(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x70(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x78(%rax), %xmm2
movq -0x10(%rbp), %rax
movsd 0x80(%rax), %xmm3
leaq 0x6a30d(%rip), %rsi     # 0xbdcf2
movb $0x4, %al
callq 0x9150
movq -0x18(%rbp), %rax
movq %rax, -0x78(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0x78(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rax
movsd 0x88(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0x90(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0x98(%rax), %xmm2
movq -0x10(%rbp), %rax
movsd 0xa0(%rax), %xmm3
leaq 0x6a2b7(%rip), %rsi     # 0xbdcf2
movb $0x4, %al
callq 0x9150
movq -0x18(%rbp), %rax
movq %rax, -0x70(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0x70(%rbp), %rdi
addq %rax, %rdi
movq -0x10(%rbp), %rax
movsd 0xa8(%rax), %xmm0
movq -0x10(%rbp), %rax
movsd 0xb0(%rax), %xmm1
movq -0x10(%rbp), %rax
movsd 0xb8(%rax), %xmm2
movq -0x10(%rbp), %rax
movsd 0xc0(%rax), %xmm3
leaq 0x6a261(%rip), %rsi     # 0xbdcf2
movb $0x4, %al
callq 0x9150
movq -0x18(%rbp), %rax
movq %rax, -0x68(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq %rax, %rcx
movq -0x68(%rbp), %rax
addq %rcx, %rax
movq %rax, -0x60(%rbp)
movq -0x10(%rbp), %rax
movsd 0xc8(%rax), %xmm0
movsd %xmm0, -0x58(%rbp)
movq -0x10(%rbp), %rax
movsd 0xd0(%rax), %xmm0
movsd %xmm0, -0x50(%rbp)
movq -0x10(%rbp), %rax
movsd 0xd8(%rax), %xmm0
movsd %xmm0, -0x48(%rbp)
movslq -0x38(%rbp), %rcx
leaq 0x6a243(%rip), %rax     # 0xbdd38
movsbl (%rax,%rcx), %eax
cmpl $0x43, %eax
jne 0x53b14
movq -0x10(%rbp), %rax
movsd 0xe0(%rax), %xmm0
movsd %xmm0, -0xa0(%rbp)
jmp 0x53b28
movq -0x10(%rbp), %rax
movsd 0xe8(%rax), %xmm0
movsd %xmm0, -0xa0(%rbp)
movsd -0x48(%rbp), %xmm2
movsd -0x50(%rbp), %xmm1
movsd -0x58(%rbp), %xmm0
movq -0x60(%rbp), %rdi
movsd -0xa0(%rbp), %xmm3
leaq 0x6a1a8(%rip), %rsi     # 0xbdcf2
movb $0x4, %al
callq 0x9150
movslq -0x38(%rbp), %rcx
leaq 0x6a1dc(%rip), %rax     # 0xbdd38
movsbl (%rax,%rcx), %eax
cmpl $0x45, %eax
jne 0x53b9b
movq -0x18(%rbp), %rax
movq %rax, -0xa8(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0xa8(%rbp), %rdi
addq %rax, %rdi
leaq 0x6a18b(%rip), %rsi     # 0xbdd15
movsd 0x6a0be(%rip), %xmm0    # 0xbdc50
movb $0x1, %al
callq 0x9150
jmp 0x53bcd
movq -0x18(%rbp), %rax
movq %rax, -0xb0(%rbp)
movq -0x18(%rbp), %rdi
callq 0x92e0
movq -0xb0(%rbp), %rdi
addq %rax, %rdi
leaq 0x6a163(%rip), %rsi     # 0xbdd23
xorps %xmm1, %xmm1
movaps %xmm1, %xmm0
movb $0x2, %al
callq 0x9150
movq -0x18(%rbp), %rdi
callq 0x92e0
movl %eax, %ecx
movq -0x20(%rbp), %rax
movl %ecx, (%rax)
addq $0xd0, %rsp
popq %rbp
retq
nopw (%rax,%rax)