// File: /workspace/github_cpp_makefile_star2_O1/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 0x30bdd2(%rip), %rax    # 0x33f2e0
cmpb $0x0, (%rax)
je 0x33611
leaq 0x30bdc2(%rip), %rdi    # 0x33f2e0
callq 0x9470
leaq 0x30c0de(%rip), %rax    # 0x33f608
movzwl (%rax), %eax
cmpl $0x53, %eax
jg 0x335a2
addl $-0x31, %eax
cmpl $0x7, %eax
ja 0x33611
leaq 0xd8b47(%rip), %rcx     # 0x10c08c
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movapd 0xd5c2a(%rip), %xmm1    # 0x109180
andpd %xmm0, %xmm1
leaq 0x2d9c17(%rip), %rax    # 0x30d178
movlpd %xmm1, (%rax)
leaq 0x1e5364(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x8000000, %rax        # imm = 0x8000000
je 0x33893
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x3386c
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x33805
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70d88
cmpl $0x2bf, %eax            # imm = 0x2BF
jg 0x335bf
cmpl $0x54, %eax
je 0x33624
cmpl $0x74, %eax
jne 0x33611
leaq 0x2d9be6(%rip), %rax    # 0x30d1a0
jmp 0x33801
cmpl $0x2c0, %eax            # imm = 0x2C0
je 0x33630
cmpl $0x389, %eax            # imm = 0x389
jne 0x33611
movapd 0xd5bab(%rip), %xmm1    # 0x109180
andpd %xmm0, %xmm1
movsd 0xd8367(%rip), %xmm0    # 0x10b948
ucomisd %xmm1, %xmm0
ja 0x3381a
ucomisd 0xd835d(%rip), %xmm1    # 0x10b950
ja 0x3381a
cvttsd2si %xmm1, %edi
leaq 0x2d9bc4(%rip), %rax    # 0x30d1c8
movl %edi, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x71276
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2d9b79(%rip), %rax    # 0x30d198
jmp 0x33801
leaq 0x2d9b7d(%rip), %rax    # 0x30d1a8
jmp 0x33801
cvttsd2si %xmm0, %eax
leaq 0x2d9b91(%rip), %rcx    # 0x30d1cc
movl %eax, (%rcx)
leaq 0x30bc9c(%rip), %rdi    # 0x33f2e0
callq 0x95e0
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x708fc
leaq 0x2d9b2b(%rip), %rax    # 0x30d188
movsd %xmm0, (%rax)
leaq 0x2d9aa8(%rip), %rax    # 0x30d110
movsd %xmm0, (%rax)
leaq 0x1e5295(%rip), %rax    # 0x218908
cmpl $0x4c, (%rax)
jne 0x33683
leaq 0x2d9a89(%rip), %rax    # 0x30d108
movsd %xmm0, (%rax)
leaq 0x2dac56(%rip), %rax    # 0x30e2e0
cmpl $0x0, 0x179f4(%rax)
jne 0x3369e
leaq 0x2d9a6e(%rip), %rax    # 0x30d108
movsd %xmm0, (%rax)
leaq 0x20b899(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x33826
cvttsd2si %xmm0, %eax
movzbl %al, %edi
movl %edi, %esi
callq 0x7e7cb
jmp 0x33805
leaq 0x2d9ac8(%rip), %rax    # 0x30d190
movsd %xmm0, (%rax)
leaq 0x20b86b(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x33805
mulsd 0xd8274(%rip), %xmm0    # 0x10b958
cvttsd2si %xmm0, %eax
movzwl %ax, %edi
callq 0x7c3fc
jmp 0x33805
leaq 0x2d9ac4(%rip), %rax    # 0x30d1c0
movsd %xmm0, (%rax)
leaq 0x2d9a51(%rip), %rax    # 0x30d158
movsd %xmm0, (%rax)
leaq 0x1e51f6(%rip), %rax    # 0x218908
cmpl $0x4c, (%rax)
jne 0x33722
leaq 0x2d9a32(%rip), %rax    # 0x30d150
movsd %xmm0, (%rax)
leaq 0x20b813(%rip), %rax    # 0x23ef3c
cmpb $0x0, (%rax)
je 0x33739
leaq 0x2d9a1b(%rip), %rax    # 0x30d150
movsd %xmm0, (%rax)
leaq 0x1e5190(%rip), %rax    # 0x2188d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x33805
cvttsd2si %xmm0, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70e7b
movapd 0xd5a1c(%rip), %xmm1    # 0x109180
andpd %xmm0, %xmm1
leaq 0x2d9a11(%rip), %rax    # 0x30d180
movlpd %xmm1, (%rax)
leaq 0x1e5156(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x33845
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x33805
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70dd9
movapd 0xd59d8(%rip), %xmm1    # 0x109180
andpd %xmm0, %xmm1
leaq 0x2d99fd(%rip), %rax    # 0x30d1b0
movlpd %xmm1, (%rax)
leaq 0x1e5112(%rip), %rax    # 0x2188d0
cmpq $0x2000000, (%rax)      # imm = 0x2000000
jne 0x33805
movsd 0xd5891(%rip), %xmm0    # 0x109060
ucomisd %xmm1, %xmm0
ja 0x338c3
ucomisd 0xd5857(%rip), %xmm1    # 0x109038
ja 0x338c3
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7106a
leaq 0x2d99b7(%rip), %rax    # 0x30d1b8
movsd %xmm0, (%rax)
movl $0x1, %edi
callq 0x7096f
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x708b3
leaq 0xe1d98(%rip), %rdi     # 0x1155b9
jmp 0x338fa
leaq 0x1e50a3(%rip), %rax    # 0x2188d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x33805
cvttsd2si %xmm0, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70e2a
movsd 0xd8113(%rip), %xmm0    # 0x10b960
ucomisd %xmm1, %xmm0
ja 0x338cc
ucomisd 0xd810d(%rip), %xmm1    # 0x10b968
ja 0x338cc
movapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x711d8
movsd 0xd58c4(%rip), %xmm0    # 0x109138
ucomisd %xmm1, %xmm0
ja 0x338d5
ucomisd 0xd5846(%rip), %xmm1    # 0x1090c8
ja 0x338d5
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x710f5
ucomisd 0xd804d(%rip), %xmm1    # 0x10b8e8
jbe 0x33905
movups 0xe1c94(%rip), %xmm0    # 0x115538
leaq 0x308975(%rip), %rdi    # 0x33c220
movaps %xmm0, 0x10(%rdi)
movupd 0xe1c71(%rip), %xmm0    # 0x115528
movapd %xmm0, (%rdi)
movw $0x39, 0x20(%rdi)
jmp 0x338fa
leaq 0xe1cc1(%rip), %rdi     # 0x11558b
jmp 0x338fa
leaq 0xe1c96(%rip), %rdi     # 0x115569
jmp 0x338fa
leaq 0x308944(%rip), %rbx    # 0x33c220
leaq 0xe1c67(%rip), %rsi     # 0x11554a
movq %rbx, %rdi
movl $0x5, %edx
movl $0x186a0, %ecx          # imm = 0x186A0
xorl %eax, %eax
callq 0x9060
movq %rbx, %rdi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x2326e
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70ecc