// File: /workspace/github_cpp_makefile_star2_O1/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 0x1beccb(%rip), %rax    # 0x2188d0
movq (%rax), %rax
movl $0x41, %ebx
cmpq $0x400, %rax            # imm = 0x400
je 0x59c58
cmpq $0x800000, %rax         # imm = 0x800000
je 0x59c58
leaq 0x2b33ac(%rip), %rax    # 0x30cfd0
leaq 0x2b33ad(%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 0x110922(%rip), %eax    # 0x16a580
testb $0x4, %al
jne 0x59dcb
leaq 0x2b3a3b(%rip), %rcx    # 0x30d6a8
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
movsd 0xaf3e4(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b3a21(%rip), %rcx    # 0x30d6ac
xorps %xmm2, %xmm2
cvtsi2sdl (%rcx), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b3a0f(%rip), %rcx    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rcx), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b3a05(%rip), %rcx    # 0x30d6b8
addsd (%rcx), %xmm0
movsd %xmm0, -0x20(%rbp)
testb $0x2, %al
jne 0x59ef3
callq 0x5989c
callq 0x59939
movb $0x0, 0x31664b(%rip)    # 0x370320
leaq 0x2b365c(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59d09
leaq 0x2b3338(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc4394(%rip), %xmm0    # 0x11e088
leaq 0x316625(%rip), %rdi    # 0x370320
leaq 0xca16a(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
cvttsd2si -0x20(%rbp), %r14d
movb $0x0, 0x31670a(%rip)    # 0x370420
leaq 0x2b3617(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59d42
leaq 0x2b32ff(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x3166ec(%rip), %rdi    # 0x370420
leaq 0xca131(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
leaq 0x2b3957(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b3946(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b3942(%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 0x316693(%rip), %r11    # 0x370420
leaq 0x31658c(%rip), %r15    # 0x370320
leaq 0x2e2485(%rip), %rdi    # 0x33c220
leaq 0xc64a4(%rip), %rsi     # 0x120246
leaq 0x316277(%rip), %r8     # 0x370020
leaq 0x316370(%rip), %r9     # 0x370120
movl %r14d, %edx
movl %ebx, %ecx
xorl %eax, %eax
pushq %r10
pushq %r11
pushq %r15
callq 0x9060
addq $0x20, %rsp
jmp 0x59feb
leaq 0x2b38d6(%rip), %rax    # 0x30d6a8
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
movsd 0xaf27f(%rip), %xmm1    # 0x109060
mulsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
leaq 0x2b38bc(%rip), %rax    # 0x30d6ac
xorps %xmm2, %xmm2
cvtsi2sdl (%rax), %xmm2
mulsd %xmm1, %xmm2
addsd %xmm0, %xmm2
leaq 0x2b38aa(%rip), %rax    # 0x30d6b0
xorps %xmm0, %xmm0
cvtsi2sdl (%rax), %xmm0
addsd %xmm2, %xmm0
leaq 0x2b38a0(%rip), %rax    # 0x30d6b8
addsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
callq 0x5989c
callq 0x59939
movb $0x0, 0x3164ee(%rip)    # 0x370320
leaq 0x2b34ff(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59e66
leaq 0x2b31db(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc4237(%rip), %xmm0    # 0x11e088
leaq 0x3164c8(%rip), %rdi    # 0x370320
leaq 0xca00d(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
movb $0x0, 0x3165b3(%rip)    # 0x370420
leaq 0x2b34c0(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59e99
leaq 0x2b31a8(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x316595(%rip), %rdi    # 0x370420
leaq 0xc9fda(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
leaq 0x2b3800(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b37ef(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b37eb(%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 0x316540(%rip), %r11    # 0x370420
leaq 0x2e2339(%rip), %rdi    # 0x33c220
leaq 0xc6311(%rip), %rsi     # 0x1201ff
jmp 0x59fc0
callq 0x5989c
callq 0x59939
movb $0x0, 0x31641c(%rip)    # 0x370320
leaq 0x2b342d(%rip), %rax    # 0x30d338
cmpl $0x0, (%rax)
je 0x59f38
leaq 0x2b3109(%rip), %rax    # 0x30d020
movsd (%rax), %xmm0
divsd 0xc4165(%rip), %xmm0    # 0x11e088
leaq 0x3163f6(%rip), %rdi    # 0x370320
leaq 0xc9f3b(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
movb $0x0, 0x3164e1(%rip)    # 0x370420
leaq 0x2b33ee(%rip), %rax    # 0x30d334
cmpl $0x0, (%rax)
je 0x59f6b
leaq 0x2b30d6(%rip), %rax    # 0x30d028
movsd (%rax), %xmm0
leaq 0x3164c3(%rip), %rdi    # 0x370420
leaq 0xc9f08(%rip), %rsi     # 0x123e6c
movb $0x1, %al
callq 0x9060
leaq 0x2b372e(%rip), %rax    # 0x30d6a0
imull $0x2710, (%rax), %eax   # imm = 0x2710
leaq 0x2b371d(%rip), %rcx    # 0x30d69c
imull $0x64, (%rcx), %ecx
addl %eax, %ecx
leaq 0x2b3719(%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 0x31646e(%rip), %r11    # 0x370420
leaq 0x2e2267(%rip), %rdi    # 0x33c220
leaq 0xc6263(%rip), %rsi     # 0x120223
leaq 0x316059(%rip), %rcx    # 0x370020
leaq 0x316152(%rip), %r8     # 0x370120
leaq 0x31634b(%rip), %r9     # 0x370320
movsd -0x20(%rbp), %xmm0
movl %ebx, %edx
movb $0x1, %al
pushq %r10
pushq %r11
callq 0x9060
addq $0x10, %rsp
leaq 0x2e222e(%rip), %rdi    # 0x33c220
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0x596f9