// File: DoubleString[P]eph_converter/src/main.cpp
// Function: main
int main(int argc,char* args[]){
	B2b b2b;
	if(argc < 10){
		printUsages();
		exit(1);
	}
	b2b.lbdtime = false;
	for(int iargc= 0;iargc < argc;iargc++){
		if(strstr(args[iargc],"-bdtime"))
			b2b.lbdtime = true;
		if(strstr(args[iargc],"-help")){
			printUsages();
			exit(1);
		}
	}
	int iyear,imon,iday,ihour,imin;
	double dsec,dseslen;
	string obsfile,ephfile;
	iyear=atoi(args[1]);
	imon=atoi(args[2]);
	iday=atoi(args[3]);
	ihour=atoi(args[4]);
	imin=atoi(args[5]);
	dsec=atof(args[6]);
	dseslen = atof(args[7]);
	obsfile=string(args[8]);
	b2b.mjd0 = md_julday(iyear,imon,iday);
	b2b.sod0 = ihour * 3600.0 + imin * 60.0 + dsec;
	timinc(b2b.mjd0,b2b.sod0,dseslen,&b2b.mjd1,&b2b.sod1);
	b2b.nav.navfilename=string(args[9]);
	strcpy(b2b.File,obsfile.c_str());

	b2b.m_process();
	return 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0xeb0, %rsp            # imm = 0xEB0
movl $0x0, -0x4(%rbp)
movl %edi, -0x8(%rbp)
movq %rsi, -0x10(%rbp)
leaq -0xda0(%rbp), %rdi
callq 0x3750
cmpl $0xa, -0x8(%rbp)
jge 0x16873
callq 0x16800
jmp 0x16852
movl $0x1, %edi
callq 0x3360
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xda8(%rbp)
movl %eax, -0xdac(%rbp)
jmp 0x16bf1
movl $0x0, -0xd98(%rbp)
movl $0x0, -0xdb0(%rbp)
movl -0xdb0(%rbp), %eax
cmpl -0x8(%rbp), %eax
jge 0x16902
movq -0x10(%rbp), %rax
movslq -0xdb0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1b8b(%rip), %rsi      # 0x18433
callq 0x30c0
cmpq $0x0, %rax
je 0x168bd
movl $0x1, -0xd98(%rbp)
movq -0x10(%rbp), %rax
movslq -0xdb0(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
leaq 0x1b68(%rip), %rsi      # 0x1843b
callq 0x30c0
cmpq $0x0, %rax
je 0x168ef
callq 0x16800
jmp 0x168e5
movl $0x1, %edi
callq 0x3360
jmp 0x168f1
movl -0xdb0(%rbp), %eax
addl $0x1, %eax
movl %eax, -0xdb0(%rbp)
jmp 0x16887
leaq -0xdf8(%rbp), %rdi
callq 0x33e0
leaq -0xe18(%rbp), %rdi
callq 0x33e0
movq -0x10(%rbp), %rax
movq 0x8(%rax), %rdi
callq 0x3440
movl %eax, -0xdb4(%rbp)
movq -0x10(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3440
movl %eax, -0xdb8(%rbp)
movq -0x10(%rbp), %rax
movq 0x18(%rax), %rdi
callq 0x3440
movl %eax, -0xdbc(%rbp)
movq -0x10(%rbp), %rax
movq 0x20(%rax), %rdi
callq 0x3440
movl %eax, -0xdc0(%rbp)
movq -0x10(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3440
movl %eax, -0xdc4(%rbp)
movq -0x10(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3380
movsd %xmm0, -0xdd0(%rbp)
movq -0x10(%rbp), %rax
movq 0x38(%rax), %rdi
callq 0x3380
movsd %xmm0, -0xdd8(%rbp)
movq -0x10(%rbp), %rax
movq 0x40(%rax), %rax
movq %rax, -0xe78(%rbp)
leaq -0xe39(%rbp), %rdi
movq %rdi, -0xe70(%rbp)
callq 0x34e0
movq -0xe78(%rbp), %rsi
movq -0xe70(%rbp), %rdx
leaq -0xe38(%rbp), %rdi
callq 0x33d0
jmp 0x169e1
leaq -0xdf8(%rbp), %rdi
leaq -0xe38(%rbp), %rsi
movq %rsi, -0xe88(%rbp)
callq 0x3370
movq -0xe88(%rbp), %rdi
callq 0x31c0
leaq -0xe39(%rbp), %rdi
callq 0x3310
movl -0xdb4(%rbp), %edi
movl -0xdb8(%rbp), %esi
movl -0xdbc(%rbp), %edx
callq 0x14480
movl %eax, -0xe7c(%rbp)
jmp 0x16a32
movl -0xe7c(%rbp), %eax
movl %eax, -0xda0(%rbp)
cvtsi2sdl -0xdc0(%rbp), %xmm0
cvtsi2sdl -0xdc4(%rbp), %xmm1
movsd 0x5ba(%rip), %xmm2      # 0x17010
mulsd %xmm2, %xmm1
movsd 0x5a6(%rip), %xmm2      # 0x17008
mulsd %xmm2, %xmm0
addsd %xmm1, %xmm0
movsd -0xdd0(%rbp), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, -0xd90(%rbp)
movl -0xda0(%rbp), %edi
movsd -0xd90(%rbp), %xmm0
movsd -0xdd8(%rbp), %xmm1
leaq -0xd9c(%rbp), %rsi
leaq -0xd88(%rbp), %rdx
callq 0x15590
jmp 0x16aa9
movq -0x10(%rbp), %rax
movq 0x48(%rax), %rax
movq %rax, -0xe98(%rbp)
leaq -0xe61(%rbp), %rdi
movq %rdi, -0xe90(%rbp)
callq 0x34e0
movq -0xe98(%rbp), %rsi
movq -0xe90(%rbp), %rdx
leaq -0xe60(%rbp), %rdi
callq 0x33d0
jmp 0x16ae7
leaq -0x680(%rbp), %rdi
leaq -0xe60(%rbp), %rsi
movq %rsi, -0xea8(%rbp)
callq 0x3370
movq -0xea8(%rbp), %rdi
callq 0x31c0
leaq -0xe61(%rbp), %rdi
callq 0x3310
leaq -0x458(%rbp), %rax
movq %rax, -0xea0(%rbp)
leaq -0xdf8(%rbp), %rdi
callq 0x3130
movq -0xea0(%rbp), %rdi
movq %rax, %rsi
callq 0x3270
leaq -0xda0(%rbp), %rdi
callq 0x41f0
jmp 0x16b50
movl $0x0, -0x4(%rbp)
leaq -0xe18(%rbp), %rdi
callq 0x31c0
leaq -0xdf8(%rbp), %rdi
callq 0x31c0
leaq -0xda0(%rbp), %rdi
callq 0x16c10
movl -0x4(%rbp), %eax
addq $0xeb0, %rsp            # imm = 0xEB0
popq %rbp
retq
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xda8(%rbp)
movl %eax, -0xdac(%rbp)
leaq -0xe39(%rbp), %rdi
callq 0x3310
jmp 0x16bd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xda8(%rbp)
movl %eax, -0xdac(%rbp)
jmp 0x16bd9
movq %rax, %rcx
movl %edx, %eax
movq %rcx, -0xda8(%rbp)
movl %eax, -0xdac(%rbp)
leaq -0xe61(%rbp), %rdi
callq 0x3310
leaq -0xe18(%rbp), %rdi
callq 0x31c0
leaq -0xdf8(%rbp), %rdi
callq 0x31c0
leaq -0xda0(%rbp), %rdi
callq 0x16c10
movq -0xda8(%rbp), %rdi
callq 0x34d0
nopl (%rax)