// File: /workspace/github_c_makefile_star2_O0/PoulinV[P]AxiCLASS/build/../tools/dei_rkck.c
// Function: rkqs
int rkqs(double *x, double htry, double eps,
	 double *hdid, double *hnext,
	 int (*derivs)(double, double [], double [], void * parameters_and_workspace, ErrorMsg error_message),
	 void * parameters_and_workspace_for_derivs,
	 struct generic_integrator_workspace * pgi)
{

  int i;
  double errmax,h,htemp,xnew;

  h=htry;
  for (;;) {
    class_call(rkck(*x,h,derivs,parameters_and_workspace_for_derivs,pgi),
	       pgi->error_message,
	       pgi->error_message);
    errmax=0.0;
    for (i=0;i<pgi->n;i++) errmax=MAX(errmax,fabs(pgi->yerr[i]/pgi->yscal[i]));
    errmax /= eps;
    if (errmax <= 1.0) break;
    htemp=_SAFETY_*h*pow(errmax,_PSHRNK_);
    h=(h >= 0.0 ? MAX(htemp,0.1*h) : MIN(htemp,0.1*h));
    xnew=(*x)+h;
    class_test(xnew == *x,
	       pgi->error_message,
	       "stepsize underflow at x=%e",xnew);
  }
  if (errmax > _ERRCON_) *hnext=_SAFETY_*h*pow(errmax,_PGROW_);
  else *hnext=5.0*h;
  *x += (*hdid=h);
  for (i=0;i<pgi->n;i++) pgi->y[i]=pgi->ytemp[i];

  return _SUCCESS_;
}

