// File: /workspace/github_cpp_makefile_star2_O2/jkingan[P]ladyheather/heathui.cpp
// Function: edit_osc_param()
void edit_osc_param()
{
DATA_SIZE val;

   // change an oscillator control parameter
   if(edit_buffer[0] == 0) return;
   val = (DATA_SIZE) atof(edit_buffer);

   if(getting_string == TC_CMD) {  // time constant
      val = (DATA_SIZE) fabs(val);
      user_time_constant = val;
      if(rcvr_type == PRS_RCVR) {
         set_prs_pt((int) val);
         return;
      }
      else if(rcvr_type == SRO_RCVR) {
         if((val < 0) || (val > 999999)) {
            sprintf(out, "Time constant must be 0 .. 999999");
            edit_error(out);
         }
         else {
            set_sro_tc((int) val);
         }
         return;
      }
      else if(rcvr_type == X72_RCVR) {
         if((val < (DATA_SIZE) MIN_X72_TC) || (val > (DATA_SIZE) MAX_X72_TC)) {
            sprintf(out, "Time constant must be %d .. %d", MIN_X72_TC, MAX_X72_TC);
            edit_error(out);
         }
         else {
            set_x72_tc((int) val);
         }
         return;
      }
   }
   else if(getting_string == DAMP_CMD) {  // damping factor
      val = (DATA_SIZE) fabs(val);
      user_damping_factor = val;
      if(rcvr_type == PRS_RCVR) {
         set_prs_pf((int) val);
         return;
      }
      else if(rcvr_type == X72_RCVR) {
         if((val < 0.25) || (val > 4.0)) {
            edit_error("Time constant must be 0.25 .. 4.0");
         }
         else {
            set_x72_damping((double) val);
         }
         return;
      }
   }
   else if(getting_string == GAIN_CMD) {  // osc gain
      user_osc_gain = val;
      lars_gain = val;
      if(ticc_type == LARS_TICC) osc_gain = val;
      if(com[RCVR_PORT].process_com == 0) osc_gain = val;
      if(luxor) set_luxor_sens((u08) val, (u08) val);
      else if(rcvr_type == PRS_RCVR) {
         set_prs_ga((int) val);
         return;
      }
   }
   else if(getting_string == INITV_CMD) {  // initial dac voltage
      user_initial_voltage = val;
      lars_initv = val;
      if(ticc_type == LARS_TICC) initial_voltage = val;
      if(saw_ntpx) initial_voltage = val;
      if(rcvr_type == PRS_RCVR) {
         set_prs_pi((int) val);
         return;
      }
   }
   else if(getting_string == JAMSYNC_CMD) {  // jam sync theshold
      val = (DATA_SIZE) fabs(val);
      user_jam_sync = val;
      if(rcvr_type == X72_RCVR) {
         if((val < 100.0) || (val > 1000.0)) {
            edit_error("Jamsync threshold time must be 100 .. 1000 ns");
         }
         else {
            set_x72_jamthresh((int) val);
         }
         return;
      }
   }
   else if(getting_string == MAXV_CMD) {  // max volts / luxor driver mode change
      user_max_volts = val;
   }
   else if(getting_string == MAX_FOSC_CMD) {  // max freq offset
      user_max_freq_offset = val;
   }
   else if(getting_string == MIN_RANGE_CMD) {  // min EFC range volts
      user_min_range = val;
   }
   else if(getting_string == MAX_RANGE_CMD) {  // max EFC range volts
      user_max_range = val;
   }
   else if(getting_string == MINV_CMD) {  // min volts / battery pwm level
      user_min_volts = val;
if(luxor) set_batt_pwm((u16) (val * (DATA_SIZE) 65535.0));
   }
   else if(getting_string == PULLIN_CMD) {
      user_pullin = (int) val;
      set_pullin_range(atoi(edit_buffer));
return;
   }
   else if(getting_string == X72_HOLDOVER_CMD) {
      val = (DATA_SIZE) fabs(val);
      if((val < 120) || (val > 1200)) {
         edit_error("Holdover analysis time must be 120 .. 1200");
      }
      else {
         user_holdover_time = (int) val;
         set_x72_holdover((int) val);
      }
return;
   }
   else return;   // unknown osc param

   set_discipline_params(1);
   request_all_dis_params();
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
pushq %rbx
pushq %rax
leaq 0x2f89e1(%rip), %rax    # 0x3292e0
cmpb $0x0, (%rax)
je 0x309ee
leaq 0x2f89d1(%rip), %rdi    # 0x3292e0
callq 0x9470
leaq 0x2f8ced(%rip), %rax    # 0x329608
movzwl (%rax), %eax
leal -0x31(%rax), %ecx
cmpl $0x7, %ecx
ja 0x3098a
leaq 0xc57df(%rip), %rax     # 0xf610c
movslq (%rax,%rcx,4), %rcx
addq %rax, %rcx
jmpq *%rcx
movapd 0xc2852(%rip), %xmm1    # 0xf3190
andpd %xmm0, %xmm1
leaq 0x2c682f(%rip), %rax    # 0x2f7178
movlpd %xmm1, (%rax)
leaq 0x1d1f7c(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x8000000, %rax        # imm = 0x8000000
je 0x30c7a
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x30c53
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x30bee
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67601
cmpl $0x54, %eax
je 0x30a01
cmpl $0x74, %eax
je 0x30a78
cmpl $0x2c0, %eax            # imm = 0x2C0
je 0x30a84
cmpl $0x389, %eax            # imm = 0x389
jne 0x309ee
movapd 0xc27de(%rip), %xmm1    # 0xf3190
andpd %xmm0, %xmm1
movsd 0xc500a(%rip), %xmm0    # 0xf59c8
ucomisd %xmm1, %xmm0
ja 0x30c01
ucomisd 0xc5000(%rip), %xmm1    # 0xf59d0
ja 0x30c01
cvttsd2si %xmm1, %edi
leaq 0x2c67e7(%rip), %rax    # 0x2f71c8
movl %edi, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67ae4
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2c679c(%rip), %rax    # 0x2f7198
jmp 0x30bea
leaq 0x2c67a0(%rip), %rax    # 0x2f71a8
jmp 0x30bea
leaq 0x2c6774(%rip), %rax    # 0x2f7188
movsd %xmm0, (%rax)
leaq 0x2c66f1(%rip), %rax    # 0x2f7110
movsd %xmm0, (%rax)
leaq 0x1d1ede(%rip), %rax    # 0x202908
cmpl $0x4c, (%rax)
jne 0x30a3a
leaq 0x2c66d2(%rip), %rax    # 0x2f7108
movsd %xmm0, (%rax)
leaq 0x2c789f(%rip), %rax    # 0x2f82e0
cmpl $0x0, 0x179f4(%rax)
jne 0x30a55
leaq 0x2c66b7(%rip), %rax    # 0x2f7108
movsd %xmm0, (%rax)
leaq 0x1f84e2(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x30c0d
cvttsd2si %xmm0, %eax
movzbl %al, %edi
movl %edi, %esi
callq 0x73266
jmp 0x30bee
leaq 0x2c6721(%rip), %rax    # 0x2f71a0
jmp 0x30bea
cvttsd2si %xmm0, %eax
leaq 0x2c673d(%rip), %rcx    # 0x2f71cc
movl %eax, (%rcx)
leaq 0x2f8848(%rip), %rdi    # 0x3292e0
callq 0x95e0
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x671f0
leaq 0x2c66df(%rip), %rax    # 0x2f7190
movsd %xmm0, (%rax)
leaq 0x1f8482(%rip), %rax    # 0x228f3e
cmpb $0x0, (%rax)
je 0x30bee
mulsd 0xc4f0b(%rip), %xmm0    # 0xf59d8
cvttsd2si %xmm0, %eax
movzwl %ax, %edi
callq 0x71025
jmp 0x30bee
leaq 0x2c66db(%rip), %rax    # 0x2f71c0
movsd %xmm0, (%rax)
leaq 0x2c6668(%rip), %rax    # 0x2f7158
movsd %xmm0, (%rax)
leaq 0x1d1e0d(%rip), %rax    # 0x202908
cmpl $0x4c, (%rax)
jne 0x30b0b
leaq 0x2c6649(%rip), %rax    # 0x2f7150
movsd %xmm0, (%rax)
leaq 0x1f842a(%rip), %rax    # 0x228f3c
cmpb $0x0, (%rax)
je 0x30b22
leaq 0x2c6632(%rip), %rax    # 0x2f7150
movsd %xmm0, (%rax)
leaq 0x1d1da7(%rip), %rax    # 0x2028d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x30bee
cvttsd2si %xmm0, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x676f4
movapd 0xc2643(%rip), %xmm1    # 0xf3190
andpd %xmm0, %xmm1
leaq 0x2c6628(%rip), %rax    # 0x2f7180
movlpd %xmm1, (%rax)
leaq 0x1d1d6d(%rip), %rax    # 0x2028d0
movq (%rax), %rax
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x30c2c
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x30bee
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67652
movapd 0xc25ff(%rip), %xmm1    # 0xf3190
andpd %xmm0, %xmm1
leaq 0x2c6614(%rip), %rax    # 0x2f71b0
movlpd %xmm1, (%rax)
leaq 0x1d1d29(%rip), %rax    # 0x2028d0
cmpq $0x2000000, (%rax)      # imm = 0x2000000
jne 0x30bee
movsd 0xc24a8(%rip), %xmm0    # 0xf3060
ucomisd %xmm1, %xmm0
ja 0x30caa
ucomisd 0xc246e(%rip), %xmm1    # 0xf3038
ja 0x30caa
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x678da
leaq 0x2c65ce(%rip), %rax    # 0x2f71b8
movsd %xmm0, (%rax)
pushq $0x1
popq %rdi
callq 0x67252
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x671af
leaq 0xceac5(%rip), %rdi     # 0xff6cd
jmp 0x30cdf
leaq 0x1d1cbc(%rip), %rax    # 0x2028d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x30bee
cvttsd2si %xmm0, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x676a3
movsd 0xc4dac(%rip), %xmm0    # 0xf59e0
ucomisd %xmm1, %xmm0
ja 0x30cb3
ucomisd 0xc4da6(%rip), %xmm1    # 0xf59e8
ja 0x30cb3
movapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67a48
movsd 0xc24e5(%rip), %xmm0    # 0xf3140
ucomisd %xmm1, %xmm0
ja 0x30cbc
ucomisd 0xc245f(%rip), %xmm1    # 0xf30c8
ja 0x30cbc
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67965
ucomisd 0xc4cee(%rip), %xmm1    # 0xf5970
jbe 0x30cea
movups 0xce9c1(%rip), %xmm0    # 0xff64c
leaq 0x2f558e(%rip), %rdi    # 0x326220
movaps %xmm0, 0x10(%rdi)
movupd 0xce99e(%rip), %xmm0    # 0xff63c
movapd %xmm0, (%rdi)
movw $0x39, 0x20(%rdi)
jmp 0x30cdf
leaq 0xce9ee(%rip), %rdi     # 0xff69f
jmp 0x30cdf
leaq 0xce9c3(%rip), %rdi     # 0xff67d
jmp 0x30cdf
leaq 0x2f555d(%rip), %rbx    # 0x326220
leaq 0xce994(%rip), %rsi     # 0xff65e
pushq $0x5
popq %rdx
movq %rbx, %rdi
movl $0x186a0, %ecx          # imm = 0x186A0
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x214df
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x67745