// File: /workspace/github_c_makefile_star2_O0/olcaytaner[P]Isell/hmm.c
// Function: multiply_constant_state_model
void multiply_constant_state_model(void *model, double mul, HMM_STATE_TYPE statetype)
{
 /*!Last Changed 15.03.2007*/
 Gaussianptr g;
 Gaussianmixtureptr gm;
 Multinomialptr m;
 Dirichletptr d;
 Dirichletmixtureptr dm;
 int i, j;
 int numrealfeatures = current_dataset->multifeaturecount - 1;
 switch (statetype)
  {
   case          STATE_DISCRETE:m = (Multinomialptr) model;
                                j = 0;
                                for (i = 0; i < current_dataset->featurecount; i++)
                                  if (current_dataset->features[i].type == STRING)
                                   {
                                    multiply_array(m->prob[j], mul, current_dataset->features[i].valuecount);
                                    j++;
                                   }
                                break;
   case          STATE_GAUSSIAN:g = (Gaussianptr) model;
                                multiply_array(g->mean, mul, numrealfeatures);
                                matrix_multiply_constant(&(g->covariance), mul);
                                break;
   case  STATE_GAUSSIAN_MIXTURE:gm = (Gaussianmixtureptr) model;
                                multiply_array(gm->weights, mul, numrealfeatures);
                                for (i = 0; i < gm->componentcount; i++)
                                 {
                                  multiply_array(gm->components[i].mean, mul, numrealfeatures);
                                  matrix_multiply_constant(&(gm->components[i].covariance), mul);
                                 }
                                break;
   case         STATE_DIRICHLET:d = (Dirichletptr) model;
                                multiply_array(d->alpha, mul, numrealfeatures);
                                break;
   case STATE_DIRICHLET_MIXTURE:dm = (Dirichletmixtureptr) model;
                                multiply_array(dm->weights, mul, dm->componentcount);
                                for (i = 0; i < dm->componentcount; i++)
                                  multiply_array(dm->components[i].alpha, mul, numrealfeatures);
                                break;
  }
}

// Assembly:
pushq %rbp
movq %rsp, %rbp
subq $0x60, %rsp
movq %rdi, -0x8(%rbp)
movsd %xmm0, -0x10(%rbp)
movl %esi, -0x14(%rbp)
leaq 0xca555(%rip), %rax     # 0x105840
movq (%rax), %rax
movl 0x1c0(%rax), %eax
decl %eax
movl %eax, -0x4c(%rbp)
movl -0x14(%rbp), %eax
movq %rax, -0x58(%rbp)
subq $0x4, %rax
ja 0x3b4f1
movq -0x58(%rbp), %rax
leaq 0xa9b2b(%rip), %rcx     # 0xe4e40
movslq (%rcx,%rax,4), %rax
addq %rcx, %rax
jmpq *%rax
movq -0x8(%rbp), %rax
movq %rax, -0x30(%rbp)
movl $0x0, -0x48(%rbp)
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
leaq 0xca502(%rip), %rcx     # 0x105840
movq (%rcx), %rcx
cmpl 0x1bc(%rcx), %eax
jge 0x3b3bf
leaq 0xca4f0(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x44(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
cmpl $0x1, (%rax)
jne 0x3b3af
movq -0x30(%rbp), %rax
movq (%rax), %rax
movslq -0x48(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsd -0x10(%rbp), %xmm0
leaq 0xca4b9(%rip), %rax     # 0x105840
movq (%rax), %rax
addq $0x30f08, %rax          # imm = 0x30F08
movslq -0x44(%rbp), %rcx
imulq $0x340, %rcx, %rcx      # imm = 0x340
addq %rcx, %rax
movl 0x18(%rax), %esi
callq 0x50700
movl -0x48(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x48(%rbp)
jmp 0x3b3b1
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3b334
jmp 0x3b4f1
movq -0x8(%rbp), %rax
movq %rax, -0x20(%rbp)
movq -0x20(%rbp), %rax
movq (%rax), %rdi
movsd -0x10(%rbp), %xmm0
movl -0x4c(%rbp), %esi
callq 0x50700
movq -0x20(%rbp), %rdi
addq $0x8, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x5a9d0
jmp 0x3b4f1
movq -0x8(%rbp), %rax
movq %rax, -0x28(%rbp)
movq -0x28(%rbp), %rax
movq 0x10(%rax), %rdi
movsd -0x10(%rbp), %xmm0
movl -0x4c(%rbp), %esi
callq 0x50700
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x28(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3b474
movq -0x28(%rbp), %rax
movq (%rax), %rax
movslq -0x44(%rbp), %rcx
imulq $0x18, %rcx, %rcx
addq %rcx, %rax
movq (%rax), %rdi
movsd -0x10(%rbp), %xmm0
movl -0x4c(%rbp), %esi
callq 0x50700
movq -0x28(%rbp), %rax
movq (%rax), %rdi
movslq -0x44(%rbp), %rax
imulq $0x18, %rax, %rax
addq %rax, %rdi
addq $0x8, %rdi
movsd -0x10(%rbp), %xmm0
callq 0x5a9d0
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3b41b
jmp 0x3b4f1
movq -0x8(%rbp), %rax
movq %rax, -0x38(%rbp)
movq -0x38(%rbp), %rax
movq (%rax), %rdi
movsd -0x10(%rbp), %xmm0
movl -0x4c(%rbp), %esi
callq 0x50700
jmp 0x3b4f1
movq -0x8(%rbp), %rax
movq %rax, -0x40(%rbp)
movq -0x40(%rbp), %rax
movq 0x10(%rax), %rdi
movsd -0x10(%rbp), %xmm0
movq -0x40(%rbp), %rax
movl 0x8(%rax), %esi
callq 0x50700
movl $0x0, -0x44(%rbp)
movl -0x44(%rbp), %eax
movq -0x40(%rbp), %rcx
cmpl 0x8(%rcx), %eax
jge 0x3b4ef
movq -0x40(%rbp), %rax
movq (%rax), %rax
movslq -0x44(%rbp), %rcx
movq (%rax,%rcx,8), %rdi
movsd -0x10(%rbp), %xmm0
movl -0x4c(%rbp), %esi
callq 0x50700
movl -0x44(%rbp), %eax
addl $0x1, %eax
movl %eax, -0x44(%rbp)
jmp 0x3b4bc
jmp 0x3b4f1
addq $0x60, %rsp
popq %rbp
retq
nopw (%rax,%rax)