// File: jkingan[P]ladyheather/heathgps.cpp
// Function: update_osc_params()
void update_osc_params()
{
   user_time_constant = time_constant;           // get current values
   user_damping_factor = damping_factor;
   user_jam_sync = jam_sync;
   user_holdover_time = x72_holdover_val;

   user_osc_gain = osc_gain;
   user_pullin = pullin_range;

   user_initial_voltage = initial_voltage;
   user_min_volts = min_volts;
   user_max_volts = max_volts;
   user_min_range = min_dac_v;
   user_max_range = max_dac_v;

   user_max_freq_offset = max_freq_offset;

   // update current values with user set values from command line
   if(user_set_osc_param & PARAM_TC)       user_time_constant = cmd_tc;
   if(user_set_osc_param & PARAM_DAMP)     user_damping_factor = cmd_damp;
   if(user_set_osc_param & PARAM_GAIN)     user_osc_gain = cmd_gain;
   if(user_set_osc_param & PARAM_PULLIN)   user_pullin = cmd_pullin;

   if(user_set_osc_param & PARAM_INITV)    user_initial_voltage = cmd_initdac;
   if(user_set_osc_param & PARAM_MINV)     user_min_volts = cmd_minv;
   if(user_set_osc_param & PARAM_MAXV)     user_max_volts = cmd_maxv;

   if(user_set_osc_param & PARAM_JAMSYNC)  user_jam_sync = cmd_jamsync;
   if(user_set_osc_param & PARAM_MAXFREQ)  user_max_freq_offset = cmd_maxfreq;
   if(user_set_osc_param & PARAM_HOLDOVER) user_holdover_time = cmd_holdover;

   if(user_set_osc_param & PARAM_MINRANGE) user_min_range = cmd_minrange;
   if(user_set_osc_param & PARAM_MAXRANGE) user_max_range = cmd_maxrange;
   user_set_osc_param = 0;

   set_discipline_params(0);
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
leaq 0x2d50d5(%rip), %rax    # 0x36c2d0
movsd (%rax), %xmm0
leaq 0x2d5152(%rip), %rax    # 0x36c358
movsd %xmm0, (%rax)
leaq 0x2d50cf(%rip), %rax    # 0x36c2e0
movsd (%rax), %xmm0
leaq 0x2d5144(%rip), %rax    # 0x36c360
movsd %xmm0, (%rax)
leaq 0x2d50f9(%rip), %rax    # 0x36c320
movsd (%rax), %xmm0
leaq 0x2d515e(%rip), %rax    # 0x36c390
movsd %xmm0, (%rax)
leaq 0x1e2dab(%rip), %rax    # 0x279fe8
movl (%rax), %ecx
leaq 0x2d5162(%rip), %rax    # 0x36c3a8
movl %ecx, (%rax)
leaq 0x2d5099(%rip), %rax    # 0x36c2e8
movsd (%rax), %xmm0
leaq 0x2d510e(%rip), %rax    # 0x36c368
movsd %xmm0, (%rax)
leaq 0x2d50e7(%rip), %rax    # 0x36c34c
movl (%rax), %ecx
leaq 0x2d513e(%rip), %rax    # 0x36c3ac
movl %ecx, (%rax)
leaq 0x2d50b9(%rip), %rax    # 0x36c330
movsd (%rax), %xmm0
leaq 0x2d511e(%rip), %rax    # 0x36c3a0
movsd %xmm0, (%rax)
leaq 0x2d5073(%rip), %rax    # 0x36c300
movsd (%rax), %xmm0
leaq 0x2d50d8(%rip), %rax    # 0x36c370
movsd %xmm0, (%rax)
leaq 0x2d5065(%rip), %rax    # 0x36c308
movsd (%rax), %xmm0
leaq 0x2d50ca(%rip), %rax    # 0x36c378
movsd %xmm0, (%rax)
leaq 0x2d5057(%rip), %rax    # 0x36c310
movsd (%rax), %xmm0
leaq 0x2d50bc(%rip), %rax    # 0x36c380
movsd %xmm0, (%rax)
leaq 0x2d5049(%rip), %rax    # 0x36c318
movsd (%rax), %xmm0
leaq 0x2d50ae(%rip), %rax    # 0x36c388
movsd %xmm0, (%rax)
leaq 0x2d5043(%rip), %rax    # 0x36c328
movsd (%rax), %xmm0
leaq 0x2d50a8(%rip), %rax    # 0x36c398
movsd %xmm0, (%rax)
leaq 0x2d5cdd(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x1, %eax
cmpl $0x0, %eax
je 0x9731b
leaq 0x2d5cd4(%rip), %rax    # 0x36cfe0
movsd (%rax), %xmm0
leaq 0x2d5041(%rip), %rax    # 0x36c358
movsd %xmm0, (%rax)
leaq 0x2d5cb6(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x2, %eax
cmpl $0x0, %eax
je 0x97342
leaq 0x2d5cb5(%rip), %rax    # 0x36cfe8
movsd (%rax), %xmm0
leaq 0x2d5022(%rip), %rax    # 0x36c360
movsd %xmm0, (%rax)
leaq 0x2d5c8f(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x4, %eax
cmpl $0x0, %eax
je 0x97369
leaq 0x2d5c96(%rip), %rax    # 0x36cff0
movsd (%rax), %xmm0
leaq 0x2d5003(%rip), %rax    # 0x36c368
movsd %xmm0, (%rax)
leaq 0x2d5c68(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x100, %eax            # imm = 0x100
cmpl $0x0, %eax
je 0x9738e
leaq 0x2d5c75(%rip), %rax    # 0x36cff8
movl (%rax), %ecx
leaq 0x2d5020(%rip), %rax    # 0x36c3ac
movl %ecx, (%rax)
leaq 0x2d5c43(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x8, %eax
cmpl $0x0, %eax
je 0x973b5
leaq 0x2d5c5a(%rip), %rax    # 0x36d000
movsd (%rax), %xmm0
leaq 0x2d4fef(%rip), %rax    # 0x36c3a0
movsd %xmm0, (%rax)
leaq 0x2d5c1c(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x10, %eax
cmpl $0x0, %eax
je 0x973dc
leaq 0x2d5c3b(%rip), %rax    # 0x36d008
movsd (%rax), %xmm0
leaq 0x2d4f98(%rip), %rax    # 0x36c370
movsd %xmm0, (%rax)
leaq 0x2d5bf5(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x20, %eax
cmpl $0x0, %eax
je 0x97403
leaq 0x2d5c1c(%rip), %rax    # 0x36d010
movsd (%rax), %xmm0
leaq 0x2d4f79(%rip), %rax    # 0x36c378
movsd %xmm0, (%rax)
leaq 0x2d5bce(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x200, %eax            # imm = 0x200
cmpl $0x0, %eax
je 0x9742c
leaq 0x2d5c0b(%rip), %rax    # 0x36d028
movsd (%rax), %xmm0
leaq 0x2d4f68(%rip), %rax    # 0x36c390
movsd %xmm0, (%rax)
leaq 0x2d5ba5(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x400, %eax            # imm = 0x400
cmpl $0x0, %eax
je 0x97455
leaq 0x2d5bea(%rip), %rax    # 0x36d030
movsd (%rax), %xmm0
leaq 0x2d4f47(%rip), %rax    # 0x36c398
movsd %xmm0, (%rax)
leaq 0x2d5b7c(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x2000, %eax           # imm = 0x2000
cmpl $0x0, %eax
je 0x9747a
leaq 0x2d5bc9(%rip), %rax    # 0x36d038
movl (%rax), %ecx
leaq 0x2d4f30(%rip), %rax    # 0x36c3a8
movl %ecx, (%rax)
leaq 0x2d5b57(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x800, %eax            # imm = 0x800
cmpl $0x0, %eax
je 0x974a3
leaq 0x2d5b84(%rip), %rax    # 0x36d018
movsd (%rax), %xmm0
leaq 0x2d4ee1(%rip), %rax    # 0x36c380
movsd %xmm0, (%rax)
leaq 0x2d5b2e(%rip), %rax    # 0x36cfd8
movl (%rax), %eax
andl $0x1000, %eax           # imm = 0x1000
cmpl $0x0, %eax
je 0x974cc
leaq 0x2d5b63(%rip), %rax    # 0x36d020
movsd (%rax), %xmm0
leaq 0x2d4ec0(%rip), %rax    # 0x36c388
movsd %xmm0, (%rax)
leaq 0x2d5b05(%rip), %rax    # 0x36cfd8
movl $0x0, (%rax)
xorl %edi, %edi
callq 0x99d80
popq %rbp
retq
nopw %cs:(%rax,%rax)