LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemAGK.cpp
// Function: HMMProblemAGK::getAg(int)
NUMBER** HMMProblemAGK::getAg(NCAT x) {
	if( x > (this->p->nG-1) ) {
		fprintf(stderr,"While accessing A, skill index %d exceeded last index of the data %d.\n", x, this->p->nG-1);
		exit(1);
	}
	return this->Ag[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8bc(%rax), %ecx
cmpl %esi, %ecx
jle 0x19946
movq 0x90(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1f688(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x13b3a(%rip), %rsi     # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemAGK.cpp
// Function: HMMProblemAGK::fit()
void HMMProblemAGK::fit() {
    NUMBER* loglik_rmse = init1D<NUMBER>(2);
    FitNullSkill(loglik_rmse, false /*do not need RMSE/SE*/);
    if(this->p->structure==STRUCTURE_Agk)
        loglik_rmse[0] += GradientDescent();
    else {
        fprintf(stderr,"Solver specified is not supported.\n");
        exit(1);
    }
    this->neg_log_lik = loglik_rmse[0];
    free(loglik_rmse);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rdi
callq 0x7dde
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x10bc8
movq 0x88(%rbx), %rax
cmpb $0x6, 0x3e(%rax)
jne 0x19fc3
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xa0(%rax)
addsd (%r14), %xmm0
movsd %xmm0, 0x20(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4290
movq 0x1f00e(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x1354e(%rip), %rdi     # 0x2d522
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::HMMProblemPiAGK(param*)
HMMProblemPiAGK::HMMProblemPiAGK(struct param *param) {
//    this->sizes = {param->nK, param->nK, param->nK};
    this->sizes[0] = param->nK;
    this->sizes[1] = param->nK;
    this->sizes[2] = param->nK;
    this->n_params = param->nK * 4 + param->nG * 2;
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0x1da8e(%rip), %rax     # 0x38938
movq %rax, (%rbx)
movl 0x8c0(%r14), %eax
movl %eax, 0xc(%rbx)
movl %eax, 0x10(%rbx)
movl 0x8c0(%r14), %eax
movl %eax, 0x14(%rbx)
shll $0x2, %eax
movl 0x8bc(%r14), %ecx
leal (%rax,%rcx,2), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1aefa
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xe0d4
movq %r14, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::getA(int)
NUMBER** HMMProblemPiAGK::getA(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing A, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->A[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1b57d
movq 0x40(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1da51(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x11f03(%rip), %rsi     # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::getB(int)
NUMBER** HMMProblemPiAGK::getB(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing B, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->B[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1b5bf
movq 0x48(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1da0f(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x11f08(%rip), %rsi     # 0x2d4db
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::getPIk(int)
NUMBER* HMMProblemPiAGK::getPIk(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing PI_k, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->pi[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1b601
movq 0x38(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1d9cd(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x12275(%rip), %rsi     # 0x2d88a
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::getAk(int)
NUMBER** HMMProblemPiAGK::getAk(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing A, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->A[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1b6b7
movq 0x40(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1d917(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x11dc9(%rip), %rsi     # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::getAg(int)
NUMBER** HMMProblemPiAGK::getAg(NCAT x) {
	if( x > (this->p->nG-1) ) {
		fprintf(stderr,"While accessing A, skill index %d exceeded last index of the data %d.\n", x, this->p->nG-1);
		exit(1);
	}
	return this->Ag[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8bc(%rax), %ecx
cmpl %esi, %ecx
jle 0x1b6fc
movq 0x98(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1d8d2(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x11d84(%rip), %rsi     # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiAGK.cpp
// Function: HMMProblemPiAGK::fit()
void HMMProblemPiAGK::fit() {
    NUMBER* loglik_rmse = init1D<NUMBER>(2);
    FitNullSkill(loglik_rmse, false /*do not need RMSE/SE*/);
    if(this->p->structure==STRUCTURE_PIAgk) {
        loglik_rmse[0] += GradientDescent();
    } else {
        fprintf(stderr,"Solver specified is not supported.\n");
        exit(1);
    }
    this->neg_log_lik = loglik_rmse[0];
    free(loglik_rmse);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rdi, %rbx
pushq $0x2
popq %rdi
callq 0x7dde
movq %rax, %r14
movq %rbx, %rdi
movq %rax, %rsi
xorl %edx, %edx
callq 0x10bc8
movq 0x88(%rbx), %rax
cmpb $0x5, 0x3e(%rax)
jne 0x1bf83
movq (%rbx), %rax
movq %rbx, %rdi
callq *0xa0(%rax)
addsd (%r14), %xmm0
movsd %xmm0, 0x20(%rbx)
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r14
jmp 0x4290
movq 0x1d04e(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x1158e(%rip), %rdi     # 0x2d522
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::HMMProblemPiABGK(param*)
HMMProblemPiABGK::HMMProblemPiABGK(struct param *param) {
    //    this->sizes = {param->nK, param->nK, param->nK};
    this->sizes[0] = param->nK;
    this->sizes[1] = param->nK;
    this->sizes[2] = param->nK;
    this->n_params = param->nK * 4 + param->nG * 4;
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0x1bad6(%rip), %rax     # 0x38a08
movq %rax, (%rbx)
movl 0x8c0(%r14), %eax
movl %eax, 0xc(%rbx)
movl %eax, 0x10(%rbx)
movl 0x8c0(%r14), %eax
movl %eax, 0x14(%rbx)
addl 0x8bc(%r14), %eax
shll $0x2, %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x1cf80
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xe0d4
movq %r14, %rdi
callq 0x4450
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::destroy()
void HMMProblemPiABGK::destroy() {
	// destroy model data - only additional stuff
	free2D<NUMBER>(this->PIg, this->p->nG);
	free3D<NUMBER>(this->Ag, this->p->nG, this->p->nS);
	free3D<NUMBER>(this->Bg, this->p->nG, this->p->nS);
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x88(%rdi), %rax
movq 0x90(%rdi), %rdi
movl 0x8bc(%rax), %esi
callq 0x7f2c
movq 0x88(%rbx), %rax
movq 0x98(%rbx), %rdi
movl 0x8bc(%rax), %esi
movsbl 0x8b8(%rax), %edx
callq 0xa064
movq 0x88(%rbx), %rax
movq 0xa0(%rbx), %rdi
movl 0x8bc(%rax), %esi
movsbl 0x8b8(%rax), %edx
popq %rbx
jmp 0xa064
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::getA(int)
NUMBER** HMMProblemPiABGK::getA(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing A_k, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->A[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1d67d
movq 0x40(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1b951(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x10443(%rip), %rsi     # 0x2dad4
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::getB(int)
NUMBER** HMMProblemPiABGK::getB(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing B_k, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->B[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1d6bf
movq 0x48(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1b90f(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x1044a(%rip), %rsi     # 0x2db1d
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::getAk(int)
NUMBER** HMMProblemPiABGK::getAk(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing A_k, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->A[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1d789
movq 0x40(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1b845(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x10337(%rip), %rsi     # 0x2dad4
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::getAg(int)
NUMBER** HMMProblemPiABGK::getAg(NCAT x) {
	if( x > (this->p->nG-1) ) {
		fprintf(stderr,"While accessing A_g, skill index %d exceeded last index of the data %d.\n", x, this->p->nG-1);
		exit(1);
	}
	return this->Ag[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8bc(%rax), %ecx
cmpl %esi, %ecx
jle 0x1d7ce
movq 0x98(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1b800(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x10384(%rip), %rsi     # 0x2db66
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::getBk(int)
NUMBER** HMMProblemPiABGK::getBk(NCAT x) {
	if( x > (this->p->nK-1) ) {
		fprintf(stderr,"While accessing B_k, skill index %d exceeded last index of the data %d.\n", x, this->p->nK-1);
		exit(1);
	}
	return this->B[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8c0(%rax), %ecx
cmpl %esi, %ecx
jle 0x1d811
movq 0x48(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1b7bd(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x102f8(%rip), %rsi     # 0x2db1d
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::getBg(int)
NUMBER** HMMProblemPiABGK::getBg(NCAT x) {
	if( x > (this->p->nG-1) ) {
		fprintf(stderr,"While accessing B_g, skill index %d exceeded last index of the data %d.\n", x, this->p->nG-1);
		exit(1);
	}
	return this->Bg[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8bc(%rax), %ecx
cmpl %esi, %ecx
jle 0x1d856
movq 0xa0(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1b778(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x10345(%rip), %rsi     # 0x2dbaf
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiABGK.cpp
// Function: HMMProblemPiABGK::setGradB(FitBit*)
void HMMProblemPiABGK::setGradB (FitBit *fb){
    if(this->p->block_fitting[2]>0) return;
    NDAT t, ndat = 0;
    NPAR o=0, i;
    NUMBER combined, deriv_logit;
    struct data* dt;
    for(NCAT x=0; x<fb->xndat; x++) {
        dt = fb->x_data[x];
        if( dt->cnt!=0 ) continue;
        ndat += dt->n;
        for(t=0; t<dt->n; t++) {
            o = this->p->dat_obs[ dt->ix[t] ];
            if(o<0)
                continue;
            for(i=0; i<fb->nS; i++) {
                combined = getB(dt,i,o);
                deriv_logit = 1 / safe0num( fb->B[i][o] * (1-fb->B[i][o]) );
                fb->gradB[i][o] -= combined * (1-combined) * deriv_logit * dt->alpha[t][i] * dt->beta[t][i] / safe0num(dt->p_O_param * ((o<0)?1:fb->B[i][o]));
            }
        }
    }
    if( this->p->Cslices>0 ) // penalty
        fb->addL2Penalty(FBV_B, this->p, (NUMBER)ndat);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x88(%rdi), %rax
cmpb $0x0, 0x983(%rax)
jle 0x1dcd3
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r14
xorl %edx, %edx
xorl %ecx, %ecx
movslq 0xe8(%rbx), %rax
cmpq %rax, %rdx
jge 0x1de39
movq 0xf0(%rbx), %rax
movq (%rax,%rdx,8), %r15
cmpl $0x0, 0x4(%r15)
jne 0x1de31
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl (%r15), %eax
movl %eax, 0x8(%rsp)
xorl %ebp, %ebp
movslq %eax, %rcx
cmpq %rcx, %rbp
jge 0x1de24
movq 0x88(%r14), %rcx
movq 0x870(%rcx), %rcx
movq 0x10(%r15), %rdx
movslq (%rdx,%rbp,4), %rdx
movsbq (%rcx,%rdx), %r12
testq %r12, %r12
js 0x1de1c
xorl %r13d, %r13d
movsbq 0x1(%rbx), %rax
cmpq %rax, %r13
jge 0x1de19
movq (%r14), %rax
movsbl %r13b, %edx
movq %r14, %rdi
movq %r15, %rsi
movl %r12d, %ecx
callq *0x20(%rax)
movsd %xmm0, (%rsp)
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm1
movsd 0xeb6c(%rip), %xmm0     # 0x2c8f0
subsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
callq 0x67cb
movsd 0xeb57(%rip), %xmm2     # 0x2c8f0
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
movsd (%rsp), %xmm2
subsd %xmm2, %xmm0
mulsd %xmm2, %xmm0
mulsd %xmm1, %xmm0
movq 0x28(%r15), %rax
movq 0x30(%r15), %rcx
movq (%rax,%rbp,8), %rax
mulsd (%rax,%r13,8), %xmm0
movq (%rcx,%rbp,8), %rax
mulsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%rsp)
movsd 0x48(%r15), %xmm0
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
mulsd (%rax,%r12,8), %xmm0
callq 0x67cb
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x68(%rbx), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%r12,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r13
jmp 0x1dd48
movl (%r15), %eax
incq %rbp
jmp 0x1dd15
movl 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdx
incq %rdx
jmp 0x1dcdd
movq 0x88(%r14), %rdx
cmpb $0x0, 0x42(%rdx)
jle 0x1dcc4
cvtsi2sd %ecx, %xmm0
pushq $0x3
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x90fe
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::HMMProblemSlicedAB(param*)
HMMProblemSlicedAB::HMMProblemSlicedAB(struct param *param) {
    NPAR i;
    switch (param->structure) {
        case STRUCTURE_SKABslc: // Expectation Maximization (Baum-Welch)
            for(i=0; i<3; i++) this->sizes[i] = param->nK;
            this->n_params = param->nK * 4 * param->nZ;
            break;
        default:
            fprintf(stderr,"Structure specified is not supported and should have been caught earlier\n");
            break;
    }
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0x19672(%rip), %rax     # 0x38ad8
movq %rax, (%rbx)
cmpb $0xb, 0x3e(%r14)
jne 0x1f4aa
xorl %ecx, %ecx
movl 0x8c0(%r14), %edx
cmpq $0x3, %rcx
je 0x1f488
movl %edx, 0xc(%rbx,%rcx,4)
incq %rcx
jmp 0x1f472
movsbl 0x8c8(%r14), %ecx
imull %ecx, %edx
shll $0x2, %edx
movl %edx, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x70(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x19b27(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0xdf26(%rip), %rdi      # 0x2d3e1
pushq $0x49
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
movq (%rbx), %rax
jmp 0x1f499
movq %rax, %r14
movq %rbx, %rdi
callq 0xe0d4
movq %r14, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::init3Params(double*&, double***&, double***&, signed char, signed char, signed char)
void HMMProblemSlicedAB::init3Params(NUMBER* &PI, NUMBER*** &A, NUMBER*** &B, NPAR nZ, NPAR nS, NPAR nO) {  // sliced
    PI = init1D<NUMBER>((NDAT)nS);
    A  = init3D<NUMBER>((NDAT)nZ, (NDAT)nS, (NDAT)nS);
    B  = init3D<NUMBER>((NDAT)nZ, (NDAT)nS, (NDAT)nO);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movsbl 0x40(%rsp), %r13d
movl %r9d, %edi
callq 0x7dde
movq %rax, (%r12)
movl %ebp, %edi
movl %ebx, %esi
movl %ebx, %edx
callq 0xa0be
movq %rax, (%r15)
movl %ebp, %edi
movl %ebx, %esi
movl %r13d, %edx
callq 0xa0be
movq %rax, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::destroy()
void HMMProblemSlicedAB::destroy() {
    NPAR nS = this->p->nS, nZ = this->p->nZ;
	// destroy model data
	if(this->A  != NULL) free4D<NUMBER>(this->A,  this->sizes[1], this->p->nZ, this->p->nS);
	if(this->B  != NULL) free4D<NUMBER>(this->B,  this->sizes[2], this->p->nZ, this->p->nS);
	if(this->lbPI!=NULL) free(this->lbPI);
	if(this->ubPI!=NULL) free(this->ubPI);
	if(this->lbA!=NULL) free3D<NUMBER>(this->lbA, nZ, nS);
	if(this->ubA!=NULL) free3D<NUMBER>(this->ubA, nZ, nS);
	if(this->lbB!=NULL) free3D<NUMBER>(this->lbB, nZ, nS);
	if(this->ubB!=NULL) free3D<NUMBER>(this->ubB, nZ, nS);
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %r14
movq 0x88(%rdi), %rax
movq 0x90(%rdi), %rdi
movsbl 0x8b8(%rax), %ebx
movsbl 0x8c8(%rax), %ebp
testq %rdi, %rdi
je 0x1feb5
movl 0x10(%r14), %esi
movl %ebp, %edx
movl %ebx, %ecx
callq 0x24ba3
movq 0x98(%r14), %rdi
testq %rdi, %rdi
je 0x1fedf
movl 0x14(%r14), %esi
movq 0x88(%r14), %rax
movsbl 0x8c8(%rax), %edx
movsbl 0x8b8(%rax), %ecx
callq 0x24ba3
movq 0xa0(%r14), %rdi
callq 0x4290
movq 0xb8(%r14), %rdi
callq 0x4290
movq 0xa8(%r14), %rdi
testq %rdi, %rdi
je 0x1ff0c
movl %ebp, %esi
movl %ebx, %edx
callq 0xa064
movq 0xc0(%r14), %rdi
testq %rdi, %rdi
je 0x1ff21
movl %ebp, %esi
movl %ebx, %edx
callq 0xa064
movq 0xb0(%r14), %rdi
testq %rdi, %rdi
je 0x1ff36
movl %ebp, %esi
movl %ebx, %edx
callq 0xa064
movq 0xc8(%r14), %rdi
testq %rdi, %rdi
je 0x1ff4f
movl %ebp, %esi
movl %ebx, %edx
popq %rbx
popq %r14
popq %rbp
jmp 0xa064
popq %rbx
popq %r14
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::getA(int)
NUMBER*** HMMProblemSlicedAB::getA(NCAT x) {
    if( x > (this->sizes[1]-1) ) {
        fprintf(stderr,"While accessing A, skill index %d exceeded last index of the data %d.\n", x, this->sizes[1]-1);
        exit(1);
    }
    return this->A[x];
}

// Assembly:
movl %esi, %edx
movl 0x10(%rdi), %ecx
cmpl %esi, %ecx
jle 0x1ffba
movq 0x90(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x19014(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0xd4c6(%rip), %rsi      # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::getB(int)
NUMBER*** HMMProblemSlicedAB::getB(NCAT x) {
    if( x > (this->sizes[2]-1) ) {
        fprintf(stderr,"While accessing B, skill index %d exceeded last index of the data %d.\n", x, this->sizes[2]-1);
        exit(1);
    }
    return this->B[x];
}

// Assembly:
movl %esi, %edx
movl 0x14(%rdi), %ecx
cmpl %esi, %ecx
jle 0x1fff6
movq 0x98(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x18fd8(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0xd4d1(%rip), %rsi      # 0x2d4db
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::setGradA(FitBitSlicedAB*)
void HMMProblemSlicedAB::setGradA (FitBitSlicedAB *fb){
    if(this->p->block_fitting[1]>0) return;
    NDAT t, ndat = 0;
    NPAR o, i, j, z;
    struct data* dt;
    for(NCAT x=0; x<fb->xndat; x++) {
        dt = fb->x_data[x];
        if( dt->cnt!=0 ) continue;
        ndat += dt->n;
        for(t=1; t<dt->n; t++) {
            z = this->p->dat_slice[ dt->ix[t] ];
            //            if(z == fb->tag) { // tag contains the current slice
            o = this->p->dat_obs[ dt->ix[t] ];//->get( dt->ix[t] );
            dt->t = dt->ix[t]; // global state pointer
            for(i=0; i<this->p->nS; i++)
                for(j=0; j<this->p->nS; j++)
                    fb->gradA[z][i][j] -= dt->beta[t][j] * ((o<0)?1:getB(dt,j,o)) * dt->alpha[t-1][i] / safe0num(dt->p_O_param);
            //            }
        }
    }
    // penalty
    if( this->p->Cslices>0 )
        fb->addL2Penalty(FBV_A, this->p, (NUMBER)ndat);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq 0x88(%rdi), %rdx
cmpb $0x0, 0x982(%rdx)
jle 0x209f7
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r14
movq %rdi, %r12
xorl %ecx, %ecx
xorl %esi, %esi
movslq 0xd0(%r14), %rax
cmpq %rax, %rcx
jge 0x20b64
movq 0xd8(%r14), %rax
movq (%rax,%rcx,8), %r15
cmpl $0x0, 0x4(%r15)
jne 0x20b5c
movl %esi, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movl (%r15), %eax
movl %eax, 0x8(%rsp)
pushq $0x1
popq %r9
cltq
cmpq %rax, %r9
jge 0x20b4f
movq 0x870(%rdx), %rax
movq 0x8a8(%rdx), %rcx
movq 0x10(%r15), %rsi
movslq (%rsi,%r9,4), %rsi
movsbq (%rcx,%rsi), %rcx
movq %rcx, 0x20(%rsp)
movb (%rax,%rsi), %bpl
movl %esi, 0x8(%r15)
movb 0x8b8(%rdx), %al
xorl %ebx, %ebx
movq %r9, 0x10(%rsp)
movsbq %al, %rax
cmpq %rax, %rbx
jge 0x20b44
xorl %r13d, %r13d
movsbq 0x8b8(%rdx), %rax
cmpq %rax, %r13
jge 0x20b3c
movq 0x30(%r15), %rax
movq (%rax,%r9,8), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%rsp)
movsd 0xbe39(%rip), %xmm0     # 0x2c8f0
testb %bpl, %bpl
js 0x20ad6
movq (%r12), %rax
movsbl %bpl, %ecx
movsbl %r13b, %edx
movq %r12, %rdi
movq %r15, %rsi
callq *0x20(%rax)
movq 0x10(%rsp), %r9
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movq 0x28(%r15), %rax
movq -0x8(%rax,%r9,8), %rax
mulsd (%rax,%rbx,8), %xmm1
movsd %xmm1, (%rsp)
movsd 0x48(%r15), %xmm0
callq 0x67cb
movq 0x10(%rsp), %r9
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x60(%r14), %rax
movq 0x20(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rax,%rbx,8), %rax
movsd (%rax,%r13,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r13,8)
incq %r13
movq 0x88(%r12), %rdx
jmp 0x20a8b
incq %rbx
jmp 0x20a7b
incq %r9
movl (%r15), %eax
jmp 0x20a3b
movl 0xc(%rsp), %esi
addl 0x8(%rsp), %esi
movq 0x18(%rsp), %rcx
incq %rcx
jmp 0x20a01
cmpb $0x0, 0x42(%rdx)
jle 0x209e8
cvtsi2sd %esi, %xmm0
pushq $0x2
popq %rsi
movq %r14, %rdi
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xacca
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::toZero3Params(double*&, double***&, double***&, signed char, signed char, signed char)
void HMMProblemSlicedAB::toZero3Params(NUMBER* &PI, NUMBER*** &A, NUMBER*** &B, NPAR nZ, NPAR nS, NPAR nO) { // sliced
    toZero1D<NUMBER>(PI, (NDAT)nS);
    toZero3D<NUMBER>(A,  (NDAT)nZ, (NDAT)nS, (NDAT)nS);
    toZero3D<NUMBER>(B,  (NDAT)nZ, (NDAT)nS, (NDAT)nO);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movsbl 0x30(%rsp), %r12d
movq (%rsi), %rdi
movl %r9d, %esi
callq 0x9311
movq (%r15), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %ebx, %ecx
callq 0xa15f
movq (%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %r12d, %ecx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0xa15f
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::cpy3Params(double*&, double***&, double***&, double*&, double***&, double***&, signed char, signed char, signed char)
void HMMProblemSlicedAB::cpy3Params(NUMBER* &soursePI, NUMBER*** &sourseA, NUMBER*** &sourseB, NUMBER* &targetPI, NUMBER*** &targetA, NUMBER*** &targetB, NPAR nZ, NPAR nS, NPAR nO) {  // sliced
    cpy1D<NUMBER>(soursePI, targetPI, (NDAT)nS);
    cpy3D<NUMBER>(sourseA,  targetA,  (NDAT)nZ, (NDAT)nS, (NDAT)nS);
    cpy3D<NUMBER>(sourseB,  targetB,  (NDAT)nZ, (NDAT)nS, (NDAT)nO);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %r14
movq %rcx, %r15
movq %rdx, %r12
movsbl 0x58(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rbx
movsbl 0x48(%rsp), %ebp
movsbq 0x50(%rsp), %r13
movq (%rsi), %rsi
movq (%r8), %rdi
movq %r13, %rdx
shlq $0x3, %rdx
callq 0x41c0
movq (%r12), %rdi
movq (%r14), %rsi
movl %ebp, %edx
movl %r13d, %ecx
movl %r13d, %r8d
callq 0xa1a2
movq (%r15), %rdi
movq (%rbx), %rsi
movl %ebp, %edx
movl %r13d, %ecx
movl 0x4(%rsp), %r8d
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0xa1a2
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::free3Params(double*&, double***&, double***&, signed char, signed char)
void HMMProblemSlicedAB::free3Params(NUMBER* &PI, NUMBER*** &A, NUMBER*** &B, NPAR nZ, NPAR nS) {  // sliced
    free(PI);
    free3D<NUMBER>(A, (NDAT)nZ, (NDAT)nS);
    free3D<NUMBER>(B, (NDAT)nZ, (NDAT)nS);
    PI = NULL;
    A  = NULL;
    B  = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq (%rsi), %rdi
callq 0x4290
movq (%r15), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0xa064
movq (%r14), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0xa064
andq $0x0, (%r12)
andq $0x0, (%r15)
andq $0x0, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedAB.cpp
// Function: HMMProblemSlicedAB::BaumWelchBit(FitBitSlicedAB*)
FitResult HMMProblemSlicedAB::BaumWelchBit(FitBitSlicedAB *fb) {
    FitResult fr;
    fr.iter = 1;
    fr.pO0  = 0.0;
    fr.pO   = 0.0;
    fr.conv = 0; // converged
    fr.ndat = 0;
    NCAT xndat = fb->xndat;
    struct data **x_data = fb->x_data;
    
    while( !fr.conv && fr.iter<=this->p->maxiter ) {
        fr.ndat = -1; // no accounting so far
        if(fr.iter==1) {
            computeAlphaAndPOParam(xndat, x_data);
            fr.pO0 = HMMProblemSlicedAB::getSumLogPOPara(xndat, x_data);
            fr.pOmid = fr.pO0;
        }
        fb->copy(FBS_PAR, FBS_PARm1);
        fr.pO = doBaumWelchStep(fb);// PI, A, B);
        
        // check convergence
        fr.conv = fb->checkConvergence(&fr);
        
        if( fr.conv || fr.iter==this->p->maxiter ) {
            //computeAlphaAndPOParam(fb->xndat, fb->x_data);
            fr.pO = HMMProblemSlicedAB::getSumLogPOPara(xndat, x_data);
        }
        fr.iter ++;
        fr.pOmid = fr.pO;
    } // main solver loop
    // recycle memory (Alpha, Beta, p_O_param, Xi, Gamma)
    RecycleFitData(fb->xndat, fb->x_data, this->p);
    fr.iter--;
    return fr;
    
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, (%rdi)
andq $0x0, 0x8(%rdi)
leaq 0x18(%rdi), %rax
movq %rax, (%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl 0xd0(%rdx), %ebp
movq 0xd8(%rdx), %r12
xorl %ecx, %ecx
pushq $0x1
popq %r13
movl %r13d, %eax
movq 0x88(%r15), %rdx
testl %ecx, %ecx
jne 0x2349f
cmpl 0x38(%rdx), %eax
jg 0x2349f
orl $-0x1, 0x24(%rbx)
cmpl $0x1, %eax
jne 0x2342d
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0x2012a
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xe400
movsd %xmm0, 0x8(%rbx)
movsd %xmm0, 0x10(%rbx)
movq %r14, %rdi
movl %r13d, %esi
pushq $0x2
popq %rdx
callq 0xa97e
movq %r15, %rdi
movq %r14, %rsi
callq 0x234c6
movsd %xmm0, 0x18(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0xaab2
movzbl %al, %eax
movl %eax, 0x20(%rbx)
testb %al, %al
jne 0x2346e
movl (%rbx), %eax
movq 0x88(%r15), %rcx
cmpl 0x38(%rcx), %eax
jne 0x23487
movq %r15, %rdi
movl %ebp, %esi
movq %r12, %rdx
callq 0xe400
movsd %xmm0, 0x18(%rbx)
movl (%rbx), %eax
movl 0x20(%rbx), %ecx
jmp 0x23491
movq (%rsp), %rcx
movsd (%rcx), %xmm0
xorl %ecx, %ecx
incl %eax
movl %eax, (%rbx)
movsd %xmm0, 0x10(%rbx)
jmp 0x233e8
movl 0xd0(%r14), %edi
movq 0xd8(%r14), %rsi
callq 0x7b9b
decl (%rbx)
movq %rbx, %rax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/./utils.h
// Function: double**** init4D<double>(int, int, int, int)
T**** init4D(NDAT size1, NDAT size2, NDAT size3, NDAT size4) {
    NDAT i,j, l;
    T**** ar = Calloc(T ***, (size_t)size1);
    for(i=0; i<size1; i++) {
        ar[i] = Calloc(T**, (size_t)size2);
        for(j=0; j<size2; j++) {
            ar[i][j] = Calloc(T*, (size_t)size3);
            for(l=0; l<size3; l++)
                ar[i][j][l] = Calloc(T, (size_t)size4);
        }
    }
    return ar;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x38, %rsp
movl %ecx, %ebp
movl %edx, %r15d
movl %esi, %r12d
movslq %edi, %r13
pushq $0x8
popq %r14
movq %r13, %rdi
movq %r14, %rsi
callq 0x4120
movq %rax, 0x8(%rsp)
movslq %r12d, %rax
movslq %r15d, %rcx
xorl %edx, %edx
testl %ecx, %ecx
movl $0x0, %ebx
movq %rcx, 0x28(%rsp)
cmovgl %ecx, %ebx
testl %eax, %eax
movl $0x0, %ecx
movq %rax, 0x10(%rsp)
cmovgl %eax, %ecx
movq %rcx, 0x30(%rsp)
movslq %ebp, %rbp
testl %r13d, %r13d
cmovlel %edx, %r13d
movq %r13, 0x18(%rsp)
xorl %r12d, %r12d
cmpq 0x18(%rsp), %r12
je 0x24b8f
movq 0x10(%rsp), %rdi
movq %r14, %rsi
callq 0x4120
movq %rax, %r15
movq 0x8(%rsp), %rax
movq %r12, 0x20(%rsp)
movq %r15, (%rax,%r12,8)
xorl %r13d, %r13d
cmpq 0x30(%rsp), %r13
je 0x24b85
movq 0x28(%rsp), %rdi
movq %r14, %rsi
callq 0x4120
movq %rax, (%r15,%r13,8)
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0x24b80
movq %rbp, %rdi
movq %r14, %rsi
callq 0x4120
movq (%r15,%r13,8), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0x24b63
incq %r13
jmp 0x24b48
movq 0x20(%rsp), %r12
incq %r12
jmp 0x24b20
movq 0x8(%rsp), %rax
addq $0x38, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/./utils.h
// Function: void free4D<double>(double****, int, int, int)
void free4D(T**** ar, NDAT size1, NDAT size2, NDAT size3) {
    for(NDAT i=0; i<size1; i++) {
        for(NDAT j=0; j<size2; j++) {
            for(NDAT l=0; l<size3; l++)
                free(ar[i][j][l]);
            free(ar[i][j]);
        }
        free(ar[i]);
    }
    free(ar);
    //    &ar = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %ecx, %ebx
movl %edx, %r14d
xorl %r13d, %r13d
testl %ecx, %ecx
cmovlel %r13d, %ebx
testl %edx, %edx
cmovlel %r13d, %r14d
movq %rdi, %r12
testl %esi, %esi
cmovlel %r13d, %esi
movq %rsi, (%rsp)
cmpq (%rsp), %r13
je 0x24c12
xorl %ebp, %ebp
cmpq %r14, %rbp
je 0x24c04
xorl %r15d, %r15d
movq (%r12,%r13,8), %rax
movq (%rax,%rbp,8), %rdi
cmpq %r15, %rbx
je 0x24bfa
movq (%rdi,%r15,8), %rdi
callq 0x4290
incq %r15
jmp 0x24bdf
callq 0x4290
incq %rbp
jmp 0x24bd7
movq (%r12,%r13,8), %rdi
callq 0x4290
incq %r13
jmp 0x24bcf
movq %r12, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4290
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::HMMProblemSlicedA(param*)
HMMProblemSlicedA::HMMProblemSlicedA(struct param *param) {
    NPAR i;
    switch (param->structure) {
        case STRUCTURE_SKAslc: 
            for(i=0; i<3; i++) this->sizes[i] = param->nK;
            this->n_params = param->nK * 4 * param->nZ;
            break;
        default:
            fprintf(stderr,"Structure specified is not supported and should have been caught earlier\n");
            break;
    }
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0x13f7c(%rip), %rax     # 0x38bd8
movq %rax, (%rbx)
cmpb $0xc, 0x3e(%r14)
jne 0x24ca0
xorl %ecx, %ecx
movl 0x8c0(%r14), %edx
cmpq $0x3, %rcx
je 0x24c7e
movl %edx, 0xc(%rbx,%rcx,4)
incq %rcx
jmp 0x24c68
movsbl 0x8c8(%r14), %ecx
imull %ecx, %edx
shll $0x2, %edx
movl %edx, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq *0x70(%rax)
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq 0x14331(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x8730(%rip), %rdi      # 0x2d3e1
pushq $0x49
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
movq (%rbx), %rax
jmp 0x24c8f
movq %rax, %r14
movq %rbx, %rdi
callq 0xe0d4
movq %r14, %rdi
callq 0x4450
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::destroy()
void HMMProblemSlicedA::destroy() {
    NPAR nS = this->p->nS, nZ = this->p->nZ;
	// destroy model data
    if(this->A  != NULL) {
        free4D<NUMBER>(this->A,  this->sizes[1], this->p->nZ, this->p->nS);
        this->A = NULL;
    }
    if(this->lbA!=NULL) {
        free3D<NUMBER>(this->lbA, nZ, nS);
        this->lbA = NULL;
    }
    if(this->ubA!=NULL) {
        free3D<NUMBER>(this->ubA, nZ, nS);
        this->ubA = NULL;
    }
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rdi, %rbx
movq 0x88(%rdi), %rax
movq 0x90(%rdi), %rdi
movsbl 0x8b8(%rax), %ebp
movsbl 0x8c8(%rax), %r14d
testq %rdi, %rdi
je 0x25628
movl 0x10(%rbx), %esi
movl %r14d, %edx
movl %ebp, %ecx
callq 0x24ba3
andq $0x0, 0x90(%rbx)
movq 0x98(%rbx), %rdi
testq %rdi, %rdi
je 0x25646
movl %r14d, %esi
movl %ebp, %edx
callq 0xa064
andq $0x0, 0x98(%rbx)
movq 0xa0(%rbx), %rdi
testq %rdi, %rdi
je 0x25664
movl %r14d, %esi
movl %ebp, %edx
callq 0xa064
andq $0x0, 0xa0(%rbx)
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::getA(int)
NUMBER*** HMMProblemSlicedA::getA(NCAT x) {
    if( x > (this->sizes[1]-1) ) {
        fprintf(stderr,"While accessing A, skill index %d exceeded last index of the data %d.\n", x, this->sizes[1]-1);
        exit(1);
    }
    return this->A[x];
}

// Assembly:
movl %esi, %edx
movl 0x10(%rdi), %ecx
cmpl %esi, %ecx
jle 0x256ce
movq 0x90(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x13900(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x7db2(%rip), %rsi      # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::getA(int, signed char)
NUMBER** HMMProblemSlicedA::getA(NCAT x, NPAR z) {
    if( x > (this->sizes[1]-1) ) {
        fprintf(stderr,"While accessing A, skill index %d or slize index %d exceeded last index of the data %d.\n", x, z, this->sizes[1]-1);
        exit(1);
    }
    return this->A[x][z];
}

// Assembly:
movl %esi, %eax
movl 0x10(%rdi), %r8d
cmpl %esi, %r8d
jle 0x2574b
movq 0x90(%rdi), %rcx
cltq
movq (%rcx,%rax,8), %rax
movsbq %dl, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %r8d
movq 0x13882(%rip), %rcx     # 0x38fd8
movq (%rcx), %rdi
movsbl %dl, %ecx
leaq 0x8549(%rip), %rsi      # 0x2dcac
movl %eax, %edx
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::getB(data*, signed char, signed char)
NUMBER HMMProblemSlicedA::getB (struct data* dt, NPAR i, NPAR m) {
    // special attention for "unknown" observations, i.e. the observation was there but we do not know what it is
    // in this case we simply return 1, effectively resulting in no change in \alpha or \beta vatiables
    if(m<0)
        return 1;
    switch(this->p->structure)
    {
        case STRUCTURE_SKAslc:
            return this->B[dt->k][i][m];
            break;
        default:
            fprintf(stderr,"Solver specified is not supported.\n");
            exit(1);
            break;
    }
}

// Assembly:
testb %cl, %cl
js 0x2581a
movq 0x88(%rdi), %rax
cmpb $0xc, 0x3e(%rax)
jne 0x25823
movq 0x48(%rdi), %rax
movslq 0x58(%rsi), %rsi
movq (%rax,%rsi,8), %rax
movsbq %dl, %rdx
movq (%rax,%rdx,8), %rax
movzbl %cl, %ecx
movsd (%rax,%rcx,8), %xmm0
retq
movsd 0x70ce(%rip), %xmm0     # 0x2c8f0
retq
pushq %rax
movq 0x137ad(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x7ced(%rip), %rdi      # 0x2d522
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
pushq $0x1
popq %rdi
callq 0x42a0
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::toZero3Params(double*&, double***&, double**&, signed char, signed char, signed char)
void HMMProblemSlicedA::toZero3Params(NUMBER* &PI, NUMBER*** &A, NUMBER** &B, NPAR nZ, NPAR nS, NPAR nO) { // sliced
    toZero1D<NUMBER>(PI, (NDAT)nS);
    toZero3D<NUMBER>(A,  (NDAT)nZ, (NDAT)nS, (NDAT)nS);
    toZero2D<NUMBER>(B,  (NDAT)nS, (NDAT)nO);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movsbl 0x30(%rsp), %r12d
movq (%rsi), %rdi
movl %r9d, %esi
callq 0x9311
movq (%r15), %rdi
movl %ebp, %esi
movl %ebx, %edx
movl %ebx, %ecx
callq 0xa15f
movq (%r14), %rdi
movl %ebx, %esi
movl %r12d, %edx
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
jmp 0x9381
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::cpy3Params(double*&, double***&, double**&, double*&, double***&, double**&, signed char, signed char, signed char)
void HMMProblemSlicedA::cpy3Params(NUMBER* &soursePI, NUMBER*** &sourseA, NUMBER** &sourseB, NUMBER* &targetPI, NUMBER*** &targetA, NUMBER** &targetB, NPAR nZ, NPAR nS, NPAR nO) {  // sliced
    cpy1D<NUMBER>(soursePI, targetPI, (NDAT)nS);
    cpy3D<NUMBER>(sourseA,  targetA,  (NDAT)nZ, (NDAT)nS, (NDAT)nS);
    cpy2D<NUMBER>(sourseB,  targetB,  (NDAT)nS, (NDAT)nO);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %r9, %rbx
movq %rcx, %r14
movq %rdx, %r15
movsbl 0x58(%rsp), %eax
movl %eax, 0x4(%rsp)
movq 0x40(%rsp), %rbp
movsbl 0x48(%rsp), %r12d
movsbq 0x50(%rsp), %r13
movq (%rsi), %rsi
movq (%r8), %rdi
movq %r13, %rdx
shlq $0x3, %rdx
callq 0x41c0
movq (%r15), %rdi
movq (%rbx), %rsi
movl %r12d, %edx
movl %r13d, %ecx
movl %r13d, %r8d
callq 0xa1a2
movq (%r14), %rdi
movq (%rbp), %rsi
movl %r13d, %edx
movl 0x4(%rsp), %ecx
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x93ad
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemSlicedA.cpp
// Function: HMMProblemSlicedA::free3Params(double*&, double***&, double**&, signed char, signed char)
void HMMProblemSlicedA::free3Params(NUMBER* &PI, NUMBER*** &A, NUMBER** &B, NPAR nZ, NPAR nS) {  // sliced
    free(PI);
    free3D<NUMBER>(A, (NDAT)nZ, (NDAT)nS);
    free2D<NUMBER>(B, (NDAT)nS);
    PI = NULL;
    A  = NULL;
    B  = NULL;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
movl %r9d, %ebx
movl %r8d, %ebp
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq (%rsi), %rdi
callq 0x4290
movq (%r15), %rdi
movl %ebp, %esi
movl %ebx, %edx
callq 0xa064
movq (%r14), %rdi
movl %ebx, %esi
callq 0x7f2c
andq $0x0, (%r12)
andq $0x0, (%r15)
andq $0x0, (%r14)
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemComp.cpp
// Function: HMMProblemComp::HMMProblemComp(param*)
HMMProblemComp::HMMProblemComp(struct param *param) {
    for(NPAR i=0; i<3; i++) this->sizes[i] = param->nK;
//    this->sizes = {param->nK, param->nK, param->nK};
    this->n_params = param->nK * 4;
  
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0xeece(%rip), %rax      # 0x38cd8
movq %rax, (%rbx)
pushq $0x3
popq %rax
movl 0x8c0(%r14), %ecx
cmpq $0x6, %rax
je 0x29e25
movl %ecx, (%rbx,%rax,4)
incq %rax
jmp 0x29e10
shll $0x2, %ecx
movl %ecx, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x29e52
addq $0x8, %rsp
popq %rbx
popq %r14
retq
movq %rax, %r14
movq %rbx, %rdi
callq 0xe0d4
movq %r14, %rdi
callq 0x4450
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemComp.cpp
// Function: HMMProblemComp::getPI(data*, signed char)
NUMBER HMMProblemComp::getPI(struct data* dt, NPAR i) {
	NUMBER r = 0;
	// dt->cnt==0 means, get dt->k'th skill only
	// if param->tag1==1, try and see whether there are other "neighbours"
	// dt->t should be set to the global index of the row in question
	if( this->p->tag1==0 || this->is_multi[dt->k] == 0) { // we ask for single skill specifically or this skill is never multiskill
		r = this->pi[dt->k][i];
	} else {
		NCAT n_skills = this->p->dat_skill_rcount[ dt->t ];
		if( n_skills==1 ) { // this skill is alone on row dt->t
			r = this->pi[dt->k][i];
		} else { // collect multiple \pi[i]
			NUMBER* q = Calloc(NUMBER, (size_t)n_skills );
			NCAT k=0;
			for(NCAT l=0; l<n_skills; l++) {
				k = this->p->dat_skill_stacked[ this->p->dat_skill_rix[ dt->t ]+l ];
				q[l] = this->pi[k][i];
			}
			r = this->pu->unite(q, n_skills, NULL, 0); //squishing(q, n_skills);
			free(q);
		} // definitely multiskill
	} // end sometimes multiskill
    return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movq 0x88(%rdi), %r12
cmpl $0x0, 0x9a0(%r12)
je 0x2a5a7
movq 0x90(%rbx), %rcx
movslq 0x58(%rsi), %rax
cmpb $0x0, (%rcx,%rax)
je 0x2a5ab
movq 0x890(%r12), %rcx
movslq 0x8(%rsi), %r13
movslq (%rcx,%r13,4), %r14
cmpq $0x1, %r14
je 0x2a5ab
pushq $0x8
popq %rsi
movq %r14, %rdi
callq 0x4120
movq %rax, %r15
movq 0x38(%rbx), %rax
movsbq %bpl, %rcx
xorl %edx, %edx
testl %r14d, %r14d
movl $0x0, %esi
cmovgl %r14d, %esi
cmpq %rdx, %rsi
je 0x2a5cb
movq 0x888(%r12), %rdi
movq 0x898(%r12), %r8
movslq (%r8,%r13,4), %r8
addq %rdx, %r8
movslq (%rdi,%r8,4), %rdi
movq (%rax,%rdi,8), %rdi
movsd (%rdi,%rcx,8), %xmm0
movsd %xmm0, (%r15,%rdx,8)
incq %rdx
jmp 0x2a573
movslq 0x58(%rsi), %rax
movq 0x38(%rbx), %rcx
movq (%rcx,%rax,8), %rax
movsbq %bpl, %rcx
movsd (%rax,%rcx,8), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq 0x98(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
movl %r14d, %edx
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *0x8(%rax)
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x4290
movsd (%rsp), %xmm0
jmp 0x2a5bc
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemComp.cpp
// Function: HMMProblemComp::getA(data*, signed char, signed char)
NUMBER HMMProblemComp::getA(struct data* dt, NPAR i, NPAR j) {
	NUMBER r = 0;
	// dt->cnt==0 means, get dt->k'th skill only
	// if param->tag1==1, try and see whether there are other "neighbours"
	// dt->t should be set to the global index of the row in question
	if( this->p->tag1==0 || this->is_multi[dt->k] == 0) { // we ask for single skill specifically or this skill is never multiskill
		r = this->A[dt->k][i][j];
	} else {
		NCAT n_skills = this->p->dat_skill_rcount[ dt->t ];
		if( n_skills==1 ) { // this skill is alone on row dt->t
			r = this->A[dt->k][i][j];
		} else { // collect multiple \pi[i]
			NUMBER* q = Calloc(NUMBER, (size_t)n_skills );
			NCAT k=0;
			for(NCAT l=0; l<n_skills; l++) {
				k = this->p->dat_skill_stacked[ this->p->dat_skill_rix[ dt->t ]+l ];
				q[l] = this->A[k][i][j];
			}
			r = this->pu->unite(q, n_skills, NULL, 0); //r = squishing(q, n_skills);
			free(q);
		} // definitely multiskill
	} // end sometimes multiskill
	return r;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rdi, %rbx
movq 0x88(%rdi), %r12
cmpl $0x0, 0x9a0(%r12)
je 0x2a660
movq 0x90(%rbx), %rdx
movslq 0x58(%rsi), %rax
cmpb $0x0, (%rdx,%rax)
je 0x2a664
movq 0x890(%r12), %rdx
movslq 0x8(%rsi), %r14
movslq (%rdx,%r14,4), %rdi
movsbq %cl, %r13
cmpq $0x1, %rdi
jne 0x2a682
movq 0x40(%rbx), %rcx
movq (%rcx,%rax,8), %rax
movsbq %bpl, %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r13,8), %xmm0
jmp 0x2a708
movslq 0x58(%rsi), %rax
movq 0x40(%rbx), %rdx
movq (%rdx,%rax,8), %rax
movsbq %bpl, %rdx
movq (%rax,%rdx,8), %rax
movsbq %cl, %rcx
movsd (%rax,%rcx,8), %xmm0
jmp 0x2a708
pushq $0x8
popq %rsi
movq %rdi, %r15
callq 0x4120
movq %r15, %rdx
movq %rax, %r15
movq 0x40(%rbx), %rax
movsbq %bpl, %rcx
xorl %r9d, %r9d
testl %edx, %edx
movl $0x0, %esi
cmovgl %edx, %esi
cmpq %r9, %rsi
je 0x2a6e1
movq 0x888(%r12), %rdi
movq 0x898(%r12), %r8
movslq (%r8,%r14,4), %r8
addq %r9, %r8
movslq (%rdi,%r8,4), %rdi
movq (%rax,%rdi,8), %rdi
movq (%rdi,%rcx,8), %rdi
movsd (%rdi,%r13,8), %xmm0
movsd %xmm0, (%r15,%r9,8)
incq %r9
jmp 0x2a6a8
movq 0x98(%rbx), %rdi
movq (%rdi), %rax
movq %r15, %rsi
xorl %ecx, %ecx
xorl %r8d, %r8d
callq *0x8(%rax)
movsd %xmm0, (%rsp)
movq %r15, %rdi
callq 0x4290
movsd (%rsp), %xmm0
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop