// File: /workspace/github_cpp_makefile_star2_O3/myudelson[P]hmm-scalable/HMMProblemSt.cpp
// Function: HMMProblemSt::initAlphaEtAl()
void HMMProblemSt::initAlphaEtAl() {
    NPAR nS = this->task->nS;
    NCAT nK = this->task->nK, nG = this->task->nG;
    NDAT Nst = this->task->Nst;
    NPAR f_is_scaled = this->task->is_scaled==1;
    toZero2D(this->alpha, Nst, nS);
    // if scaled, new parameter values are multiplied, if not scaled – added
    if(f_is_scaled)
        toValue2D(this->po_param_gk, nG, nK, 1.0);
    else
        toZero2D(this->po_param_gk, nG, nK);
    toZero1D(this->loglik_k, nK);
    
    toValue3D(this->group_skill_map, (NDAT)nG, (NDAT)nK, (NDAT)nS, -1.0); // -1 means not set (use pLo)
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x28, %rsp
movq %rdi, 0x10(%rsp)
movq 0x68(%rdi), %rax
movsbl 0x900(%rax), %r15d
movl 0x908(%rax), %r12d
movl 0x904(%rax), %ecx
movq %rcx, 0x18(%rsp)
movslq 0x8fc(%rax), %rbp
movb 0x41(%rax), %al
movb %al, 0xf(%rsp)
movl %r15d, %eax
movq %rax, 0x20(%rsp)
testq %rbp, %rbp
jle 0xb6c2
movq 0x10(%rsp), %rax
movq 0x70(%rax), %rbx
movq 0x20(%rsp), %rax
leaq (,%rax,8), %r14
xorl %r13d, %r13d
testb %r15b, %r15b
jle 0xb6ba
movq (%rbx,%r13,8), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2100
incq %r13
cmpq %r13, %rbp
jne 0xb6a7
movq 0x10(%rsp), %rax
movq 0x78(%rax), %rbp
cmpb $0x1, 0xf(%rsp)
jne 0xb7a1
movq 0x18(%rsp), %r13
testl %r13d, %r13d
jle 0xb7d1
leal 0x1(%r12), %eax
leaq -0x1(%r12), %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
shrl %eax
shlq $0x4, %rax
xorl %ecx, %ecx
movdqa 0x7738(%rip), %xmm1     # 0x12e40
movdqa 0x7740(%rip), %xmm2     # 0x12e50
pxor %xmm2, %xmm0
movabsq $0x3ff0000000000000, %rdx # imm = 0x3FF0000000000000
pcmpeqd %xmm3, %xmm3
movdqa 0x7736(%rip), %xmm4     # 0x12e60
testl %r12d, %r12d
jle 0xb797
movq (%rbp,%rcx,8), %rsi
xorl %edi, %edi
movdqa %xmm1, %xmm5
movdqa %xmm5, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r8d
notl %r8d
testb $0x1, %r8b
je 0xb775
movq %rdx, (%rsi,%rdi)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %r8d
testb $0x1, %r8b
je 0xb78a
movq %rdx, 0x8(%rsi,%rdi)
paddq %xmm4, %xmm5
addq $0x10, %rdi
cmpq %rdi, %rax
jne 0xb73a
incq %rcx
cmpq %r13, %rcx
jne 0xb72a
jmp 0xb7d1
movq 0x18(%rsp), %r13
testl %r13d, %r13d
jle 0xb7d1
leaq (,%r12,8), %r14
xorl %ebx, %ebx
testl %r12d, %r12d
jle 0xb7c9
movq (%rbp,%rbx,8), %rdi
xorl %esi, %esi
movq %r14, %rdx
callq 0x2100
incq %rbx
cmpq %rbx, %r13
jne 0xb7b5
testl %r12d, %r12d
jle 0xb7f1
movq 0x10(%rsp), %rax
movq 0x80(%rax), %rdi
leaq (,%r12,8), %rdx
xorl %esi, %esi
callq 0x2100
testl %r13d, %r13d
jle 0xb8de
movq 0x10(%rsp), %rax
movq 0xc8(%rax), %rax
movq 0x20(%rsp), %rcx
decq %rcx
movq %rcx, %xmm0
pshufd $0x44, %xmm0, %xmm0     # xmm0 = xmm0[0,1,0,1]
leal 0x8(,%r15,8), %ecx
andl $0x7f0, %ecx            # imm = 0x7F0
xorl %edx, %edx
movdqa 0x7610(%rip), %xmm1     # 0x12e40
movdqa 0x7618(%rip), %xmm2     # 0x12e50
pxor %xmm2, %xmm0
movabsq $-0x4010000000000000, %rsi # imm = 0xBFF0000000000000
pcmpeqd %xmm3, %xmm3
movdqa 0x760e(%rip), %xmm4     # 0x12e60
testl %r12d, %r12d
jle 0xb8d2
xorl %edi, %edi
testb %r15b, %r15b
jle 0xb8ca
movq (%rax,%rdx,8), %r8
movq (%r8,%rdi,8), %r8
xorl %r9d, %r9d
movdqa %xmm1, %xmm5
movdqa %xmm5, %xmm6
pxor %xmm2, %xmm6
movdqa %xmm6, %xmm7
pcmpgtd %xmm0, %xmm7
pcmpeqd %xmm0, %xmm6
pshufd $0xf5, %xmm6, %xmm8     # xmm8 = xmm6[1,1,3,3]
pand %xmm7, %xmm8
pshufd $0xf5, %xmm7, %xmm6     # xmm6 = xmm7[1,1,3,3]
por %xmm8, %xmm6
movd %xmm6, %r10d
notl %r10d
testb $0x1, %r10b
je 0xb8a8
movq %rsi, (%r8,%r9)
pxor %xmm3, %xmm6
pextrw $0x4, %xmm6, %r10d
testb $0x1, %r10b
je 0xb8bd
movq %rsi, 0x8(%r8,%r9)
paddq %xmm4, %xmm5
addq $0x10, %r9
cmpq %r9, %rcx
jne 0xb86d
incq %rdi
cmpq %r12, %rdi
jne 0xb859
incq %rdx
cmpq %r13, %rdx
jne 0xb852
addq $0x28, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq
nop