// File: /workspace/github_cpp_makefile_star2_O1/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 0x1ddd13(%rip), %rax    # 0x2188d0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x3abc7
retq
pushq %rbp
movq %rsp, %rbp
pushq %r15
pushq %r14
pushq %rbx
pushq %rax
movl %edi, %ebx
leaq 0x3006fa(%rip), %r14    # 0x33b2d4
movzbl (%r14), %edi
callq 0x33ef8
movb %al, (%r14)
leaq 0x1e081b(%rip), %rcx    # 0x21b408
movzbl (%rcx), %ecx
movl %ecx, 0x309b26(%rip)    # 0x34471c
leaq 0x1e0816(%rip), %rcx    # 0x21b413
movzbl (%rcx), %ecx
movl %ecx, 0x309b1a(%rip)    # 0x344720
leaq 0x3007db(%rip), %rcx    # 0x33b3e8
movzbl (%rcx), %ecx
movl %ecx, 0x309b0e(%rip)    # 0x344724
leaq 0x1e07f8(%rip), %rcx    # 0x21b415
movzbl (%rcx), %ecx
movl %ecx, 0x309b02(%rip)    # 0x344728
leaq 0x300683(%rip), %r15    # 0x33b2b0
movzbl (%r15), %ecx
movl %ecx, 0x309af5(%rip)    # 0x34472c
movl $0x1, 0x309aef(%rip)    # 0x344730
incl 0x309aed(%rip)          # 0x344734
testb %al, %al
je 0x3ad1f
leaq 0x2d3242(%rip), %rax    # 0x30de98
cmpb $0x0, (%rax)
jne 0x3ad1f
leaq 0x2d3236(%rip), %rax    # 0x30de9c
cmpl $0x0, (%rax)
jne 0x3ad1f
leaq 0x2d235a(%rip), %rax    # 0x30cfd0
movsd (%rax), %xmm0
leaq 0x30066f(%rip), %rax    # 0x33b2f0
movsd %xmm0, (%rax)
leaq 0x2d234c(%rip), %rax    # 0x30cfd8
movsd (%rax), %xmm1
leaq 0x300661(%rip), %rax    # 0x33b2f8
movsd %xmm1, (%rax)
leaq 0x2d233e(%rip), %rax    # 0x30cfe0
movsd (%rax), %xmm2
leaq 0x300653(%rip), %rax    # 0x33b300
movsd %xmm2, (%rax)
leaq 0x300650(%rip), %rax    # 0x33b308
movl $0xfffffff8, (%rax)     # imm = 0xFFFFFFF8
leaq 0x30067b(%rip), %rax    # 0x33b340
cmpl $0x0, (%rax)
jne 0x3aceb
leaq 0x30063f(%rip), %rax    # 0x33b310
movsd %xmm0, (%rax)
leaq 0x30063c(%rip), %rax    # 0x33b318
movsd %xmm1, (%rax)
leaq 0x300639(%rip), %rax    # 0x33b320
movsd %xmm2, (%rax)
leaq 0x30061e(%rip), %rax    # 0x33b310
movsd (%rax), %xmm0
callq 0x9710
leaq 0x2d22c6(%rip), %rax    # 0x30cfc8
movsd %xmm0, (%rax)
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x3ad1f
jp 0x3ad1f
movabsq $0x3f50624dd2f1a9fc, %rcx # imm = 0x3F50624DD2F1A9FC
movq %rcx, (%rax)
cmpl $0x7, %ebx
ja 0x3ad4d
cmpb $0x0, (%r14)
je 0x3ad4d
movl %ebx, %edi
movl $0x1, %esi
callq 0xfa611
leaq 0x300587(%rip), %rax    # 0x33b2c4
cmpb $0x0, (%rax)
jne 0x3ad79
xorl %edi, %edi
xorl %esi, %esi
callq 0x3ada6
jmp 0x3ad79
movss 0xd227b(%rip), %xmm0    # 0x10cfd0
movl $0x7, %edi
movl $0xff, %esi
movapd %xmm0, %xmm1
movapd %xmm0, %xmm2
movapd %xmm0, %xmm3
movl $0xff, %edx
callq 0x5d081
movb $0x0, (%r15)
movl $0xa, %edi
callq 0x66617
callq 0x27872
leaq 0x1e03c9(%rip), %rax    # 0x21b158
movb $0x0, (%rax)
movl $0x6b, %edi
addq $0x8, %rsp
popq %rbx
popq %r14
popq %r15
popq %rbp
jmp 0xcf81