// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: parse_cs_time()
void parse_cs_time()
{
double jd;

   if(get_msg_field()) {
      pri_hours = hours = cs_hours = atoi(msg_field);
   }
   if(get_msg_field()) {
      pri_minutes = minutes = cs_minutes = atoi(msg_field);
   }
   if(get_msg_field()) {
      pri_seconds = seconds = cs_seconds = atoi(msg_field);
   }
   pri_frac = 0.0;

   if(have_cs_mjd && cs_mjd) {
      jd = cs_mjd + JD_MJD;
      gregorian(0, jd);
      pri_year = year = g_year;
      pri_month = month = g_month;
      pri_day = day = g_day;
   }
   else {  // no MJD set, get it from system clock
      get_clock_time();   // get system clock time in UTC
      pri_year = year = clk_year;
      pri_month = month = clk_month;
      pri_day = day = clk_day;
   }

   have_cs_time = 1;

   if(timing_mode == TMODE_GPS) {     // convert utc time to gps time
      utc_to_gps();
   }
   else {
      adjust_rcvr_time(0.0);  // incorporarte possibly negative fractional second into time variables
   }

   if(seconds != last_misc_second) {
      update_gps_screen(1006);
   }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
callq 0x810b1
testl %eax, %eax
je 0xa28c6
leaq 0x29919a(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x17812e(%rip), %rcx    # 0x21a9e0
movl %eax, (%rcx)
leaq 0x26ac15(%rip), %rcx    # 0x30d4d0
movl %eax, (%rcx)
leaq 0x26ac44(%rip), %rcx    # 0x30d508
movl %eax, (%rcx)
callq 0x810b1
testl %eax, %eax
je 0xa28f6
leaq 0x29916a(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x178102(%rip), %rcx    # 0x21a9e4
movl %eax, (%rcx)
leaq 0x26abe1(%rip), %rcx    # 0x30d4cc
movl %eax, (%rcx)
leaq 0x26ac10(%rip), %rcx    # 0x30d504
movl %eax, (%rcx)
callq 0x810b1
testl %eax, %eax
je 0xa2926
leaq 0x29913a(%rip), %rdi    # 0x33ba40
callq 0x95e0
leaq 0x1780d6(%rip), %rcx    # 0x21a9e8
movl %eax, (%rcx)
leaq 0x26abad(%rip), %rcx    # 0x30d4c8
movl %eax, (%rcx)
leaq 0x26abdc(%rip), %rcx    # 0x30d500
movl %eax, (%rcx)
leaq 0x26abeb(%rip), %rax    # 0x30d518
movq $0x0, (%rax)
leaq 0x1780c9(%rip), %rax    # 0x21aa04
cmpl $0x0, (%rax)
je 0xa297d
leaq 0x177fb1(%rip), %rax    # 0x21a8f8
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xa2957
jnp 0xa297d
addsd 0x7be69(%rip), %xmm0    # 0x11e7c8
xorl %edi, %edi
callq 0xd12da
leaq 0x26ad33(%rip), %rax    # 0x30d6a0
leaq 0x26ad28(%rip), %rcx    # 0x30d69c
leaq 0x26ad29(%rip), %rdx    # 0x30d6a4
jmp 0xa2997
callq 0xa477
leaq 0x26ad3b(%rip), %rax    # 0x30d6c4
leaq 0x26ad30(%rip), %rcx    # 0x30d6c0
leaq 0x26ad31(%rip), %rdx    # 0x30d6c8
movl (%rdx), %edx
leaq 0x26ab3c(%rip), %rsi    # 0x30d4dc
movl %edx, (%rsi)
leaq 0x26ab6b(%rip), %rsi    # 0x30d514
movl %edx, (%rsi)
movl (%rcx), %ecx
leaq 0x26ab24(%rip), %rdx    # 0x30d4d8
movl %ecx, (%rdx)
leaq 0x26ab53(%rip), %rdx    # 0x30d510
movl %ecx, (%rdx)
movl (%rax), %eax
leaq 0x26ab0c(%rip), %rcx    # 0x30d4d4
movl %eax, (%rcx)
leaq 0x26ab3b(%rip), %rcx    # 0x30d50c
movl %eax, (%rcx)
leaq 0x178026(%rip), %rax    # 0x21aa00
movl $0x1, (%rax)
leaq 0x26aad6(%rip), %rax    # 0x30d4bd
cmpb $0x0, (%rax)
je 0xa29f7
xorpd %xmm0, %xmm0
callq 0x5c7ed
jmp 0xa2a21
leaq 0x26ad2a(%rip), %rax    # 0x30d728
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
callq 0x5c7ed
leaq 0x26aa93(%rip), %rax    # 0x30d4a4
andb $-0x2, (%rax)
leaq 0x26a9b1(%rip), %rax    # 0x30d3cc
movl $0x1, (%rax)
leaq 0x26aaa0(%rip), %rax    # 0x30d4c8
movl (%rax), %eax
cmpl 0xc7940(%rip), %eax     # 0x16a370
jne 0xa2a34
popq %rbp
retq
popq %rbp
jmp 0x730e8