// File: /workspace/github_cpp_makefile_star2_O1/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
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movq %rcx, -0x40(%rbp)
movq %rdx, %r14
movq %rsi, %r12
movsbl (%rsi), %esi
leaq 0x3f505(%rip), %rdi     # 0x6bd68
callq 0x1db90
movl %eax, -0x2c(%rbp)
movl 0x4(%r12), %edi
movsd 0x8(%r12), %xmm0
subq $0x8, %rsp
leaq -0x48(%rbp), %rax
leaq -0x54(%rbp), %r13
leaq -0x50(%rbp), %rbx
leaq -0x4c(%rbp), %r15
leaq -0x34(%rbp), %r8
leaq -0x30(%rbp), %r9
movq %r13, %rsi
movq %rbx, %rdx
movq %r15, %rcx
pushq %rax
callq 0x1d2d2
addq $0x10, %rsp
movq %r14, %rdi
callq 0x8290
leaq (%rax,%r14), %rdi
movl (%r13), %ecx
movl (%rbx), %r8d
movl (%r15), %r9d
leaq -0x34(%rbp), %rax
movl (%rax), %r10d
leaq -0x48(%rbp), %rax
cvttsd2si (%rax), %r11d
leaq -0x30(%rbp), %rax
movl (%rax), %ebx
movsd 0x10(%r12), %xmm0
movsd 0x18(%r12), %xmm1
movsd 0x20(%r12), %xmm2
subq $0x8, %rsp
leaq 0x3f3f7(%rip), %rsi     # 0x6bce9
movq %r12, %rdx
movb $0x3, %al
pushq %r11
pushq %rbx
pushq %r10
callq 0x8120
addq $0x20, %rsp
movq %r14, %rdi
callq 0x8290
movl 0x28(%r12), %ecx
xorps %xmm0, %xmm0
cvtsi2sd %rcx, %xmm0
leaq (%rax,%r14), %rdi
movsd 0x30(%r12), %xmm1
movsd 0x38(%r12), %xmm2
movsd 0x40(%r12), %xmm3
leaq 0x3f3e8(%rip), %r13     # 0x6bd22
movq %r13, %rsi
movb $0x4, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
leaq (%rax,%r14), %rdi
movsd 0x48(%r12), %xmm0
movsd 0x50(%r12), %xmm1
movsd 0x58(%r12), %xmm2
movsd 0x60(%r12), %xmm3
movq %r13, %rsi
movb $0x4, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
leaq (%rax,%r14), %rdi
movsd 0x68(%r12), %xmm0
movsd 0x70(%r12), %xmm1
movsd 0x78(%r12), %xmm2
movsd 0x80(%r12), %xmm3
movq %r13, %rsi
movb $0x4, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
leaq (%rax,%r14), %rdi
movsd 0x88(%r12), %xmm0
movsd 0x90(%r12), %xmm1
movsd 0x98(%r12), %xmm2
movsd 0xa0(%r12), %xmm3
movq %r13, %rsi
movb $0x4, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
leaq (%rax,%r14), %rdi
movsd 0xa8(%r12), %xmm0
movsd 0xb0(%r12), %xmm1
movsd 0xb8(%r12), %xmm2
movsd 0xc0(%r12), %xmm3
movq %r13, %rsi
movb $0x4, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
leaq (%rax,%r14), %rdi
movsd 0xc8(%r12), %xmm0
movsd 0xd0(%r12), %xmm1
movsd 0xd8(%r12), %xmm2
xorl %eax, %eax
movl -0x2c(%rbp), %ebx
cmpl $0x3, %ebx
setne %al
movsd 0xe0(%r12,%rax,8), %xmm3
movq %r13, %rsi
movb $0x4, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
addq %r14, %rax
cmpl $0x2, %ebx
jne 0x2ca9b
leaq 0x3f2be(%rip), %rsi     # 0x6bd45
movsd 0x3f1f1(%rip), %xmm0    # 0x6bc80
movq %rax, %rdi
movb $0x1, %al
callq 0x8120
jmp 0x2cab2
leaq 0x3f2b1(%rip), %rsi     # 0x6bd53
xorps %xmm0, %xmm0
xorps %xmm1, %xmm1
movq %rax, %rdi
movb $0x2, %al
callq 0x8120
movq %r14, %rdi
callq 0x8290
movq -0x40(%rbp), %rcx
movl %eax, (%rcx)
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop