// File: /workspace/github_cpp_makefile_star2_O2/DoubleString[P]eph_converter/src/B2bDecoder.cpp
// Function: B2b::m_loadorbclk()
void B2b::m_loadorbclk(){
	string line;
	ifstream in;
	int iyear,imon,iday,ih,imin,iv,nsat;
	double dsec;
	in.open(File, ios::in | ios::binary);
	if (!in.is_open()) {
		cout << "***ERROR(m_loadorbclk):can't open file " << File << endl;
		exit(1);
	}
	cout << "start reading file..." << endl;
	while (!in.eof()) {
		getline(in, line);
		if (!len_trim(line.c_str()))
			continue;
		if (strstr(line.c_str(), "> ORBIT") != nullptr) {
			orbit orb_epoch;
			sscanf(line.c_str(),"%*s%*s%d%d%d%d%d%lf%d%d",&iyear,&imon,&iday,&ih,&imin,&dsec,&iv,&nsat);
			orb_epoch.mjd = md_julday(iyear,imon,iday);
			orb_epoch.sod = ih * 3600.0 + imin * 60.0 + dsec;
			if(lbdtime){ timinc(orb_epoch.mjd,orb_epoch.sod,14,&orb_epoch.mjd,&orb_epoch.sod);}
			for(int it = 0;it < nsat;it++){
				getline(in,line);
				sat_orb orb;
				sscanf(line.c_str(),"%s%d%lf%lf%lf%lf%lf%lf",orb.cprn,&orb.iode,orb.orb,orb.orb+1,orb.orb+2,orb.orb+3,
						orb.orb+4,orb.orb+5);
				orb_epoch.ORB[orb.cprn] = orb;
			}
			ORB_ALL.push_back(orb_epoch);
		}
		if(strstr(line.c_str(),"> CLOCK") != nullptr){
			clk clk_epoch;
			sscanf(line.c_str(),"%*s%*s%d%d%d%d%d%lf%d%d",&iyear,&imon,&iday,&ih,&imin,&dsec,&iv,&nsat);
			clk_epoch.mjd = md_julday(iyear,imon,iday);
			clk_epoch.sod = ih * 3600.0 + imin * 60.0 + dsec;
			if(lbdtime){ timinc(clk_epoch.mjd,clk_epoch.sod,14,&clk_epoch.mjd,&clk_epoch.sod);}
			for(int it = 0;it < nsat;it++){
				getline(in,line);
				sat_clk clk;
				sscanf(line.c_str(),"%s%d%lf%lf%lf",clk.cprn,&clk.iode,clk.clk,clk.clk + 1,clk.clk + 2);
				clk_epoch.CLK[clk.cprn] = clk;
			}
			CLK_ALL.push_back(clk_epoch);
		}
	}
	in.close();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x308, %rsp            # imm = 0x308
movq %rdi, %r14
leaq -0xe8(%rbp), %rax
movq %rax, -0x10(%rax)
andq $0x0, -0x8(%rax)
movb $0x0, (%rax)
leaq -0x330(%rbp), %rdi
callq 0x32e0
leaq 0x948(%r14), %rbx
leaq -0x330(%rbp), %rdi
pushq $0xc
popq %rdx
movq %rbx, %rsi
callq 0x31b0
leaq -0x2b8(%rbp), %rdi
callq 0x30c0
testb %al, %al
je 0x3ca4
movq 0xe75e(%rip), %rdi      # 0x11fd8
leaq 0x8843(%rip), %rsi      # 0xc0c4
callq 0x3280
movq %rax, %rdi
callq 0x3170
leaq 0xd48(%r14), %rax
movq %rax, -0x108(%rbp)
movq %r14, -0xa0(%rbp)
leaq 0xd60(%r14), %rax
movq %rax, -0x100(%rbp)
leaq -0xf8(%rbp), %r14
leaq -0xd8(%rbp), %r12
leaq -0x128(%rbp), %r13
leaq -0x41(%rbp), %rbx
movq -0x330(%rbp), %rax
movq -0x18(%rax), %rax
testb $0x2, -0x310(%rbp,%rax)
jne 0x3c6e
leaq -0x330(%rbp), %rdi
movq %r14, %rsi
callq 0x3080
movq -0xf8(%rbp), %rdi
callq 0xad99
testl %eax, %eax
je 0x38ca
movq -0xf8(%rbp), %r15
movq %r15, %rdi
leaq 0x87c7(%rip), %rsi      # 0xc0da
callq 0x30b0
testq %rax, %rax
je 0x3ad4
andl $0x0, -0x80(%rbp)
andq $0x0, -0x78(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rax, -0x68(%rbp)
andq $0x0, -0x60(%rbp)
movq %r15, %rdi
leaq 0x879d(%rip), %rsi      # 0xc0e2
leaq -0x40(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x34(%rbp), %r9
xorl %eax, %eax
leaq -0x2c(%rbp), %r10
pushq %r10
leaq -0x54(%rbp), %r10
pushq %r10
leaq -0x50(%rbp), %r10
pushq %r10
leaq -0x30(%rbp), %r10
pushq %r10
callq 0x3270
addq $0x20, %rsp
movl -0x40(%rbp), %edi
movl -0x3c(%rbp), %esi
movl -0x38(%rbp), %edx
callq 0xa4d0
cvtsi2sdl -0x34(%rbp), %xmm0
cvtsi2sdl -0x30(%rbp), %xmm1
mulsd 0x8670(%rip), %xmm1     # 0xc008
mulsd 0x8670(%rip), %xmm0     # 0xc010
addsd %xmm1, %xmm0
addsd -0x50(%rbp), %xmm0
movl %eax, -0x98(%rbp)
movsd %xmm0, -0x90(%rbp)
movq -0xa0(%rbp), %rcx
cmpl $0x0, 0x8(%rcx)
je 0x39e1
movl %eax, %edi
movsd 0x864a(%rip), %xmm1     # 0xc018
leaq -0x98(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0xb032
xorl %r15d, %r15d
cmpl -0x2c(%rbp), %r15d
jge 0x3aae
leaq -0x330(%rbp), %rdi
movq %r14, %rsi
callq 0x3080
movq -0xf8(%rbp), %rdi
leaq 0x86ef(%rip), %rsi      # 0xc0fa
movq %r12, %rdx
leaq -0xd4(%rbp), %rcx
leaq -0xd0(%rbp), %r8
leaq -0xc8(%rbp), %r9
xorl %eax, %eax
leaq -0xa8(%rbp), %r10
pushq %r10
leaq -0xb0(%rbp), %r10
pushq %r10
leaq -0xb8(%rbp), %r10
pushq %r10
leaq -0xc0(%rbp), %r10
pushq %r10
callq 0x3270
addq $0x20, %rsp
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3110
leaq -0x88(%rbp), %rdi
movq %r13, %rsi
callq 0x5162
movq -0xa8(%rbp), %rcx
movq %rcx, 0x30(%rax)
movupd -0xd8(%rbp), %xmm0
movupd -0xc8(%rbp), %xmm1
movups -0xb8(%rbp), %xmm2
movups %xmm2, 0x20(%rax)
movupd %xmm1, 0x10(%rax)
movupd %xmm0, (%rax)
movq %r13, %rdi
callq 0x3150
incl %r15d
jmp 0x39e4
movq -0x108(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x51cc
leaq -0x88(%rbp), %rdi
callq 0x55fe
movq -0xf8(%rbp), %r15
movq %r15, %rdi
leaq 0x8633(%rip), %rsi      # 0xc111
callq 0x30b0
testq %rax, %rax
je 0x38ca
andl $0x0, -0x80(%rbp)
andq $0x0, -0x78(%rbp)
leaq -0x80(%rbp), %rax
movq %rax, -0x70(%rbp)
movq %rax, -0x68(%rbp)
andq $0x0, -0x60(%rbp)
movq %r15, %rdi
leaq 0x85d2(%rip), %rsi      # 0xc0e2
leaq -0x40(%rbp), %rdx
leaq -0x3c(%rbp), %rcx
leaq -0x38(%rbp), %r8
leaq -0x34(%rbp), %r9
xorl %eax, %eax
leaq -0x2c(%rbp), %r10
pushq %r10
leaq -0x54(%rbp), %r10
pushq %r10
leaq -0x50(%rbp), %r10
pushq %r10
leaq -0x30(%rbp), %r10
pushq %r10
callq 0x3270
addq $0x20, %rsp
movl -0x40(%rbp), %edi
movl -0x3c(%rbp), %esi
movl -0x38(%rbp), %edx
callq 0xa4d0
cvtsi2sdl -0x34(%rbp), %xmm0
cvtsi2sdl -0x30(%rbp), %xmm1
mulsd 0x84a5(%rip), %xmm1     # 0xc008
mulsd 0x84a5(%rip), %xmm0     # 0xc010
addsd %xmm1, %xmm0
addsd -0x50(%rbp), %xmm0
movl %eax, -0x98(%rbp)
movsd %xmm0, -0x90(%rbp)
movq -0xa0(%rbp), %rcx
cmpl $0x0, 0x8(%rcx)
je 0x3bac
movl %eax, %edi
movsd 0x847f(%rip), %xmm1     # 0xc018
leaq -0x98(%rbp), %rsi
leaq -0x90(%rbp), %rdx
callq 0xb032
xorl %r15d, %r15d
cmpl -0x2c(%rbp), %r15d
jge 0x3c4a
leaq -0x330(%rbp), %rdi
movq %r14, %rsi
callq 0x3080
movq -0xf8(%rbp), %rdi
subq $0x8, %rsp
leaq 0x853f(%rip), %rsi      # 0xc119
movq %r12, %rdx
leaq -0xd4(%rbp), %rcx
leaq -0xd0(%rbp), %r8
leaq -0xc8(%rbp), %r9
xorl %eax, %eax
leaq -0xc0(%rbp), %r10
pushq %r10
callq 0x3270
popq %rcx
popq %rdx
movq %r13, %rdi
movq %r12, %rsi
movq %rbx, %rdx
callq 0x3110
leaq -0x88(%rbp), %rdi
movq %r13, %rsi
callq 0x5208
movupd -0xd8(%rbp), %xmm0
movupd -0xc8(%rbp), %xmm1
movupd %xmm1, 0x10(%rax)
movupd %xmm0, (%rax)
movq %r13, %rdi
callq 0x3150
incl %r15d
jmp 0x3baf
movq -0x100(%rbp), %rdi
leaq -0x98(%rbp), %rsi
callq 0x5272
leaq -0x88(%rbp), %rdi
callq 0x5676
jmp 0x38ca
leaq -0x330(%rbp), %rdi
callq 0x3090
leaq -0x330(%rbp), %rdi
callq 0x30e0
leaq -0xf8(%rbp), %rdi
callq 0x3150
addq $0x308, %rsp            # imm = 0x308
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0xe32d(%rip), %rdi      # 0x11fd8
leaq 0x83ea(%rip), %rsi      # 0xc09c
callq 0x3280
movq %rax, %rdi
movq %rbx, %rsi
callq 0x3280
movq %rax, %rdi
callq 0x3170
pushq $0x1
popq %rdi
callq 0x3320
movq %rax, %rbx
jmp 0x3d34
jmp 0x3cdd
jmp 0x3cf5
jmp 0x3d19
movq %rax, %rbx
jmp 0x3d28
movq %rax, %rbx
leaq -0x128(%rbp), %rdi
callq 0x3150
jmp 0x3cf8
jmp 0x3cf5
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x5676
jmp 0x3d28
jmp 0x3d19
movq %rax, %rbx
leaq -0x128(%rbp), %rdi
callq 0x3150
jmp 0x3d1c
movq %rax, %rbx
leaq -0x88(%rbp), %rdi
callq 0x55fe
leaq -0x330(%rbp), %rdi
callq 0x30e0
leaq -0xf8(%rbp), %rdi
callq 0x3150
movq %rbx, %rdi
callq 0x3490