// File: /workspace/github_cpp_makefile_star2_O3/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 %r12
pushq %rbx
subq $0x10, %rsp
leaq 0x1be96d(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movl $0x31, %ebx
cmpq $0x400, %rax            # imm = 0x400
je 0x59fae
cmpq $0x800000, %rax         # imm = 0x800000
je 0x59fae
leaq 0x2b304e(%rip), %rax    # 0x30cfd0
leaq 0x2b304f(%rip), %rcx    # 0x30cfd8
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
movsd (%rax), %xmm2
cmpneqpd %xmm1, %xmm2
cmpneqpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movd %xmm0, %eax
movl $0x30, %ebx
subl %eax, %ebx
leaq 0x1c952f(%rip), %rax    # 0x2234e4
testb $0x2, (%rax)
je 0x59fd1
leaq 0x1c952f(%rip), %rax    # 0x2234f0
movsd (%rax), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x59fd6
jp 0x59fd6
callq 0x5944f
movsd %xmm0, -0x30(%rbp)
movl 0x11059f(%rip), %eax    # 0x16a580
testb $0x4, %al
jne 0x5a0d2
leaq 0x2b36b8(%rip), %rcx    # 0x30d6a8
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
movsd 0xaf061(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b369e(%rip), %rcx    # 0x30d6ac
xorps %xmm2, %xmm2
cvtsi2sdl (%rcx), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b368c(%rip), %rcx    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3682(%rip), %rcx    # 0x30d6b8
addsd (%rcx), %xmm0
testb $0x2, %al
jne 0x5a182
cvttsd2si %xmm0, %r14d
callq 0x597e8
callq 0x59885
leaq 0x1e4eb4(%rip), %rax    # 0x23ef0c
movl (%rax), %r12d
movb $0x0, 0x3161be(%rip)    # 0x370220
leaq 0x3161b7(%rip), %r15    # 0x370220
leaq 0x2b2f70(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
leaq 0xc61f7(%rip), %rsi     # 0x120272
movq %r15, %rdi
movl $0x4d, %edx
movb $0x1, %al
callq 0x9060
subq $0x8, %rsp
leaq 0xc62d9(%rip), %r10     # 0x12036e
leaq 0x2e2184(%rip), %rdi    # 0x33c220
leaq 0xc62f7(%rip), %rsi     # 0x12039a
leaq 0x315f76(%rip), %rcx    # 0x370020
leaq 0x31606f(%rip), %r8     # 0x370120
movl %r14d, %edx
movl %ebx, %r9d
movsd -0x30(%rbp), %xmm0
movb $0x1, %al
pushq %r10
pushq %r15
pushq %r12
callq 0x9060
addq $0x20, %rsp
jmp 0x5a20c
leaq 0x2b35cf(%rip), %rax    # 0x30d6a8
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd 0xaef78(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b35b5(%rip), %rax    # 0x30d6ac
xorps %xmm2, %xmm2
cvtsi2sdl (%rax), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b35a3(%rip), %rax    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3599(%rip), %rax    # 0x30d6b8
addsd (%rax), %xmm0
movsd %xmm0, -0x28(%rbp)
callq 0x597e8
callq 0x59885
leaq 0x1e4dd3(%rip), %rax    # 0x23ef0c
movl (%rax), %r14d
movb $0x0, 0x3160dd(%rip)    # 0x370220
leaq 0x3160d6(%rip), %r15    # 0x370220
leaq 0x2b2e8f(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
leaq 0xc6116(%rip), %rsi     # 0x120272
movq %r15, %rdi
movl $0x4d, %edx
movb $0x1, %al
callq 0x9060
leaq 0xc61fc(%rip), %r10     # 0x12036e
leaq 0x2e20a7(%rip), %rdi    # 0x33c220
leaq 0xc61c7(%rip), %rsi     # 0x120347
jmp 0x5a1df
movsd %xmm0, -0x28(%rbp)
callq 0x597e8
callq 0x59885
leaq 0x1e4d74(%rip), %rax    # 0x23ef0c
movl (%rax), %r14d
movb $0x0, 0x31607e(%rip)    # 0x370220
leaq 0x316077(%rip), %r15    # 0x370220
leaq 0x2b2e30(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm0
leaq 0xc60b7(%rip), %rsi     # 0x120272
movq %r15, %rdi
movl $0x4d, %edx
movb $0x1, %al
callq 0x9060
leaq 0xc619d(%rip), %r10     # 0x12036e
leaq 0x2e2048(%rip), %rdi    # 0x33c220
leaq 0xc6195(%rip), %rsi     # 0x120374
leaq 0x315e3a(%rip), %rdx    # 0x370020
leaq 0x315f33(%rip), %rcx    # 0x370120
movsd -0x28(%rbp), %xmm0
movl %ebx, %r8d
movl %r14d, %r9d
movsd -0x30(%rbp), %xmm1
movb $0x2, %al
pushq %r10
pushq %r15
callq 0x9060
addq $0x10, %rsp
leaq 0x2e200d(%rip), %rdi    # 0x33c220
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x5962f