// File: /workspace/github_c_makefile_star2_O1/PoulinV[P]AxiCLASS/build/../tools/evolver_ndf15.c
// Function: adjust_stepsize
int adjust_stepsize(double **dif, double abshdivabshlast, int neq,int k){
  double mydifU[5][5]={{-1,-2,-3,-4,-5},{0,1,3,6,10},{0,0,-1,-4,-10},{0,0,0,1,5},{0,0,0,0,-1}};
  double tempvec[5];
  double mydifRU[5][5];
  int ii,jj,kk;

  for(ii=1;ii<=5;ii++) mydifRU[0][ii-1] = -ii*abshdivabshlast;
  for(jj=2;jj<=5;jj++){
    for(ii=1;ii<=5;ii++){
      mydifRU[jj-1][ii-1] = mydifRU[jj-2][ii-1]*(1.0-(1.0+ii*abshdivabshlast)/jj);
    }
  }
  for(ii=0;ii<5;ii++){
    for(kk=0;kk<5;kk++){
      /* Save the i'th row of mydifRU */
      tempvec[kk] = mydifRU[ii][kk];
    }
    for(jj=0;jj<5;jj++){
      /* Now do the matrix multiplication: */
      mydifRU[ii][jj] = 0.0;
      for(kk=0;kk<5;kk++)    mydifRU[ii][jj] += tempvec[kk]*mydifU[kk][jj];
    }
  }

  for(ii=0;ii<neq;ii++){
    for(kk=0;kk<k;kk++){
      /* Save the k first values of the i'th row of dif */
      tempvec[kk] = dif[ii+1][kk+1];
    }
    for(jj=0;jj<k;jj++){
      /* Now do the matrix multiplication: */
      dif[ii+1][jj+1] = 0.0;
      for(kk=0;kk<k;kk++) dif[ii+1][jj+1] += tempvec[kk]*mydifRU[kk][jj];
    }
  }
  return _SUCCESS_;
}

// Assembly:
pushq %rbp
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbx
subq $0x108, %rsp            # imm = 0x108
movl %edx, %ebx
movq %rdi, (%rsp)
movl $0xfffffffe, %eax       # imm = 0xFFFFFFFE
xorl %ecx, %ecx
movdqa 0xe0869(%rip), %xmm1    # 0xf1c80
movdqa 0xe0871(%rip), %xmm2    # 0xf1c90
movdqa 0xe0879(%rip), %xmm3    # 0xf1ca0
pshufd $0xf5, %xmm3, %xmm4     # xmm4 = xmm3[1,1,3,3]
movq %rcx, %xmm5
pshufd $0x44, %xmm5, %xmm5     # xmm5 = xmm5[0,1,0,1]
por %xmm1, %xmm5
pxor %xmm2, %xmm5
movdqa %xmm3, %xmm6
pcmpgtd %xmm5, %xmm6
pshufd $0xf5, %xmm5, %xmm5     # xmm5 = xmm5[1,1,3,3]
pcmpeqd %xmm4, %xmm5
pand %xmm6, %xmm5
movd %xmm5, %edx
testb $0x1, %dl
je 0x11470
leal 0x1(%rax), %edx
xorps %xmm6, %xmm6
cvtsi2sd %edx, %xmm6
mulsd %xmm0, %xmm6
movsd %xmm6, 0x40(%rsp,%rcx,8)
pextrw $0x4, %xmm5, %edx
testb $0x1, %dl
je 0x1148b
xorps %xmm5, %xmm5
cvtsi2sd %eax, %xmm5
mulsd %xmm0, %xmm5
movsd %xmm5, 0x48(%rsp,%rcx,8)
addq $0x2, %rcx
addl $-0x2, %eax
cmpq $0x6, %rcx
jne 0x1142c
movl $0x2, %eax
leaq 0x68(%rsp), %rcx
movsd 0xdfdb6(%rip), %xmm1    # 0xf1260
xorps %xmm2, %xmm2
cvtsi2sd %eax, %xmm2
movq $-0x5, %rdx
leal 0x6(%rdx), %edi
xorps %xmm3, %xmm3
cvtsi2sd %edi, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
divsd %xmm2, %xmm3
movapd %xmm1, %xmm4
subsd %xmm3, %xmm4
mulsd (%rcx,%rdx,8), %xmm4
movsd %xmm4, 0x28(%rcx,%rdx,8)
incq %rdx
jne 0x114b8
incq %rax
addq $0x28, %rcx
cmpq $0x6, %rax
jne 0x114aa
xorl %eax, %eax
leaq 0xe10a4(%rip), %rcx     # 0xf25a0
leaq (%rax,%rax,4), %rdx
leaq (%rsp,%rdx,8), %rdx
addq $0x40, %rdx
movq 0x20(%rdx), %rdi
movq %rdi, 0x30(%rsp)
movupd (%rdx), %xmm0
movups 0x10(%rdx), %xmm1
movaps %xmm1, 0x20(%rsp)
movapd %xmm0, 0x10(%rsp)
movq %rcx, %rdi
xorl %r8d, %r8d
leaq (%rdx,%r8,8), %r9
movq $0x0, (%r9)
xorpd %xmm0, %xmm0
movq %rdi, %r10
xorl %r11d, %r11d
movsd 0x10(%rsp,%r11,8), %xmm1
mulsd (%r10), %xmm1
addsd %xmm1, %xmm0
incq %r11
addq $0x28, %r10
cmpq $0x5, %r11
jne 0x1153f
movsd %xmm0, (%r9)
incq %r8
addq $0x8, %rdi
cmpq $0x5, %r8
jne 0x1152a
incq %rax
cmpq $0x5, %rax
jne 0x114fc
testl %esi, %esi
jle 0x1161b
movl %ebx, %r13d
leaq (,%r13,8), %rax
movq %rax, 0x8(%rsp)
movl %esi, %ebp
leaq (,%r13,4), %r14
addq %r13, %r14
xorl %r15d, %r15d
leaq 0x10(%rsp), %r12
testl %ebx, %ebx
jle 0x115c2
movq (%rsp), %rax
movq 0x8(%rax,%r15,8), %rsi
addq $0x8, %rsi
movq %r12, %rdi
movq 0x8(%rsp), %rdx
callq 0x82d0
testl %ebx, %ebx
jle 0x11613
movq (%rsp), %rax
movq 0x8(%rax,%r15,8), %rax
leaq 0x40(%rsp), %rcx
xorl %edx, %edx
movq $0x0, 0x8(%rax,%rdx,8)
incq %rdx
xorpd %xmm0, %xmm0
xorl %esi, %esi
movq %r12, %rdi
movsd (%rdi), %xmm1
mulsd (%rcx,%rsi,8), %xmm1
addsd %xmm1, %xmm0
addq $0x8, %rdi
addq $0x5, %rsi
cmpq %rsi, %r14
jne 0x115eb
movsd %xmm0, (%rax,%rdx,8)
addq $0x8, %rcx
cmpq %r13, %rdx
jne 0x115d6
incq %r15
cmpq %rbp, %r15
jne 0x115a4
xorl %eax, %eax
addq $0x108, %rsp            # imm = 0x108
popq %rbx
popq %r12
popq %r13
popq %r14
popq %r15
popq %rbp
retq