// Assembly:
subq $0x18a8, %rsp           # imm = 0x18A8
movq %rdi, 0x1898(%rsp)
movsd %xmm0, 0x1890(%rsp)
movsd %xmm1, 0x1888(%rsp)
movq %rsi, 0x1880(%rsp)
movq %rdx, 0x1878(%rsp)
movq %rcx, 0x1870(%rsp)
movq %r8, 0x1868(%rsp)
movq %r9, 0x1860(%rsp)
movsd 0x1890(%rsp), %xmm0
movsd %xmm0, 0x1848(%rsp)
movq 0x1898(%rsp), %rax
movsd (%rax), %xmm0
movsd 0x1848(%rsp), %xmm1
movq 0x1870(%rsp), %rdi
movq 0x1868(%rsp), %rsi
movq 0x1860(%rsp), %rdx
callq 0xa2e0
cmpl $0x1, %eax
jne 0x9ec9
leaq 0x1030(%rsp), %rdi
movq 0x1860(%rsp), %rcx
addq $0x68, %rcx
leaq 0x1c855b(%rip), %rsi    # 0x1d23d8
leaq 0x1c86f3(%rip), %rdx    # 0x1d2577
movb $0x0, %al
callq 0x5b9c0
movq 0x1860(%rsp), %rdi
addq $0x68, %rdi
leaq 0x1030(%rsp), %r8
leaq 0x1c818e(%rip), %rsi    # 0x1d2034
leaq 0x1c8704(%rip), %rdx    # 0x1d25b1
movl $0x92, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x18a4(%rsp)
jmp 0xa2c6
xorps %xmm0, %xmm0
movsd %xmm0, 0x1850(%rsp)
movl $0x0, 0x185c(%rsp)
movl 0x185c(%rsp), %eax
movq 0x1860(%rsp), %rcx
cmpl (%rcx), %eax
jge 0x9fbc
movsd 0x1850(%rsp), %xmm1
movq 0x1860(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x185c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1860(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x185c(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm0
movaps 0x1c82f7(%rip), %xmm2   # 0x1d2230
pand %xmm2, %xmm0
ucomisd %xmm1, %xmm0
jbe 0x9f88
movq 0x1860(%rsp), %rax
movq 0x20(%rax), %rax
movslq 0x185c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1860(%rsp), %rax
movq 0x8(%rax), %rax
movslq 0x185c(%rsp), %rcx
divsd (%rax,%rcx,8), %xmm0
movaps 0x1c82b4(%rip), %xmm1   # 0x1d2230
pand %xmm1, %xmm0
movsd %xmm0, 0x28(%rsp)
jmp 0x9f97
movsd 0x1850(%rsp), %xmm0
movsd %xmm0, 0x28(%rsp)
movsd 0x28(%rsp), %xmm0
movsd %xmm0, 0x1850(%rsp)
movl 0x185c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x185c(%rsp)
jmp 0x9ee0
movsd 0x1888(%rsp), %xmm1
movsd 0x1850(%rsp), %xmm0
divsd %xmm1, %xmm0
movsd %xmm0, 0x1850(%rsp)
movsd 0x1c8265(%rip), %xmm0   # 0x1d2248
ucomisd 0x1850(%rsp), %xmm0
jb 0x9ff3
jmp 0xa1b9
movsd 0x1c825d(%rip), %xmm0   # 0x1d2258
mulsd 0x1848(%rsp), %xmm0
movsd %xmm0, 0x20(%rsp)
movsd 0x1850(%rsp), %xmm0
movsd 0x1c8235(%rip), %xmm1   # 0x1d2250
callq 0x8610
movaps %xmm0, %xmm1
movsd 0x20(%rsp), %xmm0
mulsd %xmm1, %xmm0
movsd %xmm0, 0x1840(%rsp)
movsd 0x1848(%rsp), %xmm0
xorps %xmm1, %xmm1
ucomisd %xmm1, %xmm0
jb 0xa09e
movsd 0x1840(%rsp), %xmm1
movsd 0x1c8207(%rip), %xmm0   # 0x1d2260
mulsd 0x1848(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xa081
movsd 0x1c81f0(%rip), %xmm0   # 0x1d2260
mulsd 0x1848(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
jmp 0xa090
movsd 0x1840(%rsp), %xmm0
movsd %xmm0, 0x18(%rsp)
movsd 0x18(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
jmp 0xa0f2
movsd 0x1840(%rsp), %xmm1
movsd 0x1c81b1(%rip), %xmm0   # 0x1d2260
mulsd 0x1848(%rsp), %xmm0
ucomisd %xmm1, %xmm0
jbe 0xa0cf
movsd 0x1840(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
jmp 0xa0e6
movsd 0x1c8189(%rip), %xmm0   # 0x1d2260
mulsd 0x1848(%rsp), %xmm0
movsd %xmm0, 0x8(%rsp)
movsd 0x8(%rsp), %xmm0
movsd %xmm0, 0x10(%rsp)
movsd 0x10(%rsp), %xmm0
movsd %xmm0, 0x1848(%rsp)
movq 0x1898(%rsp), %rax
movsd (%rax), %xmm0
addsd 0x1848(%rsp), %xmm0
movsd %xmm0, 0x1838(%rsp)
movsd 0x1838(%rsp), %xmm0
movq 0x1898(%rsp), %rax
ucomisd (%rax), %xmm0
jne 0xa1b4
jp 0xa1b4
leaq 0x830(%rsp), %rdi
movsd 0x1838(%rsp), %xmm0
leaq 0x1c8466(%rip), %rsi    # 0x1d25b6
movb $0x1, %al
callq 0x5b9c0
leaq 0x30(%rsp), %rdi
leaq 0x830(%rsp), %rcx
leaq 0x1c7f17(%rip), %rsi    # 0x1d2082
leaq 0x1c845f(%rip), %rdx    # 0x1d25d1
movb $0x0, %al
callq 0x5b9c0
movq 0x1860(%rsp), %rdi
addq $0x68, %rdi
leaq 0x30(%rsp), %r8
leaq 0x1c7ea3(%rip), %rsi    # 0x1d2034
leaq 0x1c8419(%rip), %rdx    # 0x1d25b1
movl $0x9c, %ecx
movb $0x0, %al
callq 0x5b9c0
movl $0x1, 0x18a4(%rsp)
jmp 0xa2c6
jmp 0x9e2b
movsd 0x1850(%rsp), %xmm0
movsd 0x1c809e(%rip), %xmm1   # 0x1d2268
ucomisd %xmm1, %xmm0
jbe 0xa216
movsd 0x1c8080(%rip), %xmm0   # 0x1d2258
mulsd 0x1848(%rsp), %xmm0
movsd %xmm0, (%rsp)
movsd 0x1850(%rsp), %xmm0
movsd 0x1c8081(%rip), %xmm1   # 0x1d2278
callq 0x8610
movaps %xmm0, %xmm1
movsd (%rsp), %xmm0
mulsd %xmm1, %xmm0
movq 0x1878(%rsp), %rax
movsd %xmm0, (%rax)
jmp 0xa233
movsd 0x1c8052(%rip), %xmm0   # 0x1d2270
mulsd 0x1848(%rsp), %xmm0
movq 0x1878(%rsp), %rax
movsd %xmm0, (%rax)
movsd 0x1848(%rsp), %xmm0
movq 0x1880(%rsp), %rax
movsd %xmm0, (%rax)
movq 0x1898(%rsp), %rax
addsd (%rax), %xmm0
movsd %xmm0, (%rax)
movl $0x0, 0x185c(%rsp)
movl 0x185c(%rsp), %eax
movq 0x1860(%rsp), %rcx
cmpl (%rcx), %eax
jge 0xa2bb
movq 0x1860(%rsp), %rax
movq 0x58(%rax), %rax
movslq 0x185c(%rsp), %rcx
movsd (%rax,%rcx,8), %xmm0
movq 0x1860(%rsp), %rax
movq 0x10(%rax), %rax
movslq 0x185c(%rsp), %rcx
movsd %xmm0, (%rax,%rcx,8)
movl 0x185c(%rsp), %eax
addl $0x1, %eax
movl %eax, 0x185c(%rsp)
jmp 0xa263
movl $0x0, 0x18a4(%rsp)
movl 0x18a4(%rsp), %eax
addq $0x18a8, %rsp           # imm = 0x18A8
retq
nopw %cs:(%rax,%rax)