// File: jkingan[P]ladyheather/heathui.cpp
// Function: edit_lla_ref_cmd()
void edit_lla_ref_cmd()
{
int err;
double old_lat, old_lon, old_alt;

   old_lat = precise_lat;
   old_lon = precise_lon;
   old_alt = precise_alt;

   precise_lat = ref_lat;
   precise_lon = ref_lon;
   precise_alt = ref_alt;

   err = parse_lla(&edit_buffer[0]);
   if     (err == BAD_LAT)     edit_error("Bad latitude value");
   else if(err == BAD_LON)     edit_error("Bad longitude value");
   else if(err == BAD_ALT)     edit_error("Bad altitude value");
   else if(err == LLA_MISSING) edit_error("Must enter three lat lon alt values (separated by spaces)");
   else if(err == NO_AVERAGE)  edit_error("No LLA data available to average");
   else if(err) ;
   else { // save current position with high accuracy
      ref_lat = precise_lat;
      ref_lon = precise_lon;
      ref_alt = precise_alt;
      user_set_ref_lla = 1;

      rebuild_lla_plot(0);
      need_redraw = 3201;
   }

   precise_lat = old_lat;
   precise_lon = old_lon;
   precise_alt = old_alt;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
leaq 0x353f91(%rip), %rax    # 0x39a4d0
movsd (%rax), %xmm0
movsd %xmm0, -0x10(%rbp)
leaq 0x353f89(%rip), %rax    # 0x39a4d8
movsd (%rax), %xmm0
movsd %xmm0, -0x18(%rbp)
leaq 0x353f81(%rip), %rax    # 0x39a4e0
movsd (%rax), %xmm0
movsd %xmm0, -0x20(%rbp)
leaq 0x353f81(%rip), %rax    # 0x39a4f0
movsd (%rax), %xmm0
leaq 0x353f56(%rip), %rax    # 0x39a4d0
movsd %xmm0, (%rax)
leaq 0x353f73(%rip), %rax    # 0x39a4f8
movsd (%rax), %xmm0
leaq 0x353f48(%rip), %rax    # 0x39a4d8
movsd %xmm0, (%rax)
leaq 0x353f65(%rip), %rax    # 0x39a500
movsd (%rax), %xmm0
leaq 0x353f3a(%rip), %rax    # 0x39a4e0
movsd %xmm0, (%rax)
leaq 0x357f0f(%rip), %rdi    # 0x39e4c0
callq 0x45770
movl %eax, -0x4(%rbp)
cmpl $0x1, -0x4(%rbp)
jne 0x465d0
leaq 0x1334bc(%rip), %rdi    # 0x179a82
callq 0x30d60
jmp 0x4669e
cmpl $0x2, -0x4(%rbp)
jne 0x465e7
leaq 0x1334b8(%rip), %rdi    # 0x179a95
callq 0x30d60
jmp 0x4669c
cmpl $0x3, -0x4(%rbp)
jne 0x465fe
leaq 0x1334b5(%rip), %rdi    # 0x179aa9
callq 0x30d60
jmp 0x4669a
cmpl $0x4, -0x4(%rbp)
jne 0x46615
leaq 0x1334b1(%rip), %rdi    # 0x179abc
callq 0x30d60
jmp 0x46698
cmpl $0x5, -0x4(%rbp)
jne 0x46629
leaq 0x1334d4(%rip), %rdi    # 0x179af6
callq 0x30d60
jmp 0x46696
cmpl $0x0, -0x4(%rbp)
je 0x46631
jmp 0x46694
leaq 0x353e98(%rip), %rax    # 0x39a4d0
movsd (%rax), %xmm0
leaq 0x353ead(%rip), %rax    # 0x39a4f0
movsd %xmm0, (%rax)
leaq 0x353e8a(%rip), %rax    # 0x39a4d8
movsd (%rax), %xmm0
leaq 0x353e9f(%rip), %rax    # 0x39a4f8
movsd %xmm0, (%rax)
leaq 0x353e7c(%rip), %rax    # 0x39a4e0
movsd (%rax), %xmm0
leaq 0x353e91(%rip), %rax    # 0x39a500
movsd %xmm0, (%rax)
leaq 0x353ea6(%rip), %rax    # 0x39a520
movl $0x1, (%rax)
xorl %edi, %edi
callq 0x15b8f0
leaq 0x231396(%rip), %rax    # 0x277a24
movl $0xc81, (%rax)          # imm = 0xC81
jmp 0x46696
jmp 0x46698
jmp 0x4669a
jmp 0x4669c
jmp 0x4669e
movsd -0x10(%rbp), %xmm0
leaq 0x353e26(%rip), %rax    # 0x39a4d0
movsd %xmm0, (%rax)
movsd -0x18(%rbp), %xmm0
leaq 0x353e1e(%rip), %rax    # 0x39a4d8
movsd %xmm0, (%rax)
movsd -0x20(%rbp), %xmm0
leaq 0x353e16(%rip), %rax    # 0x39a4e0
movsd %xmm0, (%rax)
addq $0x20, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)