// File: /workspace/github_cpp_makefile_star2_O1/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 0x1d26ef(%rip), %rbx    # 0x23e3b8
movq (%rbx), %rdi
testq %rdi, %rdi
je 0x6bed5
xorl %esi, %esi
xorl %edx, %edx
callq 0x93d0
leaq 0x1af21f(%rip), %rax    # 0x21af04
cmpl $0x0, (%rax)
je 0x6bd04
movq (%rbx), %rdi
leaq 0x1af22c(%rip), %rax    # 0x21af20
movl (%rax), %edx
leaq 0xb817d(%rip), %rsi     # 0x123e7a
xorl %eax, %eax
callq 0x9560
leaq 0x1af1e9(%rip), %rax    # 0x21aef4
cmpl $0x0, (%rax)
je 0x6bd2a
movq (%rbx), %rdi
leaq 0x1af202(%rip), %rax    # 0x21af1c
movl (%rax), %edx
leaq 0xb8166(%rip), %rsi     # 0x123e89
xorl %eax, %eax
callq 0x9560
leaq 0x1af1c7(%rip), %rax    # 0x21aef8
cmpl $0x0, (%rax)
je 0x6bd52
movq (%rbx), %rdi
leaq 0x1af1c8(%rip), %rax    # 0x21af08
movsd (%rax), %xmm0
leaq 0xb8145(%rip), %rsi     # 0x123e90
movb $0x1, %al
callq 0x9560
leaq 0x1af1a3(%rip), %rax    # 0x21aefc
cmpl $0x0, (%rax)
je 0x6bd7a
movq (%rbx), %rdi
leaq 0x1af1a8(%rip), %rax    # 0x21af10
movsd (%rax), %xmm0
leaq 0xb8129(%rip), %rsi     # 0x123e9c
movb $0x1, %al
callq 0x9560
leaq 0x1af17f(%rip), %rax    # 0x21af00
cmpl $0x0, (%rax)
je 0x6bda0
movq (%rbx), %rdi
leaq 0x1af188(%rip), %rax    # 0x21af18
movl (%rax), %edx
leaq 0xb8111(%rip), %rsi     # 0x123eaa
xorl %eax, %eax
callq 0x9560
leaq 0x1af10d(%rip), %rax    # 0x21aeb4
cmpl $0x0, (%rax)
je 0x6bdc8
movq (%rbx), %rdi
leaq 0x1aeeb2(%rip), %rax    # 0x21ac68
movsd (%rax), %xmm0
leaq 0xb80f6(%rip), %rsi     # 0x123eb7
movb $0x1, %al
callq 0x9560
leaq 0x1af0e1(%rip), %rax    # 0x21aeb0
cmpl $0x0, (%rax)
je 0x6bdf0
movq (%rbx), %rdi
leaq 0x1af102(%rip), %rax    # 0x21aee0
movsd (%rax), %xmm0
leaq 0xb80d8(%rip), %rsi     # 0x123ec1
movb $0x1, %al
callq 0x9560
leaq 0x1af0c1(%rip), %rax    # 0x21aeb8
cmpl $0x0, (%rax)
je 0x6be16
movq (%rbx), %rdi
leaq 0x1af0c6(%rip), %rax    # 0x21aecc
movl (%rax), %edx
leaq 0xb80ba(%rip), %rsi     # 0x123ec9
xorl %eax, %eax
callq 0x9560
leaq 0x1af0a7(%rip), %rax    # 0x21aec4
cmpl $0x0, (%rax)
je 0x6be3c
movq (%rbx), %rdi
leaq 0x1af0a4(%rip), %rax    # 0x21aed0
movl (%rax), %edx
leaq 0xb80a0(%rip), %rsi     # 0x123ed5
xorl %eax, %eax
callq 0x9560
leaq 0x1af079(%rip), %rax    # 0x21aebc
cmpl $0x0, (%rax)
je 0x6be62
movq (%rbx), %rdi
leaq 0x1af082(%rip), %rax    # 0x21aed4
movl (%rax), %edx
leaq 0xb8082(%rip), %rsi     # 0x123edd
xorl %eax, %eax
callq 0x9560
leaq 0x1af05f(%rip), %rax    # 0x21aec8
cmpl $0x0, (%rax)
je 0x6be88
movq (%rbx), %rdi
leaq 0x1af064(%rip), %rax    # 0x21aedc
movl (%rax), %edx
leaq 0xb8064(%rip), %rsi     # 0x123ee5
xorl %eax, %eax
callq 0x9560
leaq 0x1af031(%rip), %rax    # 0x21aec0
cmpl $0x0, (%rax)
je 0x6beae
movq (%rbx), %rdi
leaq 0x1af03a(%rip), %rax    # 0x21aed8
movl (%rax), %edx
leaq 0xb8047(%rip), %rsi     # 0x123eee
xorl %eax, %eax
callq 0x9560
movq (%rbx), %rcx
leaq 0xb803e(%rip), %rdi     # 0x123ef6
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