// File: myudelson[P]hmm-scalable/utils.cpp
// Function: set_param_defaults(param*)
void set_param_defaults(struct param *param) {
    param->item_complexity = NULL;
	// configurable - set
    param->tol                   = 0.01;
    param->tol_mode              = 'p';
	param->scaled                = 0;
    param->do_not_check_constraints = 0;
	param->sliced                = 0;
    param->duplicate_console     = 0;
	param->maxiter               = 200;
	param->quiet                 = 0;
	param->single_skill          = 0;
	param->structure			 = 1; // default is by skill
	param->solver				 = 2; // default is Gradient Descent
	param->solver_setting		 = -1; // -1 - not set
    param->metrics               = 0;
    param->metrics_target_obs    = 0;
    param->predictions           = 0;
    param->update_known          = 'r';
    param->update_unknown        = 't';
    param->binaryinput           = 0;
	param->Cw                     = Calloc(NUMBER, (size_t)1);
    param->Cw[0]                  = 0;
    param->Ccenters              = NULL;
    param->initfile[0]           = 0; // 1st bit is 0 - no file
    param->init_params           = Calloc(NUMBER, (size_t)5);
    param->init_params_n         = 5;
	param->init_params[0] = 0.5; // PI[0]
	param->init_params[1] = 1.0; // p(not forget)
	param->init_params[2] = 0.4; // p(learn)
	param->init_params[3] = 0.8; // p(not slip)
	param->init_params[4] = 0.2; // p(guess)
	param->param_lo				= Calloc(NUMBER, (size_t)10);
	param->param_lo[0] = 0; param->param_lo[1] = 0; param->param_lo[2] = 1; param->param_lo[3] = 0; param->param_lo[4] = 0;
	param->param_lo[5] = 0; param->param_lo[6] = 0; param->param_lo[7] = 0; param->param_lo[8] = 0; param->param_lo[9] = 0;
	param->param_hi				= Calloc(NUMBER, (size_t)10);
	param->param_hi[0] = 1.0; param->param_hi[1] = 1.0; param->param_hi[2] = 1.0; param->param_hi[3] = 0.0; param->param_hi[4] = 1.0;
	param->param_hi[5] = 1.0; param->param_hi[6] = 1.0; param->param_hi[7] = 0.3; param->param_hi[8] = 0.3; param->param_hi[9] = 1.0;
	param->cv_folds = 0;
	param->cv_strat = 'g'; // default group(student)-stratified
    param->cv_target_obs = 0; // 1st state to validate agains by default, cv_folds enables cross-validation
    param->cv_folds_file[0] = 0; // empty folds file
    param->cv_inout_flag = 'o'; // default rule, we're writing folds out
    param->multiskill = 0; // single skill per ovservation by default
    param->parallel = 0; // parallelization flag, no parallelization (0) by default
    // parse running settings
    param->init_reset = false; // init parameters specified
    param->lo_lims_specd = false; // parameter limits s`pecified
    param->hi_lims_specd = false; // parameter limits s`pecified
    param->stat_specd_gt2 = false; // number of states specified to be >2
    // vocabilaries
    param->map_group_fwd = NULL;
    param->map_group_bwd = NULL;
    param->map_step_fwd = NULL;
    param->map_step_bwd = NULL;
    param->map_skill_fwd = NULL;
    param->map_skill_bwd = NULL;
	// derived from data - set to 0
    param->N  = 0; //will be dynamically set in read_data_...()
    param->Nstacked  = 0; //will be dynamically set in read_data_...()
	param->nS = 2;
	param->nO = 0;
	param->nG = 0;
	param->nK = 0;
	param->nI = 0;
    param->nZ = 1;
    param->nELO = 1;
	// data
    param->all_data = NULL;
    param->nSeq = 0;
	param->k_numg = NULL;
	param->k_data = NULL;
	param->k_g_data = NULL;
	param->g_numk = NULL;
	param->g_data = NULL;
	param->g_k_data = NULL;
    param->N_null = 0;
    param->n_null_skill_group = 0;
    param->null_skills = NULL;
	// fitting specific - Armijo rule
	param->ArmijoC1            = 1e-4;
	param->ArmijoC2            = 0.9; // since we're not newton method
	param->ArmijoReduceFactor  = 2;//1/0.9;//
	param->ArmijoSeed          = 1.0; //1; - since we use smooth stepping 1 is the only thing we need
    param->ArmijoMinStep       = 0.001; //  0.000001~20steps, 0.001~10steps
    // coord descend
    param->first_iteration_qualify = 0;
    param->iterations_to_qualify   = 2;
    param->iterations_limit        = 200;
    // block fitting of some parameters
    param->block_fitting_type = 0; // no bocking of fitting - TODO, enable diff block types
    param->block_fitting[0] = 0; // no bocking fitting for PI
    param->block_fitting[1] = 0; // no bocking fitting for A
    param->block_fitting[2] = 0; // no bocking fitting for B
    param->per_kc_rmse_acc = false;
    // data
    param->dat_obs = NULL;
    param->dat_group = NULL;
    param->dat_skill = NULL;
    param->dat_skill_stacked = NULL;
    param->dat_skill_rcount = NULL;
    param->dat_skill_rix = NULL;
    param->dat_item = NULL;
//    param->dat_multiskill = NULL;
    param->dat_slice = NULL;
	param->tag1 = 0;
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x10, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq $0x0, (%rax)
movq -0x8(%rbp), %rax
movsd 0x4488d(%rip), %xmm0    # 0x4fa80
movsd %xmm0, 0x28(%rax)
movq -0x8(%rbp), %rax
movb $0x70, 0x30(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x31(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x32(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x33(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x34(%rax)
movq -0x8(%rbp), %rax
movl $0xc8, 0x38(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x3d(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x3e(%rax)
movq -0x8(%rbp), %rax
movb $0x2, 0x3f(%rax)
movq -0x8(%rbp), %rax
movb $-0x1, 0x40(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x58(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x5c(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x60(%rax)
movq -0x8(%rbp), %rax
movb $0x72, 0x64(%rax)
movq -0x8(%rbp), %rax
movb $0x74, 0x65(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x68(%rax)
movl $0x1, %edi
movl $0x8, %esi
callq 0x5180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x48(%rax)
movq -0x8(%rbp), %rax
movq 0x48(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x50(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x6c(%rax)
movl $0x5, %edi
movl $0x8, %esi
callq 0x5180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x8(%rax)
movq -0x8(%rbp), %rax
movb $0x5, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsd 0x4477d(%rip), %xmm0    # 0x4fa78
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsd 0x446f9(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsd 0x4474c(%rip), %xmm0    # 0x4fa70
movsd %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsd 0x4472f(%rip), %xmm0    # 0x4fa68
movsd %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x8(%rax), %rax
movsd 0x44712(%rip), %xmm0    # 0x4fa60
movsd %xmm0, 0x20(%rax)
movl $0xa, %edi
movl $0x8, %esi
callq 0x5180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
movsd 0x4466c(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x18(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x48(%rax)
movl $0xa, %edi
movl $0x8, %esi
callq 0x5180
movq %rax, %rcx
movq -0x8(%rbp), %rax
movq %rcx, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x445cd(%rip), %xmm0    # 0x4fa08
movsd %xmm0, (%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x445b9(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x8(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x445a4(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x10(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
xorps %xmm0, %xmm0
movsd %xmm0, 0x18(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x4457f(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x20(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x4456a(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x28(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x44555(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x30(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x44590(%rip), %xmm0    # 0x4fa58
movsd %xmm0, 0x38(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x4457b(%rip), %xmm0    # 0x4fa58
movsd %xmm0, 0x40(%rax)
movq -0x8(%rbp), %rax
movq 0x20(%rax), %rax
movsd 0x44516(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x48(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x46c(%rax)
movq -0x8(%rbp), %rax
movb $0x67, 0x46d(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x46e(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x46f(%rax)
movq -0x8(%rbp), %rax
movb $0x6f, 0x86f(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x918(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x41(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x919(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x91a(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x91b(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x91c(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x920(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x928(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x930(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x938(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x940(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x948(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8b0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8b4(%rax)
movq -0x8(%rbp), %rax
movb $0x2, 0x8b8(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x8b9(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8bc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c0(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8c4(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x8c8(%rax)
movq -0x8(%rbp), %rax
movb $0x1, 0x8c9(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8e8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8dc(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8e0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8f0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8f8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x900(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x908(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x910(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8cc(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x8d8(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8d0(%rax)
movq -0x8(%rbp), %rax
movsd 0x44369(%rip), %xmm0    # 0x4fa50
movsd %xmm0, 0x950(%rax)
movq -0x8(%rbp), %rax
movsd 0x4434d(%rip), %xmm0    # 0x4fa48
movsd %xmm0, 0x958(%rax)
movq -0x8(%rbp), %rax
movsd 0x43901(%rip), %xmm0    # 0x4f010
movsd %xmm0, 0x960(%rax)
movq -0x8(%rbp), %rax
movsd 0x442e5(%rip), %xmm0    # 0x4fa08
movsd %xmm0, 0x968(%rax)
movq -0x8(%rbp), %rax
movsd 0x44309(%rip), %xmm0    # 0x4fa40
movsd %xmm0, 0x970(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x978(%rax)
movq -0x8(%rbp), %rax
movb $0x2, 0x979(%rax)
movq -0x8(%rbp), %rax
movl $0xc8, 0x97c(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x980(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x981(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x982(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x983(%rax)
movq -0x8(%rbp), %rax
movb $0x0, 0x984(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x870(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x878(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x880(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x888(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x890(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x898(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8a0(%rax)
movq -0x8(%rbp), %rax
movq $0x0, 0x8a8(%rax)
movq -0x8(%rbp), %rax
movl $0x0, 0x9a0(%rax)
addq $0x10, %rsp
popq %rbp
retq
nopw %cs:(%rax,%rax)