// File: /workspace/github_c_makefile_star2_O3/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, 0x70(%rsp)
movq %rsi, %rbp
movq %rdi, %rbx
leaq 0xaaeae(%rip), %rax     # 0xd5870
movq (%rax), %rax
movl 0x1c0(%rax), %eax
movq %rax, 0x80(%rsp)
movq %rsi, %rdi
callq 0x2ec88
movq %rax, 0x40(%rsp)
movslq %eax, %r12
leaq 0x7dc5c(%rip), %r13     # 0xa8646
movl $0x8, %esi
movq %r12, %rdi
movq %r13, %rdx
movl $0xd, %ecx
callq 0x3a1fc
movq %rax, 0x90(%rsp)
movl 0x8(%rbx), %ecx
movl $0x8, %edi
movl $0x8, %esi
movl %r12d, %edx
movq %r13, %r8
movl $0xe, %r9d
callq 0x3a231
movq %rax, %r15
movq %rax, 0x88(%rsp)
movl 0x8(%rbx), %ecx
movl $0x8, %edi
movl $0x8, %esi
movl %r12d, %edx
movq %r13, %r8
movl $0xf, %r9d
callq 0x3a3ac
movq %rax, 0x68(%rsp)
movl 0x8(%rbx), %ecx
movl $0x8, %edi
movl $0x8, %esi
movl %r12d, %edx
movq %r13, %r8
movl $0x10, %r9d
callq 0x3a3ac
movq %rax, 0x10(%rsp)
movl 0x8(%rbx), %r8d
movl $0x8, %edi
movl $0x8, %esi
movl $0x8, %edx
movl %r12d, %ecx
movl %r8d, %r9d
pushq $0x11
pushq %r13
callq 0x3a419
addq $0x10, %rsp
movq %rax, %r13
leaq 0xd0(%rsp), %rcx
movq %rbx, %rdi
movq %rbp, %rsi
movq %r15, %rdx
movq 0x90(%rsp), %r15
movq %r15, %r8
callq 0x2b2b3
movq %rbx, %rdi
movq %rbx, %r14
movq %rbp, %rsi
movl %r12d, %edx
movq 0x68(%rsp), %rbx
movq %rbx, %rcx
movq %r15, %r8
callq 0x2b4ab
movq %r14, %rdi
movl %r12d, %esi
movq 0x88(%rsp), %r15
movq %r15, %rdx
movq %rbx, %rcx
movq 0x10(%rsp), %rbx
movq %rbx, %r8
callq 0x2b6cc
movq %r14, %rdi
movq %rbp, %rsi
movl %r12d, %edx
movq %r15, %rcx
movq 0x68(%rsp), %r8
movq %r13, %r9
callq 0x2b739
movslq 0x8(%r14), %r8
testq %r8, %r8
jle 0x2b252
movq %rbx, %rcx
movq %r14, %rbx
movq 0x80(%rsp), %rax
decl %eax
movl %eax, 0x3c(%rsp)
movq (%rcx), %rax
movq (%r14), %rcx
movq %r8, %rdx
shlq $0x3, %rdx
xorl %esi, %esi
xorpd %xmm0, %xmm0
movsd (%rax,%rsi), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, 0x10(%rcx,%rsi,4)
addq $0x8, %rsi
cmpq %rsi, %rdx
jne 0x2ab4a
testl %r8d, %r8d
movq 0x70(%rsp), %r12
jle 0x2b252
movq 0x40(%rsp), %rax
leal -0x1(%rax), %r11d
movslq %r11d, %rax
movq %rax, 0xb8(%rsp)
movl 0x3c(%rsp), %r14d
movq $0x0, (%rsp)
xorpd %xmm2, %xmm2
movq %rbp, 0x60(%rsp)
movq %r13, 0x98(%rsp)
movq %r11, 0x78(%rsp)
movq %rbx, 0x48(%rsp)
movq %r14, 0xa8(%rsp)
xorpd %xmm0, %xmm0
cmpl $0x2, 0x40(%rsp)
movq 0x10(%rsp), %r10
movq (%rsp), %rbx
jl 0x2abdb
xorl %eax, %eax
movq (%r10,%rax,8), %rcx
addsd (%rcx,%rbx,8), %xmm0
incq %rax
cmpq %rax, %r11
jne 0x2abca
movsd (%r12,%rbx,8), %xmm1
addsd %xmm0, %xmm1
movsd %xmm1, (%r12,%rbx,8)
testl %r8d, %r8d
jle 0x2ac4e
movq 0x48(%rsp), %rax
movq (%rax), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movq 0x8(%rax,%rcx), %rcx
movl %r8d, %edx
xorl %esi, %esi
xorpd %xmm1, %xmm1
cmpl $0x2, 0x40(%rsp)
jl 0x2ac31
xorl %edi, %edi
movq (%r13,%rdi,8), %r9
movq (%r9,%rbx,8), %r9
addsd (%r9,%rsi,8), %xmm1
incq %rdi
cmpq %rdi, %r11
jne 0x2ac16
addsd %xmm2, %xmm1
movq %rsi, %rdi
shlq $0x5, %rdi
movq (%rax,%rdi), %rdi
movsd %xmm1, (%rdi,%rbx,8)
movsd %xmm1, (%rcx,%rsi,8)
incq %rsi
cmpq %rdx, %rsi
jne 0x2ac09
movq 0xb8(%rsp), %rax
movq (%r10,%rax,8), %rax
addsd (%rax,%rbx,8), %xmm0
movq 0xc0(%rsp), %rax
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
movq 0x48(%rsp), %r14
movl 0xc(%r14), %eax
cmpl $0x2, %eax
je 0x2af2a
cmpl $0x1, %eax
je 0x2ad67
testl %eax, %eax
jne 0x2b236
leaq 0xaabd5(%rip), %rax     # 0xd5870
movq (%rax), %rax
movslq 0x1bc(%rax), %rcx
testq %rcx, %rcx
jle 0x2b236
movq 0x48(%rsp), %rdx
movq (%rdx), %rdx
movq %rbx, %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 0x2ad56
movslq 0x18(%rax,%r8), %r8
testq %r8, %r8
jle 0x2ad54
movq (%rdx), %r9
movslq %edi, %r10
movq (%r9,%r10,8), %r9
xorl %r10d, %r10d
xorpd %xmm0, %xmm0
testq %rbp, %rbp
je 0x2ad46
xorl %r11d, %r11d
movq %rbp, %rbx
movq (%rbx), %r14
movl (%r14,%rsi,8), %r14d
cmpq %r14, %r10
jne 0x2ad1f
movq 0x10(%rsp), %r14
movq (%r14,%r11,8), %r14
movq (%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 0x2ad00
addsd %xmm2, %xmm0
movq 0x78(%rsp), %r11
movq (%rsp), %rbx
movsd %xmm0, (%r9,%r10,8)
incq %r10
cmpq %r8, %r10
jne 0x2acf1
incl %edi
incq %rsi
cmpq %rcx, %rsi
jne 0x2accc
jmp 0x2b236
movq (%r14), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movq 0x18(%rax,%rcx), %rax
movq %rax, 0x58(%rsp)
movl $0x1, %edi
movl 0x3c(%rsp), %ebx
movl %ebx, %esi
callq 0x3d79d
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movl %ebx, %edi
movl %ebx, %esi
callq 0x3d79d
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
xorpd %xmm0, %xmm0
leaq 0x28(%rsp), %rdi
callq 0x3f41d
xorpd %xmm0, %xmm0
leaq 0x18(%rsp), %rdi
callq 0x3f41d
testq %rbp, %rbp
je 0x2aec9
xorl %r14d, %r14d
movq 0x60(%rsp), %rbp
cmpl $0x2, 0x80(%rsp)
jl 0x2aeaa
xorl %ebx, %ebx
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rax
movq (%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2ed6a
movq 0x30(%rsp), %rax
movq (%rax), %rax
mulsd 0x8(%rsp), %xmm0
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
xorl %r15d, %r15d
movq 0xa8(%rsp), %r12
movq 0x58(%rsp), %r13
movq 0x10(%rsp), %rax
movq (%rax,%r14,8), %rax
movq (%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2ed6a
movq (%r13), %rax
subsd (%rax,%rbx,8), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
movl %r15d, %esi
callq 0x2ed6a
movq (%r13), %rax
subsd (%rax,%r15,8), %xmm0
mulsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rax
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r12
jne 0x2ae2f
incq %rbx
cmpq %r12, %rbx
jne 0x2ade5
leaq 0x10(%rbp), %rax
addq $0x28, %rbp
testq %r14, %r14
cmovneq %rax, %rbp
movq (%rbp), %rbp
incq %r14
testq %rbp, %rbp
jne 0x2add5
movq 0x58(%rsp), %rbx
movq (%rbx), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rsi
movslq 0x2c(%rsp), %rdx
shlq $0x3, %rdx
callq 0x4310
addq $0x8, %rbx
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
movq %rbx, %rdi
callq 0x406d5
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3ed51
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3ed51
movq 0x70(%rsp), %r12
movq 0x60(%rsp), %rbp
jmp 0x2b221
movq (%r14), %rax
movq %rbx, %rcx
shlq $0x5, %rcx
movq 0x40(%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 0x7d6ea(%rip), %rax     # 0xa8646
pushq %rax
callq 0x3a419
addq $0x10, %rsp
movq %rax, %r15
movl $0x1, %edi
movl 0x3c(%rsp), %r12d
movl %r12d, %esi
callq 0x3d79d
movq %rax, 0x28(%rsp)
movq %rdx, 0x30(%rsp)
movl %r12d, %edi
movl %r12d, %esi
callq 0x3d79d
movq %rax, 0x18(%rsp)
movq %rdx, 0x20(%rsp)
movq %r14, %rdi
movq %rbp, %rsi
movl %ebx, %edx
movq 0x10(%rsp), %rcx
movq %r15, %r8
callq 0x2b88e
cmpl $0x0, 0x8(%r13)
jle 0x2b1e9
xorl %r12d, %r12d
movq %r13, 0xa0(%rsp)
movq %r15, 0xb0(%rsp)
xorpd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
leaq 0x28(%rsp), %rdi
callq 0x3f41d
xorpd %xmm0, %xmm0
leaq 0x18(%rsp), %rdi
callq 0x3f41d
testq %rbp, %rbp
je 0x2b15b
xorpd %xmm0, %xmm0
movsd %xmm0, 0x50(%rsp)
xorl %edx, %edx
movq 0x60(%rsp), %rbp
movq (%r15,%rdx,8), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x50(%rsp), %xmm0
addsd (%rax,%r12,8), %xmm0
movsd %xmm0, 0x50(%rsp)
cmpl $0x2, 0x80(%rsp)
jl 0x2b13c
xorl %ebx, %ebx
movq %rdx, 0x58(%rsp)
movq (%r15,%rdx,8), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r12,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2ed6a
movq 0x30(%rsp), %rax
movq (%rax), %rax
mulsd 0x8(%rsp), %xmm0
addsd (%rax,%rbx,8), %xmm0
movsd %xmm0, (%rax,%rbx,8)
xorl %r15d, %r15d
movq %r12, %r13
movq 0xa0(%rsp), %r12
movq 0xb0(%rsp), %rax
movq 0x58(%rsp), %rcx
movq (%rax,%rcx,8), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd (%rax,%r13,8), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
movl %ebx, %esi
callq 0x2ed6a
movq (%r12), %rax
leaq (,%r13,8), %rcx
leaq (%rcx,%rcx,2), %r14
movq (%rax,%r14), %rax
subsd (%rax,%rbx,8), %xmm0
mulsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movq %rbp, %rdi
movl %r15d, %esi
callq 0x2ed6a
movq (%r12), %rax
movq (%rax,%r14), %rax
movq 0xa8(%rsp), %r14
subsd (%rax,%r15,8), %xmm0
mulsd 0x8(%rsp), %xmm0
movq 0x20(%rsp), %rax
movq (%rax,%rbx,8), %rax
addsd (%rax,%r15,8), %xmm0
movsd %xmm0, (%rax,%r15,8)
incq %r15
cmpq %r15, %r14
jne 0x2b084
incq %rbx
cmpq %r14, %rbx
movq 0xb0(%rsp), %r15
movq %r13, %r12
movq 0x58(%rsp), %rdx
jne 0x2b03c
leaq 0x10(%rbp), %rax
addq $0x28, %rbp
testq %rdx, %rdx
cmovneq %rax, %rbp
movq (%rbp), %rbp
incq %rdx
testq %rbp, %rbp
jne 0x2b009
movq 0xc8(%rsp), %rax
movq (%rsp), %rcx
movq (%rax,%rcx,8), %rax
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax,%r12,8)
movq 0xa0(%rsp), %r13
movq (%r13), %rax
leaq (,%r12,8), %rcx
leaq (%rcx,%rcx,2), %rbx
movq (%rax,%rbx), %rdi
movq 0x30(%rsp), %rax
movq (%rax), %rsi
movslq 0x2c(%rsp), %rdx
shlq $0x3, %rdx
callq 0x4310
movq (%r13), %rax
leaq (%rax,%rbx), %rdi
addq $0x8, %rdi
movq 0x18(%rsp), %rsi
movq 0x20(%rsp), %rdx
callq 0x406d5
movq 0x10(%r13), %rax
movsd 0x50(%rsp), %xmm0
movsd %xmm0, (%rax,%r12,8)
incq %r12
movslq 0x8(%r13), %rax
cmpq %rax, %r12
movq 0x60(%rsp), %rbp
jl 0x2afcd
movq 0x28(%rsp), %rdi
movq 0x30(%rsp), %rsi
callq 0x3ed51
movq 0x18(%rsp), %rdi
movq 0x20(%rsp), %rsi
callq 0x3ed51
movq 0x48(%rsp), %rax
movl 0x8(%rax), %edx
movq %r15, %rdi
movq 0x40(%rsp), %rsi
callq 0x3a185
movq 0x70(%rsp), %r12
movq 0x98(%rsp), %r13
movq 0x78(%rsp), %r11
movq (%rsp), %rbx
xorpd %xmm2, %xmm2
incq %rbx
movq %rbx, %rcx
movq 0x48(%rsp), %rbx
movslq 0x8(%rbx), %r8
movq %rcx, (%rsp)
cmpq %r8, %rcx
jl 0x2abb4
movq %r13, %rdi
movq 0x40(%rsp), %rbx
movl %ebx, %esi
movl %r8d, %edx
callq 0x3a185
movq 0x88(%rsp), %rdi
movl %ebx, %esi
callq 0x3a14b
movq 0x68(%rsp), %rdi
movl %ebx, %esi
callq 0x3a14b
movq 0x10(%rsp), %rdi
movl %ebx, %esi
callq 0x3a14b
movq 0x90(%rsp), %rdi
callq 0x3a180
movsd 0xd0(%rsp), %xmm0
addq $0xd8, %rsp
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq