// File: 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
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x182ba6(%rip), %rax    # 0x2779b8
cmpl $0x0, (%rax)
je 0xf4e28
leaq 0x1a931a(%rip), %rax    # 0x29e138
cmpl $0x0, (%rax)
je 0xf4e28
jmp 0xf5182
leaq 0x276b59(%rip), %rax    # 0x36b988
cmpb $0x0, (%rax)
je 0xf4e39
jmp 0xf5182
leaq 0x1a92de(%rip), %rax    # 0x29e11e
cmpb $0x0, (%rax)
je 0xf4e4a
jmp 0xf5182
leaq 0x1a70cd(%rip), %rax    # 0x29bf1e
cmpb $0x0, (%rax)
je 0xf4e67
leaq 0x182b37(%rip), %rax    # 0x277994
cmpl $0xc, (%rax)
jge 0xf4e67
jmp 0xf5182
movsd 0x8e439(%rip), %xmm0    # 0x1832a8
leaq 0x27733a(%rip), %rax    # 0x36c1b0
ucomisd (%rax), %xmm0
jbe 0xf4e81
jmp 0xf5182
leaq 0x277328(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
movsd 0x7c734(%rip), %xmm1    # 0x1715c8
ucomisd %xmm1, %xmm0
jbe 0xf4e9f
jmp 0xf5182
movsd 0x8e401(%rip), %xmm0    # 0x1832a8
leaq 0x27730a(%rip), %rax    # 0x36c1b8
ucomisd (%rax), %xmm0
jbe 0xf4eb9
jmp 0xf5182
leaq 0x2772f8(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
movsd 0x7c6fc(%rip), %xmm1    # 0x1715c8
ucomisd %xmm1, %xmm0
jbe 0xf4ed7
jmp 0xf5182
leaq 0x2772e2(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm0
movsd 0x7a1fe(%rip), %xmm1    # 0x16f0e8
ucomisd %xmm1, %xmm0
jbe 0xf4ef5
jmp 0xf5182
movsd 0x8e21b(%rip), %xmm0    # 0x183118
leaq 0x2772bc(%rip), %rax    # 0x36c1c0
ucomisd (%rax), %xmm0
jbe 0xf4f0f
jmp 0xf5182
leaq 0x27816a(%rip), %rax    # 0x36d080
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xf5039
leaq 0x1a8e42(%rip), %rax    # 0x29dd6b
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0xf5039
leaq 0x277274(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf4f7c
jp 0xf4f7c
leaq 0x277266(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf4f7c
jp 0xf4f7c
leaq 0x277258(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf4f7c
jp 0xf4f7c
jmp 0xf5039
leaq 0x27722d(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
leaq 0x2a5542(%rip), %rax    # 0x39a4d0
movsd %xmm0, (%rax)
leaq 0x27721f(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
leaq 0x2a5534(%rip), %rax    # 0x39a4d8
movsd %xmm0, (%rax)
leaq 0x277211(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm0
leaq 0x2a5526(%rip), %rax    # 0x39a4e0
movsd %xmm0, (%rax)
leaq 0x2a5523(%rip), %rax    # 0x39a4e8
movl $0xfffffffd, (%rax)     # imm = 0xFFFFFFFD
xorl %edi, %edi
callq 0x159b10
leaq 0x2771d7(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
callq 0x96f0
leaq 0x2771bf(%rip), %rax    # 0x36c1a8
movsd %xmm0, (%rax)
leaq 0x2771b4(%rip), %rax    # 0x36c1a8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0xf5016
jp 0xf5016
leaq 0x27719e(%rip), %rax    # 0x36c1a8
movsd 0x7a17e(%rip), %xmm0    # 0x16f190
movsd %xmm0, (%rax)
leaq 0x277293(%rip), %rax    # 0x36c2b0
movzbl (%rax), %eax
cmpl $0x7, %eax
jne 0xf502f
leaq 0x278054(%rip), %rax    # 0x36d080
movb $0x1, (%rax)
leaq 0x27804a(%rip), %rax    # 0x36d080
movb $0x1, (%rax)
leaq 0x1a8540(%rip), %rax    # 0x29d580
cmpq $0x0, (%rax)
je 0xf50db
leaq 0x27762b(%rip), %rax    # 0x36c67c
cmpl $0x0, (%rax)
jne 0xf50db
leaq 0x1a905b(%rip), %rax    # 0x29e0bc
cmpb $0x0, (%rax)
je 0xf50db
leaq 0x27800b(%rip), %rax    # 0x36d078
cmpb $0x0, (%rax)
jne 0xf507e
leaq 0x2a543b(%rip), %rax    # 0x39a4b4
cmpb $0x0, (%rax)
je 0xf50db
leaq 0x1a84fb(%rip), %rax    # 0x29d580
movq (%rax), %rdi
leaq 0x27788d(%rip), %rax    # 0x36c91c
movl (%rax), %eax
movl %eax, %edx
leaq 0x2775e2(%rip), %rax    # 0x36c67c
movl (%rax), %ecx
movsd 0x7a0dc(%rip), %xmm0    # 0x16f180
leaq 0x277105(%rip), %rax    # 0x36c1b0
mulsd (%rax), %xmm0
movsd 0x7a0c9(%rip), %xmm1    # 0x16f180
leaq 0x2770fa(%rip), %rax    # 0x36c1b8
mulsd (%rax), %xmm1
leaq 0x2770f7(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm2
leaq 0x9575e(%rip), %rsi     # 0x18a832
movb $0x3, %al
callq 0x9550
leaq 0x277f9e(%rip), %rax    # 0x36d080
cmpb $0x0, (%rax)
je 0xf5149
leaq 0x1a8fce(%rip), %rax    # 0x29e0bc
cmpb $0x0, (%rax)
je 0xf5149
leaq 0x277f7f(%rip), %rax    # 0x36d079
cmpb $0x0, (%rax)
je 0xf5149
leaq 0x277f73(%rip), %rax    # 0x36d079
movzbl (%rax), %eax
cmpl $0x1, %eax
jne 0xf5124
leaq 0x277f64(%rip), %rax    # 0x36d079
movb $0x0, (%rax)
movl $0xc8, %edi
callq 0x159c40
jmp 0xf5147
leaq 0x277f4e(%rip), %rax    # 0x36d079
movb $0x0, (%rax)
movl $0x4, %edi
movl $0x14, %esi
callq 0x159a40
movl $0x89a, %edi            # imm = 0x89A
callq 0xeaf0
jmp 0xf5149
leaq 0x277060(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
leaq 0x27705d(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm1
leaq 0x27705a(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm2
leaq 0x1a8faf(%rip), %rax    # 0x29e120
movl (%rax), %edi
addl $0x7, %edi
xorl %esi, %esi
movl $0x1, %edx
callq 0xf2600
addq $0x10, %rsp
popq %rbp
retq
nopl (%rax,%rax)