// File: 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:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movl %edi, -0x4(%rbp)
leaq 0x224eee(%rip), %rax    # 0x277ab0
cmpq $0x400, (%rax)          # imm = 0x400
jne 0x52bd0
jmp 0x52dbc
leaq 0x3478dd(%rip), %rax    # 0x39a4b4
movzbl (%rax), %edi
callq 0x49220
movb %al, %cl
leaq 0x3478cc(%rip), %rax    # 0x39a4b4
movb %cl, (%rax)
movl $0x1, %edi
callq 0x52a70
leaq 0x3478b9(%rip), %rax    # 0x39a4b4
cmpb $0x0, (%rax)
je 0x52d0a
leaq 0x31a46d(%rip), %rax    # 0x36d078
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x52d0a
leaq 0x31a45e(%rip), %rax    # 0x36d07c
cmpl $0x0, (%rax)
jne 0x52d0a
leaq 0x319582(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
leaq 0x347897(%rip), %rax    # 0x39a4d0
movsd %xmm0, (%rax)
leaq 0x319574(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
leaq 0x347889(%rip), %rax    # 0x39a4d8
movsd %xmm0, (%rax)
leaq 0x319566(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm0
leaq 0x34787b(%rip), %rax    # 0x39a4e0
movsd %xmm0, (%rax)
leaq 0x347878(%rip), %rax    # 0x39a4e8
movl $0xfffffff8, (%rax)     # imm = 0xFFFFFFF8
leaq 0x3478a3(%rip), %rax    # 0x39a520
cmpl $0x0, (%rax)
jne 0x52cc4
leaq 0x319527(%rip), %rax    # 0x36c1b0
movsd (%rax), %xmm0
leaq 0x34785c(%rip), %rax    # 0x39a4f0
movsd %xmm0, (%rax)
leaq 0x319519(%rip), %rax    # 0x36c1b8
movsd (%rax), %xmm0
leaq 0x34784e(%rip), %rax    # 0x39a4f8
movsd %xmm0, (%rax)
leaq 0x31950b(%rip), %rax    # 0x36c1c0
movsd (%rax), %xmm0
leaq 0x347840(%rip), %rax    # 0x39a500
movsd %xmm0, (%rax)
leaq 0x347825(%rip), %rax    # 0x39a4f0
movsd (%rax), %xmm0
callq 0x96f0
leaq 0x3194cd(%rip), %rax    # 0x36c1a8
movsd %xmm0, (%rax)
leaq 0x3194c2(%rip), %rax    # 0x36c1a8
movsd (%rax), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jne 0x52d08
jp 0x52d08
leaq 0x3194ac(%rip), %rax    # 0x36c1a8
movsd 0x11c48c(%rip), %xmm0   # 0x16f190
movsd %xmm0, (%rax)
jmp 0x52d0a
leaq 0x3477a3(%rip), %rax    # 0x39a4b4
cmpb $0x0, (%rax)
je 0x52d49
cmpl $0x0, -0x4(%rbp)
jl 0x52d49
cmpl $0x7, -0x4(%rbp)
jg 0x52d49
movl -0x4(%rbp), %edi
movl $0x1, %esi
callq 0x159a40
leaq 0x34776e(%rip), %rax    # 0x39a4a4
movzbl (%rax), %eax
cmpl $0x0, %eax
jne 0x52d47
xorl %esi, %esi
movl %esi, %edi
callq 0x52dd0
jmp 0x52d94
movl $0x7, %edi
movl $0xff, %edx
movss 0x11ebdd(%rip), %xmm3   # 0x171938
movl %edx, %esi
movaps %xmm3, %xmm0
movaps %xmm3, %xmm1
movaps %xmm3, %xmm2
callq 0x805d0
leaq 0x34771e(%rip), %rax    # 0x39a490
movb $0x0, (%rax)
leaq 0x347728(%rip), %rax    # 0x39a4a4
cmpb $0x0, (%rax)
je 0x52d92
leaq 0x347728(%rip), %rax    # 0x39a4b0
cmpl $0x0, (%rax)
jne 0x52d92
callq 0x53190
jmp 0x52d94
movl $0xa, %edi
callq 0x8c270
movl $0x19, %edi
callq 0x37780
leaq 0x227589(%rip), %rax    # 0x27a338
movb $0x0, (%rax)
movl $0x6b, %edi
callq 0xeaf0
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)