// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathgps.cpp
// Function: send_gga()
void send_gga()
{
char valid;
double dop;

   // send NMEA GPGGA sentence
   // !!!!!! we should handle GLONASS/GALILEO/BEIDOU

   valid = '0';
   if     (rcvr_type == NO_RCVR)   valid = '1';
   else if(rcvr_type == TIDE_RCVR) valid = '1';
   else if(lat || lon)             valid = '1';

   if((have_dops & HDOP) && hdop) dop = (double) hdop;
   else dop = (double) average_dop();  // calculate a composite DOP value

// gregorian(0, jd_utc);
   if(echo_fmt & ECHO_MSECS) {
      sprintf(out, "GPGGA,%010.3f,%s,%s,%c,%d,%.1f,%s,%s,,",
         nmea_time(),nmea_lat(),nmea_lon(),valid,sat_count,dop,nmea_alt(),"0.0,M");
   }
   else if(echo_fmt & ECHO_HSECS) {
      sprintf(out, "GPGGA,%09.2f,%s,%s,%c,%d,%.1f,%s,%s,,",
         nmea_time(),nmea_lat(),nmea_lon(),valid,sat_count,dop,nmea_alt(),"0.0,M");
   }
   else {
      sprintf(out, "GPGGA,%06d,%s,%s,%c,%d,%.1f,%s,%s,,",
         (int) nmea_time(),nmea_lat(),nmea_lon(),valid,sat_count,dop,nmea_alt(),"0.0,M");
   }

   echo_nmea_string(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
subq $0x18, %rsp
leaq 0x1af9ae(%rip), %rax    # 0x2028d0
movq (%rax), %rax
pushq $0x31
popq %rbx
cmpq $0x400, %rax            # imm = 0x400
je 0x52f69
cmpq $0x800000, %rax         # imm = 0x800000
je 0x52f69
leaq 0x2a4091(%rip), %rax    # 0x2f6fd0
leaq 0x2a4092(%rip), %rcx    # 0x2f6fd8
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
movsd (%rax), %xmm2
cmpneqpd %xmm1, %xmm2
cmpneqpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movd %xmm0, %eax
pushq $0x30
popq %rbx
subl %eax, %ebx
leaq 0x1ba574(%rip), %rax    # 0x20d4e4
testb $0x2, (%rax)
je 0x52f8c
leaq 0x1ba574(%rip), %rax    # 0x20d4f0
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x52f91
jp 0x52f91
callq 0x52755
movsd %xmm0, -0x28(%rbp)
movl 0x1015e3(%rip), %r14d   # 0x154580
testb $0x4, %r14b
jne 0x5301f
callq 0x52a38
testb $0x2, %r14b
jne 0x53060
cvttsd2si %xmm0, %r14d
callq 0x52aba
callq 0x52b54
leaq 0x1d5f44(%rip), %rax    # 0x228f0c
movl (%rax), %r15d
callq 0x52bec
subq $0x8, %rsp
leaq 0xb72db(%rip), %r10     # 0x10a2b6
leaq 0x30723e(%rip), %r11    # 0x35a220
leaq 0x2d3237(%rip), %rdi    # 0x326220
leaq 0xb72f2(%rip), %rsi     # 0x10a2e2
leaq 0x307029(%rip), %rcx    # 0x35a020
leaq 0x307122(%rip), %r8     # 0x35a120
movl %r14d, %edx
movl %ebx, %r9d
movsd -0x28(%rbp), %xmm0
movb $0x1, %al
pushq %r10
pushq %r11
pushq %r15
callq 0x9060
addq $0x20, %rsp
jmp 0x530c5
callq 0x52a38
movsd %xmm0, -0x20(%rbp)
callq 0x52aba
callq 0x52b54
leaq 0x1d5ed2(%rip), %rax    # 0x228f0c
movl (%rax), %r14d
callq 0x52bec
leaq 0xb726d(%rip), %r10     # 0x10a2b6
leaq 0x3071d0(%rip), %r11    # 0x35a220
leaq 0x2d31c9(%rip), %rdi    # 0x326220
leaq 0xb7231(%rip), %rsi     # 0x10a28f
jmp 0x5309a
movsd %xmm0, -0x20(%rbp)
callq 0x52aba
callq 0x52b54
leaq 0x1d5e96(%rip), %rax    # 0x228f0c
movl (%rax), %r14d
callq 0x52bec
leaq 0xb7231(%rip), %r10     # 0x10a2b6
leaq 0x307194(%rip), %r11    # 0x35a220
leaq 0x2d318d(%rip), %rdi    # 0x326220
leaq 0xb7222(%rip), %rsi     # 0x10a2bc
leaq 0x306f7f(%rip), %rdx    # 0x35a020
leaq 0x307078(%rip), %rcx    # 0x35a120
movsd -0x20(%rbp), %xmm0
movl %ebx, %r8d
movl %r14d, %r9d
movsd -0x28(%rbp), %xmm1
movb $0x2, %al
pushq %r10
pushq %r11
callq 0x9060
popq %rcx
popq %rdx
leaq 0x2d3154(%rip), %rdi    # 0x326220
addq $0x18, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x52935