// File: /workspace/github_c_makefile_star2_O2/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 %r15
pushq %r14
pushq %rbx
subq $0x80, %rsp
movl $0xffffffff, %eax       # imm = 0xFFFFFFFF
xorl %ecx, %ecx
cmpq $0x5, %rcx
je 0xf9f0
cvtsi2sd %eax, %xmm1
mulsd %xmm0, %xmm1
movsd %xmm1, -0x50(%rsp,%rcx,8)
decl %eax
incq %rcx
jmp 0xf9d5
movabsq $0x2, %rax
leaq -0x28(%rsp), %rcx
movabsq $-0x5, %r8
movsd 0xd584f(%rip), %xmm1    # 0xe5260
cmpq $0x6, %rax
je 0xfa5b
cvtsi2sd %eax, %xmm2
movq %r8, %r9
testq %r9, %r9
je 0xfa52
leal 0x6(%r9), %r10d
cvtsi2sd %r10d, %xmm3
mulsd %xmm0, %xmm3
addsd %xmm1, %xmm3
divsd %xmm2, %xmm3
movapd %xmm1, %xmm4
subsd %xmm3, %xmm4
mulsd (%rcx,%r9,8), %xmm4
movsd %xmm4, 0x28(%rcx,%r9,8)
incq %r9
jmp 0xfa1e
incq %rax
addq $0x28, %rcx
jmp 0xfa11
leaq -0x50(%rsp), %rax
xorl %ecx, %ecx
leaq 0xd6b17(%rip), %r8      # 0xe6580
cmpq $0x5, %rcx
je 0xfae4
xorl %r9d, %r9d
cmpq $0x5, %r9
je 0xfa8a
movsd (%rax,%r9,8), %xmm0
movsd %xmm0, -0x80(%rsp,%r9,8)
incq %r9
jmp 0xfa72
imulq $0x28, %rcx, %r9
addq %rsp, %r9
addq $-0x50, %r9
movq %r8, %r10
xorl %r11d, %r11d
cmpq $0x5, %r11
je 0xfadb
leaq (%r9,%r11,8), %rbx
xorpd %xmm0, %xmm0
movq %r10, %r14
xorl %r15d, %r15d
cmpq $0x5, %r15
je 0xface
movsd -0x80(%rsp,%r15,8), %xmm1
mulsd (%r14), %xmm1
addsd %xmm1, %xmm0
incq %r15
addq $0x28, %r14
jmp 0xfaaf
movsd %xmm0, (%rbx)
incq %r11
addq $0x8, %r10
jmp 0xfa9b
incq %rcx
addq $0x28, %rax
jmp 0xfa69
xorl %eax, %eax
testl %edx, %edx
movl $0x0, %ecx
cmovgl %edx, %ecx
testl %esi, %esi
cmovlel %eax, %esi
movl %edx, %edx
leaq (%rdx,%rdx,4), %rdx
leaq -0x50(%rsp), %r8
leaq -0x80(%rsp), %r9
cmpq %rsi, %rax
je 0xfb7c
xorl %r10d, %r10d
cmpq %r10, %rcx
je 0xfb2a
movq 0x8(%rdi,%rax,8), %r11
movsd 0x8(%r11,%r10,8), %xmm0
movsd %xmm0, -0x80(%rsp,%r10,8)
incq %r10
jmp 0xfb0d
movq %r8, %r10
xorl %r11d, %r11d
cmpq %rcx, %r11
je 0xfb77
movq 0x8(%rdi,%rax,8), %rbx
andq $0x0, 0x8(%rbx,%r11,8)
incq %r11
xorpd %xmm0, %xmm0
movq %r9, %r14
xorl %r15d, %r15d
cmpq %r15, %rdx
je 0xfb71
movsd (%r14), %xmm1
mulsd (%r10,%r15,8), %xmm1
addsd %xmm1, %xmm0
movsd %xmm0, (%rbx,%r11,8)
addq $0x5, %r15
addq $0x8, %r14
jmp 0xfb4d
addq $0x8, %r10
jmp 0xfb30
incq %rax
jmp 0xfb05
xorl %eax, %eax
addq $0x80, %rsp
popq %rbx
popq %r14
popq %r15
retq