// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: show_lla(int)
void show_lla(int why)
{
   if(text_mode && first_key) return;
   if(zoom_screen) return;
   if(luxor) return;
   if(all_adevs && (all_adev_row < (ALL_ROW+5))) return;

   if(lat < (0.0-PI)) return;    // filter out any bogosity
   if(lat > PI) return;
   if(lon < (0.0-PI)) return;
   if(lon > PI) return;
   if(alt > 100000.0) return;
   if(alt < (0.0-100000.0)) return;

   // get a default precise position from the last self-surveyed coordinates
   if((have_initial_posn == 0) && (lla_log == 0) && (lat || lon || alt)) {  
      precise_lat = lat;
      precise_lon = lon;
      precise_alt = alt;
      have_precise_lla = (-3);

      #ifdef BUFFER_LLA
         clear_lla_points(0);
      #endif

      cos_factor = cos(lat);
      if(cos_factor == 0.0) cos_factor = 0.001;
      if(rcvr_mode == RCVR_MODE_HOLD) have_initial_posn = 1;
have_initial_posn = 1;  // ggggggggggg
   }
   
   #ifdef PRECISE_STUFF
      if(lla_file && (gps_status == GPS_FIXES) && have_time && (precision_survey || show_fixes)) {
         fprintf(lla_file, "%-6lu %X %13.8lf  %13.8lf  %8.3lf\n", 
         (unsigned long) tow, gps_status, lat*RAD_TO_DEG, lon*RAD_TO_DEG, alt);
      }

      // user requested a precision survey from the command line
      if(have_initial_posn && have_time && user_precision_survey) {
         if(user_precision_survey == 1) {  // start precise survey
            user_precision_survey = 0;
            start_precision_survey(200);
         }
         else {  // start 3D fix mode
            user_precision_survey = 0;
            start_3d_fixes(4, 20);
            config_screen(2202);
         }
      }
   #endif  // PRECISE_STUFF

   format_lla(lat, lon, alt,  POSN_ROW+1+eofs, POSN_COL, 1);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
leaq 0x164528(%rip), %rax    # 0x2187d8
cmpl $0x0, (%rax)
setne %al
leaq 0x18ac9b(%rip), %rcx    # 0x23ef58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0xb43a6
leaq 0x2584d6(%rip), %rax    # 0x30c7a8
cmpb $0x0, (%rax)
jne 0xb43a6
leaq 0x18ac5c(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
jne 0xb43a6
leaq 0x188a4c(%rip), %rax    # 0x23cd3e
cmpb $0x0, (%rax)
setne %al
leaq 0x1644b5(%rip), %rcx    # 0x2187b4
cmpl $0xc, (%rcx)
setl %cl
testb %cl, %al
jne 0xb43a6
leaq 0x258cbc(%rip), %rbx    # 0x30cfd0
movsd (%rbx), %xmm0
movapd 0x54e70(%rip), %xmm3    # 0x109190
movapd %xmm0, %xmm1
andpd %xmm3, %xmm1
ucomisd 0x574f8(%rip), %xmm1    # 0x10b828
ja 0xb43a6
leaq 0x258c9f(%rip), %r14    # 0x30cfd8
movsd (%r14), %xmm1
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd 0x574da(%rip), %xmm2    # 0x10b828
ja 0xb43a6
leaq 0x258c89(%rip), %r15    # 0x30cfe0
movsd (%r15), %xmm2
andpd %xmm2, %xmm3
ucomisd 0x54d60(%rip), %xmm3    # 0x1090c8
ja 0xb43a6
leaq 0x259b2f(%rip), %r12    # 0x30dea0
movb (%r12), %al
leaq 0x18a80f(%rip), %rcx    # 0x23eb8b
movb (%rcx), %cl
orb %al, %cl
jne 0xb4422
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jne 0xb43b5
jp 0xb43b5
ucomisd %xmm3, %xmm1
jne 0xb43b5
jp 0xb43b5
ucomisd %xmm3, %xmm2
jne 0xb43b5
jp 0xb43b5
xorl %eax, %eax
jmp 0xb4422
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x286f34(%rip), %rax    # 0x33b2f0
movsd %xmm0, (%rax)
leaq 0x286f31(%rip), %rax    # 0x33b2f8
movsd %xmm1, (%rax)
leaq 0x286f2e(%rip), %rax    # 0x33b300
movsd %xmm2, (%rax)
leaq 0x286f2b(%rip), %rax    # 0x33b308
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
xorl %edi, %edi
callq 0xfae0d
movsd (%rbx), %xmm0
callq 0x9710
xorpd %xmm2, %xmm2
cmpeqsd %xmm0, %xmm2
movsd 0x5752c(%rip), %xmm1    # 0x10b930
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
leaq 0x258bb1(%rip), %rax    # 0x30cfc8
movlpd %xmm2, (%rax)
movb $0x1, (%r12)
movb $0x1, %al
leaq 0x189f77(%rip), %rcx    # 0x23e3a0
movq (%rcx), %rdi
testq %rdi, %rdi
setne %dl
leaq 0x259063(%rip), %rcx    # 0x30d49c
cmpl $0x0, (%rcx)
sete %sil
leaq 0x18aa95(%rip), %r13    # 0x23eedc
movb (%r13), %cl
testb %cl, %cl
setne %r8b
andb %dl, %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0xb44b0
leaq 0x259a34(%rip), %rdx    # 0x30de98
leaq 0x286e69(%rip), %rcx    # 0x33b2d4
movb (%rcx), %sil
movb $0x1, %cl
orb (%rdx), %sil
je 0xb44b0
leaq 0x2592c0(%rip), %rax    # 0x30d73c
movl (%rax), %edx
movsd 0x54cda(%rip), %xmm1    # 0x109160
movsd (%rbx), %xmm0
mulsd %xmm1, %xmm0
mulsd (%r14), %xmm1
movsd (%r15), %xmm2
leaq 0x72fd9(%rip), %rsi     # 0x127478
xorl %ecx, %ecx
movb $0x3, %al
callq 0x9560
movb (%r12), %al
movb (%r13), %cl
testb %al, %al
setne %al
testb %cl, %cl
setne %dl
andb %al, %dl
leaq 0x2599d6(%rip), %rax    # 0x30de99
movb (%rax), %cl
testb %cl, %cl
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xb4501
movb $0x0, (%rax)
cmpb $0x1, %cl
jne 0xb44e8
movl $0xc8, %edi
callq 0xfaee8
jmp 0xb4501
movl $0x4, %edi
movl $0x14, %esi
callq 0xfad64
movl $0x89a, %edi            # imm = 0x89A
callq 0xcf89
movsd (%rbx), %xmm0
movsd (%r14), %xmm1
movsd (%r15), %xmm2
leaq 0x18aa2a(%rip), %rax    # 0x23ef40
movl (%rax), %edi
addl $0x7, %edi
xorl %esi, %esi
movl $0x1, %edx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xb27ba