LLM4Binary/decompile-bench-makefile huggingface dataset:
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::getPI(data*, signed char)
NUMBER HMMProblem::getPI(struct data* dt, NPAR i) {
    switch(this->p->structure)
    {
        case STRUCTURE_SKILL:
            return this->pi[dt->k][i];
            break;
//        case STRUCTURE_GROUP:
//            return this->pi[dt->g][i];
//            break;
        default:
            fprintf(stderr,"Solver specified is not supported.\n");
            exit(1);
            break;
    }
}

// Assembly:
movq 0x88(%rdi), %rax
cmpb $0x1, 0x3e(%rax)
jne 0xe32f
movq 0x38(%rdi), %rax
movslq 0x58(%rsi), %rcx
movq (%rax,%rcx,8), %rax
movsbq %dl, %rcx
movsd (%rax,%rcx,8), %xmm0
retq
pushq %rax
movq 0x2aca1(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x1f1e1(%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/HMMProblem.cpp
// Function: HMMProblem::getA(data*, signed char, signed char)
NUMBER HMMProblem::getA (struct data* dt, NPAR i, NPAR j) {
    switch(this->p->structure)
    {
        case STRUCTURE_SKILL:
            return this->A[dt->k][i][j];
            break;
//        case STRUCTURE_GROUP:
//            return this->A[dt->g][i][j];
//            break;
        default:
            fprintf(stderr,"Solver specified is not supported.\n");
            exit(1);
            break;
    }
}

// Assembly:
movq 0x88(%rdi), %rax
cmpb $0x1, 0x3e(%rax)
jne 0xe37f
movq 0x40(%rdi), %rax
movslq 0x58(%rsi), %rsi
movq (%rax,%rsi,8), %rax
movsbq %dl, %rdx
movq (%rax,%rdx,8), %rax
movsbq %cl, %rcx
movsd (%rax,%rcx,8), %xmm0
retq
pushq %rax
movq 0x2ac51(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x1f191(%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/HMMProblem.cpp
// Function: HMMProblem::getB(data*, signed char, signed char)
NUMBER HMMProblem::getB (struct data* dt, NPAR i, NPAR m) {
    // special attention for "unknonw" 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_SKILL:
            return this->B[dt->k][i][m];
            break;
//        case STRUCTURE_GROUP:
//            return this->B[dt->g][i][m];
//            break;
        default:
            fprintf(stderr,"Solver specified is not supported.\n");
            exit(1);
            break;
    }
}

// Assembly:
testb %cl, %cl
js 0xe3d2
movq 0x88(%rdi), %rax
cmpb $0x1, 0x3e(%rax)
jne 0xe3db
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 0x1e516(%rip), %xmm0    # 0x2c8f0
retq
pushq %rax
movq 0x2abf5(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x1f135(%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/HMMProblem.cpp
// Function: HMMProblem::initAlpha(int, data**)
void HMMProblem::initAlpha(NCAT xndat, struct data** x_data) {
	NPAR nS = this->p->nS;
//    int parallel_now = this->p->parallel==2; //PAR
//    #pragma omp parallel for schedule(dynamic) if(parallel_now) //PAR
	for(NCAT x=0; x<xndat; x++) {
        NDAT t;
        NPAR i;
		if( x_data[x]->cnt!=0 ) continue; // ... and the thing has not been computed yet (e.g. from group to skill)
		// alpha
		if( x_data[x]->alpha == NULL ) {
			x_data[x]->alpha = Calloc(NUMBER*, (size_t)x_data[x]->n);
			for(t=0; t<x_data[x]->n; t++)
				x_data[x]->alpha[t] = Calloc(NUMBER, (size_t)nS);
			
		} else {
			for(t=0; t<x_data[x]->n; t++)
				for(i=0; i<nS; i++)
					x_data[x]->alpha[t][i] = 0.0;
		}
		// p_O_param
		x_data[x]->p_O_param = 0.0;
		x_data[x]->loglik = 0.0;
        // c - scaling
		if( x_data[x]->c == NULL ) {
            x_data[x]->c = Calloc(NUMBER, (size_t)x_data[x]->n);
        } else {
			for(t=0; t<x_data[x]->n; t++)
                x_data[x]->c[t] = 0.0;
        }
	} // for all groups in skill
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rdx, %rbx
movq 0x88(%rdi), %rax
movsbq 0x8b8(%rax), %r14
xorl %ecx, %ecx
testb %r14b, %r14b
movl $0x0, %eax
cmovgl %r14d, %eax
movl %esi, %r12d
testl %esi, %esi
cmovlel %ecx, %r12d
movzbl %al, %ebp
xorl %r13d, %r13d
movq %r12, (%rsp)
cmpq %r12, %r13
je 0xe53a
movq (%rbx,%r13,8), %r15
cmpl $0x0, 0x4(%r15)
je 0xe485
incq %r13
jmp 0xe46c
movq 0x28(%r15), %rcx
movl (%r15), %eax
testq %rcx, %rcx
je 0xe4bc
testl %eax, %eax
movl $0x0, %edx
cmovgl %eax, %edx
xorl %esi, %esi
cmpq %rdx, %rsi
je 0xe4f6
xorl %edi, %edi
cmpq %rdi, %rbp
je 0xe4b7
movq (%rcx,%rsi,8), %r8
andq $0x0, (%r8,%rdi,8)
incq %rdi
jmp 0xe4a4
incq %rsi
jmp 0xe49d
movslq %eax, %rdi
pushq $0x8
popq %rsi
callq 0x4120
movq %rax, 0x28(%r15)
xorl %r12d, %r12d
movq (%rbx,%r13,8), %r15
movslq (%r15), %rax
cmpq %rax, %r12
jge 0xe4f2
movq %r14, %rdi
pushq $0x8
popq %rsi
callq 0x4120
movq 0x28(%r15), %rcx
movq %rax, (%rcx,%r12,8)
incq %r12
jmp 0xe4ce
movq (%rsp), %r12
xorps %xmm0, %xmm0
movups %xmm0, 0x48(%r15)
movq 0x20(%r15), %rcx
testq %rcx, %rcx
je 0xe526
testl %eax, %eax
movl $0x0, %edx
cmovlel %edx, %eax
xorl %edx, %edx
cmpq %rdx, %rax
je 0xe480
andq $0x0, (%rcx,%rdx,8)
incq %rdx
jmp 0xe513
movslq %eax, %rdi
pushq $0x8
popq %rsi
callq 0x4120
movq %rax, 0x20(%r15)
jmp 0xe480
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::initBeta(int, data**)
void HMMProblem::initBeta(NCAT xndat, struct data** x_data) {
	NPAR nS = this->p->nS;
//    int parallel_now = this->p->parallel==2; //PAR
//    #pragma omp parallel for schedule(dynamic) if(parallel_now) //PAR
	for(NCAT x=0; x<xndat; x++) {
        NDAT t;
        NPAR i;
		if( x_data[x]->cnt!=0 ) continue; // ... and the thing has not been computed yet (e.g. from group to skill)
		// beta
		if( x_data[x]->beta == NULL ) {
			x_data[x]->beta = Calloc(NUMBER*, (size_t)x_data[x]->n);
			for(t=0; t<x_data[x]->n; t++)
				x_data[x]->beta[t] = Calloc(NUMBER, (size_t)nS);
			
		} else {
			for(t=0; t<x_data[x]->n; t++)
				for(i=0; i<nS; i++)
					x_data[x]->beta[t][i] = 0.0;
		}
	} // for all groups in skill
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq 0x88(%rdi), %rax
movsbq 0x8b8(%rax), %rbx
xorl %ecx, %ecx
testb %bl, %bl
movl $0x0, %eax
cmovgl %ebx, %eax
testl %esi, %esi
cmovlel %ecx, %esi
movq %rsi, (%rsp)
movq %rdx, %r15
movzbl %al, %ebp
xorl %r13d, %r13d
cmpq (%rsp), %r13
je 0xe7a0
movq (%r15,%r13,8), %r14
cmpl $0x0, 0x4(%r14)
je 0xe734
incq %r13
jmp 0xe71e
movq 0x30(%r14), %rax
movslq (%r14), %rdi
testq %rax, %rax
je 0xe76b
testl %edi, %edi
movl $0x0, %ecx
cmovlel %ecx, %edi
xorl %ecx, %ecx
cmpq %rdi, %rcx
je 0xe72f
xorl %edx, %edx
cmpq %rdx, %rbp
je 0xe766
movq (%rax,%rcx,8), %rsi
andq $0x0, (%rsi,%rdx,8)
incq %rdx
jmp 0xe753
incq %rcx
jmp 0xe74c
pushq $0x8
popq %rsi
callq 0x4120
movq %rax, 0x30(%r14)
xorl %r14d, %r14d
movq (%r15,%r13,8), %r12
movslq (%r12), %rax
cmpq %rax, %r14
jge 0xe72f
movq %rbx, %rdi
pushq $0x8
popq %rsi
callq 0x4120
movq 0x30(%r12), %rcx
movq %rax, (%rcx,%r14,8)
incq %r14
jmp 0xe77a
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::setGradPI(FitBit*)
void HMMProblem::setGradPI(FitBit *fb){
    if(this->p->block_fitting[0]>0) return;
    NDAT t = 0, ndat = 0;
    NPAR i, o;
    struct data* dt;
    for(NCAT x=0; x<fb->xndat; x++) {
        dt = fb->x_data[x];
        if( dt->cnt!=0 ) continue;
        ndat += dt->n;
        o = this->p->dat_obs[ dt->ix[t] ];//->get( dt->ix[t] );
        for(i=0; i<this->p->nS; i++) {
            fb->gradPI[i] -= dt->beta[t][i] * ((o<0)?1:fb->B[i][o]) / safe0num(dt->p_O_param);
        }
    }
    if( this->p->Cslices>0 ) // penalty
        fb->addL2Penalty(FBV_PI, this->p, (NUMBER)ndat);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x18, %rsp
movq 0x88(%rdi), %rdx
cmpb $0x0, 0x981(%rdx)
jle 0xef37
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r14
xorl %r15d, %r15d
xorl %ecx, %ecx
movslq 0xe8(%rbx), %rax
cmpq %rax, %r15
jge 0xf00c
movq 0xf0(%rbx), %rax
movq (%rax,%r15,8), %r12
cmpl $0x0, 0x4(%r12)
jne 0xf004
movl %ecx, 0xc(%rsp)
movl (%r12), %eax
movl %eax, 0x8(%rsp)
movq 0x870(%rdx), %rax
movq 0x10(%r12), %rcx
movslq (%rcx), %rcx
movzbl (%rax,%rcx), %ebp
xorl %r13d, %r13d
movsbq 0x8b8(%rdx), %rax
cmpq %rax, %r13
jge 0xeffc
movsd 0x1d950(%rip), %xmm0    # 0x2c8f0
testb %bpl, %bpl
js 0xefb2
movq 0x20(%rbx), %rax
movq (%rax,%r13,8), %rax
movsd (%rax,%rbp,8), %xmm0
movq 0x30(%r12), %rax
movq (%rax), %rax
mulsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x48(%r12), %xmm0
callq 0x67cb
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x58(%rbx), %rax
movsd (%rax,%r13,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r13,8)
incq %r13
movq 0x88(%r14), %rdx
jmp 0xef8b
movl 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
incq %r15
jmp 0xef42
cmpb $0x0, 0x42(%rdx)
jle 0xef28
cvtsi2sd %ecx, %xmm0
pushq $0x1
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/HMMProblem.cpp
// Function: HMMProblem::setGradA(FitBit*)
void HMMProblem::setGradA (FitBit *fb){
    if(this->p->block_fitting[1]>0) return;
    NDAT t, ndat = 0;
    NPAR o, i, j;
    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++) {
            o = this->p->dat_obs[ dt->ix[t] ];//->get( dt->ix[t] );
            for(i=0; i<this->p->nS; i++)
                for(j=0; j<this->p->nS; j++)
                    fb->gradA[i][j] -= dt->beta[t][j] * ((o<0)?1:fb->B[j][o]) * dt->alpha[t-1][i] / safe0num(dt->p_O_param);
        }
    }
    if( this->p->Cslices>0 ) // penalty
        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 0xf061
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %r12
movq %rdi, %rbx
xorl %ecx, %ecx
xorl %esi, %esi
movslq 0xe8(%r12), %rax
cmpq %rax, %rcx
jge 0xf1a2
movq 0xf0(%r12), %rax
movq (%rax,%rcx,8), %r13
cmpl $0x0, 0x4(%r13)
jne 0xf19a
movl %esi, 0xc(%rsp)
movq %rcx, 0x18(%rsp)
movl (%r13), %eax
movl %eax, 0x8(%rsp)
pushq $0x1
popq %rbp
cltq
cmpq %rax, %rbp
jge 0xf18d
movq 0x870(%rdx), %rax
movq 0x10(%r13), %rcx
movq %rbp, 0x10(%rsp)
movslq (%rcx,%rbp,4), %rcx
movzbl (%rax,%rcx), %ebp
movb 0x8b8(%rdx), %al
xorl %r15d, %r15d
movsbq %al, %rax
cmpq %rax, %r15
jge 0xf17c
xorl %r14d, %r14d
movsbq 0x8b8(%rdx), %rax
cmpq %rax, %r14
jge 0xf174
movsd 0x1d7f4(%rip), %xmm0    # 0x2c8f0
testb %bpl, %bpl
js 0xf10f
movq 0x20(%r12), %rax
movq (%rax,%r14,8), %rax
movsd (%rax,%rbp,8), %xmm0
movq 0x30(%r13), %rax
movq 0x10(%rsp), %rdx
movq (%rax,%rdx,8), %rax
mulsd (%rax,%r14,8), %xmm0
movq 0x28(%r13), %rax
movq -0x8(%rax,%rdx,8), %rax
mulsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x48(%r13), %xmm0
callq 0x67cb
movsd 0x20(%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x60(%r12), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%r14,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r14,8)
incq %r14
movq 0x88(%rbx), %rdx
jmp 0xf0e3
incq %r15
jmp 0xf0d3
movq 0x10(%rsp), %rbp
incq %rbp
movl (%r13), %eax
jmp 0xf0a7
movl 0xc(%rsp), %esi
addl 0x8(%rsp), %esi
movq 0x18(%rsp), %rcx
incq %rcx
jmp 0xf06b
cmpb $0x0, 0x42(%rdx)
jle 0xf052
cvtsi2sd %esi, %xmm0
pushq $0x2
popq %rsi
movq %r12, %rdi
addq $0x28, %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/HMMProblem.cpp
// Function: HMMProblem::setGradB(FitBit*)
void HMMProblem::setGradB (FitBit *fb){
    if(this->p->block_fitting[2]>0) return;
    NDAT t, ndat = 0;
	NPAR o, o0, i;//, j;
    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++) { // old
        for(t=0; t<dt->n; t++) { // Levinson MMFST
            o  = this->p->dat_obs[ dt->ix[t] ];//->get( dt->ix[t] );
            o0 = this->p->dat_obs[ dt->ix[0] ];//->get( dt->ix[t] );
            if(o<0) // if no observation -- skip
                continue;
            for(i=0; i<this->p->nS; i++)
                fb->gradB[i][o] -= dt->alpha[t][i] * dt->beta[t][i] / safe0num(dt->p_O_param * fb->B[i][o]); // old
//            for(j=0; j<this->p->nS; j++)
//                if(t==0) {
//                    fb->gradB[j][o] -= (o0==o) * fb->pi[j] * dt->beta[0][j];
//                } else {
//                    for(i=0; i<this->p->nS; i++)
//                        fb->gradB[j][o] -= ( dt->alpha[t-1][i] * fb->A[i][j] * dt->beta[t][j] /*+ (o0==o) * getPI(dt,j) * dt->beta[0][j]*/ ) / safe0num(dt->p_O_param); // Levinson MMFST
//                }
        }
    }
    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), %rdx
cmpb $0x0, 0x983(%rdx)
jle 0xf1f7
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
movq %rsi, %rbx
movq %rdi, %r14
xorl %ecx, %ecx
xorl %esi, %esi
movslq 0xe8(%rbx), %rax
cmpq %rax, %rcx
jge 0xf300
movq 0xf0(%rbx), %rax
movq (%rax,%rcx,8), %r12
cmpl $0x0, 0x4(%r12)
jne 0xf2f8
movl %esi, 0x4(%rsp)
movq %rcx, 0x8(%rsp)
movl (%r12), %eax
movl %eax, (%rsp)
xorl %ebp, %ebp
movslq %eax, %rcx
cmpq %rcx, %rbp
jge 0xf2ec
movq 0x870(%rdx), %rcx
movq 0x10(%r12), %rsi
movslq (%rsi,%rbp,4), %rsi
movsbq (%rcx,%rsi), %r13
testq %r13, %r13
js 0xf2e4
xorl %r15d, %r15d
movsbq 0x8b8(%rdx), %rax
cmpq %rax, %r15
jge 0xf2e0
movq 0x28(%r12), %rax
movq 0x30(%r12), %rcx
movq (%rax,%rbp,8), %rax
movsd (%rax,%r15,8), %xmm0
movq (%rcx,%rbp,8), %rax
mulsd (%rax,%r15,8), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x48(%r12), %xmm0
movq 0x20(%rbx), %rax
movq (%rax,%r15,8), %rax
mulsd (%rax,%r13,8), %xmm0
callq 0x67cb
movsd 0x10(%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x68(%rbx), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%r13,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r13,8)
incq %r15
movq 0x88(%r14), %rdx
jmp 0xf267
movl (%r12), %eax
incq %rbp
jmp 0xf23a
movl 0x4(%rsp), %esi
addl (%rsp), %esi
movq 0x8(%rsp), %rcx
incq %rcx
jmp 0xf201
cmpb $0x0, 0x42(%rdx)
jle 0xf1e8
cvtsi2sd %esi, %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/HMMProblem.cpp
// Function: HMMProblem::computeGradients(FitBit*)
NDAT HMMProblem::computeGradients(FitBit *fb){
    fb->toZero(FBS_GRAD);
    
    NDAT ndat = computeAlphaAndPOParam(fb->xndat, fb->x_data);
    computeBeta(fb->xndat, fb->x_data);

    if(fb->pi != NULL && this->p->block_fitting[0]==0) setGradPI(fb);
    if(fb->A  != NULL && this->p->block_fitting[1]==0) setGradA(fb);
    if(fb->B  != NULL && this->p->block_fitting[2]==0) setGradB(fb);
    return ndat;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8800
movl 0xe8(%rbx), %esi
movq 0xf0(%rbx), %rdx
movq %r14, %rdi
callq 0xe7b0
movl %eax, %ebp
movl 0xe8(%rbx), %esi
movq 0xf0(%rbx), %rdx
movq %r14, %rdi
callq 0xea9e
cmpq $0x0, 0x10(%rbx)
je 0xf38c
movq 0x88(%r14), %rax
cmpb $0x0, 0x981(%rax)
jne 0xf38c
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
cmpq $0x0, 0x18(%rbx)
je 0xf3af
movq 0x88(%r14), %rax
cmpb $0x0, 0x982(%rax)
jne 0xf3af
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
cmpq $0x0, 0x20(%rbx)
je 0xf3d2
movq 0x88(%r14), %rax
cmpb $0x0, 0x983(%rax)
jne 0xf3d2
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x38(%rax)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::computeGradientsBig(FitBit**, int)
NDAT HMMProblem::computeGradientsBig(FitBit **fbs, NCAT nfbs){
    NCAT xndat = this->p->nSeq;
    struct data** x_data = this->p->k_data;
//    NPAR kg_flag = -1;
   
	NCAT x;
    
//    switch(this->p->structure)
//    {
//        case STRUCTURE_SKILL:
//            kg_flag = 0;
//            break;
//        case STRUCTURE_GROUP:
//            kg_flag = 1;
//            break;
//    }

    // there are as many fbs as skills or groups in this setup
    for(x=0; x<nfbs; x++)
        fbs[x]->toZero(FBS_GRAD);
    
    NDAT ndat = computeAlphaAndPOParam(xndat, x_data);
    computeBeta(xndat, x_data);

    
	for(x=0; x<nfbs; x++) {
        if(fbs[x]->pi != NULL && this->p->block_fitting[0]==0) setGradPI(fbs[x]);
        if(fbs[x]->A  != NULL && this->p->block_fitting[1]==0) setGradA (fbs[x]);
        if(fbs[x]->B  != NULL && this->p->block_fitting[2]==0) setGradB (fbs[x]);
    }// for all sequences
    return ndat;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebx
movq %rsi, %r14
movq %rdi, %r15
movq 0x88(%rdi), %rax
movl 0x8dc(%rax), %ecx
movl %ecx, 0x4(%rsp)
movq 0x8f0(%rax), %r13
xorl %r12d, %r12d
testl %edx, %edx
cmovlel %r12d, %ebx
pushq $0x3
popq %rbp
cmpq %r12, %rbx
je 0xf426
movq (%r14,%r12,8), %rdi
movl %ebp, %esi
callq 0x8800
incq %r12
jmp 0xf411
movq %r15, %rdi
movl 0x4(%rsp), %r12d
movl %r12d, %esi
movq %r13, %rdx
callq 0xe7b0
movl %eax, %ebp
movq %r15, %rdi
movl %r12d, %esi
movq %r13, %rdx
callq 0xea9e
xorl %r12d, %r12d
cmpq %r12, %rbx
je 0xf4c2
movq (%r14,%r12,8), %rsi
cmpq $0x0, 0x10(%rsi)
je 0xf479
movq 0x88(%r15), %rax
cmpb $0x0, 0x981(%rax)
jne 0xf479
movq (%r15), %rax
movq %r15, %rdi
callq *0x28(%rax)
movq (%r14,%r12,8), %rsi
cmpq $0x0, 0x18(%rsi)
je 0xf49d
movq 0x88(%r15), %rax
cmpb $0x0, 0x982(%rax)
jne 0xf49d
movq (%r15), %rax
movq %r15, %rdi
callq *0x30(%rax)
movq (%r14,%r12,8), %rsi
cmpq $0x0, 0x20(%rsi)
je 0xf4bd
movq 0x88(%r15), %rax
cmpb $0x0, 0x983(%rax)
jne 0xf4bd
movq (%r15), %rax
movq %r15, %rdi
callq *0x38(%rax)
incq %r12
jmp 0xf44c
movl %ebp, %eax
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::fit()
void HMMProblem::fit() {
    NUMBER* loglik_rmse = init1D<NUMBER>(2);
    FitNullSkill(loglik_rmse, false /*do RMSE*/);
    switch(this->p->solver)
    {
        case METHOD_BW: // Conjugate Gradient Descent
            loglik_rmse[0] += BaumWelch();
            break;
        case METHOD_GD: // Gradient Descent
        case METHOD_CGD: // Conjugate Gradient Descent
        case METHOD_GDL: // Gradient Descent, Lagrange
        case METHOD_GBB: // Brzilai Borwein Gradient Method
            loglik_rmse[0] += GradientDescent();
            break;
        default:
            fprintf(stderr,"Solver specified is not supported.\n");
            break;
    }
    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
movzbl 0x3f(%rax), %eax
leal -0x2(%rax), %ecx
cmpl $0x4, %ecx
jae 0x10b95
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
cmpl $0x1, %eax
jne 0x10ba4
movq %rbx, %rdi
callq 0x10e40
jmp 0x10b7c
movq 0x2842d(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x1c96d(%rip), %rdi     # 0x2d522
pushq $0x23
popq %rsi
pushq $0x1
popq %rdx
callq 0x44b0
movsd (%r14), %xmm0
jmp 0x10b81
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::free3Params(double*&, double**&, double**&, signed char)
void HMMProblem::free3Params(NUMBER* &PI, NUMBER** &A, NUMBER** &B, NPAR nS) {
    free(PI);
    free2D<NUMBER>(A, (NDAT)nS);
    free2D<NUMBER>(B, (NDAT)nS);
    PI = NULL;
    A  = NULL;
    B  = NULL;
}

// Assembly:
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
pushq %rax
movl %r8d, %ebx
movq %rcx, %r14
movq %rdx, %r15
movq %rsi, %r12
movq (%rsi), %rdi
callq 0x4290
movq (%r15), %rdi
movl %ebx, %esi
callq 0x7f2c
movq (%r14), %rdi
movl %ebx, %esi
callq 0x7f2c
andq $0x0, (%r12)
andq $0x0, (%r15)
andq $0x0, (%r14)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::checkConvergenceBig(FitBit**, int, double, double*)
bool HMMProblem::checkConvergenceBig(FitBit** fbs, NCAT nfbs, NUMBER tol, NUMBER *criterion) {
    NUMBER critetion_bit;
    for(NCAT x=0; x<nfbs; x++)
    {
        critetion_bit = 0;
        for(NPAR i=0; i<fbs[x]->nS; i++)
        {
            if(fbs[x]->pi != NULL) critetion_bit += pow( fbs[x]->pi[i]-fbs[x]->PIm1[i], 2 )/*:0*/;
            for(NPAR j=0; (fbs[x]->A != NULL) && j<fbs[x]->nS; j++) {
                critetion_bit+= pow(fbs[x]->A[i][j] - fbs[x]->Am1[i][j],2);
            }
            for(NPAR k=0; (fbs[x]->B != NULL) && k<fbs[x]->nO; k++) {
                critetion_bit += pow(fbs[x]->B[i][k] - fbs[x]->Bm1[i][k],2);
            }
        }
        *criterion += sqrt(critetion_bit);
    }
    *criterion/=nfbs;
	return (*criterion) < tol; // double the truth or false
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r12
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movsd %xmm0, 0x8(%rsp)
movl %edx, %ebp
movq %rsi, %r14
xorl %r15d, %r15d
testl %edx, %edx
movl $0x0, %r12d
cmovgl %edx, %r12d
xorpd %xmm3, %xmm3
cmpq %r12, %r15
je 0x1390b
movq (%r14,%r15,8), %rax
movsbq 0x1(%rax), %rcx
testb %cl, %cl
movl $0x0, %edx
cmovgl %ecx, %edx
movslq %edx, %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
cmpq %rdx, %rsi
je 0x138e6
movq 0x10(%rax), %rdi
testq %rdi, %rdi
je 0x1385e
movsd (%rdi,%rsi,8), %xmm1
movq 0x28(%rax), %rdi
subsd (%rdi,%rsi,8), %xmm1
mulsd %xmm1, %xmm1
addsd %xmm1, %xmm0
movq 0x18(%rax), %rdi
xorl %r8d, %r8d
movapd %xmm0, %xmm1
testq %rdi, %rdi
je 0x1389c
cmpq %rcx, %r8
jge 0x13898
movq (%rdi,%rsi,8), %r9
movsd (%r9,%r8,8), %xmm2
movq 0x30(%rax), %r9
movq (%r9,%rsi,8), %r9
subsd (%r9,%r8,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm1
incq %r8
jmp 0x13869
movapd %xmm1, %xmm0
movq 0x20(%rax), %rdi
xorl %r8d, %r8d
movapd %xmm0, %xmm1
testq %rdi, %rdi
je 0x138de
movsbq (%rax), %r9
cmpq %r9, %r8
jge 0x138da
movq (%rdi,%rsi,8), %r9
movsd (%r9,%r8,8), %xmm2
movq 0x38(%rax), %r9
movq (%r9,%rsi,8), %r9
subsd (%r9,%r8,8), %xmm2
mulsd %xmm2, %xmm2
addsd %xmm2, %xmm1
incq %r8
jmp 0x138a7
movapd %xmm1, %xmm0
incq %rsi
jmp 0x13836
ucomisd %xmm3, %xmm0
jb 0x138f2
sqrtsd %xmm0, %xmm0
jmp 0x138fb
callq 0x41a0
xorpd %xmm3, %xmm3
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
incq %r15
jmp 0x13811
cvtsi2sd %ebp, %xmm0
movsd (%rbx), %xmm1
divsd %xmm0, %xmm1
movsd 0x8(%rsp), %xmm0
ucomisd %xmm1, %xmm0
movsd %xmm1, (%rbx)
seta %al
addq $0x10, %rsp
popq %rbx
popq %r12
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::BaumWelchBit(FitBit*)
FitResult HMMProblem::BaumWelchBit(FitBit *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;
    
    fr.ndat = -1; // no accounting so far
    while( !fr.conv && fr.iter<=this->p->maxiter ) {
        if(fr.iter==1) {
            fr.ndat = computeAlphaAndPOParam(xndat, x_data);
            fr.pO0 = HMMProblem::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 = HMMProblem::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
subq $0x18, %rsp
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %rbx
movl $0x1, (%rdi)
andq $0x0, 0x8(%rdi)
leaq 0x18(%rdi), %rax
movq %rax, 0x10(%rsp)
xorps %xmm0, %xmm0
movups %xmm0, 0x18(%rdi)
movl 0xe8(%rdx), %eax
movl %eax, 0xc(%rsp)
movq 0xf0(%rdx), %r12
orl $-0x1, 0x24(%rdi)
xorl %ebp, %ebp
pushq $0x1
popq %r13
movq 0x88(%r15), %rdx
testl %ebp, %ebp
jne 0x13fcc
cmpl 0x38(%rdx), %r13d
jg 0x13fcc
cmpl $0x1, %r13d
jne 0x13f58
movq %r15, %rdi
movl 0xc(%rsp), %ebp
movl %ebp, %esi
movq %r12, %rdx
callq 0xe7b0
movl %eax, 0x24(%rbx)
movl %ebp, %esi
movq %r12, %rdx
callq 0xe400
movsd %xmm0, 0x8(%rbx)
movsd %xmm0, 0x10(%rbx)
movq %r14, %rdi
pushq $0x1
popq %rsi
pushq $0x2
popq %rdx
callq 0x88b6
movq %r15, %rdi
movq %r14, %rsi
callq 0x13ff4
movsd %xmm0, 0x18(%rbx)
movq %r14, %rdi
movq %rbx, %rsi
callq 0x89ea
movzbl %al, %ebp
movl %ebp, 0x20(%rbx)
movl (%rbx), %r13d
testb %bpl, %bpl
jne 0x13f9c
movq 0x88(%r15), %rax
cmpl 0x38(%rax), %r13d
jne 0x13fb3
movl 0xc(%rsp), %esi
movq %r12, %rdx
callq 0xe400
movq 0x10(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0x13fbc
movq 0x10(%rsp), %rax
movsd (%rax), %xmm0
incl %r13d
movl %r13d, (%rbx)
movsd %xmm0, 0x10(%rbx)
jmp 0x13f11
movl 0xe8(%r14), %edi
movq 0xf0(%r14), %rsi
callq 0x7b9b
decl (%rbx)
movq %rbx, %rax
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::readNullObsRatio(_IO_FILE*, param*, int*)
void HMMProblem::readNullObsRatio(FILE *fid, struct param* param, NDAT *line_no) {
	NPAR i;
	//
	// read null skill ratios
	//
    fscanf(fid, "Null skill ratios\t");
    this->null_obs_ratio =Calloc(NUMBER, (size_t)this->p->nO);
    this->null_skill_obs      = 0;
    this->null_skill_obs_prob = 0;
	for(i=0; i<param->nO; i++) {
        if( i==(param->nO-1) ) // end
            fscanf(fid,"%lf\n",&this->null_obs_ratio[i] );
        else
            fscanf(fid,"%lf\t",&this->null_obs_ratio[i] );
		
        if( this->null_obs_ratio[i] > this->null_skill_obs_prob ) {
            this->null_skill_obs_prob = this->null_obs_ratio[i];
            this->null_skill_obs = i;
        }
	}
    (*line_no)++;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movq %rcx, (%rsp)
movq %rdx, %r14
movq %rsi, %r15
movq %rdi, %r12
leaq 0x181d7(%rip), %rsi     # 0x2d56a
movq %r15, %rdi
xorl %eax, %eax
callq 0x4480
movq 0x88(%r12), %rax
movsbq 0x8b9(%rax), %rdi
pushq $0x8
popq %rsi
callq 0x4120
movq %rax, %rdx
movq %rax, 0x18(%r12)
xorpd %xmm0, %xmm0
movupd %xmm0, 0x28(%r12)
leaq 0x18493(%rip), %rbp     # 0x2d862
xorl %ebx, %ebx
xorl %r13d, %r13d
movsbq 0x8b9(%r14), %rax
cmpq %rax, %r13
jge 0x15434
decl %eax
addq %rbx, %rdx
cmpl %eax, %r13d
movq %rbp, %rsi
leaq 0x1846a(%rip), %rax     # 0x2d85d
cmoveq %rax, %rsi
movq %r15, %rdi
xorl %eax, %eax
callq 0x4480
movq 0x18(%r12), %rdx
movsd (%rdx,%r13,8), %xmm0
ucomisd 0x30(%r12), %xmm0
jbe 0x1542b
movsd %xmm0, 0x30(%r12)
movsbl %r13b, %eax
cvtsi2sd %eax, %xmm0
movsd %xmm0, 0x28(%r12)
incq %r13
addq $0x8, %rbx
jmp 0x153d4
movq (%rsp), %rax
incl (%rax)
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::checkConvergenceBig0(FitBit**, int, double, double*)
bool HMMProblem::checkConvergenceBig0(FitBit** fbs, NCAT nfbs, NUMBER tol, NUMBER *criterion) {
    for(NCAT x=0; x<nfbs; x++)
    {
        for(NPAR i=0; i<fbs[x]->nS; i++)
        {
            if(fbs[x]->pi != NULL) *criterion += pow( fbs[x]->pi[i]-fbs[x]->PIm1[i], 2 )/*:0*/;
            for(NPAR j=0; (fbs[x]->A != NULL) && j<fbs[x]->nS; j++) {
                *criterion += pow(fbs[x]->A[i][j] - fbs[x]->Am1[i][j],2);
            }
            for(NPAR k=0; (fbs[x]->B != NULL) && k<fbs[x]->nO; k++) {
                *criterion += pow(fbs[x]->B[i][k] - fbs[x]->Bm1[i][k],2);
            }
        }
    }
    *criterion = sqrt(*criterion);
	return (*criterion) < tol; // double the truth or false
}

// Assembly:
pushq %r15
pushq %r14
pushq %rbx
subq $0x10, %rsp
movq %rcx, %rbx
movapd %xmm0, %xmm2
xorl %eax, %eax
testl %edx, %edx
cmovlel %eax, %edx
xorl %ecx, %ecx
cmpq %rdx, %rcx
je 0x159a7
movq (%rsi,%rcx,8), %rdi
movzbl 0x1(%rdi), %r8d
testb %r8b, %r8b
cmovlel %eax, %r8d
movzbl %r8b, %r8d
xorl %r9d, %r9d
cmpq %r8, %r9
je 0x1599f
movq 0x10(%rdi), %r10
testq %r10, %r10
je 0x15915
movsd (%r10,%r9,8), %xmm0
movq 0x28(%rdi), %r10
subsd (%r10,%r9,8), %xmm0
mulsd %xmm0, %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
movq 0x18(%rdi), %r10
testq %r10, %r10
je 0x1594f
xorl %r11d, %r11d
cmpq %r11, %r8
je 0x1594f
movq (%r10,%r9,8), %r14
movsd (%r14,%r11,8), %xmm0
movq 0x30(%rdi), %r14
movq (%r14,%r9,8), %r14
subsd (%r14,%r11,8), %xmm0
mulsd %xmm0, %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
incq %r11
jmp 0x15921
movq 0x20(%rdi), %r10
testq %r10, %r10
je 0x15997
movl (%rdi), %r11d
testb %r11b, %r11b
cmovlel %eax, %r11d
movzbl %r11b, %r11d
xorl %r14d, %r14d
cmpq %r14, %r11
je 0x15997
movq (%r10,%r9,8), %r15
movsd (%r15,%r14,8), %xmm0
movq 0x38(%rdi), %r15
movq (%r15,%r9,8), %r15
subsd (%r15,%r14,8), %xmm0
mulsd %xmm0, %xmm0
addsd (%rbx), %xmm0
movsd %xmm0, (%rbx)
incq %r14
jmp 0x15969
incq %r9
jmp 0x158e7
incq %rcx
jmp 0x158c7
movsd (%rbx), %xmm0
xorpd %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0x159bb
sqrtsd %xmm0, %xmm0
jmp 0x159cc
movsd %xmm2, 0x8(%rsp)
callq 0x41a0
movsd 0x8(%rsp), %xmm2
ucomisd %xmm0, %xmm2
movsd %xmm0, (%rbx)
seta %al
addq $0x10, %rsp
popq %rbx
popq %r14
popq %r15
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblem.cpp
// Function: HMMProblem::toFileAlphaBetaObs(char const*, int)
void HMMProblem::toFileAlphaBetaObs(const char *filename, NCAT k) {
    NPAR nS = this->p->nS;
    FILE *fid = fopen(filename,"w");
    
    if(fid == NULL) {
        fprintf(stderr,"Can't write output model file %s\n",filename);
        exit(1);
    }
    
    struct data *dt = this->p->k_data[k];
    
    for(NDAT tt=0; tt<dt->n; tt++) {
        for(NPAR i=0; i<nS; i++) fprintf(fid,"%20.17f\t", dt->alpha[tt][i]);
        for(NPAR i=0; i<nS; i++) fprintf(fid,"%20.17f\t", dt->beta[tt][i]);
        fprintf(fid,"%i\n", this->p->dat_obs[ dt->ix[tt] ]);
    }
   fclose(fid);
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
pushq %rax
movl %edx, %ebp
movq %rsi, %r15
movq %rdi, %r12
movq 0x88(%rdi), %rax
movb 0x8b8(%rax), %bl
leaq 0x17b3d(%rip), %rsi     # 0x2d546
movq %r15, %rdi
callq 0x4280
testq %rax, %rax
je 0x15af4
movq %rax, %r14
movq %r12, (%rsp)
movq 0x88(%r12), %rax
movq 0x8f0(%rax), %rax
movslq %ebp, %rcx
movq (%rax,%rcx,8), %r13
movzbl %bl, %eax
xorl %ecx, %ecx
testb %al, %al
cmovlel %ecx, %eax
movzbl %al, %ebp
leaq 0x17e36(%rip), %r12     # 0x2d881
xorl %r15d, %r15d
movslq (%r13), %rax
cmpq %rax, %r15
jge 0x15ade
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x15a81
movq 0x28(%r13), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x4350
incq %rbx
jmp 0x15a5d
xorl %ebx, %ebx
cmpq %rbx, %rbp
je 0x15aa7
movq 0x30(%r13), %rax
movq (%rax,%r15,8), %rax
movsd (%rax,%rbx,8), %xmm0
movq %r14, %rdi
movq %r12, %rsi
movb $0x1, %al
callq 0x4350
incq %rbx
jmp 0x15a83
movq (%rsp), %rax
movq 0x88(%rax), %rax
movq 0x870(%rax), %rax
movq 0x10(%r13), %rcx
movslq (%rcx,%r15,4), %rcx
movsbl (%rax,%rcx), %edx
movq %r14, %rdi
leaq 0x170a7(%rip), %rsi     # 0x2cb76
xorl %eax, %eax
callq 0x4350
incq %r15
jmp 0x15a4e
movq %r14, %rdi
addq $0x8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x4210
movq 0x234dd(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x17a43(%rip), %rsi     # 0x2d548
movq %r15, %rdx
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiGK.cpp
// Function: HMMProblemPiGK::HMMProblemPiGK(param*)
HMMProblemPiGK::HMMProblemPiGK(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 + param->nG;
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0x22afe(%rip), %rax     # 0x38680
movq %rax, (%rbx)
pushq $0x3
popq %rax
movl 0x8c0(%r14), %ecx
cmpq $0x6, %rax
je 0x15b9d
movl %ecx, (%rbx,%rax,4)
incq %rax
jmp 0x15b88
shll $0x2, %ecx
addl 0x8bc(%r14), %ecx
movl %ecx, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x15bd0
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/HMMProblemPiGK.cpp
// Function: HMMProblemPiGK::getPIk(int)
NUMBER* HMMProblemPiGK::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 0x161ad
movq 0x38(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x22e21(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x176c9(%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/HMMProblemPiGK.cpp
// Function: HMMProblemPiGK::getPIg(int)
NUMBER* HMMProblemPiGK::getPIg(NCAT x) {
	if( x > (this->p->nG-1) ) {
		fprintf(stderr,"While accessing PI_g, skill index %d exceeded last index of the data %d.\n", x, this->p->nG-1);
		exit(1);
	}
	return this->PIg[x];
}

// Assembly:
movl %esi, %edx
movq 0x88(%rdi), %rax
movl 0x8bc(%rax), %ecx
cmpl %esi, %ecx
jle 0x161f2
movq 0x90(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x22ddc(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x176ce(%rip), %rsi     # 0x2d8d4
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiGK.cpp
// Function: HMMProblemPiGK::setGradPI(FitBit*)
void HMMProblemPiGK::setGradPI(FitBit *fb){
    if(this->p->block_fitting[0]>0) return;
    NDAT t = 0, ndat = 0;
    NPAR i, o;
    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;
//    o = dt->obs[t];
        o = this->p->dat_obs[ dt->ix[t] ];//->get( dt->ix[t] );
        for(i=0; i<fb->nS; i++) {
            combined = getPI(dt,i);//sigmoid( logit(this->PI[k][i]) + logit(this->PIg[g][i]) );
            deriv_logit = 1 / safe0num( fb->pi[i] * (1-fb->pi[i]) );
            fb->gradPI[i] -= combined * (1-combined) * deriv_logit * dt->beta[t][i] * ((o<0)?1:getB(dt,i,o)) / safe0num(dt->p_O_param);
        }
    }
    if( this->p->Cslices>0 ) // penalty
        fb->addL2Penalty(FBV_PI, 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, 0x981(%rax)
jle 0x162b7
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 0x163fe
movq 0xf0(%rbx), %rax
movq (%rax,%rdx,8), %r15
cmpl $0x0, 0x4(%r15)
jne 0x163f6
movq %rdx, 0x10(%rsp)
movl %ecx, 0xc(%rsp)
movl (%r15), %eax
movl %eax, 0x8(%rsp)
movq 0x88(%r14), %rax
movq 0x870(%rax), %rax
movq 0x10(%r15), %rcx
movslq (%rcx), %rcx
movb (%rax,%rcx), %r12b
movsbl %r12b, %ebp
xorl %r13d, %r13d
movsbq 0x1(%rbx), %rax
cmpq %rax, %r13
jge 0x163e9
movq (%r14), %rax
movsbl %r13b, %edx
movq %r14, %rdi
movq %r15, %rsi
callq *0x10(%rax)
movsd %xmm0, (%rsp)
movq 0x10(%rbx), %rax
movsd (%rax,%r13,8), %xmm1
movsd 0x165a4(%rip), %xmm0    # 0x2c8f0
subsd %xmm1, %xmm0
mulsd %xmm1, %xmm0
callq 0x67cb
movsd 0x1658f(%rip), %xmm2    # 0x2c8f0
movapd %xmm2, %xmm1
divsd %xmm0, %xmm1
movapd %xmm2, %xmm0
movsd (%rsp), %xmm3
subsd %xmm3, %xmm0
mulsd %xmm3, %xmm0
mulsd %xmm1, %xmm0
movq 0x30(%r15), %rax
movq (%rax), %rax
mulsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%rsp)
movapd %xmm2, %xmm0
testb %r12b, %r12b
js 0x163ab
movq (%r14), %rax
movsbl %r13b, %edx
movq %r14, %rdi
movq %r15, %rsi
movl %ebp, %ecx
callq *0x20(%rax)
movsd (%rsp), %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movsd 0x48(%r15), %xmm0
callq 0x67cb
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
movq 0x58(%rbx), %rax
movsd (%rax,%r13,8), %xmm0
subsd %xmm1, %xmm0
movsd %xmm0, (%rax,%r13,8)
incq %r13
jmp 0x16317
movl 0xc(%rsp), %ecx
addl 0x8(%rsp), %ecx
movq 0x10(%rsp), %rdx
incq %rdx
jmp 0x162c1
movq 0x88(%r14), %rdx
cmpb $0x0, 0x42(%rdx)
jle 0x162a8
cvtsi2sd %ecx, %xmm0
pushq $0x1
popq %rsi
movq %rbx, %rdi
addq $0x18, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
jmp 0x90fe
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiGK.cpp
// Function: HMMProblemPiGK::fit()
void HMMProblemPiGK::fit() {
    NUMBER* loglik_rmse = init1D<NUMBER>(2);
    FitNullSkill(loglik_rmse, false /*do not need RMSE/SE*/);
    if(this->p->structure == STRUCTURE_PIgk) {
        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 $0x4, 0x3e(%rax)
jne 0x167eb
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 0x227e6(%rip), %rax     # 0x38fd8
movq (%rax), %rcx
leaq 0x16d26(%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/HMMProblemPiGKww.cpp
// Function: HMMProblemPiGKww::init(param*)
void HMMProblemPiGKww::init(struct param *param){
//    HMMProblemPiGK::init(param);
    this->ww = init1D<NUMBER>(3);
	this->ww[0] = 0.5;//1;
	this->ww[1] = 0.5;//1;
    this->ww[2] = 0;//0;
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
pushq $0x3
popq %rdi
callq 0x7dde
movq %rax, 0x98(%rbx)
movaps 0x16322(%rip), %xmm0    # 0x2da20
movups %xmm0, (%rax)
andq $0x0, 0x10(%rax)
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiGKww.cpp
// Function: HMMProblemPiGKww::getPI(data*, signed char)
NUMBER HMMProblemPiGKww::getPI(struct data* dt, NPAR i) {
//    NUMBER p = this->pi[dt->k][i] * 2 * this->ww[0][i], q = this->PIg[dt->g][i] * 2 * this->ww[1][i];
//    return 1/( 1 + (1-p)*(1-q)/(p*q) );

//    NUMBER lw0 = logit(this->ww[0][i]), lw1 = logit(this->ww[1][i]);
//    NUMBER p = this->pi[dt->k][i], q = this->PIg[dt->g][i];
//    return 1/( 1 + pow(1-p,lw0)*pow(1-q,lw1)/(pow(p,lw0)*pow(q,lw1)) );
    
//    NUMBER p = this->pi[dt->k][i] * 2 * this->ww[0], q = this->PIg[dt->g][i] * 2 * this->ww[1];
//    return 1/( 1 + (1-p)*(1-q)/(p*q) );

//    // a logit(k) + b logit(u)
//    NUMBER p = pow((1-this->pi[dt->k][i])/safe0num(this->pi[dt->k][i]), this->ww[0]), q = pow((1-this->PIg[dt->g][i])/safe0num(this->PIg[dt->g][i]), this->ww[1]);
//    return 1/( 1 + p*q/exp(this->ww[2]) );
    
    // logit1(a) logit(k) + logit1(b) logit(u)
    NUMBER p = this->pi[dt->k][i], q = this->PIg[dt->g][i];
    return 1/( 1 + pow( (1-p)/p,1+logit(this->ww[0])) * pow( (1-q)/q,1+logit(this->ww[1])) * ( (0.5-this->ww[2])/safe0num(0.5+this->ww[2]) )/* */  );
    
//    // logit1(a) logit(k) + logit1(b) logit(u)
//    NUMBER p = this->pi[dt->k][i], q = this->PIg[dt->g][i];
//    NUMBER a = 1+sqrt(3)*(this->ww[0]-0.5)/sqrt(1-pow(this->ww[0]-0.5,2)),
//           b = 1+sqrt(3)*(this->ww[1]-0.5)/sqrt(1-pow(this->ww[1]-0.5,2)),
//           c = 1+sqrt(3)*(this->ww[2]-0.5)/sqrt(1-pow(this->ww[2]-0.5,2));
//    
//    return 1/( 1 + pow( (1-p)/p,a) * pow( (1-q)/q,b) * exp(-c)  );
    
    
    
}

// Assembly:
pushq %rbx
subq $0x10, %rsp
movq %rdi, %rbx
movslq 0x58(%rsi), %rax
movq 0x38(%rdi), %rcx
movq 0x90(%rdi), %rdi
movq (%rcx,%rax,8), %rax
movslq %edx, %rcx
movsd (%rax,%rcx,8), %xmm0
movslq 0x5c(%rsi), %rax
movq (%rdi,%rax,8), %rax
movsd (%rax,%rcx,8), %xmm1
movsd %xmm1, 0x8(%rsp)
movsd 0x1516e(%rip), %xmm1    # 0x2c8f0
subsd %xmm0, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, (%rsp)
movq 0x98(%rbx), %rax
movsd (%rax), %xmm0
callq 0x6845
movapd %xmm0, %xmm1
addsd 0x15145(%rip), %xmm1    # 0x2c8f0
movsd (%rsp), %xmm0
callq 0x4440
movsd %xmm0, (%rsp)
movsd 0x1512e(%rip), %xmm1    # 0x2c8f0
movsd 0x8(%rsp), %xmm0
subsd %xmm0, %xmm1
divsd %xmm0, %xmm1
movsd %xmm1, 0x8(%rsp)
movq 0x98(%rbx), %rax
movsd 0x8(%rax), %xmm0
callq 0x6845
movapd %xmm0, %xmm1
addsd 0x150fd(%rip), %xmm1    # 0x2c8f0
movsd 0x8(%rsp), %xmm0
callq 0x4440
mulsd (%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq 0x98(%rbx), %rax
movsd 0x10(%rax), %xmm0
movsd 0x15103(%rip), %xmm1    # 0x2c920
movapd %xmm1, %xmm2
subsd %xmm0, %xmm2
movsd %xmm2, (%rsp)
addsd %xmm1, %xmm0
callq 0x67cb
movsd (%rsp), %xmm1
divsd %xmm0, %xmm1
mulsd 0x8(%rsp), %xmm1
movsd 0x150a6(%rip), %xmm0    # 0x2c8f0
addsd %xmm0, %xmm1
divsd %xmm1, %xmm0
addq $0x10, %rsp
popq %rbx
retq
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemPiGKww.cpp
// Function: HMMProblemPiGKww::computeGradients(FitBit*)
NDAT HMMProblemPiGKww::computeGradients(FitBit *fb){
    fb->toZero(FBS_GRAD);
    
    NDAT ndat = computeAlphaAndPOParam(fb->xndat, fb->x_data);
    computeBeta(fb->xndat, fb->x_data);

    /*vv diff vv*/
    if(fb->pi != NULL && this->p->block_fitting[0]==0) setGradPI(fb);
    if(fb->pi != NULL && this->p->block_fitting[0]==0) setGradWW(fb);
    /*^^ diff ^^*/

    if(fb->A  != NULL && this->p->block_fitting[1]==0) setGradA(fb);
    if(fb->B  != NULL && this->p->block_fitting[2]==0) setGradB(fb);
    return ndat;
}

// Assembly:
pushq %rbp
pushq %r14
pushq %rbx
movq %rsi, %rbx
movq %rdi, %r14
pushq $0x3
popq %rsi
movq %rbx, %rdi
callq 0x8800
movl 0xe8(%rbx), %esi
movq 0xf0(%rbx), %rdx
movq %r14, %rdi
callq 0xe7b0
movl %eax, %ebp
movl 0xe8(%rbx), %esi
movq 0xf0(%rbx), %rdx
movq %r14, %rdi
callq 0xea9e
cmpq $0x0, 0x10(%rbx)
je 0x18120
movq 0x88(%r14), %rax
cmpb $0x0, 0x981(%rax)
jne 0x18101
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x28(%rax)
cmpq $0x0, 0x10(%rbx)
je 0x18120
movq 0x88(%r14), %rax
cmpb $0x0, 0x981(%rax)
jne 0x18120
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0xc8(%rax)
cmpq $0x0, 0x18(%rbx)
je 0x18143
movq 0x88(%r14), %rax
cmpb $0x0, 0x982(%rax)
jne 0x18143
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x30(%rax)
cmpq $0x0, 0x20(%rbx)
je 0x18166
movq 0x88(%r14), %rax
cmpb $0x0, 0x983(%rax)
jne 0x18166
movq (%r14), %rax
movq %r14, %rdi
movq %rbx, %rsi
callq *0x38(%rax)
movl %ebp, %eax
popq %rbx
popq %r14
popq %rbp
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemAGK.cpp
// Function: HMMProblemAGK::HMMProblemAGK(param*)
HMMProblemAGK::HMMProblemAGK(struct param *param) {
    this->sizes[0] = param->nK;
    this->sizes[1] = param->nK;
    this->sizes[2] = param->nK;
    this->n_params = param->nK * 4 + param->nG;
    init(param);
}

// Assembly:
pushq %r14
pushq %rbx
pushq %rax
movq %rsi, %r14
movq %rdi, %rbx
callq 0xd954
leaq 0x1f686(%rip), %rax     # 0x38868
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
addl 0x8bc(%r14), %eax
movl %eax, 0x8(%rbx)
movq %rbx, %rdi
movq %r14, %rsi
callq 0x19230
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/HMMProblemAGK.cpp
// Function: HMMProblemAGK::destroy()
void HMMProblemAGK::destroy() {
	// destroy model data
    if( this->Ag != NULL) {
        free3D<NUMBER>(this->Ag, this->p->nG, this->p->nS);
        this->Ag = NULL;
    }
}

// Assembly:
pushq %rbx
movq %rdi, %rbx
movq 0x90(%rdi), %rdi
testq %rdi, %rdi
je 0x197ff
movq 0x88(%rbx), %rax
movl 0x8bc(%rax), %esi
movsbl 0x8b8(%rax), %edx
callq 0xa064
andq $0x0, 0x90(%rbx)
popq %rbx
retq
nop
// File: /workspace/github_cpp_makefile_star2_O2/myudelson[P]hmm-scalable/HMMProblemAGK.cpp
// Function: HMMProblemAGK::getPI(int)
NUMBER* HMMProblemAGK::getPI(NCAT x) { // same as getPIk(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 0x1983b
movq 0x38(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1f793(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x1403b(%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/HMMProblemAGK.cpp
// Function: HMMProblemAGK::getA(int)
NUMBER** HMMProblemAGK::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 0x1987d
movq 0x40(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1f751(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x13c03(%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/HMMProblemAGK.cpp
// Function: HMMProblemAGK::getB(int)
NUMBER** HMMProblemAGK::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 0x198bf
movq 0x48(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1f70f(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x13c08(%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/HMMProblemAGK.cpp
// Function: HMMProblemAGK::getAk(int)
NUMBER** HMMProblemAGK::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 0x19901
movq 0x40(%rdi), %rax
movslq %edx, %rcx
movq (%rax,%rcx,8), %rax
retq
pushq %rax
decl %ecx
movq 0x1f6cd(%rip), %rax     # 0x38fd8
movq (%rax), %rdi
leaq 0x13b7f(%rip), %rsi     # 0x2d494
xorl %eax, %eax
callq 0x4350
pushq $0x1
popq %rdi
callq 0x42a0