// File: 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
subq $0xa0, %rsp
movb $0x30, -0x1(%rbp)
leaq 0x1fb78a(%rip), %rax    # 0x277ab0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x7c335
movb $0x31, -0x1(%rbp)
jmp 0x7c381
leaq 0x1fb774(%rip), %rax    # 0x277ab0
cmpq $0x800000, (%rax)       # imm = 0x800000
jne 0x7c34b
movb $0x31, -0x1(%rbp)
jmp 0x7c37f
leaq 0x2efe5e(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7c379
jp 0x7c379
leaq 0x2efe50(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7c379
jp 0x7c379
jmp 0x7c37d
movb $0x31, -0x1(%rbp)
jmp 0x7c37f
jmp 0x7c381
leaq 0x20633c(%rip), %rax    # 0x2826c4
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7c3bc
leaq 0x206337(%rip), %rax    # 0x2826d0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x7c3aa
jp 0x7c3aa
jmp 0x7c3bc
leaq 0x20631f(%rip), %rax    # 0x2826d0
movsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
jmp 0x7c3c6
callq 0x7b750
movsd %xmm0, -0x10(%rbp)
movl 0x14d1a4(%rip), %eax    # 0x1c9570
andl $0x4, %eax
cmpl $0x0, %eax
je 0x7c45d
callq 0x7bc70
movsd %xmm0, -0x38(%rbp)
callq 0x7bd40
movq %rax, -0x30(%rbp)
callq 0x7be40
movq %rax, -0x28(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, -0x20(%rbp)
leaq 0x221cea(%rip), %rax    # 0x29e0ec
movl (%rax), %eax
movl %eax, -0x1c(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x18(%rbp)
callq 0x7bf40
movsd -0x38(%rbp), %xmm0
movq -0x30(%rbp), %rdx
movq -0x28(%rbp), %rcx
movl -0x20(%rbp), %r8d
movl -0x1c(%rbp), %r9d
movsd -0x18(%rbp), %xmm1
movq %rax, %r10
leaq 0x31efc6(%rip), %rdi    # 0x39b400
leaq 0x107186(%rip), %rsi    # 0x1835c7
leaq 0x1071a6(%rip), %rax    # 0x1835ee
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x2, %al
callq 0x9060
jmp 0x7c581
movl 0x14d10d(%rip), %eax    # 0x1c9570
andl $0x2, %eax
cmpl $0x0, %eax
je 0x7c4f4
callq 0x7bc70
movsd %xmm0, -0x60(%rbp)
callq 0x7bd40
movq %rax, -0x58(%rbp)
callq 0x7be40
movq %rax, -0x50(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, -0x48(%rbp)
leaq 0x221c53(%rip), %rax    # 0x29e0ec
movl (%rax), %eax
movl %eax, -0x44(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x40(%rbp)
callq 0x7bf40
movsd -0x60(%rbp), %xmm0
movq -0x58(%rbp), %rdx
movq -0x50(%rbp), %rcx
movl -0x48(%rbp), %r8d
movl -0x44(%rbp), %r9d
movsd -0x40(%rbp), %xmm1
movq %rax, %r10
leaq 0x31ef2f(%rip), %rdi    # 0x39b400
leaq 0x10711c(%rip), %rsi    # 0x1835f4
leaq 0x10710f(%rip), %rax    # 0x1835ee
movq %r10, (%rsp)
movq %rax, 0x8(%rsp)
movb $0x2, %al
callq 0x9060
jmp 0x7c57f
callq 0x7bc70
cvttsd2si %xmm0, %eax
movl %eax, -0x84(%rbp)
callq 0x7bd40
movq %rax, -0x80(%rbp)
callq 0x7be40
movq %rax, -0x78(%rbp)
movsbl -0x1(%rbp), %eax
movl %eax, -0x70(%rbp)
leaq 0x221bc9(%rip), %rax    # 0x29e0ec
movl (%rax), %eax
movl %eax, -0x6c(%rbp)
movsd -0x10(%rbp), %xmm0
movsd %xmm0, -0x68(%rbp)
callq 0x7bf40
movl -0x84(%rbp), %edx
movq -0x80(%rbp), %rcx
movq -0x78(%rbp), %r8
movl -0x70(%rbp), %r9d
movl -0x6c(%rbp), %r11d
movsd -0x68(%rbp), %xmm0
movq %rax, %r10
leaq 0x31eea4(%rip), %rdi    # 0x39b400
leaq 0x1070b7(%rip), %rsi    # 0x18361a
leaq 0x107084(%rip), %rax    # 0x1835ee
movl %r11d, (%rsp)
movq %r10, 0x8(%rsp)
movq %rax, 0x10(%rsp)
movb $0x1, %al
callq 0x9060
jmp 0x7c581
leaq 0x31ee78(%rip), %rdi    # 0x39b400
callq 0x7bad0
addq $0xa0, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)