// File: /workspace/github_cpp_makefile_star2_O3/jkingan[P]ladyheather/heathgps.cpp
// Function: save_x72_state()
void save_x72_state()
{
   // save current settings to disk file since STUPID Symmetricom does not
   // save most settings to eeprom

   if(x72_file == 0) {
      return;
   }

   fseek(x72_file, 0L, SEEK_SET);


   if(user_set_x72_dmode) {
      fprintf(x72_file, "%d DISCIPLINE\n", last_x72_dmode);
   }
   if(user_set_x72_tc) {
      fprintf(x72_file, "%d TC\n", last_x72_tc);
   }
   if(user_set_x72_damping) {
      fprintf(x72_file, "%g DAMPING\n", last_x72_damping);
   }
   if(user_set_x72_jamthresh) {
      fprintf(x72_file, "%g JAMTHRESH\n", last_x72_jamthresh);
   }
   if(user_set_x72_holdover) {
      fprintf(x72_file, "%d HOLDOVER\n", last_x72_holdover);
   }


   if(user_set_x72_osc) {
      fprintf(x72_file, "%.1f OSC\n", x72_osc);
   }

   if(user_set_x72_dds) { 
      fprintf(x72_file, "%g DDS\n", last_x72_dds);
   }

   if(user_set_x72_acmos_freq) { 
      fprintf(x72_file, "%d DIVIDER\n", last_x72_acmos_freq);
   }

   if(user_set_x72_efc) { 
      fprintf(x72_file, "%d EFC\n", last_x72_efc);
   }

   if(user_set_x72_pps_enable) {
      fprintf(x72_file, "%d PPS\n", last_x72_pps_enable);
   }

   if(user_set_x72_srvc) {
      fprintf(x72_file, "%d SRVC\n", last_x72_srvc);
   }

   if(user_set_x72_tic) { 
      fprintf(x72_file, "%d TIC\n", last_x72_tic);
   }


   fprintf(x72_file, "\n0 EOF\n");

   fflush(x72_file);   // !!!!! we should probably close and re-open the file
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x1d25a4(%rip), %rbx    # 0x23e3b8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6c020
xorl %esi, %esi
xorl %edx, %edx
callq 0x93d0
leaq 0x1af0d4(%rip), %rax    # 0x21af04
cmpl $0x0, (%rax)
je 0x6be4f
movq (%rbx), %rdi
leaq 0x1af0e1(%rip), %rax    # 0x21af20
movl (%rax), %edx
leaq 0xb8112(%rip), %rsi     # 0x123f5a
xorl %eax, %eax
callq 0x9560
leaq 0x1af09e(%rip), %rax    # 0x21aef4
cmpl $0x0, (%rax)
je 0x6be75
movq (%rbx), %rdi
leaq 0x1af0b7(%rip), %rax    # 0x21af1c
movl (%rax), %edx
leaq 0xb80fb(%rip), %rsi     # 0x123f69
xorl %eax, %eax
callq 0x9560
leaq 0x1af07c(%rip), %rax    # 0x21aef8
cmpl $0x0, (%rax)
je 0x6be9d
movq (%rbx), %rdi
leaq 0x1af07d(%rip), %rax    # 0x21af08
movsd (%rax), %xmm0
leaq 0xb80da(%rip), %rsi     # 0x123f70
movb $0x1, %al
callq 0x9560
leaq 0x1af058(%rip), %rax    # 0x21aefc
cmpl $0x0, (%rax)
je 0x6bec5
movq (%rbx), %rdi
leaq 0x1af05d(%rip), %rax    # 0x21af10
movsd (%rax), %xmm0
leaq 0xb80be(%rip), %rsi     # 0x123f7c
movb $0x1, %al
callq 0x9560
leaq 0x1af034(%rip), %rax    # 0x21af00
cmpl $0x0, (%rax)
je 0x6beeb
movq (%rbx), %rdi
leaq 0x1af03d(%rip), %rax    # 0x21af18
movl (%rax), %edx
leaq 0xb80a6(%rip), %rsi     # 0x123f8a
xorl %eax, %eax
callq 0x9560
leaq 0x1aefc2(%rip), %rax    # 0x21aeb4
cmpl $0x0, (%rax)
je 0x6bf13
movq (%rbx), %rdi
leaq 0x1aed67(%rip), %rax    # 0x21ac68
movsd (%rax), %xmm0
leaq 0xb808b(%rip), %rsi     # 0x123f97
movb $0x1, %al
callq 0x9560
leaq 0x1aef96(%rip), %rax    # 0x21aeb0
cmpl $0x0, (%rax)
je 0x6bf3b
movq (%rbx), %rdi
leaq 0x1aefb7(%rip), %rax    # 0x21aee0
movsd (%rax), %xmm0
leaq 0xb806d(%rip), %rsi     # 0x123fa1
movb $0x1, %al
callq 0x9560
leaq 0x1aef76(%rip), %rax    # 0x21aeb8
cmpl $0x0, (%rax)
je 0x6bf61
movq (%rbx), %rdi
leaq 0x1aef7b(%rip), %rax    # 0x21aecc
movl (%rax), %edx
leaq 0xb804f(%rip), %rsi     # 0x123fa9
xorl %eax, %eax
callq 0x9560
leaq 0x1aef5c(%rip), %rax    # 0x21aec4
cmpl $0x0, (%rax)
je 0x6bf87
movq (%rbx), %rdi
leaq 0x1aef59(%rip), %rax    # 0x21aed0
movl (%rax), %edx
leaq 0xb8035(%rip), %rsi     # 0x123fb5
xorl %eax, %eax
callq 0x9560
leaq 0x1aef2e(%rip), %rax    # 0x21aebc
cmpl $0x0, (%rax)
je 0x6bfad
movq (%rbx), %rdi
leaq 0x1aef37(%rip), %rax    # 0x21aed4
movl (%rax), %edx
leaq 0xb8017(%rip), %rsi     # 0x123fbd
xorl %eax, %eax
callq 0x9560
leaq 0x1aef14(%rip), %rax    # 0x21aec8
cmpl $0x0, (%rax)
je 0x6bfd3
movq (%rbx), %rdi
leaq 0x1aef19(%rip), %rax    # 0x21aedc
movl (%rax), %edx
leaq 0xb7ff9(%rip), %rsi     # 0x123fc5
xorl %eax, %eax
callq 0x9560
leaq 0x1aeee6(%rip), %rax    # 0x21aec0
cmpl $0x0, (%rax)
je 0x6bff9
movq (%rbx), %rdi
leaq 0x1aeeef(%rip), %rax    # 0x21aed8
movl (%rax), %edx
leaq 0xb7fdc(%rip), %rsi     # 0x123fce
xorl %eax, %eax
callq 0x9560
movq (%rbx), %rcx
leaq 0xb7fd3(%rip), %rdi     # 0x123fd6
movl $0x7, %esi
movl $0x1, %edx
callq 0x9750
movq (%rbx), %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x9420
addq $0x8, %rsp
popq %rbx
popq %rbp
retq