// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: send_rmc()
void send_rmc()
{
char valid;

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

   valid = 'V';
   if     (rcvr_type == NO_RCVR)   valid = 'A';
   else if(rcvr_type == TIDE_RCVR) valid = 'A';
   else if(lat || lon)             valid = 'A';

//   gregorian(0, jd_utc);
   if     (echo_fmt & ECHO_MSECS) sprintf(out, "GPRMC,%010.3f,%c,%s,%s,%s,%s,%06d,,", nmea_time(),valid,nmea_lat(),nmea_lon(),nmea_speed(),nmea_heading(),nmea_date());
   else if(echo_fmt & ECHO_HSECS) sprintf(out, "GPRMC,%09.2f,%c,%s,%s,%s,%s,%06d,,", nmea_time(),valid,nmea_lat(),nmea_lon(),nmea_speed(),nmea_heading(),nmea_date());
   else                           sprintf(out, "GPRMC,%06d,%c,%s,%s,%s,%s,%06d,,", (int) nmea_time(),valid,nmea_lat(),nmea_lon(),nmea_speed(),nmea_heading(),nmea_date());
   echo_nmea_string(out);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
leaq 0x1bed7f(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movl $0x41, %ebx
cmpq $0x400, %rax            # imm = 0x400
je 0x59ba4
cmpq $0x800000, %rax         # imm = 0x800000
je 0x59ba4
leaq 0x2b3460(%rip), %rax    # 0x30cfd0
leaq 0x2b3461(%rip), %rcx    # 0x30cfd8
movsd (%rcx), %xmm0
xorpd %xmm1, %xmm1
movsd (%rax), %xmm2
cmpneqpd %xmm1, %xmm2
cmpneqpd %xmm1, %xmm0
orpd %xmm2, %xmm0
movd %xmm0, %eax
testb $0x1, %al
movl $0x41, %eax
movl $0x56, %ebx
cmovnel %eax, %ebx
movl 0x1109d6(%rip), %eax    # 0x16a580
testb $0x4, %al
jne 0x59d17
leaq 0x2b3aef(%rip), %rcx    # 0x30d6a8
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
movsd 0xaf498(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b3ad5(%rip), %rcx    # 0x30d6ac
xorps %xmm2, %xmm2
cvtsi2sdl (%rcx), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b3ac3(%rip), %rcx    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3ab9(%rip), %rcx    # 0x30d6b8
addsd (%rcx), %xmm0
movsd %xmm0, -0x20(%rbp)
testb $0x2, %al
jne 0x59e3f
callq 0x597e8
callq 0x59885
movb $0x0, 0x3166ff(%rip)    # 0x370320
leaq 0x2b3710(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59c55
leaq 0x2b33ec(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc44f0(%rip), %xmm0    # 0x11e130
leaq 0x3166d9(%rip), %rdi    # 0x370320
leaq 0xca2fe(%rip), %rsi     # 0x123f4c
movb $0x1, %al
callq 0x9060
cvttsd2si -0x20(%rbp), %r14d
movb $0x0, 0x3167be(%rip)    # 0x370420
leaq 0x2b36cb(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59c8e
leaq 0x2b33b3(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x3167a0(%rip), %rdi    # 0x370420
leaq 0xca2c5(%rip), %rsi     # 0x123f4c
movb $0x1, %al
callq 0x9060
leaq 0x2b3a0b(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b39fa(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b39f6(%rip), %rax    # 0x30d6a4
movslq (%rax), %r10
imulq $0x51eb851f, %r10, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull $0x64, %eax, %eax
subl %eax, %r10d
addl %ecx, %r10d
subq $0x8, %rsp
leaq 0x316747(%rip), %r11    # 0x370420
leaq 0x316640(%rip), %r15    # 0x370320
leaq 0x2e2539(%rip), %rdi    # 0x33c220
leaq 0xc6638(%rip), %rsi     # 0x120326
leaq 0x31632b(%rip), %r8     # 0x370020
leaq 0x316424(%rip), %r9     # 0x370120
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r15
callq 0x9060
addq $0x20, %rsp
jmp 0x59f37
leaq 0x2b398a(%rip), %rax    # 0x30d6a8
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd 0xaf333(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b3970(%rip), %rax    # 0x30d6ac
xorps %xmm2, %xmm2
cvtsi2sdl (%rax), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b395e(%rip), %rax    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3954(%rip), %rax    # 0x30d6b8
addsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x597e8
callq 0x59885
movb $0x0, 0x3165a2(%rip)    # 0x370320
leaq 0x2b35b3(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59db2
leaq 0x2b328f(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc4393(%rip), %xmm0    # 0x11e130
leaq 0x31657c(%rip), %rdi    # 0x370320
leaq 0xca1a1(%rip), %rsi     # 0x123f4c
movb $0x1, %al
callq 0x9060
movb $0x0, 0x316667(%rip)    # 0x370420
leaq 0x2b3574(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59de5
leaq 0x2b325c(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x316649(%rip), %rdi    # 0x370420
leaq 0xca16e(%rip), %rsi     # 0x123f4c
movb $0x1, %al
callq 0x9060
leaq 0x2b38b4(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b38a3(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b389f(%rip), %rax    # 0x30d6a4
movslq (%rax), %r10
imulq $0x51eb851f, %r10, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull $0x64, %eax, %eax
subl %eax, %r10d
addl %ecx, %r10d
leaq 0x3165f4(%rip), %r11    # 0x370420
leaq 0x2e23ed(%rip), %rdi    # 0x33c220
leaq 0xc64a5(%rip), %rsi     # 0x1202df
jmp 0x59f0c
callq 0x597e8
callq 0x59885
movb $0x0, 0x3164d0(%rip)    # 0x370320
leaq 0x2b34e1(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59e84
leaq 0x2b31bd(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc42c1(%rip), %xmm0    # 0x11e130
leaq 0x3164aa(%rip), %rdi    # 0x370320
leaq 0xca0cf(%rip), %rsi     # 0x123f4c
movb $0x1, %al
callq 0x9060
movb $0x0, 0x316595(%rip)    # 0x370420
leaq 0x2b34a2(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59eb7
leaq 0x2b318a(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x316577(%rip), %rdi    # 0x370420
leaq 0xca09c(%rip), %rsi     # 0x123f4c
movb $0x1, %al
callq 0x9060
leaq 0x2b37e2(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b37d1(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b37cd(%rip), %rax    # 0x30d6a4
movslq (%rax), %r10
imulq $0x51eb851f, %r10, %rax # imm = 0x51EB851F
movq %rax, %rdx
shrq $0x3f, %rdx
sarq $0x25, %rax
addl %edx, %eax
imull $0x64, %eax, %eax
subl %eax, %r10d
addl %ecx, %r10d
leaq 0x316522(%rip), %r11    # 0x370420
leaq 0x2e231b(%rip), %rdi    # 0x33c220
leaq 0xc63f7(%rip), %rsi     # 0x120303
leaq 0x31610d(%rip), %rcx    # 0x370020
leaq 0x316206(%rip), %r8     # 0x370120
leaq 0x3163ff(%rip), %r9     # 0x370320
movsd -0x20(%rbp), %xmm0
movl %ebx, %edx
movb $0x1, %al
pushq %r10
pushq %r11
callq 0x9060
addq $0x10, %rsp
leaq 0x2e22e2(%rip), %rdi    # 0x33c220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x5962f