// File: /workspace/github_cpp_makefile_star2_O2/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 0x15ea9f(%rip), %rax    # 0x2027d8
cmpl $0x0, (%rax)
setne %al
leaq 0x185212(%rip), %rcx    # 0x228f58
cmpl $0x0, (%rcx)
setne %cl
testb %cl, %al
jne 0xa3e2f
leaq 0x252a4d(%rip), %rax    # 0x2f67a8
cmpb $0x0, (%rax)
jne 0xa3e2f
leaq 0x1851d3(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
jne 0xa3e2f
leaq 0x182fc3(%rip), %rax    # 0x226d3e
cmpb $0x0, (%rax)
setne %al
leaq 0x15ea2c(%rip), %rcx    # 0x2027b4
cmpl $0xc, (%rcx)
setl %cl
testb %cl, %al
jne 0xa3e2f
leaq 0x253233(%rip), %rbx    # 0x2f6fd0
movsd (%rbx), %xmm0
movapd 0x4f3e7(%rip), %xmm3    # 0xf3190
movapd %xmm0, %xmm1
andpd %xmm3, %xmm1
ucomisd 0x51ae7(%rip), %xmm1    # 0xf58a0
ja 0xa3e2f
leaq 0x253216(%rip), %r14    # 0x2f6fd8
movsd (%r14), %xmm1
movapd %xmm1, %xmm2
andpd %xmm3, %xmm2
ucomisd 0x51ac9(%rip), %xmm2    # 0xf58a0
ja 0xa3e2f
leaq 0x253200(%rip), %r15    # 0x2f6fe0
movsd (%r15), %xmm2
andpd %xmm2, %xmm3
ucomisd 0x4f2d7(%rip), %xmm3    # 0xf30c8
ja 0xa3e2f
leaq 0x2540a6(%rip), %r12    # 0x2f7ea0
movb (%r12), %al
leaq 0x184d86(%rip), %rcx    # 0x228b8b
movb (%rcx), %cl
orb %al, %cl
jne 0xa3eab
xorpd %xmm3, %xmm3
ucomisd %xmm3, %xmm0
jne 0xa3e3e
jp 0xa3e3e
ucomisd %xmm3, %xmm1
jne 0xa3e3e
jp 0xa3e3e
ucomisd %xmm3, %xmm2
jne 0xa3e3e
jp 0xa3e3e
xorl %eax, %eax
jmp 0xa3eab
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
leaq 0x2814ab(%rip), %rax    # 0x3252f0
movsd %xmm0, (%rax)
leaq 0x2814a8(%rip), %rax    # 0x3252f8
movsd %xmm1, (%rax)
leaq 0x2814a5(%rip), %rax    # 0x325300
movsd %xmm2, (%rax)
leaq 0x2814a2(%rip), %rax    # 0x325308
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
xorl %edi, %edi
callq 0xe53f2
movsd (%rbx), %xmm0
callq 0x9710
xorpd %xmm2, %xmm2
cmpeqsd %xmm0, %xmm2
movsd 0x51b1b(%rip), %xmm1    # 0xf59a8
andpd %xmm2, %xmm1
andnpd %xmm0, %xmm2
orpd %xmm1, %xmm2
leaq 0x253128(%rip), %rax    # 0x2f6fc8
movlpd %xmm2, (%rax)
movb $0x1, (%r12)
movb $0x1, %al
leaq 0x1844ee(%rip), %rcx    # 0x2283a0
movq (%rcx), %rdi
testq %rdi, %rdi
setne %dl
leaq 0x2535da(%rip), %rcx    # 0x2f749c
cmpl $0x0, (%rcx)
sete %sil
leaq 0x18500c(%rip), %r13    # 0x228edc
movb (%r13), %cl
testb %cl, %cl
setne %r8b
andb %dl, %r8b
andb %sil, %r8b
cmpb $0x1, %r8b
jne 0xa3f39
leaq 0x253fab(%rip), %rdx    # 0x2f7e98
leaq 0x2813e0(%rip), %rcx    # 0x3252d4
movb (%rcx), %sil
movb $0x1, %cl
orb (%rdx), %sil
je 0xa3f39
leaq 0x253837(%rip), %rax    # 0x2f773c
movl (%rax), %edx
movsd 0x4f251(%rip), %xmm1    # 0xf3160
movsd (%rbx), %xmm0
mulsd %xmm1, %xmm0
mulsd (%r14), %xmm1
movsd (%r15), %xmm2
leaq 0x6d495(%rip), %rsi     # 0x1113bd
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 0x253f4d(%rip), %rax    # 0x2f7e99
movb (%rax), %cl
testb %cl, %cl
setne %sil
andb %dl, %sil
cmpb $0x1, %sil
jne 0xa3f86
movb $0x0, (%rax)
cmpb $0x1, %cl
jne 0xa3f71
movl $0xc8, %edi
callq 0xe54cc
jmp 0xa3f86
pushq $0x4
popq %rdi
pushq $0x14
popq %rsi
callq 0xe534c
movl $0x89a, %edi            # imm = 0x89A
callq 0xcc4f
movsd (%rbx), %xmm0
movsd (%r14), %xmm1
movsd (%r15), %xmm2
leaq 0x184fa5(%rip), %rax    # 0x228f40
movl (%rax), %edi
addl $0x7, %edi
pushq $0x1
popq %rdx
xorl %esi, %esi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa2476