// File: /workspace/github_c_makefile_star2_O1/olcaytaner[P]Isell/hmm.c
// Function: iterate_em_hmm
double iterate_em_hmm(Hmmptr hmm, Instanceptr traindata, double *accumA, double *accumB, double **accumMix)
{
 /*!Last Changed 26.03.2007*/
 int i, j, k, t, f, m, p, f2 = 0, seqlen;
 int numrealfeatures = current_dataset->multifeaturecount - 1;
 Gaussianptr g;
 Gaussianmixtureptr gm;
 Multinomialptr mn;
 Instanceptr inst;
 double  loglikelihood;
 double  numeratorA, denominatorA, numeratorB, denominatorB, denominatorMC;
 double **alpha, **beta, **gamma, ***xi, *scale, ***gammaMix;
 matrix numeratorM, numeratorC;
 seqlen = frame_count(traindata);

 scale = (double *) safecalloc(seqlen, sizeof(double), "iterate_em_hmm", 13);
 alpha = (double **) safecalloc_2d(sizeof(double*), sizeof(double), seqlen, hmm->statecount, "iterate_em_hmm", 14);
 beta = (double **) safemalloc_2d(sizeof(double*), sizeof(double), seqlen, hmm->statecount, "iterate_em_hmm", 15);
 gamma = (double **) safemalloc_2d(sizeof(double*), sizeof(double), seqlen, hmm->statecount, "iterate_em_hmm", 16);
 xi = (double ***) safemalloc_3d(sizeof(double**), sizeof(double*), sizeof(double), seqlen, hmm->statecount, hmm->statecount, "iterate_em_hmm", 17);
 calc_fwd(hmm, traindata, alpha, &loglikelihood, scale);
 calc_bwd(hmm, traindata, seqlen, beta, scale);
 calc_gamma(hmm, seqlen, alpha, beta, gamma);
 /*initialization t=0*/
 calc_xi(hmm, traindata, seqlen, alpha, beta, xi);
 /* reestimate frequency of state i in time t=1 */
 for (i = 0; i < hmm->statecount; i++) 
   hmm->states[i].pi = WEIGHT_DELTA + (1 - WEIGHT_DELTA) * gamma[0][i];
 /* reestimate transition matrix  and symbol prob in each state */
 for (i = 0; i < hmm->statecount; i++)
  { 
   denominatorA = 0.0;
   for (t = 0; t < seqlen - 1; t++) 
     denominatorA += gamma[t][i];
   accumA[i] += denominatorA;
   for (j = 0; j < hmm->statecount; j++)
    {
     numeratorA = 0.0;
     for (t = 0; t < seqlen - 1; t++) 
       numeratorA += xi[t][i][j];
     hmm->states[j].a_dot_j[i] = WEIGHT_DELTA + (1 - WEIGHT_DELTA) * numeratorA;
     hmm->states[i].a_i_dot[j] = hmm->states[j].a_dot_j[i];
    }
   denominatorB = denominatorA + gamma[seqlen - 1][i];
   accumB[i] += denominatorB;
   switch (hmm->statetype)
    {
     case          STATE_DISCRETE:mn = (Multinomialptr) (hmm->states[i].b);
                                  p = 0;
                                  for (f = 0; f < current_dataset->featurecount; f++)
                                    if (current_dataset->features[f].type == STRING)
                                     {
                                      for (k = 0; k < current_dataset->features[f].valuecount; k++)
                                       {
                                        numeratorB = 0.0;
                                        inst = traindata;
                                        t = 0;
                                        while (inst)
                                         {
                                          if (inst->values[f].stringindex == k)
                                            numeratorB += gamma[t][i];
                                          if (t == 0)
                                            inst = inst->sublist;
                                          else
                                            inst = inst->next;
                                          t++;
                                         }
                                        mn->prob[p][k] = WEIGHT_DELTA + (1 - WEIGHT_DELTA) * numeratorB;
                                       }
                                      p++;
                                     }
                                  break;
     case          STATE_GAUSSIAN:g = (Gaussianptr) (hmm->states[i].b);
                                  numeratorM = matrix_alloc(1, numrealfeatures);
                                  numeratorC = matrix_alloc(numrealfeatures, numrealfeatures);
                                  initialize_matrix(&numeratorM, 0);
                                  initialize_matrix(&numeratorC, 0);
                                  inst = traindata;
                                  t = 0;
                                  while (inst)
                                   {
                                    for (f = 0; f < numrealfeatures; f++)
                                     {
                                      numeratorM.values[0][f] += gamma[t][i] * real_feature(inst, f);
                                      for (f2 = 0; f2 < numrealfeatures; f2++)
                                        numeratorC.values[f][f2] += gamma[t][i] * (real_feature(inst, f) - g->mean[f]) * (real_feature(inst, f2) - g->mean[f2]);
                                     }
                                    if (t == 0)
                                      inst = inst->sublist;
                                    else
                                      inst = inst->next;
                                    t++;
                                   }
                                  memcpy(g->mean, numeratorM.values[0], numeratorM.col * sizeof(double));
                                  matrix_identical(&(g->covariance), numeratorC);
                                  matrix_free(numeratorM);
                                  matrix_free(numeratorC);
                                  break;
     case  STATE_GAUSSIAN_MIXTURE:gm = (Gaussianmixtureptr) (hmm->states[i].b);
                                  gammaMix = (double ***) safemalloc_3d(sizeof(double**), sizeof(double*), sizeof(double), seqlen, hmm->statecount, gm->componentcount, "iterate_em_hmm", 22);
                                  numeratorM = matrix_alloc(1, numrealfeatures);
                                  numeratorC = matrix_alloc(numrealfeatures, numrealfeatures);
                                  calc_gammaMix(hmm, traindata, seqlen, gamma, gammaMix);
                                  for (m = 0; m < gm->componentcount; m++)
                                   {
                                    denominatorMC = 0.0;
                                    initialize_matrix(&numeratorM, 0);
                                    initialize_matrix(&numeratorC, 0);
                                    inst = traindata;
                                    t = 0;
                                    while(inst)
                                     {
                                      denominatorMC += gammaMix[t][i][m];
                                      for (f = 0; f < numrealfeatures; f++)
                                       {
                                        numeratorM.values[0][f] += gammaMix[t][i][m] * real_feature(inst, f);
                                        for (f2 = 0; f2 < numrealfeatures; f2++)
                                          numeratorC.values[f][f2] += gammaMix[t][i][m] * (real_feature(inst, f) - gm->components[m].mean[f]) * (real_feature(inst, f2) - gm->components[m].mean[f2]);
                                       }
                                      if (t == 0)
                                        inst = inst->sublist;
                                      else
                                        inst = inst->next;
                                      t++;
                                     }
                                    accumMix[i][m] = denominatorMC;
                                    memcpy(gm->components[m].mean, numeratorM.values[0], numeratorM.col * sizeof(double));
                                    matrix_identical(&(gm->components[m].covariance), numeratorC);
                                    gm->weights[m] = denominatorMC;
                                   }
                                  matrix_free(numeratorM);
                                  matrix_free(numeratorC);
                                  free_3d((void ***)gammaMix, seqlen, hmm->statecount);
                                  break;
     case         STATE_DIRICHLET:break;
     case STATE_DIRICHLET_MIXTURE:break;
    }
  }
 free_3d((void ***)xi, seqlen, hmm->statecount);
 free_2d((void **)alpha, seqlen);
 free_2d((void **)beta, seqlen);
 free_2d((void **)gamma, seqlen);
 safe_free(scale);
 return loglikelihood;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0xd8, %rsp
movq %r8, 0xc8(%rsp)
movq %rcx, 0xc0(%rsp)
movq %rdx, %r12
movq %rsi, %rbp
movq %rdi, %r15
leaq 0xa868d(%rip), %rax     # 0xd2870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
movq %rax, 0x78(%rsp)
movq %rsi, %rdi
callq 0x2e3d4
movl %eax, %r14d
movslq %eax, %rdi
movq %r14, 0x10(%rsp)
leaq 0x7b3e3(%rip), %r13     # 0xa55ee
movl $0x8, %esi
movq %r13, %rdx
movl $0xd, %ecx
callq 0x39210
movq %rax, 0x90(%rsp)
movl 0x8(%r15), %ecx
movl $0x8, %edi
movl $0x8, %esi
movl %r14d, %edx
movq %r13, %r8
movl $0xe, %r9d
callq 0x39245
movq %rax, 0x88(%rsp)
movl 0x8(%r15), %ecx
movl $0x8, %edi
movl $0x8, %esi
movl %r14d, %edx
movq %r13, %r8
movl $0xf, %r9d
callq 0x393b5
movq %rax, 0x80(%rsp)
movl 0x8(%r15), %ecx
movl $0x8, %edi
movl $0x8, %esi
movl %r14d, %edx
movq %r13, %r8
movl $0x10, %r9d
callq 0x393b5
movq %rax, 0x18(%rsp)
movl 0x8(%r15), %r8d
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl %r14d, %ecx
movl %r8d, %r9d
pushq $0x11
pushq %r13
callq 0x39422
addq $0x10, %rsp
movq %rax, %r13
leaq 0xd0(%rsp), %rcx
movq %r15, %rdi
movq %r15, 0x8(%rsp)
movq %rbp, %rsi
movq 0x88(%rsp), %rbx
movq %rbx, %rdx
movq 0x90(%rsp), %r14
movq %r14, %r8
callq 0x2aaea
movq %r15, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
movq 0x80(%rsp), %r15
movq %r15, %rcx
movq %r14, %r8
callq 0x2acea
movq 0x8(%rsp), %r14
movq %r14, %rdi
movq 0x10(%rsp), %rsi
movq %rbx, %rdx
movq %r15, %rcx
movq 0x18(%rsp), %r8
callq 0x2ae84
movq %r14, %rdi
movq %rbp, %rsi
movq 0x10(%rsp), %rdx
movq %rbx, %rcx
movq %r15, %r8
movq %r13, %r9
callq 0x2aef7
movslq 0x8(%r14), %rax
testq %rax, %rax
jle 0x2a37d
movq 0x18(%rsp), %rcx
movq (%rcx), %rcx
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
shlq $0x3, %rax
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd (%rcx,%rsi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rdx,%rsi,4)
addq $0x8, %rsi
cmpq %rsi, %rax
jne 0x2a365
movq 0x8(%rsp), %rax
movl 0x8(%rax), %r8d
testl %r8d, %r8d
jle 0x2aa86
movq 0x78(%rsp), %rax
decl %eax
movq 0x10(%rsp), %rcx
leal -0x1(%rcx), %r10d
movslq %r10d, %rcx
movq %rcx, 0xb8(%rsp)
movl %eax, 0x64(%rsp)
movl %eax, %eax
movq %rax, 0xb0(%rsp)
xorl %r14d, %r14d
xorpd %xmm2, %xmm2
movq %r12, 0xa0(%rsp)
movq %rbp, 0x68(%rsp)
movq %r13, 0x98(%rsp)
movq %r10, 0x70(%rsp)
xorpd %xmm0, %xmm0
cmpl $0x2, 0x10(%rsp)
movq 0x18(%rsp), %rdx
jl 0x2a3fd
xorl %eax, %eax
movq (%rdx,%rax,8), %rcx
addsd (%rcx,%r14,8), %xmm0
incq %rax
cmpq %rax, %r10
jne 0x2a3eb
movsd (%r12,%r14,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r12,%r14,8)
testl %r8d, %r8d
jle 0x2a471
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %r14, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rcx
movl %r8d, %edx
xorl %esi, %esi
xorpd %xmm1, %xmm1
cmpl $0x2, 0x10(%rsp)
jl 0x2a453
xorl %edi, %edi
movq (%r13,%rdi,8), %r9
movq (%r9,%r14,8), %r9
addsd (%r9,%rsi,8), %xmm1
incq %rdi
cmpq %rdi, %r10
jne 0x2a438
addsd %xmm2, %xmm1
movq %rsi, %rdi
shlq $0x5, %rdi
movq (%rax,%rdi), %rdi
movsd %xmm1, (%rdi,%r14,8)
movsd %xmm1, (%rcx,%rsi,8)
incq %rsi
cmpq %rdx, %rsi
jne 0x2a42b
movq 0x18(%rsp), %rdx
movq 0xb8(%rsp), %rax
movq (%rdx,%rax,8), %rax
addsd (%rax,%r14,8), %xmm0
movq 0xc0(%rsp), %rax
addsd (%rax,%r14,8), %xmm0
movsd %xmm0, (%rax,%r14,8)
movq 0x8(%rsp), %rax
movl 0xc(%rax), %eax
cmpl $0x2, %eax
movq %r14, 0x20(%rsp)
je 0x2a777
cmpl $0x1, %eax
je 0x2a598
testl %eax, %eax
jne 0x2aa71
leaq 0xa83a6(%rip), %rax     # 0xd2870
movq (%rax), %rax
movslq 0x1bc(%rax), %rcx
testq %rcx, %rcx
jle 0x2aa71
movq 0x8(%rsp), %rdx
movq (%rdx), %rdx
movq %r14, %rsi
shlq $0x5, %rsi
movq 0x18(%rdx,%rsi), %rdx
addq $0x30f08, %rax          # imm = 0x30F08
xorl %esi, %esi
xorl %edi, %edi
imulq $0x340, %rsi, %r8       # imm = 0x340
cmpl $0x1, (%rax,%r8)
jne 0x2a587
movslq 0x18(%rax,%r8), %r8
testq %r8, %r8
jle 0x2a580
movq (%rdx), %r9
movslq %edi, %r10
movq (%r9,%r10,8), %r9
xorl %r10d, %r10d
xorpd %xmm0, %xmm0
testq %rbp, %rbp
je 0x2a572
xorl %r11d, %r11d
movq %rbp, %rbx
movq (%rbx), %r14
movl (%r14,%rsi,8), %r14d
cmpq %r14, %r10
jne 0x2a54f
movq 0x18(%rsp), %r14
movq (%r14,%r11,8), %r14
movq 0x20(%rsp), %r15
addsd (%r14,%r15,8), %xmm0
leaq 0x10(%rbx), %r14
addq $0x28, %rbx
testq %r11, %r11
cmovneq %r14, %rbx
movq (%rbx), %rbx
incq %r11
testq %rbx, %rbx
jne 0x2a52f
addsd %xmm2, %xmm0
movq 0x20(%rsp), %r14
movsd %xmm0, (%r9,%r10,8)
incq %r10
cmpq %r8, %r10
jne 0x2a520
incl %edi
movq 0x70(%rsp), %r10
incq %rsi
cmpq %rcx, %rsi
jne 0x2a4fb
jmp 0x2aa71
movq 0x8(%rsp), %rax
movq (%rax), %rax
movq %r14, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq %rax, 0x50(%rsp)
movl $0x1, %edi
movl 0x64(%rsp), %ebx
movl %ebx, %esi
callq 0x3c6e5
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movl %ebx, %edi
movl %ebx, %esi
callq 0x3c6e5
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
xorpd %xmm0, %xmm0
leaq 0x38(%rsp), %rdi
callq 0x3e1f9
xorpd %xmm0, %xmm0
leaq 0x28(%rsp), %rdi
callq 0x3e1f9
testq %rbp, %rbp
movq 0x18(%rsp), %r13
je 0x2a701
xorl %ecx, %ecx
movq 0x68(%rsp), %rbp
cmpl $0x2, 0x78(%rsp)
jl 0x2a6e2
xorl %ebx, %ebx
movq %rcx, 0x58(%rsp)
movq (%r13,%rcx,8), %rax
movq 0x20(%rsp), %rdx
movsd (%rax,%rdx,8), %xmm0
movsd %xmm0, (%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2e4b6
movq 0x40(%rsp), %rax
movq (%rax), %rax
mulsd (%rsp), %xmm0
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
xorl %r15d, %r15d
movq 0xb0(%rsp), %r12
movq 0x50(%rsp), %r14
movq 0x58(%rsp), %rax
movq (%r13,%rax,8), %rax
movq 0x20(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, (%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2e4b6
movq (%r14), %rax
subsd (%rax,%rbx,8), %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movq %rbp, %rdi
movl %r15d, %esi
callq 0x2e4b6
movq (%r14), %rax
subsd (%rax,%r15,8), %xmm0
mulsd (%rsp), %xmm0
movq 0x30(%rsp), %rax
movq (%rax,%rbx,8), %rax
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x2a666
incq %rbx
cmpq %r12, %rbx
movq 0x58(%rsp), %rcx
jne 0x2a621
leaq 0x10(%rbp), %rax
addq $0x28, %rbp
testq %rcx, %rcx
cmovneq %rax, %rbp
movq (%rbp), %rbp
incq %rcx
testq %rbp, %rbp
jne 0x2a60f
movq 0x50(%rsp), %rbx
movq (%rbx), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movslq 0x3c(%rsp), %rdx
shlq $0x3, %rdx
callq 0x4310
addq $0x8, %rbx
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
movq %rbx, %rdi
callq 0x3f37d
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3dbad
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3dbad
movq 0xa0(%rsp), %r12
movq 0x68(%rsp), %rbp
movq 0x98(%rsp), %r13
movq 0x70(%rsp), %r10
movq 0x20(%rsp), %r14
jmp 0x2aa6d
movq 0x8(%rsp), %r14
movq (%r14), %rax
movq 0x20(%rsp), %rcx
shlq $0x5, %rcx
movq 0x10(%rsp), %rbx
movq 0x18(%rax,%rcx), %r13
movl 0x8(%r13), %r9d
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl %ebx, %ecx
pushq $0x16
leaq 0x7ae3e(%rip), %rax     # 0xa55ee
pushq %rax
callq 0x39422
addq $0x10, %rsp
movq %rax, %r15
movl $0x1, %edi
movl 0x64(%rsp), %r12d
movl %r12d, %esi
callq 0x3c6e5
movq %rax, 0x38(%rsp)
movq %rdx, 0x40(%rsp)
movl %r12d, %edi
movl %r12d, %esi
callq 0x3c6e5
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movq %r14, %rdi
movq 0x20(%rsp), %r14
movq %rbp, %rsi
movl %ebx, %edx
movq 0x18(%rsp), %rcx
movq %r15, %r8
callq 0x2b04b
cmpl $0x0, 0x8(%r13)
jle 0x2aa25
xorl %r12d, %r12d
movq %r13, 0xa8(%rsp)
movq %r15, 0x50(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
leaq 0x38(%rsp), %rdi
callq 0x3e1f9
xorpd %xmm0, %xmm0
leaq 0x28(%rsp), %rdi
callq 0x3e1f9
testq %rbp, %rbp
je 0x2a99b
xorpd %xmm0, %xmm0
movsd %xmm0, 0x48(%rsp)
xorl %ecx, %ecx
movq 0x68(%rsp), %rbp
movq (%r15,%rcx,8), %rax
movq (%rax,%r14,8), %rax
movsd 0x48(%rsp), %xmm0
addsd (%rax,%r12,8), %xmm0
movsd %xmm0, 0x48(%rsp)
cmpl $0x2, 0x78(%rsp)
jl 0x2a97c
xorl %ebx, %ebx
movq %rcx, 0x58(%rsp)
movq (%r15,%rcx,8), %rax
movq (%rax,%r14,8), %rax
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, (%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2e4b6
movq 0x40(%rsp), %rax
movq (%rax), %rax
mulsd (%rsp), %xmm0
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
xorl %r15d, %r15d
movq %r12, %r13
movq 0xa8(%rsp), %r12
movq 0x58(%rsp), %rax
movq 0x50(%rsp), %rcx
movq (%rcx,%rax,8), %rax
movq (%rax,%r14,8), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, (%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2e4b6
movq (%r12), %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%rcx,2), %r14
movq (%rax,%r14), %rax
subsd (%rax,%rbx,8), %xmm0
mulsd (%rsp), %xmm0
movsd %xmm0, (%rsp)
movq %rbp, %rdi
movl %r15d, %esi
callq 0x2e4b6
movq (%r12), %rax
movq (%rax,%r14), %rax
movq 0x20(%rsp), %r14
movq 0xb0(%rsp), %rcx
subsd (%rax,%r15,8), %xmm0
mulsd (%rsp), %xmm0
movq 0x30(%rsp), %rax
movq (%rax,%rbx,8), %rax
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %rcx
jne 0x2a8cd
incq %rbx
cmpq %rcx, %rbx
movq 0x50(%rsp), %r15
movq %r13, %r12
movq 0x58(%rsp), %rcx
jne 0x2a88b
leaq 0x10(%rbp), %rax
addq $0x28, %rbp
testq %rcx, %rcx
cmovneq %rax, %rbp
movq (%rbp), %rbp
incq %rcx
testq %rbp, %rbp
jne 0x2a85f
movq 0xc8(%rsp), %rax
movq (%rax,%r14,8), %rax
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax,%r12,8)
movq 0xa8(%rsp), %r13
movq (%r13), %rax
leaq (,%r12,8), %rcx
leaq (%rcx,%rcx,2), %rbx
movq (%rax,%rbx), %rdi
movq 0x40(%rsp), %rax
movq (%rax), %rsi
movslq 0x3c(%rsp), %rdx
shlq $0x3, %rdx
callq 0x4310
movq (%r13), %rax
leaq (%rax,%rbx), %rdi
addq $0x8, %rdi
movq 0x28(%rsp), %rsi
movq 0x30(%rsp), %rdx
callq 0x3f37d
movq 0x10(%r13), %rax
movsd 0x48(%rsp), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x8(%r13), %rax
cmpq %rax, %r12
movq 0x68(%rsp), %rbp
jl 0x2a823
movq 0x38(%rsp), %rdi
movq 0x40(%rsp), %rsi
callq 0x3dbad
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3dbad
movq 0x8(%rsp), %rax
movl 0x8(%rax), %edx
movq %r15, %rdi
movq 0x10(%rsp), %rsi
callq 0x39199
movq 0xa0(%rsp), %r12
movq 0x98(%rsp), %r13
movq 0x70(%rsp), %r10
xorpd %xmm2, %xmm2
incq %r14
movq 0x8(%rsp), %rax
movslq 0x8(%rax), %r8
cmpq %r8, %r14
jl 0x2a3d9
movq %r13, %rdi
movq 0x10(%rsp), %rbx
movl %ebx, %esi
movl %r8d, %edx
callq 0x39199
movq 0x88(%rsp), %rdi
movl %ebx, %esi
callq 0x3915f
movq 0x80(%rsp), %rdi
movl %ebx, %esi
callq 0x3915f
movq 0x18(%rsp), %rdi
movl %ebx, %esi
callq 0x3915f
movq 0x90(%rsp), %rdi
callq 0x39194
movsd 0xd0(%rsp), %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq