// File: /workspace/github_cpp_makefile_star2_O3/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 0x30bcb7(%rip), %rax    # 0x33f2e0
cmpb $0x0, (%rax)
je 0x3372c
leaq 0x30bca7(%rip), %rdi    # 0x33f2e0
callq 0x9470
leaq 0x30bfc3(%rip), %rax    # 0x33f608
movzwl (%rax), %eax
cmpl $0x53, %eax
jg 0x336bd
addl $-0x31, %eax
cmpl $0x7, %eax
ja 0x3372c
leaq 0xd8a34(%rip), %rcx     # 0x10c094
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movapd 0xd5b1f(%rip), %xmm1    # 0x109190
andpd %xmm0, %xmm1
leaq 0x2d9afc(%rip), %rax    # 0x30d178
movlpd %xmm1, (%rax)
leaq 0x1e5249(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x8000000, %rax        # imm = 0x8000000
je 0x339ae
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x33987
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x33920
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70e11
cmpl $0x2bf, %eax            # imm = 0x2BF
jg 0x336da
cmpl $0x54, %eax
je 0x3373f
cmpl $0x74, %eax
jne 0x3372c
leaq 0x2d9acb(%rip), %rax    # 0x30d1a0
jmp 0x3391c
cmpl $0x2c0, %eax            # imm = 0x2C0
je 0x3374b
cmpl $0x389, %eax            # imm = 0x389
jne 0x3372c
movapd 0xd5aa0(%rip), %xmm1    # 0x109190
andpd %xmm0, %xmm1
movsd 0xd8254(%rip), %xmm0    # 0x10b950
ucomisd %xmm1, %xmm0
ja 0x33935
ucomisd 0xd824a(%rip), %xmm1    # 0x10b958
ja 0x33935
cvttsd2si %xmm1, %edi
leaq 0x2d9aa9(%rip), %rax    # 0x30d1c8
movl %edi, (%rax)
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x712ff
addq $0x8, %rsp
popq %rbx
popq %rbp
retq
leaq 0x2d9a5e(%rip), %rax    # 0x30d198
jmp 0x3391c
leaq 0x2d9a62(%rip), %rax    # 0x30d1a8
jmp 0x3391c
cvttsd2si %xmm0, %eax
leaq 0x2d9a76(%rip), %rcx    # 0x30d1cc
movl %eax, (%rcx)
leaq 0x30bb81(%rip), %rdi    # 0x33f2e0
callq 0x95e0
movl %eax, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x709c4
leaq 0x2d9a10(%rip), %rax    # 0x30d188
movsd %xmm0, (%rax)
leaq 0x2d998d(%rip), %rax    # 0x30d110
movsd %xmm0, (%rax)
leaq 0x1e517a(%rip), %rax    # 0x218908
cmpl $0x4c, (%rax)
jne 0x3379e
leaq 0x2d996e(%rip), %rax    # 0x30d108
movsd %xmm0, (%rax)
leaq 0x2dab3b(%rip), %rax    # 0x30e2e0
cmpl $0x0, 0x179f4(%rax)
jne 0x337b9
leaq 0x2d9953(%rip), %rax    # 0x30d108
movsd %xmm0, (%rax)
leaq 0x20b77e(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x33941
cvttsd2si %xmm0, %eax
movzbl %al, %edi
movl %edi, %esi
callq 0x7e5e2
jmp 0x33920
leaq 0x2d99ad(%rip), %rax    # 0x30d190
movsd %xmm0, (%rax)
leaq 0x20b750(%rip), %rax    # 0x23ef3e
cmpb $0x0, (%rax)
je 0x33920
mulsd 0xd8161(%rip), %xmm0    # 0x10b960
cvttsd2si %xmm0, %eax
movzwl %ax, %edi
callq 0x7c189
jmp 0x33920
leaq 0x2d99a9(%rip), %rax    # 0x30d1c0
movsd %xmm0, (%rax)
leaq 0x2d9936(%rip), %rax    # 0x30d158
movsd %xmm0, (%rax)
leaq 0x1e50db(%rip), %rax    # 0x218908
cmpl $0x4c, (%rax)
jne 0x3383d
leaq 0x2d9917(%rip), %rax    # 0x30d150
movsd %xmm0, (%rax)
leaq 0x20b6f8(%rip), %rax    # 0x23ef3c
cmpb $0x0, (%rax)
je 0x33854
leaq 0x2d9900(%rip), %rax    # 0x30d150
movsd %xmm0, (%rax)
leaq 0x1e5075(%rip), %rax    # 0x2188d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x33920
cvttsd2si %xmm0, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70f04
movapd 0xd5911(%rip), %xmm1    # 0x109190
andpd %xmm0, %xmm1
leaq 0x2d98f6(%rip), %rax    # 0x30d180
movlpd %xmm1, (%rax)
leaq 0x1e503b(%rip), %rax    # 0x2188d0
movq (%rax), %rax
cmpq $0x2000000, %rax        # imm = 0x2000000
je 0x33960
cmpq $0x1000000, %rax        # imm = 0x1000000
jne 0x33920
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70e62
movapd 0xd58cd(%rip), %xmm1    # 0x109190
andpd %xmm0, %xmm1
leaq 0x2d98e2(%rip), %rax    # 0x30d1b0
movlpd %xmm1, (%rax)
leaq 0x1e4ff7(%rip), %rax    # 0x2188d0
cmpq $0x2000000, (%rax)      # imm = 0x2000000
jne 0x33920
movsd 0xd5776(%rip), %xmm0    # 0x109060
ucomisd %xmm1, %xmm0
ja 0x339de
ucomisd 0xd573c(%rip), %xmm1    # 0x109038
ja 0x339de
cvttpd2dq %xmm1, %xmm0
cvtdq2pd %xmm0, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x710f3
leaq 0x2d989c(%rip), %rax    # 0x30d1b8
movsd %xmm0, (%rax)
movl $0x1, %edi
callq 0x70a37
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7097b
leaq 0xe1d11(%rip), %rdi     # 0x11564d
jmp 0x33a15
leaq 0x1e4f88(%rip), %rax    # 0x2188d0
cmpq $0x1000000, (%rax)      # imm = 0x1000000
jne 0x33920
cvttsd2si %xmm0, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70eb3
movsd 0xd8000(%rip), %xmm0    # 0x10b968
ucomisd %xmm1, %xmm0
ja 0x339e7
ucomisd 0xd7ffa(%rip), %xmm1    # 0x10b970
ja 0x339e7
movapd %xmm1, %xmm0
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x71261
movsd 0xd57a9(%rip), %xmm0    # 0x109138
ucomisd %xmm1, %xmm0
ja 0x339f0
ucomisd 0xd572b(%rip), %xmm1    # 0x1090c8
ja 0x339f0
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x7117e
ucomisd 0xd7f42(%rip), %xmm1    # 0x10b8f8
jbe 0x33a20
movups 0xe1c0d(%rip), %xmm0    # 0x1155cc
leaq 0x30885a(%rip), %rdi    # 0x33c220
movaps %xmm0, 0x10(%rdi)
movupd 0xe1bea(%rip), %xmm0    # 0x1155bc
movapd %xmm0, (%rdi)
movw $0x39, 0x20(%rdi)
jmp 0x33a15
leaq 0xe1c3a(%rip), %rdi     # 0x11561f
jmp 0x33a15
leaq 0xe1c0f(%rip), %rdi     # 0x1155fd
jmp 0x33a15
leaq 0x308829(%rip), %rbx    # 0x33c220
leaq 0xe1be0(%rip), %rsi     # 0x1155de
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 0x23027
cvttsd2si %xmm1, %edi
addq $0x8, %rsp
popq %rbx
popq %rbp
jmp 0x70f55