// File: /workspace/github_cpp_makefile_star2_O2/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 0x1cb00c(%rip), %rax    # 0x2028d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x378ce
retq
pushq %rbp
movq %rsp, %rbp
pushq %r14
pushq %rbx
movl %edi, %ebx
leaq 0x2ed9f6(%rip), %r14    # 0x3252d4
movzbl (%r14), %edi
callq 0x31279
movb %al, (%r14)
pushq $0x1
popq %rdi
callq 0x377c9
cmpb $0x0, (%r14)
je 0x379ce
leaq 0x2c0595(%rip), %rax    # 0x2f7e98
cmpb $0x0, (%rax)
jne 0x379ce
leaq 0x2c0589(%rip), %rax    # 0x2f7e9c
cmpl $0x0, (%rax)
jne 0x379ce
leaq 0x2bf6ad(%rip), %rax    # 0x2f6fd0
movsd (%rax), %xmm0
leaq 0x2ed9c2(%rip), %rax    # 0x3252f0
movsd %xmm0, (%rax)
leaq 0x2bf69f(%rip), %rax    # 0x2f6fd8
movsd (%rax), %xmm1
leaq 0x2ed9b4(%rip), %rax    # 0x3252f8
movsd %xmm1, (%rax)
leaq 0x2bf691(%rip), %rax    # 0x2f6fe0
movsd (%rax), %xmm2
leaq 0x2ed9a6(%rip), %rax    # 0x325300
movsd %xmm2, (%rax)
leaq 0x2ed9a3(%rip), %rax    # 0x325308
movl $0xfffffff8, (%rax)     # imm = 0xFFFFFFF8
leaq 0x2ed9ce(%rip), %rax    # 0x325340
cmpl $0x0, (%rax)
je 0x37984
leaq 0x2ed992(%rip), %rax    # 0x325310
movsd (%rax), %xmm0
jmp 0x379a5
leaq 0x2ed985(%rip), %rax    # 0x325310
movsd %xmm0, (%rax)
leaq 0x2ed982(%rip), %rax    # 0x325318
movsd %xmm1, (%rax)
leaq 0x2ed97f(%rip), %rax    # 0x325320
movsd %xmm2, (%rax)
callq 0x9710
leaq 0x2bf617(%rip), %rax    # 0x2f6fc8
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x379ce
jp 0x379ce
movabsq $0x3f50624dd2f1a9fc, %rcx # imm = 0x3F50624DD2F1A9FC
movq %rcx, (%rax)
cmpl $0x7, %ebx
ja 0x379fa
cmpb $0x0, (%r14)
je 0x379fa
pushq $0x1
popq %rsi
movl %ebx, %edi
callq 0xe534c
leaq 0x2ed8da(%rip), %rax    # 0x3252c4
cmpb $0x0, (%rax)
jne 0x37a2a
xorl %edi, %edi
xorl %esi, %esi
callq 0x37a4d
jmp 0x37a2a
pushq $0x7
popq %rdi
movss 0xbf6e3(%rip), %xmm0    # 0xf70e8
movl $0xff, %esi
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movapd %xmm0, %xmm3
movl $0xff, %edx
callq 0x55b65
leaq 0x2ed889(%rip), %rax    # 0x3252b0
movb $0x0, (%rax)
pushq $0xa
popq %rdi
callq 0x5e18e
callq 0x2591f
leaq 0x1cd71a(%rip), %rax    # 0x205158
movb $0x0, (%rax)
pushq $0x6b
popq %rdi
popq %rbx
popq %r14
popq %rbp
jmp 0xcc4f