// File: myudelson[P]hmm-scalable/HMMProblemSt.cpp
// Function: HMMProblemSt::~HMMProblemSt()
HMMProblemSt::~HMMProblemSt() {
//    printf("HMMProblemSt::~HMMProblemSt\n");
    NDAT Nst = this->task->Nst;
//    printf("before null_obs_ratios\n");
    if(this->null_obs_ratios != NULL) free(this->null_obs_ratios);
//    printf("before param_skill\n");
    if(this->param_skill != NULL) free(this->param_skill);
//    printf("before gradient_skill\n");
    if(this->gradient_skill != NULL) free(this->gradient_skill);
//    printf("before lb_param_skill\n");
    if(this->lb_param_skill != NULL) free(this->lb_param_skill);
//    printf("before ub_param_skill\n");
    if(this->ub_param_skill != NULL) free(this->ub_param_skill);
//    printf("before alpha %d\n",this->alpha != NULL);
    if(this->alpha != NULL) free2D(this->alpha, Nst);
//    printf("before po_param_gk\n");
    if(this->po_param_gk != NULL) free2D(this->po_param_gk, this->task->nG);
//    printf("before loglik_k\n");
    if(this->loglik_k != NULL) free(this->loglik_k);
//    printf("before ndat_k\n");
    if(this->ndat_k != NULL) free(this->ndat_k);
//    printf("before beta\n");
    if(this->beta != NULL) free2D(this->beta, Nst);
//    printf("before scale\n");
    if(this->scale != NULL) free(this->scale);
//    printf("before gamma\n");
    if(this->gamma != NULL) free2D(this->gamma, Nst);
//    printf("before xi\n");
    if(this->xi != NULL) free3D(this->xi, Nst, this->task->nS);
//    printf("before backward_ix\n");
    if(this->backward_ix != NULL) free(this->backward_ix);
//    printf("before forward_ix\n");
    if(this->forward_ix != NULL) free(this->forward_ix);
    
    free3D(this->group_skill_map, this->task->nG, this->task->nK); //UNBOOST
    
//    printf("before active_set_block\n");
    free(this->active_set_block);
//    printf("before unblocked_simplex\n");
    free(this->unblocked_simplex);
    
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x20, %rsp
movq %rdi, -0x8(%rbp)
movq -0x8(%rbp), %rax
movq %rax, -0x18(%rbp)
leaq 0xfffd(%rip), %rcx      # 0x21bd8
addq $0x10, %rcx
movq %rcx, (%rax)
movq 0x68(%rax), %rcx
movl 0x8fc(%rcx), %ecx
movl %ecx, -0xc(%rbp)
cmpq $0x0, 0x10(%rax)
je 0x11c03
movq -0x18(%rbp), %rax
movq 0x10(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x28(%rax)
je 0x11c1b
movq -0x18(%rbp), %rax
movq 0x28(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x30(%rax)
je 0x11c33
movq -0x18(%rbp), %rax
movq 0x30(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x40(%rax)
je 0x11c4b
movq -0x18(%rbp), %rax
movq 0x40(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x48(%rax)
je 0x11c63
movq -0x18(%rbp), %rax
movq 0x48(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x70(%rax)
je 0x11c82
movq -0x18(%rbp), %rax
movq 0x70(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xa1d0
jmp 0x11c80
jmp 0x11c82
movq -0x18(%rbp), %rax
cmpq $0x0, 0x78(%rax)
je 0x11ca8
movq -0x18(%rbp), %rcx
movq 0x68(%rcx), %rax
movq 0x78(%rcx), %rdi
movl 0x904(%rax), %esi
callq 0xa1d0
jmp 0x11ca6
jmp 0x11ca8
movq -0x18(%rbp), %rax
cmpq $0x0, 0x80(%rax)
je 0x11cc6
movq -0x18(%rbp), %rax
movq 0x80(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x88(%rax)
je 0x11ce4
movq -0x18(%rbp), %rax
movq 0x88(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x90(%rax)
je 0x11d09
movq -0x18(%rbp), %rax
movq 0x90(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xa1d0
jmp 0x11d07
jmp 0x11d09
movq -0x18(%rbp), %rax
cmpq $0x0, 0xa8(%rax)
je 0x11d27
movq -0x18(%rbp), %rax
movq 0xa8(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0x98(%rax)
je 0x11d4c
movq -0x18(%rbp), %rax
movq 0x98(%rax), %rdi
movl -0xc(%rbp), %esi
callq 0xa1d0
jmp 0x11d4a
jmp 0x11d4c
movq -0x18(%rbp), %rax
cmpq $0x0, 0xa0(%rax)
je 0x11d7c
movq -0x18(%rbp), %rcx
movq 0x68(%rcx), %rax
movq 0xa0(%rcx), %rdi
movl -0xc(%rbp), %esi
movsbl 0x900(%rax), %edx
callq 0x19200
jmp 0x11d7a
jmp 0x11d7c
movq -0x18(%rbp), %rax
cmpq $0x0, 0xb0(%rax)
je 0x11d9a
movq -0x18(%rbp), %rax
movq 0xb0(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
cmpq $0x0, 0xb8(%rax)
je 0x11db8
movq -0x18(%rbp), %rax
movq 0xb8(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rcx
movq 0x68(%rcx), %rax
movq 0xc8(%rcx), %rdi
movl 0x904(%rax), %esi
movl 0x908(%rax), %edx
callq 0x19200
jmp 0x11dda
movq -0x18(%rbp), %rax
movq 0x58(%rax), %rdi
callq 0x3320
movq -0x18(%rbp), %rax
movq 0x60(%rax), %rdi
callq 0x3320
addq $0x20, %rsp
popq %rbp
retq
movq %rax, %rdi
callq 0x45b0
nopw %cs:(%rax,%rax)