// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathui.cpp
// Function: do_fixes(int)
void do_fixes(int mode)
{
   if(rcvr_type == NO_RCVR) return;

   show_fixes = toggle_value(show_fixes);
   change_fix_config(1);

   if(show_fixes && (precision_survey == 0)  && (trimble_save == 0)) {  // set reference position for fix map
      precise_lat = lat;
      precise_lon = lon;
      precise_alt = alt;
      have_precise_lla = (-8);
      if(user_set_ref_lla == 0) {
         ref_lat = lat;
         ref_lon = lon;
         ref_alt = alt;
      }
      cos_factor = cos(ref_lat);
      if(cos_factor == 0.0) cos_factor = 0.001;
   }

   if(show_fixes && (mode >= 0) && (mode <= 7)) {  // 3d fix mode
      start_3d_fixes(mode, 1);
      if(GRAPH_LLA && (graph_lla == 0)) {
         config_lla_plots(HIDE_LLA_ON_HOLD, KEEP_LLA_SHOW);
      }
   }
   else {  // normal overdetermined clock mode
      set_rcvr_mode(RCVR_MODE_HOLD);
      plot_lla = 0;
      if(GRAPH_LLA && graph_lla && (keep_lla_plots == 0)) {
         config_normal_plots();
      }
   }

   request_rcvr_config(10);
   reset_first_key(25);
   prot_menu = 0;
   config_screen(107);
}

// Assembly:
leaq 0x1ddc8f(%rip), %rax    # 0x2188d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x3ac4b
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x300676(%rip), %r14    # 0x33b2d4
movzbl (%r14), %edi
callq 0x34013
movb %al, (%r14)
leaq 0x1e0797(%rip), %rcx    # 0x21b408
movzbl (%rcx), %ecx
movl %ecx, 0x309aa2(%rip)    # 0x34471c
leaq 0x1e0792(%rip), %rcx    # 0x21b413
movzbl (%rcx), %ecx
movl %ecx, 0x309a96(%rip)    # 0x344720
leaq 0x300757(%rip), %rcx    # 0x33b3e8
movzbl (%rcx), %ecx
movl %ecx, 0x309a8a(%rip)    # 0x344724
leaq 0x1e0774(%rip), %rcx    # 0x21b415
movzbl (%rcx), %ecx
movl %ecx, 0x309a7e(%rip)    # 0x344728
leaq 0x3005ff(%rip), %r15    # 0x33b2b0
movzbl (%r15), %ecx
movl %ecx, 0x309a71(%rip)    # 0x34472c
movl $0x1, 0x309a6b(%rip)    # 0x344730
incl 0x309a69(%rip)          # 0x344734
testb %al, %al
je 0x3ada5
leaq 0x2d31be(%rip), %rax    # 0x30de98
cmpb $0x0, (%rax)
jne 0x3ada5
leaq 0x2d31b2(%rip), %rax    # 0x30de9c
cmpl $0x0, (%rax)
jne 0x3ada5
leaq 0x2d22d6(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x3005eb(%rip), %rax    # 0x33b2f0
movsd %xmm0, (%rax)
leaq 0x2d22c8(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
leaq 0x3005dd(%rip), %rax    # 0x33b2f8
movsd %xmm1, (%rax)
leaq 0x2d22ba(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm2
leaq 0x3005cf(%rip), %rax    # 0x33b300
movsd %xmm2, (%rax)
leaq 0x3005cc(%rip), %rax    # 0x33b308
movl $0xfffffff8, (%rax)     # imm = 0xFFFFFFF8
leaq 0x3005f7(%rip), %rax    # 0x33b340
cmpl $0x0, (%rax)
je 0x3ad5b
leaq 0x3005bb(%rip), %rax    # 0x33b310
movsd (%rax), %xmm0
jmp 0x3ad7c
leaq 0x3005ae(%rip), %rax    # 0x33b310
movsd %xmm0, (%rax)
leaq 0x3005ab(%rip), %rax    # 0x33b318
movsd %xmm1, (%rax)
leaq 0x3005a8(%rip), %rax    # 0x33b320
movsd %xmm2, (%rax)
callq 0x9710
leaq 0x2d2240(%rip), %rax    # 0x30cfc8
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3ada5
jp 0x3ada5
movabsq $0x3f50624dd2f1a9fc, %rcx # imm = 0x3F50624DD2F1A9FC
movq %rcx, (%rax)
cmpl $0x7, %ebx
ja 0x3add3
cmpb $0x0, (%r14)
je 0x3add3
movl %ebx, %edi
movl $0x1, %esi
callq 0xfad64
leaq 0x300501(%rip), %rax    # 0x33b2c4
cmpb $0x0, (%rax)
jne 0x3adff
xorl %edi, %edi
xorl %esi, %esi
callq 0x3ae2c
jmp 0x3adff
movss 0xd228d(%rip), %xmm0    # 0x10d068
movl $0x7, %edi
movl $0xff, %esi
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movapd %xmm0, %xmm3
movl $0xff, %edx
callq 0x5cf59
movb $0x0, (%r15)
movl $0xa, %edi
callq 0x667f2
callq 0x275c7
leaq 0x1e0343(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movl $0x6b, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xcf89