Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / linearalgebra / gmx_arpack.cpp
index a3de65eb741ba518bbecd77fb16ed55ebe760ccf..29a1deb73dc35f2b0a8825219e7b1b64237e23e4 100644 (file)
 #include "gmx_blas.h"
 #include "gmx_lapack.h"
 
-static void
-F77_FUNC(dstqrb, DSTQRB) (int *      n,
-                          double *   d__,
-                          double *   e,
-                          double *   z__,
-                          double *   work,
-                          int *      info)
+#ifndef DOXYGEN
+
+static void F77_FUNC(dstqrb, DSTQRB)(int* n, double* d__, double* e, double* z__, double* work, int* info)
 {
     int    i__1, i__2;
     double d__1, d__2;
@@ -107,7 +103,6 @@ F77_FUNC(dstqrb, DSTQRB) (int *      n,
     for (j = 1; j <= i__1; ++j)
     {
         z__[j] = 0.;
-
     }
     z__[*n] = 1.;
 
@@ -136,7 +131,7 @@ L10:
             {
                 goto L30;
             }
-            if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m+1])) * eps)
+            if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m + 1])) * eps)
             {
                 e[m] = 0.;
                 goto L30;
@@ -157,7 +152,7 @@ L30:
     }
 
     i__1   = lend - l + 1;
-    anorm  = F77_FUNC(dlanst, DLANST) ("i", &i__1, &d__[l], &e[l]);
+    anorm  = F77_FUNC(dlanst, DLANST)("i", &i__1, &d__[l], &e[l]);
     iscale = 0;
     if (anorm == 0.)
     {
@@ -167,21 +162,19 @@ L30:
     {
         iscale = 1;
         i__1   = lend - l + 1;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n,
-                                  info);
+        F77_FUNC(dlascl, DLASCL)
+        ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n, info);
         i__1 = lend - l;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n,
-                                  info);
+        F77_FUNC(dlascl, DLASCL)("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n, info);
     }
     else if (anorm < ssfmin)
     {
         iscale = 2;
         i__1   = lend - l + 1;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n,
-                                  info);
+        F77_FUNC(dlascl, DLASCL)
+        ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n, info);
         i__1 = lend - l;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n,
-                                  info);
+        F77_FUNC(dlascl, DLASCL)("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n, info);
     }
 
     if (std::abs(d__[lend]) < std::abs(d__[l]))
@@ -193,7 +186,7 @@ L30:
     if (lend > l)
     {
 
-L40:
+    L40:
         if (l != lend)
         {
             lendm1 = lend - 1;
@@ -211,7 +204,7 @@ L40:
 
         m = lend;
 
-L60:
+    L60:
         if (m < lend)
         {
             e[m] = 0.;
@@ -226,7 +219,7 @@ L60:
         {
             if (icompz > 0)
             {
-                F77_FUNC(dlaev2, DLAEV2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
+                F77_FUNC(dlaev2, DLAEV2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
                 work[l]          = c__;
                 work[*n - 1 + l] = s;
 
@@ -236,12 +229,12 @@ L60:
             }
             else
             {
-                F77_FUNC(dlae2, DLAE2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
+                F77_FUNC(dlae2, DLAE2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
             }
             d__[l]     = rt1;
             d__[l + 1] = rt2;
             e[l]       = 0.;
-            l         += 2;
+            l += 2;
             if (l <= lend)
             {
                 goto L40;
@@ -256,8 +249,8 @@ L60:
         ++jtot;
 
         g   = (d__[l + 1] - p) / (e[l] * 2.);
-        r__ = F77_FUNC(dlapy2, DLAPY2) (&g, &c_b31);
-        g   = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__ ));
+        r__ = F77_FUNC(dlapy2, DLAPY2)(&g, &c_b31);
+        g   = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__));
 
         s   = 1.;
         c__ = 1.;
@@ -269,7 +262,7 @@ L60:
         {
             f = s * e[i__];
             b = c__ * e[i__];
-            F77_FUNC(dlartg, DLARTG) (&g, &f, &c__, &s, &r__);
+            F77_FUNC(dlartg, DLARTG)(&g, &f, &c__, &s, &r__);
             if (i__ != m - 1)
             {
                 e[i__ + 1] = r__;
@@ -285,22 +278,21 @@ L60:
                 work[i__]          = c__;
                 work[*n - 1 + i__] = -s;
             }
-
         }
 
         if (icompz > 0)
         {
             mm = m - l + 1;
 
-            F77_FUNC(dlasr, DLASR) ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &
-                                    z__[l], &c__1);
+            F77_FUNC(dlasr, DLASR)
+            ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &z__[l], &c__1);
         }
 
         d__[l] -= p;
-        e[l]    = g;
+        e[l] = g;
         goto L40;
 
-L80:
+    L80:
         d__[l] = p;
 
         ++l;
@@ -309,12 +301,11 @@ L80:
             goto L40;
         }
         goto L140;
-
     }
     else
     {
 
-L90:
+    L90:
         if (l != lend)
         {
             lendp1 = lend + 1;
@@ -323,7 +314,7 @@ L90:
             {
                 d__2 = std::abs(e[m - 1]);
                 tst  = d__2 * d__2;
-                if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m- 1]) + safmin)
+                if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m - 1]) + safmin)
                 {
                     goto L110;
                 }
@@ -332,7 +323,7 @@ L90:
 
         m = lend;
 
-L110:
+    L110:
         if (m > lend)
         {
             e[m - 1] = 0.;
@@ -347,8 +338,7 @@ L110:
         {
             if (icompz > 0)
             {
-                F77_FUNC(dlaev2, DLAEV2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s)
-                ;
+                F77_FUNC(dlaev2, DLAEV2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s);
 
                 tst        = z__[l];
                 z__[l]     = c__ * tst - s * z__[l - 1];
@@ -356,12 +346,12 @@ L110:
             }
             else
             {
-                F77_FUNC(dlae2, DLAE2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
+                F77_FUNC(dlae2, DLAE2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
             }
             d__[l - 1] = rt1;
             d__[l]     = rt2;
             e[l - 1]   = 0.;
-            l         += -2;
+            l += -2;
             if (l >= lend)
             {
                 goto L90;
@@ -377,8 +367,8 @@ L110:
 
 
         g   = (d__[l - 1] - p) / (e[l - 1] * 2.);
-        r__ = F77_FUNC(dlapy2, DLAPY2) (&g, &c_b31);
-        g   = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__ ));
+        r__ = F77_FUNC(dlapy2, DLAPY2)(&g, &c_b31);
+        g   = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__));
 
         s   = 1.;
         c__ = 1.;
@@ -390,7 +380,7 @@ L110:
         {
             f = s * e[i__];
             b = c__ * e[i__];
-            F77_FUNC(dlartg, DLARTG) (&g, &f, &c__, &s, &r__);
+            F77_FUNC(dlartg, DLARTG)(&g, &f, &c__, &s, &r__);
             if (i__ != m)
             {
                 e[i__ - 1] = r__;
@@ -406,22 +396,21 @@ L110:
                 work[i__]          = c__;
                 work[*n - 1 + i__] = s;
             }
-
         }
 
         if (icompz > 0)
         {
             mm = l - m + 1;
 
-            F77_FUNC(dlasr, DLASR) ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &
-                                    z__[m], &c__1);
+            F77_FUNC(dlasr, DLASR)
+            ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &z__[m], &c__1);
         }
 
         d__[l] -= p;
-        e[lm1]  = g;
+        e[lm1] = g;
         goto L90;
 
-L130:
+    L130:
         d__[l] = p;
 
         --l;
@@ -430,27 +419,26 @@ L130:
             goto L90;
         }
         goto L140;
-
     }
 
 L140:
     if (iscale == 1)
     {
         i__1 = lendsv - lsv + 1;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv],
-                                  n, info);
+        F77_FUNC(dlascl, DLASCL)
+        ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv], n, info);
         i__1 = lendsv - lsv;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n,
-                                  info);
+        F77_FUNC(dlascl, DLASCL)
+        ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n, info);
     }
     else if (iscale == 2)
     {
         i__1 = lendsv - lsv + 1;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv],
-                                  n, info);
+        F77_FUNC(dlascl, DLASCL)
+        ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv], n, info);
         i__1 = lendsv - lsv;
-        F77_FUNC(dlascl, DLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n,
-                                  info);
+        F77_FUNC(dlascl, DLASCL)
+        ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n, info);
     }
 
     if (jtot < nmaxit)
@@ -471,8 +459,7 @@ L160:
     if (icompz == 0)
     {
 
-        F77_FUNC(dlasrt, DLASRT) ("i", n, &d__[1], info);
-
+        F77_FUNC(dlasrt, DLASRT)("i", n, &d__[1], info);
     }
     else
     {
@@ -506,24 +493,22 @@ L160:
 
 L190:
     return;
-
 }
 
-static void
-F77_FUNC(dgetv0, DGETV0) (int *     ido,
-                          const char *    bmat,
-                          int gmx_unused *     itry,
-                          int *     initv,
-                          int *     n,
-                          int *     j,
-                          double *  v,
-                          int *     ldv,
-                          double *  resid,
-                          double *  rnorm,
-                          int *     ipntr,
-                          double *  workd,
-                          int *     iwork,
-                          int *     ierr)
+static void F77_FUNC(dgetv0, DGETV0)(int*        ido,
+                                     const char* bmat,
+                                     int gmx_unused* itry,
+                                     int*            initv,
+                                     int*            n,
+                                     int*            j,
+                                     double*         v,
+                                     int*            ldv,
+                                     double*         resid,
+                                     double*         rnorm,
+                                     int*            ipntr,
+                                     double*         workd,
+                                     int*            iwork,
+                                     int*            ierr)
 {
     int    c__1  = 1;
     double c_b22 = 1.;
@@ -531,14 +516,14 @@ F77_FUNC(dgetv0, DGETV0) (int *     ido,
     double c_b27 = -1.;
     int    v_dim1, v_offset, i__1;
 
-    int    jj;
-    int    idist;
+    int jj;
+    int idist;
 
     --workd;
     --resid;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     --ipntr;
     --iwork;
 
@@ -553,14 +538,14 @@ F77_FUNC(dgetv0, DGETV0) (int *     ido,
         if (!(*initv))
         {
             idist = 2;
-            F77_FUNC(dlarnv, DLARNV) (&idist, &iwork[1], n, &resid[1]);
+            F77_FUNC(dlarnv, DLARNV)(&idist, &iwork[1], n, &resid[1]);
         }
 
         if (*bmat == 'G')
         {
             ipntr[1] = 1;
             ipntr[2] = *n + 1;
-            F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+            F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
             *ido = -1;
             goto L9000;
         }
@@ -579,7 +564,7 @@ F77_FUNC(dgetv0, DGETV0) (int *     ido,
     iwork[5] = 1;
     if (*bmat == 'G')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &workd[*n + 1], &c__1, &resid[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &workd[*n + 1], &c__1, &resid[1], &c__1);
         ipntr[1] = *n + 1;
         ipntr[2] = 1;
         *ido     = 2;
@@ -587,7 +572,7 @@ F77_FUNC(dgetv0, DGETV0) (int *     ido,
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
     }
 
 L20:
@@ -596,12 +581,12 @@ L20:
     iwork[5] = 0;
     if (*bmat == 'G')
     {
-        workd[*n * 3 + 4] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+        workd[*n * 3 + 4] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
         workd[*n * 3 + 4] = std::sqrt(std::abs(workd[*n * 3 + 4]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 4] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 4] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
     }
     *rnorm = workd[*n * 3 + 4];
 
@@ -613,15 +598,15 @@ L20:
 L30:
 
     i__1 = *j - 1;
-    F77_FUNC(dgemv, DGEMV) ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24,
-                            &workd[*n + 1], &c__1);
+    F77_FUNC(dgemv, DGEMV)
+    ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24, &workd[*n + 1], &c__1);
     i__1 = *j - 1;
-    F77_FUNC(dgemv, DGEMV) ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &
-                            c_b22, &resid[1], &c__1);
+    F77_FUNC(dgemv, DGEMV)
+    ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &c_b22, &resid[1], &c__1);
 
     if (*bmat == 'G')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
         ipntr[1] = *n + 1;
         ipntr[2] = 1;
         *ido     = 2;
@@ -629,19 +614,19 @@ L30:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
     }
 
 L40:
 
     if (*bmat == 'G')
     {
-        *rnorm = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+        *rnorm = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
         *rnorm = std::sqrt(std::abs(*rnorm));
     }
     else if (*bmat == 'I')
     {
-        *rnorm = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+        *rnorm = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
     }
 
     if (*rnorm > workd[*n * 3 + 4] * .717F)
@@ -677,29 +662,24 @@ L9000:
 }
 
 
-
-
-
-static void
-F77_FUNC(dsapps, DSAPPS) (int *     n,
-                          int *     kev,
-                          int *     np,
-                          double *  shift,
-                          double *  v,
-                          int *     ldv,
-                          double *  h__,
-                          int *     ldh,
-                          double *  resid,
-                          double *  q,
-                          int *     ldq,
-                          double *  workd)
+static void F77_FUNC(dsapps, DSAPPS)(int*    n,
+                                     int*    kev,
+                                     int*    np,
+                                     double* shift,
+                                     double* v,
+                                     int*    ldv,
+                                     double* h__,
+                                     int*    ldh,
+                                     double* resid,
+                                     double* q,
+                                     int*    ldq,
+                                     double* workd)
 {
     double c_b4  = 0.;
     double c_b5  = 1.;
     double c_b14 = -1.;
     int    c__1  = 1;
-    int    h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
-           i__3, i__4;
+    int    h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3, i__4;
     double c__, f, g;
     int    i__, j;
     double r__, s, a1, a2, a3, a4;
@@ -714,13 +694,13 @@ F77_FUNC(dsapps, DSAPPS) (int *     n,
     --shift;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
     q_dim1   = *ldq;
     q_offset = 1 + q_dim1;
-    q       -= q_offset;
+    q -= q_offset;
 
     epsmch = GMX_DOUBLE_EPS;
     itop   = 1;
@@ -728,7 +708,7 @@ F77_FUNC(dsapps, DSAPPS) (int *     n,
 
     kplusp = *kev + *np;
 
-    F77_FUNC(dlaset, DLASET) ("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
+    F77_FUNC(dlaset, DLASET)("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
 
     if (*np == 0)
     {
@@ -741,12 +721,12 @@ F77_FUNC(dsapps, DSAPPS) (int *     n,
 
         istart = itop;
 
-L20:
+    L20:
 
         i__2 = kplusp - 1;
         for (i__ = istart; i__ <= i__2; ++i__)
         {
-            big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__ + 1 + (h_dim1*2)]);
+            big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
             if (h__[i__ + 1 + h_dim1] <= epsmch * big)
             {
                 h__[i__ + 1 + h_dim1] = 0.;
@@ -755,23 +735,19 @@ L20:
             }
         }
         iend = kplusp;
-L40:
+    L40:
 
         if (istart < iend)
         {
 
             f = h__[istart + (h_dim1 << 1)] - shift[jj];
             g = h__[istart + 1 + h_dim1];
-            F77_FUNC(dlartg, DLARTG) (&f, &g, &c__, &s, &r__);
-
-            a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 +
-                                                             h_dim1];
-            a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (
-                                                              h_dim1 << 1)];
-            a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 +
-                                                                 h_dim1];
-            a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 <<
-                                                                    1)];
+            F77_FUNC(dlartg, DLARTG)(&f, &g, &c__, &s, &r__);
+
+            a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 + h_dim1];
+            a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (h_dim1 << 1)];
+            a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 + h_dim1];
+            a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 << 1)];
             h__[istart + (h_dim1 << 1)]     = c__ * a1 + s * a2;
             h__[istart + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
             h__[istart + 1 + h_dim1]        = c__ * a3 + s * a4;
@@ -780,12 +756,10 @@ L40:
             i__2 = (i__3 < kplusp) ? i__3 : kplusp;
             for (j = 1; j <= i__2; ++j)
             {
-                a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) *
-                                                          q_dim1];
-                q[j + (istart + 1) * q_dim1] = -s * q[j + istart * q_dim1] +
-                    c__ * q[j + (istart + 1) * q_dim1];
+                a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) * q_dim1];
+                q[j + (istart + 1) * q_dim1] =
+                        -s * q[j + istart * q_dim1] + c__ * q[j + (istart + 1) * q_dim1];
                 q[j + istart * q_dim1] = a1;
-
             }
 
             i__2 = iend - 1;
@@ -796,7 +770,7 @@ L40:
                 g = s * h__[i__ + 1 + h_dim1];
 
                 h__[i__ + 1 + h_dim1] = c__ * h__[i__ + 1 + h_dim1];
-                F77_FUNC(dlartg, DLARTG) (&f, &g, &c__, &s, &r__);
+                F77_FUNC(dlartg, DLARTG)(&f, &g, &c__, &s, &r__);
 
                 if (r__ < 0.)
                 {
@@ -807,14 +781,10 @@ L40:
 
                 h__[i__ + h_dim1] = r__;
 
-                a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 +
-                                                              h_dim1];
-                a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1
-                                                                      << 1)];
-                a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)
-                    ];
-                a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 +
-                                                                  h_dim1];
+                a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 + h_dim1];
+                a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1 << 1)];
+                a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)];
+                a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 + h_dim1];
 
                 h__[i__ + (h_dim1 << 1)]     = c__ * a1 + s * a2;
                 h__[i__ + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
@@ -824,15 +794,11 @@ L40:
                 i__3 = (i__4 < kplusp) ? i__4 : kplusp;
                 for (j = 1; j <= i__3; ++j)
                 {
-                    a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) *
-                                                           q_dim1];
-                    q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] +
-                        c__ * q[j + (i__ + 1) * q_dim1];
+                    a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) * q_dim1];
+                    q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] + c__ * q[j + (i__ + 1) * q_dim1];
                     q[j + i__ * q_dim1] = a1;
                 }
-
             }
-
         }
 
         istart = iend + 1;
@@ -840,7 +806,7 @@ L40:
         if (h__[iend + h_dim1] < 0.)
         {
             h__[iend + h_dim1] = -h__[iend + h_dim1];
-            F77_FUNC(dscal, DSCAL) (&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
+            F77_FUNC(dscal, DSCAL)(&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
         }
 
         if (iend < kplusp)
@@ -858,81 +824,70 @@ L40:
             ++itop;
         }
 
-L90:
-        ;
+    L90:;
     }
 
     i__1 = kplusp - 1;
     for (i__ = itop; i__ <= i__1; ++i__)
     {
-        big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__+ 1 + (h_dim1*2)]);
+        big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
         if (h__[i__ + 1 + h_dim1] <= epsmch * big)
         {
             h__[i__ + 1 + h_dim1] = 0.;
         }
-
     }
 
     if (h__[*kev + 1 + h_dim1] > 0.)
     {
-        F77_FUNC(dgemv, DGEMV) ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) *
-                                                                              q_dim1 + 1], &c__1, &c_b4, &workd[*n + 1], &c__1);
+        F77_FUNC(dgemv, DGEMV)
+        ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) * q_dim1 + 1], &c__1, &c_b4,
+         &workd[*n + 1], &c__1);
     }
 
     i__1 = *kev;
     for (i__ = 1; i__ <= i__1; ++i__)
     {
         i__2 = kplusp - i__ + 1;
-        F77_FUNC(dgemv, DGEMV) ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) *
-                                                                            q_dim1 + 1], &c__1, &c_b4, &workd[1], &c__1);
-        F77_FUNC(dcopy, DCOPY) (n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &
-                                c__1);
-
+        F77_FUNC(dgemv, DGEMV)
+        ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) * q_dim1 + 1], &c__1, &c_b4,
+         &workd[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &c__1);
     }
 
-    F77_FUNC(dlacpy, DLACPY) ("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
+    F77_FUNC(dlacpy, DLACPY)("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
 
     if (h__[*kev + 1 + h_dim1] > 0.)
     {
-        F77_FUNC(dcopy, DCOPY) (n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
     }
 
-    F77_FUNC(dscal, DSCAL) (n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
+    F77_FUNC(dscal, DSCAL)(n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
     if (h__[*kev + 1 + h_dim1] > 0.)
     {
-        F77_FUNC(daxpy, DAXPY) (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1,
-                                &resid[1], &c__1);
+        F77_FUNC(daxpy, DAXPY)
+        (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1, &resid[1], &c__1);
     }
 
 
-
 L9000:
     return;
-
 }
 
 
-
-static void
-F77_FUNC(dsortr, DSORTR) (const char *    which,
-                          int *     apply,
-                          int *     n,
-                          double *  x1,
-                          double *  x2)
+static void F77_FUNC(dsortr, DSORTR)(const char* which, int* apply, int* n, double* x1, double* x2)
 {
-    int    i__1;
+    int i__1;
 
     int    i__, j, igap;
     double temp;
 
 
-
     igap = *n / 2;
 
     if (!std::strncmp(which, "SA", 2))
     {
 
-L10:
+    L10:
         if (igap == 0)
         {
             goto L9000;
@@ -941,7 +896,7 @@ L10:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L20:
+        L20:
 
             if (j < 0)
             {
@@ -966,17 +921,15 @@ L20:
             }
             j -= igap;
             goto L20;
-L30:
-            ;
+        L30:;
         }
         igap /= 2;
         goto L10;
-
     }
     else if (!std::strncmp(which, "SM", 2))
     {
 
-L40:
+    L40:
         if (igap == 0)
         {
             goto L9000;
@@ -985,7 +938,7 @@ L40:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L50:
+        L50:
 
             if (j < 0)
             {
@@ -1010,17 +963,15 @@ L50:
             }
             j -= igap;
             goto L50;
-L60:
-            ;
+        L60:;
         }
         igap /= 2;
         goto L40;
-
     }
     else if (!std::strncmp(which, "LA", 2))
     {
 
-L70:
+    L70:
         if (igap == 0)
         {
             goto L9000;
@@ -1029,7 +980,7 @@ L70:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L80:
+        L80:
 
             if (j < 0)
             {
@@ -1054,18 +1005,16 @@ L80:
             }
             j -= igap;
             goto L80;
-L90:
-            ;
+        L90:;
         }
         igap /= 2;
         goto L70;
-
     }
     else if (!std::strncmp(which, "LM", 2))
     {
 
 
-L100:
+    L100:
         if (igap == 0)
         {
             goto L9000;
@@ -1074,7 +1023,7 @@ L100:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L110:
+        L110:
 
             if (j < 0)
             {
@@ -1099,8 +1048,7 @@ L110:
             }
             j -= igap;
             goto L110;
-L120:
-            ;
+        L120:;
         }
         igap /= 2;
         goto L100;
@@ -1108,37 +1056,28 @@ L120:
 
 L9000:
     return;
-
 }
 
 
-
-
-static void
-F77_FUNC(dsesrt, DSESRT) (const char *    which,
-                          int *     apply,
-                          int *     n,
-                          double *  x,
-                          int *     na,
-                          double *  a,
-                          int *     lda)
+static void F77_FUNC(dsesrt,
+                     DSESRT)(const char* which, int* apply, int* n, double* x, int* na, double* a, int* lda)
 {
-    int    a_dim1, a_offset, i__1;
-    int    c__1 = 1;
+    int a_dim1, a_offset, i__1;
+    int c__1 = 1;
 
     int    i__, j, igap;
     double temp;
 
     a_dim1   = *lda;
     a_offset = 1 + a_dim1 * 0;
-    a       -= a_offset;
+    a -= a_offset;
 
     igap = *n / 2;
 
     if (!std::strncmp(which, "SA", 2))
     {
 
-L10:
+    L10:
         if (igap == 0)
         {
             goto L9000;
@@ -1147,7 +1086,7 @@ L10:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L20:
+        L20:
 
             if (j < 0)
             {
@@ -1161,8 +1100,8 @@ L20:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(dswap, DSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -1171,17 +1110,15 @@ L20:
             }
             j -= igap;
             goto L20;
-L30:
-            ;
+        L30:;
         }
         igap /= 2;
         goto L10;
-
     }
     else if (!std::strncmp(which, "SM", 2))
     {
 
-L40:
+    L40:
         if (igap == 0)
         {
             goto L9000;
@@ -1190,7 +1127,7 @@ L40:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L50:
+        L50:
 
             if (j < 0)
             {
@@ -1204,8 +1141,8 @@ L50:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(dswap, DSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -1214,17 +1151,15 @@ L50:
             }
             j -= igap;
             goto L50;
-L60:
-            ;
+        L60:;
         }
         igap /= 2;
         goto L40;
-
     }
     else if (!std::strncmp(which, "LA", 2))
     {
 
-L70:
+    L70:
         if (igap == 0)
         {
             goto L9000;
@@ -1233,7 +1168,7 @@ L70:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L80:
+        L80:
 
             if (j < 0)
             {
@@ -1247,8 +1182,8 @@ L80:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(dswap, DSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -1257,17 +1192,15 @@ L80:
             }
             j -= igap;
             goto L80;
-L90:
-            ;
+        L90:;
         }
         igap /= 2;
         goto L70;
-
     }
     else if (!std::strncmp(which, "LM", 2))
     {
 
-L100:
+    L100:
         if (igap == 0)
         {
             goto L9000;
@@ -1276,7 +1209,7 @@ L100:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L110:
+        L110:
 
             if (j < 0)
             {
@@ -1290,8 +1223,8 @@ L110:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(dswap, DSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(dswap, DSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -1300,8 +1233,7 @@ L110:
             }
             j -= igap;
             goto L110;
-L120:
-            ;
+        L120:;
         }
         igap /= 2;
         goto L100;
@@ -1309,20 +1241,11 @@ L120:
 
 L9000:
     return;
-
 }
 
 
-
-
-static void
-F77_FUNC(dsgets, DSGETS) (int *     ishift,
-                          const char *    which,
-                          int *     kev,
-                          int *     np,
-                          double *  ritz,
-                          double *  bounds,
-                          double *  shifts)
+static void F77_FUNC(dsgets,
+                     DSGETS)(int* ishift, const char* which, int* kev, int* np, double* ritz, double* bounds, double* shifts)
 {
     int c__1 = 1;
     int i__1, i__2;
@@ -1335,32 +1258,29 @@ F77_FUNC(dsgets, DSGETS) (int *     ishift,
     if (!std::strncmp(which, "BE", 2))
     {
         i__1 = *kev + *np;
-        F77_FUNC(dsortr, DSORTR) ("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
+        F77_FUNC(dsortr, DSORTR)("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
         kevd2 = *kev / 2;
         if (*kev > 1)
         {
             i__1 = (kevd2 < *np) ? kevd2 : *np;
             i__2 = (kevd2 > *np) ? kevd2 : *np;
-            F77_FUNC(dswap, DSWAP) (&i__1, &ritz[1], &c__1,
-                                    &ritz[i__2 + 1], &c__1);
+            F77_FUNC(dswap, DSWAP)(&i__1, &ritz[1], &c__1, &ritz[i__2 + 1], &c__1);
             i__1 = (kevd2 < *np) ? kevd2 : *np;
             i__2 = (kevd2 > *np) ? kevd2 : *np;
-            F77_FUNC(dswap, DSWAP) (&i__1, &bounds[1], &c__1,
-                                    &bounds[i__2 + 1], &c__1);
+            F77_FUNC(dswap, DSWAP)(&i__1, &bounds[1], &c__1, &bounds[i__2 + 1], &c__1);
         }
-
     }
     else
     {
         i__1 = *kev + *np;
-        F77_FUNC(dsortr, DSORTR) (which, &c__1, &i__1, &ritz[1], &bounds[1]);
+        F77_FUNC(dsortr, DSORTR)(which, &c__1, &i__1, &ritz[1], &bounds[1]);
     }
 
     if (*ishift == 1 && *np > 0)
     {
 
-        F77_FUNC(dsortr, DSORTR) ("SM", &c__1, np, &bounds[1], &ritz[1]);
-        F77_FUNC(dcopy, DCOPY) (np, &ritz[1], &c__1, &shifts[1], &c__1);
+        F77_FUNC(dsortr, DSORTR)("SM", &c__1, np, &bounds[1], &ritz[1]);
+        F77_FUNC(dcopy, DCOPY)(np, &ritz[1], &c__1, &shifts[1], &c__1);
     }
 
 
@@ -1368,15 +1288,9 @@ F77_FUNC(dsgets, DSGETS) (int *     ishift,
 }
 
 
-
-static void
-F77_FUNC(dsconv, DSCONV) (int *     n,
-                          double *  ritz,
-                          double *  bounds,
-                          double *  tol,
-                          int *     nconv)
+static void F77_FUNC(dsconv, DSCONV)(int* n, double* ritz, double* bounds, double* tol, int* nconv)
 {
-    double c_b3 = 2/3.;
+    double c_b3 = 2 / 3.;
     int    i__1;
     double d__2, d__3;
 
@@ -1407,15 +1321,14 @@ F77_FUNC(dsconv, DSCONV) (int *     n,
 }
 
 
-static void
-F77_FUNC(dseigt, DSEIGT) (double *  rnorm,
-                          int *     n,
-                          double *  h__,
-                          int *     ldh,
-                          double *  eig,
-                          double *  bounds,
-                          double *  workl,
-                          int *     ierr)
+static void F77_FUNC(dseigt, DSEIGT)(double* rnorm,
+                                     int*    n,
+                                     double* h__,
+                                     int*    ldh,
+                                     double* eig,
+                                     double* bounds,
+                                     double* workl,
+                                     int*    ierr)
 {
     int c__1 = 1;
     int h_dim1, h_offset, i__1;
@@ -1428,12 +1341,12 @@ F77_FUNC(dseigt, DSEIGT) (double *  rnorm,
     --eig;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
 
-    F77_FUNC(dcopy, DCOPY) (n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
+    F77_FUNC(dcopy, DCOPY)(n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
     i__1 = *n - 1;
-    F77_FUNC(dcopy, DCOPY) (&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
-    F77_FUNC(dstqrb, DSTQRB) (n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
+    F77_FUNC(dcopy, DCOPY)(&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
+    F77_FUNC(dstqrb, DSTQRB)(n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
     if (*ierr != 0)
     {
         goto L9000;
@@ -1443,7 +1356,6 @@ F77_FUNC(dseigt, DSEIGT) (double *  rnorm,
     for (k = 1; k <= i__1; ++k)
     {
         bounds[k] = *rnorm * std::abs(bounds[k]);
-
     }
 
 
@@ -1452,25 +1364,22 @@ L9000:
 }
 
 
-
-
-static void
-F77_FUNC(dsaitr, DSAITR) (int *     ido,
-                          const char *    bmat,
-                          int *     n,
-                          int *     k,
-                          int *     np,
-                          int *     mode,
-                          double *  resid,
-                          double *  rnorm,
-                          double *  v,
-                          int *     ldv,
-                          double *  h__,
-                          int *     ldh,
-                          int *     ipntr,
-                          double *  workd,
-                          int *     iwork,
-                          int *     info)
+static void F77_FUNC(dsaitr, DSAITR)(int*        ido,
+                                     const char* bmat,
+                                     int*        n,
+                                     int*        k,
+                                     int*        np,
+                                     int*        mode,
+                                     double*     resid,
+                                     double*     rnorm,
+                                     double*     v,
+                                     int*        ldv,
+                                     double*     h__,
+                                     int*        ldh,
+                                     int*        ipntr,
+                                     double*     workd,
+                                     int*        iwork,
+                                     int*        info)
 {
 
     int    c__0  = 0;
@@ -1490,10 +1399,10 @@ F77_FUNC(dsaitr, DSAITR) (int *     ido,
     --resid;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
     --ipntr;
     --iwork;
     minval = GMX_DOUBLE_MIN;
@@ -1550,8 +1459,9 @@ L20:
     *ido     = 0;
 L30:
 
-    F77_FUNC(dgetv0, DGETV0) (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv,
-                              &resid[1], rnorm, &ipntr[1], &workd[1], &iwork[21], &iwork[7]);
+    F77_FUNC(dgetv0, DGETV0)
+    (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv, &resid[1], rnorm, &ipntr[1],
+     &workd[1], &iwork[21], &iwork[7]);
     if (*ido != 99)
     {
         goto L9000;
@@ -1571,24 +1481,24 @@ L30:
 
 L40:
 
-    F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
+    F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
     if (*rnorm >= safmin)
     {
         temp1 = 1. / *rnorm;
-        F77_FUNC(dscal, DSCAL) (n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
-        F77_FUNC(dscal, DSCAL) (n, &temp1, &workd[iwork[8]], &c__1);
+        F77_FUNC(dscal, DSCAL)(n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
+        F77_FUNC(dscal, DSCAL)(n, &temp1, &workd[iwork[8]], &c__1);
     }
     else
     {
 
-        F77_FUNC(dlascl, DLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] *
-                                                                                     v_dim1 + 1], n, &infol);
-        F77_FUNC(dlascl, DLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[
-                                                                                             8]], n, &infol);
+        F77_FUNC(dlascl, DLASCL)
+        ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] * v_dim1 + 1], n, &infol);
+        F77_FUNC(dlascl, DLASCL)
+        ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[8]], n, &infol);
     }
 
     iwork[5] = 1;
-    F77_FUNC(dcopy, DCOPY) (n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
+    F77_FUNC(dcopy, DCOPY)(n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
     ipntr[1] = iwork[10];
     ipntr[2] = iwork[9];
     ipntr[3] = iwork[8];
@@ -1600,7 +1510,7 @@ L50:
 
     iwork[5] = 0;
 
-    F77_FUNC(dcopy, DCOPY) (n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
+    F77_FUNC(dcopy, DCOPY)(n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
 
     if (*mode == 2)
     {
@@ -1617,7 +1527,7 @@ L50:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
     }
 L60:
 
@@ -1627,34 +1537,34 @@ L65:
     if (*mode == 2)
     {
 
-        workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[10]], &
-                                                  c__1);
+        workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[10]], &c__1);
         workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
     }
     else if (*bmat == 'G')
     {
-        workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
-                                                  c__1);
+        workd[*n * 3 + 3] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
         workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 3] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 3] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
     }
 
     if (*mode != 2)
     {
-        F77_FUNC(dgemv, DGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]],
-                                &c__1, &c_b42, &workd[iwork[9]], &c__1);
+        F77_FUNC(dgemv, DGEMV)
+        ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+         &workd[iwork[9]], &c__1);
     }
     else
     {
-        F77_FUNC(dgemv, DGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]
-                                ], &c__1, &c_b42, &workd[iwork[9]], &c__1);
+        F77_FUNC(dgemv, DGEMV)
+        ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]], &c__1, &c_b42,
+         &workd[iwork[9]], &c__1);
     }
 
-    F77_FUNC(dgemv, DGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
-                            c__1, &c_b18, &resid[1], &c__1);
+    F77_FUNC(dgemv, DGEMV)
+    ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
 
     h__[iwork[12] + (h_dim1 << 1)] = workd[iwork[9] + iwork[12] - 1];
     if (iwork[12] == 1 || iwork[4] == 1)
@@ -1671,7 +1581,7 @@ L65:
 
     if (*bmat == 'G')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
         ipntr[1] = iwork[9];
         ipntr[2] = iwork[8];
         *ido     = 2;
@@ -1680,7 +1590,7 @@ L65:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
     }
 L70:
 
@@ -1688,12 +1598,12 @@ L70:
 
     if (*bmat == 'G')
     {
-        *rnorm = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        *rnorm = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
         *rnorm = std::sqrt(std::abs(*rnorm));
     }
     else if (*bmat == 'I')
     {
-        *rnorm = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+        *rnorm = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
     }
 
     if (*rnorm > workd[*n * 3 + 3] * .717F)
@@ -1703,11 +1613,12 @@ L70:
 
 L80:
 
-    F77_FUNC(dgemv, DGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &
-                            c__1, &c_b42, &workd[iwork[9]], &c__1);
+    F77_FUNC(dgemv, DGEMV)
+    ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+     &workd[iwork[9]], &c__1);
 
-    F77_FUNC(dgemv, DGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
-                            c__1, &c_b18, &resid[1], &c__1);
+    F77_FUNC(dgemv, DGEMV)
+    ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
 
     if (iwork[12] == 1 || iwork[4] == 1)
     {
@@ -1718,7 +1629,7 @@ L80:
     iwork[3] = 1;
     if (*bmat == 'G')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
         ipntr[1] = iwork[9];
         ipntr[2] = iwork[8];
         *ido     = 2;
@@ -1727,20 +1638,19 @@ L80:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
     }
 L90:
 
 
     if (*bmat == 'G')
     {
-        workd[*n * 3 + 2] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
-                                                  c__1);
+        workd[*n * 3 + 2] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
         workd[*n * 3 + 2] = std::sqrt(std::abs(workd[*n * 3 + 2]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 2] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 2] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
     }
 
 
@@ -1748,7 +1658,6 @@ L90:
     {
 
         *rnorm = workd[*n * 3 + 2];
-
     }
     else
     {
@@ -1778,11 +1687,11 @@ L100:
         h__[iwork[12] + h_dim1] = -h__[iwork[12] + h_dim1];
         if (iwork[12] < *k + *np)
         {
-            F77_FUNC(dscal, DSCAL) (n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
+            F77_FUNC(dscal, DSCAL)(n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
         }
         else
         {
-            F77_FUNC(dscal, DSCAL) (n, &c_b50, &resid[1], &c__1);
+            F77_FUNC(dscal, DSCAL)(n, &c_b50, &resid[1], &c__1);
         }
     }
 
@@ -1802,43 +1711,37 @@ L9000:
 }
 
 
-
-
-
-
-static void
-F77_FUNC(dsaup2, DSAUP2) (int *     ido,
-                          const char *    bmat,
-                          int *     n,
-                          const char *    which,
-                          int *     nev,
-                          int *     np,
-                          double *  tol,
-                          double *  resid,
-                          int *     mode,
-                          int gmx_unused *     iupd,
-                          int *     ishift,
-                          int *     mxiter,
-                          double *  v,
-                          int *     ldv,
-                          double *  h__,
-                          int *     ldh,
-                          double *  ritz,
-                          double *  bounds,
-                          double *  q,
-                          int *     ldq,
-                          double *  workl,
-                          int *     ipntr,
-                          double *  workd,
-                          int *     iwork,
-                          int *     info)
+static void F77_FUNC(dsaup2, DSAUP2)(int*        ido,
+                                     const char* bmat,
+                                     int*        n,
+                                     const char* which,
+                                     int*        nev,
+                                     int*        np,
+                                     double*     tol,
+                                     double*     resid,
+                                     int*        mode,
+                                     int gmx_unused* iupd,
+                                     int*            ishift,
+                                     int*            mxiter,
+                                     double*         v,
+                                     int*            ldv,
+                                     double*         h__,
+                                     int*            ldh,
+                                     double*         ritz,
+                                     double*         bounds,
+                                     double*         q,
+                                     int*            ldq,
+                                     double*         workl,
+                                     int*            ipntr,
+                                     double*         workd,
+                                     int*            iwork,
+                                     int*            info)
 {
-    double c_b3 = 2/3.;
+    double c_b3 = 2 / 3.;
     int    c__1 = 1;
     int    c__0 = 0;
 
-    int    h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
-           i__3;
+    int    h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3;
     double d__2, d__3;
     int    j;
     double eps23;
@@ -1857,13 +1760,13 @@ F77_FUNC(dsaup2, DSAUP2) (int *     ido,
     --ritz;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
     q_dim1   = *ldq;
     q_offset = 1 + q_dim1;
-    q       -= q_offset;
+    q -= q_offset;
     --ipntr;
     --iwork;
     eps23 = GMX_DOUBLE_EPS;
@@ -1903,9 +1806,9 @@ F77_FUNC(dsaup2, DSAUP2) (int *     ido,
 
     if (iwork[2] == 1)
     {
-        F77_FUNC(dgetv0, DGETV0) (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &
-                                  resid[1], &workd[*n * 3 + 1], &ipntr[1], &workd[1], &iwork[41],
-                                  info);
+        F77_FUNC(dgetv0, DGETV0)
+        (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &resid[1], &workd[*n * 3 + 1],
+         &ipntr[1], &workd[1], &iwork[41], info);
 
         if (*ido != 99)
         {
@@ -1937,9 +1840,9 @@ F77_FUNC(dsaup2, DSAUP2) (int *     ido,
         goto L100;
     }
 
-    F77_FUNC(dsaitr, DSAITR) (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 +
-                                                                                      1], &v[v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1],
-                              &iwork[21], info);
+    F77_FUNC(dsaitr, DSAITR)
+    (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv,
+     &h__[h_offset], ldh, &ipntr[1], &workd[1], &iwork[21], info);
 
     if (*ido != 99)
     {
@@ -1964,9 +1867,9 @@ L1000:
 L20:
     iwork[4] = 1;
 
-    F77_FUNC(dsaitr, DSAITR) (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1],
-                              &v[v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1],
-                              &iwork[21], info);
+    F77_FUNC(dsaitr, DSAITR)
+    (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv, &h__[h_offset],
+     ldh, &ipntr[1], &workd[1], &iwork[21], info);
 
     if (*ido != 99)
     {
@@ -1983,8 +1886,8 @@ L20:
     }
     iwork[4] = 0;
 
-    F77_FUNC(dseigt, DSEIGT) (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &
-                              bounds[1], &workl[1], &ierr);
+    F77_FUNC(dseigt, DSEIGT)
+    (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &bounds[1], &workl[1], &ierr);
 
     if (ierr != 0)
     {
@@ -1992,15 +1895,15 @@ L20:
         goto L1200;
     }
 
-    F77_FUNC(dcopy, DCOPY) (&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
-    F77_FUNC(dcopy, DCOPY) (&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
+    F77_FUNC(dcopy, DCOPY)(&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
+    F77_FUNC(dcopy, DCOPY)(&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
 
     *nev = iwork[9];
     *np  = iwork[10];
-    F77_FUNC(dsgets, DSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+    F77_FUNC(dsgets, DSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
 
-    F77_FUNC(dcopy, DCOPY) (nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
-    F77_FUNC(dsconv, DSCONV) (nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
+    F77_FUNC(dcopy, DCOPY)(nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
+    F77_FUNC(dsconv, DSCONV)(nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
 
     nptemp = *np;
     i__1   = nptemp;
@@ -2020,23 +1923,20 @@ L20:
         {
 
             std::strncpy(wprime, "SA", 2);
-            F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
+            F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
             nevd2 = *nev / 2;
             nevm2 = *nev - nevd2;
             if (*nev > 1)
             {
                 i__1 = (nevd2 < *np) ? nevd2 : *np;
                 i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np + 1;
-                F77_FUNC(dswap, DSWAP) (&i__1, &ritz[nevm2 + 1], &c__1,
-                                        &ritz[((i__2 > i__3) ? i__2 : i__3)],
-                                        &c__1);
+                F77_FUNC(dswap, DSWAP)
+                (&i__1, &ritz[nevm2 + 1], &c__1, &ritz[((i__2 > i__3) ? i__2 : i__3)], &c__1);
                 i__1 = (nevd2 < *np) ? nevd2 : *np;
                 i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np;
-                F77_FUNC(dswap, DSWAP) (&i__1, &bounds[nevm2 + 1], &c__1,
-                                        &bounds[((i__2 > i__3) ? i__2 : i__3) + 1],
-                                        &c__1);
+                F77_FUNC(dswap, DSWAP)
+                (&i__1, &bounds[nevm2 + 1], &c__1, &bounds[((i__2 > i__3) ? i__2 : i__3) + 1], &c__1);
             }
-
         }
         else
         {
@@ -2058,28 +1958,27 @@ L20:
                 std::strncpy(wprime, "LA", 2);
             }
 
-            F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
-
+            F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
         }
 
         i__1 = iwork[9];
         for (j = 1; j <= i__1; ++j)
         {
-            d__2       = eps23;
-            d__3       = std::abs(ritz[j]);
-            temp       = (d__2 > d__3) ? d__2 : d__3;
+            d__2 = eps23;
+            d__3 = std::abs(ritz[j]);
+            temp = (d__2 > d__3) ? d__2 : d__3;
             bounds[j] /= temp;
         }
 
         std::strncpy(wprime, "LA", 2);
-        F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
+        F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
 
         i__1 = iwork[9];
         for (j = 1; j <= i__1; ++j)
         {
-            d__2       = eps23;
-            d__3       = std::abs(ritz[j]);
-            temp       = (d__2 > d__3) ? d__2 : d__3;
+            d__2 = eps23;
+            d__3 = std::abs(ritz[j]);
+            temp = (d__2 > d__3) ? d__2 : d__3;
             bounds[j] *= temp;
         }
 
@@ -2087,13 +1986,11 @@ L20:
         {
 
             std::strncpy(wprime, "LA", 2);
-            F77_FUNC(dsortr, DSORTR) (wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+            F77_FUNC(dsortr, DSORTR)(wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
         }
         else
         {
-            F77_FUNC(dsortr, DSORTR) (which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+            F77_FUNC(dsortr, DSORTR)(which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
         }
 
         h__[h_dim1 + 1] = workd[*n * 3 + 1];
@@ -2110,13 +2007,12 @@ L20:
 
         *np = iwork[8];
         goto L1100;
-
     }
     else if (iwork[8] < *nev && *ishift == 1)
     {
         nevbef = *nev;
-        i__1   = iwork[8], i__2 = *np / 2;
-        *nev  += (i__1 < i__2) ? i__1 : i__2;
+        i__1 = iwork[8], i__2 = *np / 2;
+        *nev += (i__1 < i__2) ? i__1 : i__2;
         if (*nev == 1 && iwork[7] >= 6)
         {
             *nev = iwork[7] / 2;
@@ -2130,9 +2026,8 @@ L20:
 
         if (nevbef < *nev)
         {
-            F77_FUNC(dsgets, DSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+            F77_FUNC(dsgets, DSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
         }
-
     }
 
 
@@ -2150,16 +2045,17 @@ L50:
 
     if (*ishift == 0)
     {
-        F77_FUNC(dcopy, DCOPY) (np, &workl[1], &c__1, &ritz[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(np, &workl[1], &c__1, &ritz[1], &c__1);
     }
 
-    F77_FUNC(dsapps, DSAPPS) (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &
-                              resid[1], &q[q_offset], ldq, &workd[1]);
+    F77_FUNC(dsapps, DSAPPS)
+    (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &resid[1], &q[q_offset], ldq,
+     &workd[1]);
 
     iwork[1] = 1;
     if (*bmat == 'G')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
         ipntr[1] = *n + 1;
         ipntr[2] = 1;
         *ido     = 2;
@@ -2168,19 +2064,19 @@ L50:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(dcopy, DCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
     }
 
 L100:
 
     if (*bmat == 'G')
     {
-        workd[*n * 3 + 1] = F77_FUNC(ddot, DDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+        workd[*n * 3 + 1] = F77_FUNC(ddot, DDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
         workd[*n * 3 + 1] = std::sqrt(std::abs(workd[*n * 3 + 1]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 1] = F77_FUNC(dnrm2, DNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 1] = F77_FUNC(dnrm2, DNRM2)(n, &resid[1], &c__1);
     }
     iwork[1] = 0;
 
@@ -2196,29 +2092,26 @@ L1200:
 
 L9000:
     return;
-
 }
 
 
-
-void
-F77_FUNC(dsaupd, DSAUPD) (int *     ido,
-                          const char *    bmat,
-                          int *     n,
-                          const char *      which,
-                          int *     nev,
-                          double *  tol,
-                          double *  resid,
-                          int *     ncv,
-                          double *  v,
-                          int *     ldv,
-                          int *     iparam,
-                          int *     ipntr,
-                          double *  workd,
-                          int *     iwork,
-                          double *  workl,
-                          int *     lworkl,
-                          int *     info)
+void F77_FUNC(dsaupd, DSAUPD)(int*        ido,
+                              const char* bmat,
+                              int*        n,
+                              const char* which,
+                              int*        nev,
+                              double*     tol,
+                              double*     resid,
+                              int*        ncv,
+                              double*     v,
+                              int*        ldv,
+                              int*        iparam,
+                              int*        ipntr,
+                              double*     workd,
+                              int*        iwork,
+                              double*     workl,
+                              int*        lworkl,
+                              int*        info)
 {
     int v_dim1, v_offset, i__1, i__2;
     int j;
@@ -2227,7 +2120,7 @@ F77_FUNC(dsaupd, DSAUPD) (int *     ido,
     --resid;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     --iparam;
     --ipntr;
     --iwork;
@@ -2266,9 +2159,8 @@ F77_FUNC(dsaupd, DSAUPD) (int *     ido,
         {
             iwork[2] = -4;
         }
-        if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
-            std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
-            std::strncmp(which, "BE", 2))
+        if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+            && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
         {
             iwork[2] = -5;
         }
@@ -2341,11 +2233,10 @@ F77_FUNC(dsaupd, DSAUPD) (int *     ido,
         ipntr[11] = iwork[7];
     }
 
-    F77_FUNC(dsaup2, DSAUP2) (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &
-                              iwork[11], &iwork[6], &iwork[5], &iwork[10], &v[v_offset], ldv, &
-                              workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]], &
-                              workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1],
-                              &iwork[21], info);
+    F77_FUNC(dsaup2, DSAUP2)
+    (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &iwork[11], &iwork[6], &iwork[5],
+     &iwork[10], &v[v_offset], ldv, &workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]],
+     &workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1], &iwork[21], info);
 
     if (*ido == 3)
     {
@@ -2371,36 +2262,33 @@ F77_FUNC(dsaupd, DSAUPD) (int *     ido,
 L9000:
 
     return;
-
 }
 
 
-
-void
-F77_FUNC(dseupd, DSEUPD) (int *     rvec,
-                          const char *    howmny,
-                          int *     select,
-                          double *  d__,
-                          double *  z__,
-                          int *     ldz,
-                          double *  sigma,
-                          const char *    bmat,
-                          int *     n,
-                          const char *    which,
-                          int *     nev,
-                          double *  tol,
-                          double *  resid,
-                          int *     ncv,
-                          double *  v,
-                          int *     ldv,
-                          int *     iparam,
-                          int *     ipntr,
-                          double *  workd,
-                          double *  workl,
-                          int *     lworkl,
-                          int *     info)
+void F77_FUNC(dseupd, DSEUPD)(int*        rvec,
+                              const char* howmny,
+                              int*        select,
+                              double*     d__,
+                              double*     z__,
+                              int*        ldz,
+                              double*     sigma,
+                              const char* bmat,
+                              int*        n,
+                              const char* which,
+                              int*        nev,
+                              double*     tol,
+                              double*     resid,
+                              int*        ncv,
+                              double*     v,
+                              int*        ldv,
+                              int*        iparam,
+                              int*        ipntr,
+                              double*     workd,
+                              double*     workl,
+                              int*        lworkl,
+                              int*        info)
 {
-    double c_b21  = 2/3.;
+    double c_b21  = 2 / 3.;
     int    c__1   = 1;
     double c_b102 = 1.;
     int    v_dim1, v_offset, z_dim1, z_offset, i__1;
@@ -2429,12 +2317,12 @@ F77_FUNC(dseupd, DSEUPD) (int *     rvec,
     --resid;
     z_dim1   = *ldz;
     z_offset = 1 + z_dim1;
-    z__     -= z_offset;
+    z__ -= z_offset;
     --d__;
     --select;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     --iparam;
     --ipntr;
     --workl;
@@ -2465,9 +2353,8 @@ F77_FUNC(dseupd, DSEUPD) (int *     rvec,
     {
         ierr = -3;
     }
-    if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
-        std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
-        std::strncmp(which, "BE", 2))
+    if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+        && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
     {
         ierr = -5;
     }
@@ -2475,8 +2362,7 @@ F77_FUNC(dseupd, DSEUPD) (int *     rvec,
     {
         ierr = -6;
     }
-    if (*howmny != 'A' && *howmny != 'P' &&
-        *howmny != 'S' && *rvec)
+    if (*howmny != 'A' && *howmny != 'P' && *howmny != 'S' && *rvec)
     {
         ierr = -15;
     }
@@ -2554,28 +2440,24 @@ F77_FUNC(dseupd, DSEUPD) (int *     rvec,
     }
     else if (*bmat == 'G')
     {
-        bnorm2 = F77_FUNC(dnrm2, DNRM2) (n, &workd[1], &c__1);
+        bnorm2 = F77_FUNC(dnrm2, DNRM2)(n, &workd[1], &c__1);
     }
 
     if (*rvec)
     {
 
-        if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2) ||
-            !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
-        {
-
-        }
+        if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2)
+            || !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
+        {}
         else if (!std::strncmp(which, "BE", 2))
         {
 
 
-            ism    = (*nev > nconv) ? *nev : nconv;
-            ism   /= 2;
+            ism = (*nev > nconv) ? *nev : nconv;
+            ism /= 2;
             ilg    = ism + 1;
             thres1 = workl[ism];
             thres2 = workl[ilg];
-
-
         }
 
         reord  = 0;
@@ -2660,11 +2542,11 @@ F77_FUNC(dseupd, DSEUPD) (int *     rvec,
         }
 
         i__1 = *ncv - 1;
-        F77_FUNC(dcopy, DCOPY) (&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
-        F77_FUNC(dcopy, DCOPY) (ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
+        F77_FUNC(dcopy, DCOPY)(&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
+        F77_FUNC(dcopy, DCOPY)(ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
 
-        F77_FUNC(dsteqr, DSTEQR) ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &
-                                  workl[iw], &ierr);
+        F77_FUNC(dsteqr, DSTEQR)
+        ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &workl[iw], &ierr);
 
         if (ierr != 0)
         {
@@ -2684,18 +2566,16 @@ F77_FUNC(dseupd, DSEUPD) (int *     rvec,
                 goto L30;
             }
 
-L20:
+        L20:
             if (select[leftptr])
             {
 
                 ++leftptr;
-
             }
             else if (!select[rghtptr])
             {
 
                 --rghtptr;
-
             }
             else
             {
@@ -2703,15 +2583,14 @@ L20:
                 temp                     = workl[ihd + leftptr - 1];
                 workl[ihd + leftptr - 1] = workl[ihd + rghtptr - 1];
                 workl[ihd + rghtptr - 1] = temp;
-                F77_FUNC(dcopy, DCOPY) (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[
-                                            iw], &c__1);
-                F77_FUNC(dcopy, DCOPY) (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[
-                                            iq + *ncv * (leftptr - 1)], &c__1);
-                F77_FUNC(dcopy, DCOPY) (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr -
-                                                                                    1)], &c__1);
+                F77_FUNC(dcopy, DCOPY)
+                (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[iw], &c__1);
+                F77_FUNC(dcopy, DCOPY)
+                (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[iq + *ncv * (leftptr - 1)], &c__1);
+                F77_FUNC(dcopy, DCOPY)
+                (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr - 1)], &c__1);
                 ++leftptr;
                 --rghtptr;
-
             }
 
             if (leftptr < rghtptr)
@@ -2719,37 +2598,33 @@ L20:
                 goto L20;
             }
 
-L30:
-            ;
+        L30:;
         }
 
-        F77_FUNC(dcopy, DCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
-
+        F77_FUNC(dcopy, DCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
     }
     else
     {
 
-        F77_FUNC(dcopy, DCOPY) (&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
-        F77_FUNC(dcopy, DCOPY) (ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
-
+        F77_FUNC(dcopy, DCOPY)(&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
+        F77_FUNC(dcopy, DCOPY)(ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
     }
     if (!std::strncmp(type__, "REGULR", 6))
     {
 
         if (*rvec)
         {
-            F77_FUNC(dsesrt, DSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+            F77_FUNC(dsesrt, DSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
         }
         else
         {
-            F77_FUNC(dcopy, DCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+            F77_FUNC(dcopy, DCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
         }
-
     }
     else
     {
 
-        F77_FUNC(dcopy, DCOPY) (ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
+        F77_FUNC(dcopy, DCOPY)(ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
         if (!std::strncmp(type__, "SHIFTI", 6))
         {
             i__1 = *ncv;
@@ -2763,8 +2638,7 @@ L30:
             i__1 = *ncv;
             for (k = 1; k <= i__1; ++k)
             {
-                workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd
-                                                                          + k - 1] - 1.);
+                workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd + k - 1] - 1.);
             }
         }
         else if (!std::strncmp(type__, "CAYLEY", 6))
@@ -2772,36 +2646,35 @@ L30:
             i__1 = *ncv;
             for (k = 1; k <= i__1; ++k)
             {
-                workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (
-                        workl[ihd + k - 1] - 1.);
+                workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (workl[ihd + k - 1] - 1.);
             }
         }
 
-        F77_FUNC(dcopy, DCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
-        F77_FUNC(dsortr, DSORTR) ("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
+        F77_FUNC(dcopy, DCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
+        F77_FUNC(dsortr, DSORTR)("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
         if (*rvec)
         {
-            F77_FUNC(dsesrt, DSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+            F77_FUNC(dsesrt, DSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
         }
         else
         {
-            F77_FUNC(dcopy, DCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+            F77_FUNC(dcopy, DCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
             d__1 = bnorm2 / rnorm;
-            F77_FUNC(dscal, DSCAL) (ncv, &d__1, &workl[ihb], &c__1);
-            F77_FUNC(dsortr, DSORTR) ("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
+            F77_FUNC(dscal, DSCAL)(ncv, &d__1, &workl[ihb], &c__1);
+            F77_FUNC(dsortr, DSORTR)("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
         }
-
     }
 
     if (*rvec && *howmny == 'A')
     {
 
-        F77_FUNC(dgeqr2, DGEQR2) (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
-                                  &ierr);
+        F77_FUNC(dgeqr2, DGEQR2)
+        (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb], &ierr);
 
-        F77_FUNC(dorm2r, DORM2R) ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &
-                                  workl[iw + *ncv], &v[v_offset], ldv, &workd[*n + 1], &ierr);
-        F77_FUNC(dlacpy, DLACPY) ("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
+        F77_FUNC(dorm2r, DORM2R)
+        ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &v[v_offset],
+         ldv, &workd[*n + 1], &ierr);
+        F77_FUNC(dlacpy, DLACPY)("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
 
         i__1 = *ncv - 1;
         for (j = 1; j <= i__1; ++j)
@@ -2809,13 +2682,12 @@ L30:
             workl[ihb + j - 1] = 0.;
         }
         workl[ihb + *ncv - 1] = 1.;
-        F77_FUNC(dorm2r, DORM2R) ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &
-                                  workl[iw + *ncv], &workl[ihb], ncv, &temp, &ierr);
-
+        F77_FUNC(dorm2r, DORM2R)
+        ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
+         ncv, &temp, &ierr);
     }
     else if (*rvec && *howmny == 'S')
     {
-
     }
 
     if (!std::strncmp(type__, "REGULR", 6) && *rvec)
@@ -2826,12 +2698,11 @@ L30:
         {
             workl[ihb + j - 1] = rnorm * std::abs(workl[ihb + j - 1]);
         }
-
     }
     else if (std::strncmp(type__, "REGULR", 6) && *rvec)
     {
 
-        F77_FUNC(dscal, DSCAL) (ncv, &bnorm2, &workl[ihb], &c__1);
+        F77_FUNC(dscal, DSCAL)(ncv, &bnorm2, &workl[ihb], &c__1);
         if (!std::strncmp(type__, "SHIFTI", 6))
         {
 
@@ -2839,9 +2710,8 @@ L30:
             for (k = 1; k <= i__1; ++k)
             {
                 d__2               = workl[iw + k - 1];
-                workl[ihb + k - 1] = std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+                workl[ihb + k - 1] = std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
             }
-
         }
         else if (!std::strncmp(type__, "BUCKLE", 6))
         {
@@ -2850,9 +2720,8 @@ L30:
             for (k = 1; k <= i__1; ++k)
             {
                 d__2               = workl[iw + k - 1] - 1.;
-                workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+                workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
             }
-
         }
         else if (!std::strncmp(type__, "CAYLEY", 6))
         {
@@ -2860,12 +2729,10 @@ L30:
             i__1 = *ncv;
             for (k = 1; k <= i__1; ++k)
             {
-                workl[ihb + k - 1] = std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
-
+                workl[ihb + k - 1] =
+                        std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
             }
-
         }
-
     }
 
     if (*rvec && (!std::strncmp(type__, "SHIFTI", 6) || !std::strncmp(type__, "CAYLEY", 6)))
@@ -2876,7 +2743,6 @@ L30:
         {
             workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / workl[iw + k];
         }
-
     }
     else if (*rvec && !std::strncmp(type__, "BUCKLE", 6))
     {
@@ -2884,38 +2750,26 @@ L30:
         i__1 = nconv - 1;
         for (k = 0; k <= i__1; ++k)
         {
-            workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] -
-                                                              1.);
+            workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] - 1.);
         }
-
     }
 
     if (std::strncmp(type__, "REGULR", 6))
     {
-        F77_FUNC(dger, DGER) (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[
-                                  z_offset], ldz);
+        F77_FUNC(dger, DGER)
+        (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[z_offset], ldz);
     }
 
 L9000:
 
     return;
-
 }
 
 
-
-
-
 /* Selected single precision arpack routines */
 
 
-static void
-F77_FUNC(sstqrb, SSTQRB) (int *      n,
-                          float *   d__,
-                          float *   e,
-                          float *   z__,
-                          float *   work,
-                          int *      info)
+static void F77_FUNC(sstqrb, SSTQRB)(int* n, float* d__, float* e, float* z__, float* work, int* info)
 {
     int   i__1, i__2;
     float d__1, d__2;
@@ -2970,7 +2824,6 @@ F77_FUNC(sstqrb, SSTQRB) (int *      n,
     for (j = 1; j <= i__1; ++j)
     {
         z__[j] = 0.;
-
     }
     z__[*n] = 1.;
 
@@ -2999,7 +2852,7 @@ L10:
             {
                 goto L30;
             }
-            if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m+1])) * eps)
+            if (tst <= std::sqrt(std::abs(d__[m])) * std::sqrt(std::abs(d__[m + 1])) * eps)
             {
                 e[m] = 0.;
                 goto L30;
@@ -3020,7 +2873,7 @@ L30:
     }
 
     i__1   = lend - l + 1;
-    anorm  = F77_FUNC(slanst, SLANST) ("i", &i__1, &d__[l], &e[l]);
+    anorm  = F77_FUNC(slanst, SLANST)("i", &i__1, &d__[l], &e[l]);
     iscale = 0;
     if (anorm == 0.)
     {
@@ -3030,21 +2883,19 @@ L30:
     {
         iscale = 1;
         i__1   = lend - l + 1;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n,
-                                  info);
+        F77_FUNC(slascl, SLASCL)
+        ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &d__[l], n, info);
         i__1 = lend - l;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n,
-                                  info);
+        F77_FUNC(slascl, SLASCL)("g", &c__0, &c__0, &anorm, &ssfmax, &i__1, &c__1, &e[l], n, info);
     }
     else if (anorm < ssfmin)
     {
         iscale = 2;
         i__1   = lend - l + 1;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n,
-                                  info);
+        F77_FUNC(slascl, SLASCL)
+        ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &d__[l], n, info);
         i__1 = lend - l;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n,
-                                  info);
+        F77_FUNC(slascl, SLASCL)("g", &c__0, &c__0, &anorm, &ssfmin, &i__1, &c__1, &e[l], n, info);
     }
 
     if (std::abs(d__[lend]) < std::abs(d__[l]))
@@ -3056,7 +2907,7 @@ L30:
     if (lend > l)
     {
 
-L40:
+    L40:
         if (l != lend)
         {
             lendm1 = lend - 1;
@@ -3074,7 +2925,7 @@ L40:
 
         m = lend;
 
-L60:
+    L60:
         if (m < lend)
         {
             e[m] = 0.;
@@ -3089,7 +2940,7 @@ L60:
         {
             if (icompz > 0)
             {
-                F77_FUNC(slaev2, SLAEV2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
+                F77_FUNC(slaev2, SLAEV2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2, &c__, &s);
                 work[l]          = c__;
                 work[*n - 1 + l] = s;
 
@@ -3099,12 +2950,12 @@ L60:
             }
             else
             {
-                F77_FUNC(slae2, SLAE2) (&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
+                F77_FUNC(slae2, SLAE2)(&d__[l], &e[l], &d__[l + 1], &rt1, &rt2);
             }
             d__[l]     = rt1;
             d__[l + 1] = rt2;
             e[l]       = 0.;
-            l         += 2;
+            l += 2;
             if (l <= lend)
             {
                 goto L40;
@@ -3119,8 +2970,8 @@ L60:
         ++jtot;
 
         g   = (d__[l + 1] - p) / (e[l] * 2.);
-        r__ = F77_FUNC(slapy2, SLAPY2) (&g, &c_b31);
-        g   = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__ ));
+        r__ = F77_FUNC(slapy2, SLAPY2)(&g, &c_b31);
+        g   = d__[m] - p + e[l] / (g + ((g > 0) ? r__ : -r__));
 
         s   = 1.;
         c__ = 1.;
@@ -3132,7 +2983,7 @@ L60:
         {
             f = s * e[i__];
             b = c__ * e[i__];
-            F77_FUNC(slartg, SLARTG) (&g, &f, &c__, &s, &r__);
+            F77_FUNC(slartg, SLARTG)(&g, &f, &c__, &s, &r__);
             if (i__ != m - 1)
             {
                 e[i__ + 1] = r__;
@@ -3148,22 +2999,21 @@ L60:
                 work[i__]          = c__;
                 work[*n - 1 + i__] = -s;
             }
-
         }
 
         if (icompz > 0)
         {
             mm = m - l + 1;
 
-            F77_FUNC(slasr, SLASR) ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &
-                                    z__[l], &c__1);
+            F77_FUNC(slasr, SLASR)
+            ("r", "v", "b", &c__1, &mm, &work[l], &work[*n - 1 + l], &z__[l], &c__1);
         }
 
         d__[l] -= p;
-        e[l]    = g;
+        e[l] = g;
         goto L40;
 
-L80:
+    L80:
         d__[l] = p;
 
         ++l;
@@ -3172,12 +3022,11 @@ L80:
             goto L40;
         }
         goto L140;
-
     }
     else
     {
 
-L90:
+    L90:
         if (l != lend)
         {
             lendp1 = lend + 1;
@@ -3186,7 +3035,7 @@ L90:
             {
                 d__2 = std::abs(e[m - 1]);
                 tst  = d__2 * d__2;
-                if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m- 1]) + safmin)
+                if (tst <= eps2 * std::abs(d__[m]) * std::abs(d__[m - 1]) + safmin)
                 {
                     goto L110;
                 }
@@ -3195,7 +3044,7 @@ L90:
 
         m = lend;
 
-L110:
+    L110:
         if (m > lend)
         {
             e[m - 1] = 0.;
@@ -3210,8 +3059,7 @@ L110:
         {
             if (icompz > 0)
             {
-                F77_FUNC(slaev2, SLAEV2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s)
-                ;
+                F77_FUNC(slaev2, SLAEV2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2, &c__, &s);
 
                 tst        = z__[l];
                 z__[l]     = c__ * tst - s * z__[l - 1];
@@ -3219,12 +3067,12 @@ L110:
             }
             else
             {
-                F77_FUNC(slae2, SLAE2) (&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
+                F77_FUNC(slae2, SLAE2)(&d__[l - 1], &e[l - 1], &d__[l], &rt1, &rt2);
             }
             d__[l - 1] = rt1;
             d__[l]     = rt2;
             e[l - 1]   = 0.;
-            l         += -2;
+            l += -2;
             if (l >= lend)
             {
                 goto L90;
@@ -3240,8 +3088,8 @@ L110:
 
 
         g   = (d__[l - 1] - p) / (e[l - 1] * 2.);
-        r__ = F77_FUNC(slapy2, SLAPY2) (&g, &c_b31);
-        g   = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__ ));
+        r__ = F77_FUNC(slapy2, SLAPY2)(&g, &c_b31);
+        g   = d__[m] - p + e[l - 1] / (g + ((g > 0) ? r__ : -r__));
 
         s   = 1.;
         c__ = 1.;
@@ -3253,7 +3101,7 @@ L110:
         {
             f = s * e[i__];
             b = c__ * e[i__];
-            F77_FUNC(slartg, SLARTG) (&g, &f, &c__, &s, &r__);
+            F77_FUNC(slartg, SLARTG)(&g, &f, &c__, &s, &r__);
             if (i__ != m)
             {
                 e[i__ - 1] = r__;
@@ -3269,22 +3117,21 @@ L110:
                 work[i__]          = c__;
                 work[*n - 1 + i__] = s;
             }
-
         }
 
         if (icompz > 0)
         {
             mm = l - m + 1;
 
-            F77_FUNC(slasr, SLASR) ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &
-                                    z__[m], &c__1);
+            F77_FUNC(slasr, SLASR)
+            ("r", "v", "f", &c__1, &mm, &work[m], &work[*n - 1 + m], &z__[m], &c__1);
         }
 
         d__[l] -= p;
-        e[lm1]  = g;
+        e[lm1] = g;
         goto L90;
 
-L130:
+    L130:
         d__[l] = p;
 
         --l;
@@ -3293,27 +3140,26 @@ L130:
             goto L90;
         }
         goto L140;
-
     }
 
 L140:
     if (iscale == 1)
     {
         i__1 = lendsv - lsv + 1;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv],
-                                  n, info);
+        F77_FUNC(slascl, SLASCL)
+        ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &d__[lsv], n, info);
         i__1 = lendsv - lsv;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n,
-                                  info);
+        F77_FUNC(slascl, SLASCL)
+        ("g", &c__0, &c__0, &ssfmax, &anorm, &i__1, &c__1, &e[lsv], n, info);
     }
     else if (iscale == 2)
     {
         i__1 = lendsv - lsv + 1;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv],
-                                  n, info);
+        F77_FUNC(slascl, SLASCL)
+        ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &d__[lsv], n, info);
         i__1 = lendsv - lsv;
-        F77_FUNC(slascl, SLASCL) ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n,
-                                  info);
+        F77_FUNC(slascl, SLASCL)
+        ("g", &c__0, &c__0, &ssfmin, &anorm, &i__1, &c__1, &e[lsv], n, info);
     }
 
     if (jtot < nmaxit)
@@ -3334,8 +3180,7 @@ L160:
     if (icompz == 0)
     {
 
-        F77_FUNC(slasrt, SLASRT) ("i", n, &d__[1], info);
-
+        F77_FUNC(slasrt, SLASRT)("i", n, &d__[1], info);
     }
     else
     {
@@ -3369,24 +3214,22 @@ L160:
 
 L190:
     return;
-
 }
 
-static void
-F77_FUNC(sgetv0, SGETV0) (int *     ido,
-                          const char *    bmat,
-                          int gmx_unused *     itry,
-                          int *     initv,
-                          int *     n,
-                          int *     j,
-                          float *  v,
-                          int *     ldv,
-                          float *  resid,
-                          float *  rnorm,
-                          int *     ipntr,
-                          float *  workd,
-                          int *     iwork,
-                          int *     ierr)
+static void F77_FUNC(sgetv0, SGETV0)(int*        ido,
+                                     const char* bmat,
+                                     int gmx_unused* itry,
+                                     int*            initv,
+                                     int*            n,
+                                     int*            j,
+                                     float*          v,
+                                     int*            ldv,
+                                     float*          resid,
+                                     float*          rnorm,
+                                     int*            ipntr,
+                                     float*          workd,
+                                     int*            iwork,
+                                     int*            ierr)
 {
     int   c__1  = 1;
     float c_b22 = 1.;
@@ -3394,14 +3237,14 @@ F77_FUNC(sgetv0, SGETV0) (int *     ido,
     float c_b27 = -1.;
     int   v_dim1, v_offset, i__1;
 
-    int   jj;
-    int   idist;
+    int jj;
+    int idist;
 
     --workd;
     --resid;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     --ipntr;
     --iwork;
 
@@ -3416,14 +3259,14 @@ F77_FUNC(sgetv0, SGETV0) (int *     ido,
         if (!(*initv))
         {
             idist = 2;
-            F77_FUNC(slarnv, SLARNV) (&idist, &iwork[1], n, &resid[1]);
+            F77_FUNC(slarnv, SLARNV)(&idist, &iwork[1], n, &resid[1]);
         }
 
         if (*bmat == 'G')
         {
             ipntr[1] = 1;
             ipntr[2] = *n + 1;
-            F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+            F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
             *ido = -1;
             goto L9000;
         }
@@ -3442,7 +3285,7 @@ F77_FUNC(sgetv0, SGETV0) (int *     ido,
     iwork[5] = 1;
     if (*bmat == 'G')
     {
-        F77_FUNC(scopy, SCOPY) (n, &workd[*n + 1], &c__1, &resid[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &workd[*n + 1], &c__1, &resid[1], &c__1);
         ipntr[1] = *n + 1;
         ipntr[2] = 1;
         *ido     = 2;
@@ -3450,7 +3293,7 @@ F77_FUNC(sgetv0, SGETV0) (int *     ido,
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
     }
 
 L20:
@@ -3459,12 +3302,12 @@ L20:
     iwork[5] = 0;
     if (*bmat == 'G')
     {
-        workd[*n * 3 + 4] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+        workd[*n * 3 + 4] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
         workd[*n * 3 + 4] = std::sqrt(std::abs(workd[*n * 3 + 4]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 4] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 4] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
     }
     *rnorm = workd[*n * 3 + 4];
 
@@ -3476,15 +3319,15 @@ L20:
 L30:
 
     i__1 = *j - 1;
-    F77_FUNC(sgemv, SGEMV) ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24,
-                            &workd[*n + 1], &c__1);
+    F77_FUNC(sgemv, SGEMV)
+    ("T", n, &i__1, &c_b22, &v[v_offset], ldv, &workd[1], &c__1, &c_b24, &workd[*n + 1], &c__1);
     i__1 = *j - 1;
-    F77_FUNC(sgemv, SGEMV) ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &
-                            c_b22, &resid[1], &c__1);
+    F77_FUNC(sgemv, SGEMV)
+    ("N", n, &i__1, &c_b27, &v[v_offset], ldv, &workd[*n + 1], &c__1, &c_b22, &resid[1], &c__1);
 
     if (*bmat == 'G')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
         ipntr[1] = *n + 1;
         ipntr[2] = 1;
         *ido     = 2;
@@ -3492,19 +3335,19 @@ L30:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
     }
 
 L40:
 
     if (*bmat == 'G')
     {
-        *rnorm = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+        *rnorm = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
         *rnorm = std::sqrt(std::abs(*rnorm));
     }
     else if (*bmat == 'I')
     {
-        *rnorm = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+        *rnorm = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
     }
 
     if (*rnorm > workd[*n * 3 + 4] * .717F)
@@ -3540,29 +3383,24 @@ L9000:
 }
 
 
-
-
-
-static void
-F77_FUNC(ssapps, SSAPPS) (int *     n,
-                          int *     kev,
-                          int *     np,
-                          float *  shift,
-                          float *  v,
-                          int *     ldv,
-                          float *  h__,
-                          int *     ldh,
-                          float *  resid,
-                          float *  q,
-                          int *     ldq,
-                          float *  workd)
+static void F77_FUNC(ssapps, SSAPPS)(int*   n,
+                                     int*   kev,
+                                     int*   np,
+                                     float* shift,
+                                     float* v,
+                                     int*   ldv,
+                                     float* h__,
+                                     int*   ldh,
+                                     float* resid,
+                                     float* q,
+                                     int*   ldq,
+                                     float* workd)
 {
     float c_b4  = 0.;
     float c_b5  = 1.;
     float c_b14 = -1.;
     int   c__1  = 1;
-    int   h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
-          i__3, i__4;
+    int   h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3, i__4;
     float c__, f, g;
     int   i__, j;
     float r__, s, a1, a2, a3, a4;
@@ -3577,13 +3415,13 @@ F77_FUNC(ssapps, SSAPPS) (int *     n,
     --shift;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
     q_dim1   = *ldq;
     q_offset = 1 + q_dim1;
-    q       -= q_offset;
+    q -= q_offset;
 
     epsmch = GMX_FLOAT_EPS;
     itop   = 1;
@@ -3591,7 +3429,7 @@ F77_FUNC(ssapps, SSAPPS) (int *     n,
 
     kplusp = *kev + *np;
 
-    F77_FUNC(slaset, SLASET) ("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
+    F77_FUNC(slaset, SLASET)("All", &kplusp, &kplusp, &c_b4, &c_b5, &q[q_offset], ldq);
 
     if (*np == 0)
     {
@@ -3604,12 +3442,12 @@ F77_FUNC(ssapps, SSAPPS) (int *     n,
 
         istart = itop;
 
-L20:
+    L20:
 
         i__2 = kplusp - 1;
         for (i__ = istart; i__ <= i__2; ++i__)
         {
-            big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__ + 1 + (h_dim1*2)]);
+            big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
             if (h__[i__ + 1 + h_dim1] <= epsmch * big)
             {
                 h__[i__ + 1 + h_dim1] = 0.;
@@ -3618,23 +3456,19 @@ L20:
             }
         }
         iend = kplusp;
-L40:
+    L40:
 
         if (istart < iend)
         {
 
             f = h__[istart + (h_dim1 << 1)] - shift[jj];
             g = h__[istart + 1 + h_dim1];
-            F77_FUNC(slartg, SLARTG) (&f, &g, &c__, &s, &r__);
-
-            a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 +
-                                                             h_dim1];
-            a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (
-                                                              h_dim1 << 1)];
-            a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 +
-                                                                 h_dim1];
-            a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 <<
-                                                                    1)];
+            F77_FUNC(slartg, SLARTG)(&f, &g, &c__, &s, &r__);
+
+            a1 = c__ * h__[istart + (h_dim1 << 1)] + s * h__[istart + 1 + h_dim1];
+            a2 = c__ * h__[istart + 1 + h_dim1] + s * h__[istart + 1 + (h_dim1 << 1)];
+            a4 = c__ * h__[istart + 1 + (h_dim1 << 1)] - s * h__[istart + 1 + h_dim1];
+            a3 = c__ * h__[istart + 1 + h_dim1] - s * h__[istart + (h_dim1 << 1)];
             h__[istart + (h_dim1 << 1)]     = c__ * a1 + s * a2;
             h__[istart + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
             h__[istart + 1 + h_dim1]        = c__ * a3 + s * a4;
@@ -3643,12 +3477,10 @@ L40:
             i__2 = (i__3 < kplusp) ? i__3 : kplusp;
             for (j = 1; j <= i__2; ++j)
             {
-                a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) *
-                                                          q_dim1];
-                q[j + (istart + 1) * q_dim1] = -s * q[j + istart * q_dim1] +
-                    c__ * q[j + (istart + 1) * q_dim1];
+                a1 = c__ * q[j + istart * q_dim1] + s * q[j + (istart + 1) * q_dim1];
+                q[j + (istart + 1) * q_dim1] =
+                        -s * q[j + istart * q_dim1] + c__ * q[j + (istart + 1) * q_dim1];
                 q[j + istart * q_dim1] = a1;
-
             }
 
             i__2 = iend - 1;
@@ -3659,7 +3491,7 @@ L40:
                 g = s * h__[i__ + 1 + h_dim1];
 
                 h__[i__ + 1 + h_dim1] = c__ * h__[i__ + 1 + h_dim1];
-                F77_FUNC(slartg, SLARTG) (&f, &g, &c__, &s, &r__);
+                F77_FUNC(slartg, SLARTG)(&f, &g, &c__, &s, &r__);
 
                 if (r__ < 0.)
                 {
@@ -3670,14 +3502,10 @@ L40:
 
                 h__[i__ + h_dim1] = r__;
 
-                a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 +
-                                                              h_dim1];
-                a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1
-                                                                      << 1)];
-                a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)
-                    ];
-                a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 +
-                                                                  h_dim1];
+                a1 = c__ * h__[i__ + (h_dim1 << 1)] + s * h__[i__ + 1 + h_dim1];
+                a2 = c__ * h__[i__ + 1 + h_dim1] + s * h__[i__ + 1 + (h_dim1 << 1)];
+                a3 = c__ * h__[i__ + 1 + h_dim1] - s * h__[i__ + (h_dim1 << 1)];
+                a4 = c__ * h__[i__ + 1 + (h_dim1 << 1)] - s * h__[i__ + 1 + h_dim1];
 
                 h__[i__ + (h_dim1 << 1)]     = c__ * a1 + s * a2;
                 h__[i__ + 1 + (h_dim1 << 1)] = c__ * a4 - s * a3;
@@ -3687,15 +3515,11 @@ L40:
                 i__3 = (i__4 < kplusp) ? i__4 : kplusp;
                 for (j = 1; j <= i__3; ++j)
                 {
-                    a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) *
-                                                           q_dim1];
-                    q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] +
-                        c__ * q[j + (i__ + 1) * q_dim1];
+                    a1 = c__ * q[j + i__ * q_dim1] + s * q[j + (i__ + 1) * q_dim1];
+                    q[j + (i__ + 1) * q_dim1] = -s * q[j + i__ * q_dim1] + c__ * q[j + (i__ + 1) * q_dim1];
                     q[j + i__ * q_dim1] = a1;
                 }
-
             }
-
         }
 
         istart = iend + 1;
@@ -3703,7 +3527,7 @@ L40:
         if (h__[iend + h_dim1] < 0.)
         {
             h__[iend + h_dim1] = -h__[iend + h_dim1];
-            F77_FUNC(sscal, SSCAL) (&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
+            F77_FUNC(sscal, SSCAL)(&kplusp, &c_b14, &q[iend * q_dim1 + 1], &c__1);
         }
 
         if (iend < kplusp)
@@ -3721,81 +3545,70 @@ L40:
             ++itop;
         }
 
-L90:
-        ;
+    L90:;
     }
 
     i__1 = kplusp - 1;
     for (i__ = itop; i__ <= i__1; ++i__)
     {
-        big = std::abs(h__[i__ + (h_dim1*2)]) + std::abs(h__[i__+ 1 + (h_dim1*2)]);
+        big = std::abs(h__[i__ + (h_dim1 * 2)]) + std::abs(h__[i__ + 1 + (h_dim1 * 2)]);
         if (h__[i__ + 1 + h_dim1] <= epsmch * big)
         {
             h__[i__ + 1 + h_dim1] = 0.;
         }
-
     }
 
     if (h__[*kev + 1 + h_dim1] > 0.)
     {
-        F77_FUNC(sgemv, SGEMV) ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) *
-                                                                              q_dim1 + 1], &c__1, &c_b4, &workd[*n + 1], &c__1);
+        F77_FUNC(sgemv, SGEMV)
+        ("N", n, &kplusp, &c_b5, &v[v_offset], ldv, &q[(*kev + 1) * q_dim1 + 1], &c__1, &c_b4,
+         &workd[*n + 1], &c__1);
     }
 
     i__1 = *kev;
     for (i__ = 1; i__ <= i__1; ++i__)
     {
         i__2 = kplusp - i__ + 1;
-        F77_FUNC(sgemv, SGEMV) ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) *
-                                                                            q_dim1 + 1], &c__1, &c_b4, &workd[1], &c__1);
-        F77_FUNC(scopy, SCOPY) (n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &
-                                c__1);
-
+        F77_FUNC(sgemv, SGEMV)
+        ("N", n, &i__2, &c_b5, &v[v_offset], ldv, &q[(*kev - i__ + 1) * q_dim1 + 1], &c__1, &c_b4,
+         &workd[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &workd[1], &c__1, &v[(kplusp - i__ + 1) * v_dim1 + 1], &c__1);
     }
 
-    F77_FUNC(slacpy, SLACPY) ("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
+    F77_FUNC(slacpy, SLACPY)("All", n, kev, &v[(*np + 1) * v_dim1 + 1], ldv, &v[v_offset], ldv);
 
     if (h__[*kev + 1 + h_dim1] > 0.)
     {
-        F77_FUNC(scopy, SCOPY) (n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &workd[*n + 1], &c__1, &v[(*kev + 1) * v_dim1 + 1], &c__1);
     }
 
-    F77_FUNC(sscal, SSCAL) (n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
+    F77_FUNC(sscal, SSCAL)(n, &q[kplusp + *kev * q_dim1], &resid[1], &c__1);
     if (h__[*kev + 1 + h_dim1] > 0.)
     {
-        F77_FUNC(saxpy, SAXPY) (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1,
-                                &resid[1], &c__1);
+        F77_FUNC(saxpy, SAXPY)
+        (n, &h__[*kev + 1 + h_dim1], &v[(*kev + 1) * v_dim1 + 1], &c__1, &resid[1], &c__1);
     }
 
 
-
 L9000:
     return;
-
 }
 
 
-
-static void
-F77_FUNC(ssortr, SSORTR) (const char *    which,
-                          int *     apply,
-                          int *     n,
-                          float *  x1,
-                          float *  x2)
+static void F77_FUNC(ssortr, SSORTR)(const char* which, int* apply, int* n, float* x1, float* x2)
 {
-    int   i__1;
+    int i__1;
 
     int   i__, j, igap;
     float temp;
 
 
-
     igap = *n / 2;
 
     if (!std::strncmp(which, "SA", 2))
     {
 
-L10:
+    L10:
         if (igap == 0)
         {
             goto L9000;
@@ -3804,7 +3617,7 @@ L10:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L20:
+        L20:
 
             if (j < 0)
             {
@@ -3829,17 +3642,15 @@ L20:
             }
             j -= igap;
             goto L20;
-L30:
-            ;
+        L30:;
         }
         igap /= 2;
         goto L10;
-
     }
     else if (!std::strncmp(which, "SM", 2))
     {
 
-L40:
+    L40:
         if (igap == 0)
         {
             goto L9000;
@@ -3848,7 +3659,7 @@ L40:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L50:
+        L50:
 
             if (j < 0)
             {
@@ -3873,17 +3684,15 @@ L50:
             }
             j -= igap;
             goto L50;
-L60:
-            ;
+        L60:;
         }
         igap /= 2;
         goto L40;
-
     }
     else if (!std::strncmp(which, "LA", 2))
     {
 
-L70:
+    L70:
         if (igap == 0)
         {
             goto L9000;
@@ -3892,7 +3701,7 @@ L70:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L80:
+        L80:
 
             if (j < 0)
             {
@@ -3917,18 +3726,16 @@ L80:
             }
             j -= igap;
             goto L80;
-L90:
-            ;
+        L90:;
         }
         igap /= 2;
         goto L70;
-
     }
     else if (!std::strncmp(which, "LM", 2))
     {
 
 
-L100:
+    L100:
         if (igap == 0)
         {
             goto L9000;
@@ -3937,7 +3744,7 @@ L100:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L110:
+        L110:
 
             if (j < 0)
             {
@@ -3962,8 +3769,7 @@ L110:
             }
             j -= igap;
             goto L110;
-L120:
-            ;
+        L120:;
         }
         igap /= 2;
         goto L100;
@@ -3971,37 +3777,28 @@ L120:
 
 L9000:
     return;
-
 }
 
 
-
-
-static void
-F77_FUNC(ssesrt, SSESRT) (const char *    which,
-                          int *     apply,
-                          int *     n,
-                          float *  x,
-                          int *     na,
-                          float *  a,
-                          int *     lda)
+static void F77_FUNC(ssesrt,
+                     SSESRT)(const char* which, int* apply, int* n, float* x, int* na, float* a, int* lda)
 {
-    int   a_dim1, a_offset, i__1;
-    int   c__1 = 1;
+    int a_dim1, a_offset, i__1;
+    int c__1 = 1;
 
     int   i__, j, igap;
     float temp;
 
     a_dim1   = *lda;
     a_offset = 1 + a_dim1 * 0;
-    a       -= a_offset;
+    a -= a_offset;
 
     igap = *n / 2;
 
     if (!std::strncmp(which, "SA", 2))
     {
 
-L10:
+    L10:
         if (igap == 0)
         {
             goto L9000;
@@ -4010,7 +3807,7 @@ L10:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L20:
+        L20:
 
             if (j < 0)
             {
@@ -4024,8 +3821,8 @@ L20:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(sswap, SSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -4034,17 +3831,15 @@ L20:
             }
             j -= igap;
             goto L20;
-L30:
-            ;
+        L30:;
         }
         igap /= 2;
         goto L10;
-
     }
     else if (!std::strncmp(which, "SM", 2))
     {
 
-L40:
+    L40:
         if (igap == 0)
         {
             goto L9000;
@@ -4053,7 +3848,7 @@ L40:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L50:
+        L50:
 
             if (j < 0)
             {
@@ -4067,8 +3862,8 @@ L50:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(sswap, SSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -4077,17 +3872,15 @@ L50:
             }
             j -= igap;
             goto L50;
-L60:
-            ;
+        L60:;
         }
         igap /= 2;
         goto L40;
-
     }
     else if (!std::strncmp(which, "LA", 2))
     {
 
-L70:
+    L70:
         if (igap == 0)
         {
             goto L9000;
@@ -4096,7 +3889,7 @@ L70:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L80:
+        L80:
 
             if (j < 0)
             {
@@ -4110,8 +3903,8 @@ L80:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(sswap, SSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -4120,17 +3913,15 @@ L80:
             }
             j -= igap;
             goto L80;
-L90:
-            ;
+        L90:;
         }
         igap /= 2;
         goto L70;
-
     }
     else if (!std::strncmp(which, "LM", 2))
     {
 
-L100:
+    L100:
         if (igap == 0)
         {
             goto L9000;
@@ -4139,7 +3930,7 @@ L100:
         for (i__ = igap; i__ <= i__1; ++i__)
         {
             j = i__ - igap;
-L110:
+        L110:
 
             if (j < 0)
             {
@@ -4153,8 +3944,8 @@ L110:
                 x[j + igap] = temp;
                 if (*apply)
                 {
-                    F77_FUNC(sswap, SSWAP) (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) *
-                                                                              a_dim1 + 1], &c__1);
+                    F77_FUNC(sswap, SSWAP)
+                    (na, &a[j * a_dim1 + 1], &c__1, &a[(j + igap) * a_dim1 + 1], &c__1);
                 }
             }
             else
@@ -4163,8 +3954,7 @@ L110:
             }
             j -= igap;
             goto L110;
-L120:
-            ;
+        L120:;
         }
         igap /= 2;
         goto L100;
@@ -4172,20 +3962,11 @@ L120:
 
 L9000:
     return;
-
 }
 
 
-
-
-static void
-F77_FUNC(ssgets, SSGETS) (int *     ishift,
-                          const char *    which,
-                          int *     kev,
-                          int *     np,
-                          float *  ritz,
-                          float *  bounds,
-                          float *  shifts)
+static void F77_FUNC(ssgets,
+                     SSGETS)(int* ishift, const char* which, int* kev, int* np, float* ritz, float* bounds, float* shifts)
 {
     int c__1 = 1;
     int i__1, i__2;
@@ -4198,32 +3979,29 @@ F77_FUNC(ssgets, SSGETS) (int *     ishift,
     if (!std::strncmp(which, "BE", 2))
     {
         i__1 = *kev + *np;
-        F77_FUNC(ssortr, SSORTR) ("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
+        F77_FUNC(ssortr, SSORTR)("LA", &c__1, &i__1, &ritz[1], &bounds[1]);
         kevd2 = *kev / 2;
         if (*kev > 1)
         {
             i__1 = (kevd2 < *np) ? kevd2 : *np;
             i__2 = (kevd2 > *np) ? kevd2 : *np;
-            F77_FUNC(sswap, SSWAP) (&i__1, &ritz[1], &c__1,
-                                    &ritz[i__2 + 1], &c__1);
+            F77_FUNC(sswap, SSWAP)(&i__1, &ritz[1], &c__1, &ritz[i__2 + 1], &c__1);
             i__1 = (kevd2 < *np) ? kevd2 : *np;
             i__2 = (kevd2 > *np) ? kevd2 : *np;
-            F77_FUNC(sswap, SSWAP) (&i__1, &bounds[1], &c__1,
-                                    &bounds[i__2 + 1], &c__1);
+            F77_FUNC(sswap, SSWAP)(&i__1, &bounds[1], &c__1, &bounds[i__2 + 1], &c__1);
         }
-
     }
     else
     {
         i__1 = *kev + *np;
-        F77_FUNC(ssortr, SSORTR) (which, &c__1, &i__1, &ritz[1], &bounds[1]);
+        F77_FUNC(ssortr, SSORTR)(which, &c__1, &i__1, &ritz[1], &bounds[1]);
     }
 
     if (*ishift == 1 && *np > 0)
     {
 
-        F77_FUNC(ssortr, SSORTR) ("SM", &c__1, np, &bounds[1], &ritz[1]);
-        F77_FUNC(scopy, SCOPY) (np, &ritz[1], &c__1, &shifts[1], &c__1);
+        F77_FUNC(ssortr, SSORTR)("SM", &c__1, np, &bounds[1], &ritz[1]);
+        F77_FUNC(scopy, SCOPY)(np, &ritz[1], &c__1, &shifts[1], &c__1);
     }
 
 
@@ -4231,15 +4009,9 @@ F77_FUNC(ssgets, SSGETS) (int *     ishift,
 }
 
 
-
-static void
-F77_FUNC(ssconv, SSCONV) (int *     n,
-                          float *  ritz,
-                          float *  bounds,
-                          float *  tol,
-                          int *     nconv)
+static void F77_FUNC(ssconv, SSCONV)(int* n, float* ritz, float* bounds, float* tol, int* nconv)
 {
-    float c_b3 = 2/3.;
+    float c_b3 = 2 / 3.;
     int   i__1;
     float d__2, d__3;
 
@@ -4270,15 +4042,9 @@ F77_FUNC(ssconv, SSCONV) (int *     n,
 }
 
 
-static void
-F77_FUNC(sseigt, SSEIGT) (float *  rnorm,
-                          int *     n,
-                          float *  h__,
-                          int *     ldh,
-                          float *  eig,
-                          float *  bounds,
-                          float *  workl,
-                          int *     ierr)
+static void F77_FUNC(
+        sseigt,
+        SSEIGT)(float* rnorm, int* n, float* h__, int* ldh, float* eig, float* bounds, float* workl, int* ierr)
 {
     int c__1 = 1;
     int h_dim1, h_offset, i__1;
@@ -4291,12 +4057,12 @@ F77_FUNC(sseigt, SSEIGT) (float *  rnorm,
     --eig;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
 
-    F77_FUNC(scopy, SCOPY) (n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
+    F77_FUNC(scopy, SCOPY)(n, &h__[(h_dim1 << 1) + 1], &c__1, &eig[1], &c__1);
     i__1 = *n - 1;
-    F77_FUNC(scopy, SCOPY) (&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
-    F77_FUNC(sstqrb, SSTQRB) (n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
+    F77_FUNC(scopy, SCOPY)(&i__1, &h__[h_dim1 + 2], &c__1, &workl[1], &c__1);
+    F77_FUNC(sstqrb, SSTQRB)(n, &eig[1], &workl[1], &bounds[1], &workl[*n + 1], ierr);
     if (*ierr != 0)
     {
         goto L9000;
@@ -4306,7 +4072,6 @@ F77_FUNC(sseigt, SSEIGT) (float *  rnorm,
     for (k = 1; k <= i__1; ++k)
     {
         bounds[k] = *rnorm * std::abs(bounds[k]);
-
     }
 
 
@@ -4315,25 +4080,22 @@ L9000:
 }
 
 
-
-
-static void
-F77_FUNC(ssaitr, SSAITR) (int *     ido,
-                          const char *    bmat,
-                          int *     n,
-                          int *     k,
-                          int *     np,
-                          int *     mode,
-                          float *  resid,
-                          float *  rnorm,
-                          float *  v,
-                          int *     ldv,
-                          float *  h__,
-                          int *     ldh,
-                          int *     ipntr,
-                          float *  workd,
-                          int *     iwork,
-                          int *     info)
+static void F77_FUNC(ssaitr, SSAITR)(int*        ido,
+                                     const char* bmat,
+                                     int*        n,
+                                     int*        k,
+                                     int*        np,
+                                     int*        mode,
+                                     float*      resid,
+                                     float*      rnorm,
+                                     float*      v,
+                                     int*        ldv,
+                                     float*      h__,
+                                     int*        ldh,
+                                     int*        ipntr,
+                                     float*      workd,
+                                     int*        iwork,
+                                     int*        info)
 {
 
     int   c__0  = 0;
@@ -4353,10 +4115,10 @@ F77_FUNC(ssaitr, SSAITR) (int *     ido,
     --resid;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
     --ipntr;
     --iwork;
     minval = GMX_FLOAT_MIN;
@@ -4413,8 +4175,9 @@ L20:
     *ido     = 0;
 L30:
 
-    F77_FUNC(sgetv0, sgetv0) (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv,
-                              &resid[1], rnorm, &ipntr[1], &workd[1], &iwork[21], &iwork[7]);
+    F77_FUNC(sgetv0, sgetv0)
+    (ido, bmat, &iwork[11], &c__0, n, &iwork[12], &v[v_offset], ldv, &resid[1], rnorm, &ipntr[1],
+     &workd[1], &iwork[21], &iwork[7]);
     if (*ido != 99)
     {
         goto L9000;
@@ -4434,24 +4197,24 @@ L30:
 
 L40:
 
-    F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
+    F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &v[iwork[12] * v_dim1 + 1], &c__1);
     if (*rnorm >= safmin)
     {
         temp1 = 1. / *rnorm;
-        F77_FUNC(sscal, SSCAL) (n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
-        F77_FUNC(sscal, SSCAL) (n, &temp1, &workd[iwork[8]], &c__1);
+        F77_FUNC(sscal, SSCAL)(n, &temp1, &v[iwork[12] * v_dim1 + 1], &c__1);
+        F77_FUNC(sscal, SSCAL)(n, &temp1, &workd[iwork[8]], &c__1);
     }
     else
     {
 
-        F77_FUNC(slascl, SLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] *
-                                                                                     v_dim1 + 1], n, &infol);
-        F77_FUNC(slascl, SLASCL) ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[
-                                                                                             8]], n, &infol);
+        F77_FUNC(slascl, SLASCL)
+        ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &v[iwork[12] * v_dim1 + 1], n, &infol);
+        F77_FUNC(slascl, SLASCL)
+        ("General", &i__, &i__, rnorm, &c_b18, n, &c__1, &workd[iwork[8]], n, &infol);
     }
 
     iwork[5] = 1;
-    F77_FUNC(scopy, SCOPY) (n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
+    F77_FUNC(scopy, SCOPY)(n, &v[iwork[12] * v_dim1 + 1], &c__1, &workd[iwork[10]], &c__1);
     ipntr[1] = iwork[10];
     ipntr[2] = iwork[9];
     ipntr[3] = iwork[8];
@@ -4463,7 +4226,7 @@ L50:
 
     iwork[5] = 0;
 
-    F77_FUNC(scopy, SCOPY) (n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
+    F77_FUNC(scopy, SCOPY)(n, &workd[iwork[9]], &c__1, &resid[1], &c__1);
 
     if (*mode == 2)
     {
@@ -4480,7 +4243,7 @@ L50:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
     }
 L60:
 
@@ -4490,34 +4253,34 @@ L65:
     if (*mode == 2)
     {
 
-        workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[10]], &
-                                                  c__1);
+        workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[10]], &c__1);
         workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
     }
     else if (*bmat == 'G')
     {
-        workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
-                                                  c__1);
+        workd[*n * 3 + 3] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
         workd[*n * 3 + 3] = std::sqrt(std::abs(workd[*n * 3 + 3]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 3] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 3] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
     }
 
     if (*mode != 2)
     {
-        F77_FUNC(sgemv, SGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]],
-                                &c__1, &c_b42, &workd[iwork[9]], &c__1);
+        F77_FUNC(sgemv, SGEMV)
+        ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+         &workd[iwork[9]], &c__1);
     }
     else
     {
-        F77_FUNC(sgemv, SGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]
-                                ], &c__1, &c_b42, &workd[iwork[9]], &c__1);
+        F77_FUNC(sgemv, SGEMV)
+        ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[10]], &c__1, &c_b42,
+         &workd[iwork[9]], &c__1);
     }
 
-    F77_FUNC(sgemv, SGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
-                            c__1, &c_b18, &resid[1], &c__1);
+    F77_FUNC(sgemv, SGEMV)
+    ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
 
     h__[iwork[12] + (h_dim1 << 1)] = workd[iwork[9] + iwork[12] - 1];
     if (iwork[12] == 1 || iwork[4] == 1)
@@ -4534,7 +4297,7 @@ L65:
 
     if (*bmat == 'G')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
         ipntr[1] = iwork[9];
         ipntr[2] = iwork[8];
         *ido     = 2;
@@ -4543,7 +4306,7 @@ L65:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
     }
 L70:
 
@@ -4551,12 +4314,12 @@ L70:
 
     if (*bmat == 'G')
     {
-        *rnorm = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        *rnorm = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
         *rnorm = std::sqrt(std::abs(*rnorm));
     }
     else if (*bmat == 'I')
     {
-        *rnorm = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+        *rnorm = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
     }
 
     if (*rnorm > workd[*n * 3 + 3] * .717F)
@@ -4566,11 +4329,12 @@ L70:
 
 L80:
 
-    F77_FUNC(sgemv, SGEMV) ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &
-                            c__1, &c_b42, &workd[iwork[9]], &c__1);
+    F77_FUNC(sgemv, SGEMV)
+    ("T", n, &iwork[12], &c_b18, &v[v_offset], ldv, &workd[iwork[8]], &c__1, &c_b42,
+     &workd[iwork[9]], &c__1);
 
-    F77_FUNC(sgemv, SGEMV) ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &
-                            c__1, &c_b18, &resid[1], &c__1);
+    F77_FUNC(sgemv, SGEMV)
+    ("N", n, &iwork[12], &c_b50, &v[v_offset], ldv, &workd[iwork[9]], &c__1, &c_b18, &resid[1], &c__1);
 
     if (iwork[12] == 1 || iwork[4] == 1)
     {
@@ -4581,7 +4345,7 @@ L80:
     iwork[3] = 1;
     if (*bmat == 'G')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[9]], &c__1);
         ipntr[1] = iwork[9];
         ipntr[2] = iwork[8];
         *ido     = 2;
@@ -4590,20 +4354,19 @@ L80:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
     }
 L90:
 
 
     if (*bmat == 'G')
     {
-        workd[*n * 3 + 2] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[iwork[8]], &
-                                                  c__1);
+        workd[*n * 3 + 2] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[iwork[8]], &c__1);
         workd[*n * 3 + 2] = std::sqrt(std::abs(workd[*n * 3 + 2]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 2] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 2] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
     }
 
 
@@ -4611,7 +4374,6 @@ L90:
     {
 
         *rnorm = workd[*n * 3 + 2];
-
     }
     else
     {
@@ -4641,11 +4403,11 @@ L100:
         h__[iwork[12] + h_dim1] = -h__[iwork[12] + h_dim1];
         if (iwork[12] < *k + *np)
         {
-            F77_FUNC(sscal, SSCAL) (n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
+            F77_FUNC(sscal, SSCAL)(n, &c_b50, &v[(iwork[12] + 1) * v_dim1 + 1], &c__1);
         }
         else
         {
-            F77_FUNC(sscal, SSCAL) (n, &c_b50, &resid[1], &c__1);
+            F77_FUNC(sscal, SSCAL)(n, &c_b50, &resid[1], &c__1);
         }
     }
 
@@ -4665,43 +4427,37 @@ L9000:
 }
 
 
-
-
-
-
-static void
-F77_FUNC(ssaup2, SSAUP2) (int *     ido,
-                          const char *    bmat,
-                          int *     n,
-                          const char *    which,
-                          int *     nev,
-                          int *     np,
-                          float *  tol,
-                          float *  resid,
-                          int *     mode,
-                          int gmx_unused *     iupd,
-                          int *     ishift,
-                          int *     mxiter,
-                          float *  v,
-                          int *     ldv,
-                          float *  h__,
-                          int *     ldh,
-                          float *  ritz,
-                          float *  bounds,
-                          float *  q,
-                          int *     ldq,
-                          float *  workl,
-                          int *     ipntr,
-                          float *  workd,
-                          int *     iwork,
-                          int *     info)
+static void F77_FUNC(ssaup2, SSAUP2)(int*        ido,
+                                     const char* bmat,
+                                     int*        n,
+                                     const char* which,
+                                     int*        nev,
+                                     int*        np,
+                                     float*      tol,
+                                     float*      resid,
+                                     int*        mode,
+                                     int gmx_unused* iupd,
+                                     int*            ishift,
+                                     int*            mxiter,
+                                     float*          v,
+                                     int*            ldv,
+                                     float*          h__,
+                                     int*            ldh,
+                                     float*          ritz,
+                                     float*          bounds,
+                                     float*          q,
+                                     int*            ldq,
+                                     float*          workl,
+                                     int*            ipntr,
+                                     float*          workd,
+                                     int*            iwork,
+                                     int*            info)
 {
-    float c_b3 = 2/3.;
+    float c_b3 = 2 / 3.;
     int   c__1 = 1;
     int   c__0 = 0;
 
-    int   h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2,
-          i__3;
+    int   h_dim1, h_offset, q_dim1, q_offset, v_dim1, v_offset, i__1, i__2, i__3;
     float d__2, d__3;
     int   j;
     float eps23;
@@ -4720,13 +4476,13 @@ F77_FUNC(ssaup2, SSAUP2) (int *     ido,
     --ritz;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     h_dim1   = *ldh;
     h_offset = 1 + h_dim1;
-    h__     -= h_offset;
+    h__ -= h_offset;
     q_dim1   = *ldq;
     q_offset = 1 + q_dim1;
-    q       -= q_offset;
+    q -= q_offset;
     --ipntr;
     --iwork;
     eps23 = GMX_FLOAT_EPS;
@@ -4766,9 +4522,9 @@ F77_FUNC(ssaup2, SSAUP2) (int *     ido,
 
     if (iwork[2] == 1)
     {
-        F77_FUNC(sgetv0, SGETV0) (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &
-                                  resid[1], &workd[*n * 3 + 1], &ipntr[1], &workd[1], &iwork[41],
-                                  info);
+        F77_FUNC(sgetv0, SGETV0)
+        (ido, bmat, &c__1, &iwork[3], n, &c__1, &v[v_offset], ldv, &resid[1], &workd[*n * 3 + 1],
+         &ipntr[1], &workd[1], &iwork[41], info);
 
         if (*ido != 99)
         {
@@ -4800,9 +4556,9 @@ F77_FUNC(ssaup2, SSAUP2) (int *     ido,
         goto L100;
     }
 
-    F77_FUNC(ssaitr, SSAITR) (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 +
-                                                                                      1], &v[v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1],
-                              &iwork[21], info);
+    F77_FUNC(ssaitr, SSAITR)
+    (ido, bmat, n, &c__0, &iwork[9], mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv,
+     &h__[h_offset], ldh, &ipntr[1], &workd[1], &iwork[21], info);
 
     if (*ido != 99)
     {
@@ -4827,9 +4583,9 @@ L1000:
 L20:
     iwork[4] = 1;
 
-    F77_FUNC(ssaitr, SSAITR) (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1], &v[
-                                  v_offset], ldv, &h__[h_offset], ldh, &ipntr[1], &workd[1], &iwork[
-                                  21], info);
+    F77_FUNC(ssaitr, SSAITR)
+    (ido, bmat, n, nev, np, mode, &resid[1], &workd[*n * 3 + 1], &v[v_offset], ldv, &h__[h_offset],
+     ldh, &ipntr[1], &workd[1], &iwork[21], info);
 
     if (*ido != 99)
     {
@@ -4846,8 +4602,8 @@ L20:
     }
     iwork[4] = 0;
 
-    F77_FUNC(sseigt, SSEIGT) (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &
-                              bounds[1], &workl[1], &ierr);
+    F77_FUNC(sseigt, SSEIGT)
+    (&workd[*n * 3 + 1], &iwork[7], &h__[h_offset], ldh, &ritz[1], &bounds[1], &workl[1], &ierr);
 
     if (ierr != 0)
     {
@@ -4855,15 +4611,15 @@ L20:
         goto L1200;
     }
 
-    F77_FUNC(scopy, SCOPY) (&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
-    F77_FUNC(scopy, SCOPY) (&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
+    F77_FUNC(scopy, SCOPY)(&iwork[7], &ritz[1], &c__1, &workl[iwork[7] + 1], &c__1);
+    F77_FUNC(scopy, SCOPY)(&iwork[7], &bounds[1], &c__1, &workl[(iwork[7] << 1) + 1], &c__1);
 
     *nev = iwork[9];
     *np  = iwork[10];
-    F77_FUNC(ssgets, SSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+    F77_FUNC(ssgets, SSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
 
-    F77_FUNC(scopy, SCOPY) (nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
-    F77_FUNC(ssconv, SSCONV) (nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
+    F77_FUNC(scopy, SCOPY)(nev, &bounds[*np + 1], &c__1, &workl[*np + 1], &c__1);
+    F77_FUNC(ssconv, SSCONV)(nev, &ritz[*np + 1], &workl[*np + 1], tol, &iwork[8]);
 
 
     nptemp = *np;
@@ -4884,23 +4640,20 @@ L20:
         {
 
             std::strncpy(wprime, "SA", 2);
-            F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
+            F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
             nevd2 = *nev / 2;
             nevm2 = *nev - nevd2;
             if (*nev > 1)
             {
                 i__1 = (nevd2 < *np) ? nevd2 : *np;
                 i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np + 1;
-                F77_FUNC(sswap, SSWAP) (&i__1, &ritz[nevm2 + 1], &c__1,
-                                        &ritz[((i__2 > i__3) ? i__2 : i__3)],
-                                        &c__1);
+                F77_FUNC(sswap, SSWAP)
+                (&i__1, &ritz[nevm2 + 1], &c__1, &ritz[((i__2 > i__3) ? i__2 : i__3)], &c__1);
                 i__1 = (nevd2 < *np) ? nevd2 : *np;
                 i__2 = iwork[7] - nevd2 + 1, i__3 = iwork[7] - *np;
-                F77_FUNC(sswap, SSWAP) (&i__1, &bounds[nevm2 + 1], &c__1,
-                                        &bounds[((i__2 > i__3) ? i__2 : i__3) + 1],
-                                        &c__1);
+                F77_FUNC(sswap, SSWAP)
+                (&i__1, &bounds[nevm2 + 1], &c__1, &bounds[((i__2 > i__3) ? i__2 : i__3) + 1], &c__1);
             }
-
         }
         else
         {
@@ -4922,28 +4675,27 @@ L20:
                 std::strncpy(wprime, "LA", 2);
             }
 
-            F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
-
+            F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[7], &ritz[1], &bounds[1]);
         }
 
         i__1 = iwork[9];
         for (j = 1; j <= i__1; ++j)
         {
-            d__2       = eps23;
-            d__3       = std::abs(ritz[j]);
-            temp       = (d__2 > d__3) ? d__2 : d__3;
+            d__2 = eps23;
+            d__3 = std::abs(ritz[j]);
+            temp = (d__2 > d__3) ? d__2 : d__3;
             bounds[j] /= temp;
         }
 
         std::strncpy(wprime, "LA", 2);
-        F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
+        F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[9], &bounds[1], &ritz[1]);
 
         i__1 = iwork[9];
         for (j = 1; j <= i__1; ++j)
         {
-            d__2       = eps23;
-            d__3       = std::abs(ritz[j]);
-            temp       = (d__2 > d__3) ? d__2 : d__3;
+            d__2 = eps23;
+            d__3 = std::abs(ritz[j]);
+            temp = (d__2 > d__3) ? d__2 : d__3;
             bounds[j] *= temp;
         }
 
@@ -4951,13 +4703,11 @@ L20:
         {
 
             std::strncpy(wprime, "LA", 2);
-            F77_FUNC(ssortr, SSORTR) (wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+            F77_FUNC(ssortr, SSORTR)(wprime, &c__1, &iwork[8], &ritz[1], &bounds[1]);
         }
         else
         {
-            F77_FUNC(ssortr, SSORTR) (which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
-
+            F77_FUNC(ssortr, SSORTR)(which, &c__1, &iwork[8], &ritz[1], &bounds[1]);
         }
 
         h__[h_dim1 + 1] = workd[*n * 3 + 1];
@@ -4974,13 +4724,12 @@ L20:
 
         *np = iwork[8];
         goto L1100;
-
     }
     else if (iwork[8] < *nev && *ishift == 1)
     {
         nevbef = *nev;
-        i__1   = iwork[8], i__2 = *np / 2;
-        *nev  += (i__1 < i__2) ? i__1 : i__2;
+        i__1 = iwork[8], i__2 = *np / 2;
+        *nev += (i__1 < i__2) ? i__1 : i__2;
         if (*nev == 1 && iwork[7] >= 6)
         {
             *nev = iwork[7] / 2;
@@ -4994,9 +4743,8 @@ L20:
 
         if (nevbef < *nev)
         {
-            F77_FUNC(ssgets, SSGETS) (ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
+            F77_FUNC(ssgets, SSGETS)(ishift, which, nev, np, &ritz[1], &bounds[1], &workl[1]);
         }
-
     }
 
 
@@ -5014,16 +4762,17 @@ L50:
 
     if (*ishift == 0)
     {
-        F77_FUNC(scopy, SCOPY) (np, &workl[1], &c__1, &ritz[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(np, &workl[1], &c__1, &ritz[1], &c__1);
     }
 
-    F77_FUNC(ssapps, SSAPPS) (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &
-                              resid[1], &q[q_offset], ldq, &workd[1]);
+    F77_FUNC(ssapps, SSAPPS)
+    (n, nev, np, &ritz[1], &v[v_offset], ldv, &h__[h_offset], ldh, &resid[1], &q[q_offset], ldq,
+     &workd[1]);
 
     iwork[1] = 1;
     if (*bmat == 'G')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[*n + 1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[*n + 1], &c__1);
         ipntr[1] = *n + 1;
         ipntr[2] = 1;
         *ido     = 2;
@@ -5032,19 +4781,19 @@ L50:
     }
     else if (*bmat == 'I')
     {
-        F77_FUNC(scopy, SCOPY) (n, &resid[1], &c__1, &workd[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(n, &resid[1], &c__1, &workd[1], &c__1);
     }
 
 L100:
 
     if (*bmat == 'G')
     {
-        workd[*n * 3 + 1] = F77_FUNC(sdot, SDOT) (n, &resid[1], &c__1, &workd[1], &c__1);
+        workd[*n * 3 + 1] = F77_FUNC(sdot, SDOT)(n, &resid[1], &c__1, &workd[1], &c__1);
         workd[*n * 3 + 1] = std::sqrt(std::abs(workd[*n * 3 + 1]));
     }
     else if (*bmat == 'I')
     {
-        workd[*n * 3 + 1] = F77_FUNC(snrm2, SNRM2) (n, &resid[1], &c__1);
+        workd[*n * 3 + 1] = F77_FUNC(snrm2, SNRM2)(n, &resid[1], &c__1);
     }
     iwork[1] = 0;
 
@@ -5060,29 +4809,26 @@ L1200:
 
 L9000:
     return;
-
 }
 
 
-
-void
-F77_FUNC(ssaupd, SSAUPD) (int *     ido,
-                          const char *    bmat,
-                          int *     n,
-                          const char *      which,
-                          int *     nev,
-                          float *  tol,
-                          float *  resid,
-                          int *     ncv,
-                          float *  v,
-                          int *     ldv,
-                          int *     iparam,
-                          int *     ipntr,
-                          float *  workd,
-                          int *     iwork,
-                          float *  workl,
-                          int *     lworkl,
-                          int *     info)
+void F77_FUNC(ssaupd, SSAUPD)(int*        ido,
+                              const char* bmat,
+                              int*        n,
+                              const char* which,
+                              int*        nev,
+                              float*      tol,
+                              float*      resid,
+                              int*        ncv,
+                              float*      v,
+                              int*        ldv,
+                              int*        iparam,
+                              int*        ipntr,
+                              float*      workd,
+                              int*        iwork,
+                              float*      workl,
+                              int*        lworkl,
+                              int*        info)
 {
     int v_dim1, v_offset, i__1, i__2;
     int j;
@@ -5091,7 +4837,7 @@ F77_FUNC(ssaupd, SSAUPD) (int *     ido,
     --resid;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     --iparam;
     --ipntr;
     --iwork;
@@ -5130,9 +4876,8 @@ F77_FUNC(ssaupd, SSAUPD) (int *     ido,
         {
             iwork[2] = -4;
         }
-        if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
-            std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
-            std::strncmp(which, "BE", 2))
+        if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+            && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
         {
             iwork[2] = -5;
         }
@@ -5205,11 +4950,10 @@ F77_FUNC(ssaupd, SSAUPD) (int *     ido,
         ipntr[11] = iwork[7];
     }
 
-    F77_FUNC(ssaup2, SSAUP2) (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &
-                              iwork[11], &iwork[6], &iwork[5], &iwork[10], &v[v_offset], ldv, &
-                              workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]], &
-                              workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1],
-                              &iwork[21], info);
+    F77_FUNC(ssaup2, SSAUP2)
+    (ido, bmat, n, which, &iwork[13], &iwork[15], tol, &resid[1], &iwork[11], &iwork[6], &iwork[5],
+     &iwork[10], &v[v_offset], ldv, &workl[iwork[3]], &iwork[8], &workl[iwork[16]], &workl[iwork[1]],
+     &workl[iwork[4]], &iwork[9], &workl[iwork[7]], &ipntr[1], &workd[1], &iwork[21], info);
 
     if (*ido == 3)
     {
@@ -5235,36 +4979,33 @@ F77_FUNC(ssaupd, SSAUPD) (int *     ido,
 L9000:
 
     return;
-
 }
 
 
-
-void
-F77_FUNC(sseupd, SSEUPD) (int *     rvec,
-                          const char *    howmny,
-                          int *     select,
-                          float *  d__,
-                          float *  z__,
-                          int *     ldz,
-                          float *  sigma,
-                          const char *    bmat,
-                          int *     n,
-                          const char *    which,
-                          int *     nev,
-                          float *  tol,
-                          float *  resid,
-                          int *     ncv,
-                          float *  v,
-                          int *     ldv,
-                          int *     iparam,
-                          int *     ipntr,
-                          float *  workd,
-                          float *  workl,
-                          int *     lworkl,
-                          int *     info)
+void F77_FUNC(sseupd, SSEUPD)(int*        rvec,
+                              const char* howmny,
+                              int*        select,
+                              float*      d__,
+                              float*      z__,
+                              int*        ldz,
+                              float*      sigma,
+                              const char* bmat,
+                              int*        n,
+                              const char* which,
+                              int*        nev,
+                              float*      tol,
+                              float*      resid,
+                              int*        ncv,
+                              float*      v,
+                              int*        ldv,
+                              int*        iparam,
+                              int*        ipntr,
+                              float*      workd,
+                              float*      workl,
+                              int*        lworkl,
+                              int*        info)
 {
-    float c_b21  = 2/3.;
+    float c_b21  = 2 / 3.;
     int   c__1   = 1;
     float c_b102 = 1.;
     int   v_dim1, v_offset, z_dim1, z_offset, i__1;
@@ -5293,12 +5034,12 @@ F77_FUNC(sseupd, SSEUPD) (int *     rvec,
     --resid;
     z_dim1   = *ldz;
     z_offset = 1 + z_dim1;
-    z__     -= z_offset;
+    z__ -= z_offset;
     --d__;
     --select;
     v_dim1   = *ldv;
     v_offset = 1 + v_dim1;
-    v       -= v_offset;
+    v -= v_offset;
     --iparam;
     --ipntr;
     --workl;
@@ -5329,9 +5070,8 @@ F77_FUNC(sseupd, SSEUPD) (int *     rvec,
     {
         ierr = -3;
     }
-    if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) &&
-        std::strncmp(which, "LA", 2) && std::strncmp(which, "SA", 2) &&
-        std::strncmp(which, "BE", 2))
+    if (std::strncmp(which, "LM", 2) && std::strncmp(which, "SM", 2) && std::strncmp(which, "LA", 2)
+        && std::strncmp(which, "SA", 2) && std::strncmp(which, "BE", 2))
     {
         ierr = -5;
     }
@@ -5339,8 +5079,7 @@ F77_FUNC(sseupd, SSEUPD) (int *     rvec,
     {
         ierr = -6;
     }
-    if (*howmny != 'A' && *howmny != 'P' &&
-        *howmny != 'S' && *rvec)
+    if (*howmny != 'A' && *howmny != 'P' && *howmny != 'S' && *rvec)
     {
         ierr = -15;
     }
@@ -5418,28 +5157,24 @@ F77_FUNC(sseupd, SSEUPD) (int *     rvec,
     }
     else if (*bmat == 'G')
     {
-        bnorm2 = F77_FUNC(snrm2, SNRM2) (n, &workd[1], &c__1);
+        bnorm2 = F77_FUNC(snrm2, SNRM2)(n, &workd[1], &c__1);
     }
 
     if (*rvec)
     {
 
-        if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2) ||
-            !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
-        {
-
-        }
+        if (!std::strncmp(which, "LM", 2) || !std::strncmp(which, "SM", 2)
+            || !std::strncmp(which, "LA", 2) || !std::strncmp(which, "SA", 2))
+        {}
         else if (!std::strncmp(which, "BE", 2))
         {
 
 
-            ism    = (*nev > nconv) ? *nev : nconv;
-            ism   /= 2;
+            ism = (*nev > nconv) ? *nev : nconv;
+            ism /= 2;
             ilg    = ism + 1;
             thres1 = workl[ism];
             thres2 = workl[ilg];
-
-
         }
 
         reord  = 0;
@@ -5524,11 +5259,11 @@ F77_FUNC(sseupd, SSEUPD) (int *     rvec,
         }
 
         i__1 = *ncv - 1;
-        F77_FUNC(scopy, SCOPY) (&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
-        F77_FUNC(scopy, SCOPY) (ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
+        F77_FUNC(scopy, SCOPY)(&i__1, &workl[ih + 1], &c__1, &workl[ihb], &c__1);
+        F77_FUNC(scopy, SCOPY)(ncv, &workl[ih + ldh], &c__1, &workl[ihd], &c__1);
 
-        F77_FUNC(ssteqr, SSTEQR) ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &
-                                  workl[iw], &ierr);
+        F77_FUNC(ssteqr, SSTEQR)
+        ("Identity", ncv, &workl[ihd], &workl[ihb], &workl[iq], &ldq, &workl[iw], &ierr);
 
         if (ierr != 0)
         {
@@ -5548,18 +5283,16 @@ F77_FUNC(sseupd, SSEUPD) (int *     rvec,
                 goto L30;
             }
 
-L20:
+        L20:
             if (select[leftptr])
             {
 
                 ++leftptr;
-
             }
             else if (!select[rghtptr])
             {
 
                 --rghtptr;
-
             }
             else
             {
@@ -5567,15 +5300,14 @@ L20:
                 temp                     = workl[ihd + leftptr - 1];
                 workl[ihd + leftptr - 1] = workl[ihd + rghtptr - 1];
                 workl[ihd + rghtptr - 1] = temp;
-                F77_FUNC(scopy, SCOPY) (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[
-                                            iw], &c__1);
-                F77_FUNC(scopy, SCOPY) (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[
-                                            iq + *ncv * (leftptr - 1)], &c__1);
-                F77_FUNC(scopy, SCOPY) (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr -
-                                                                                    1)], &c__1);
+                F77_FUNC(scopy, SCOPY)
+                (ncv, &workl[iq + *ncv * (leftptr - 1)], &c__1, &workl[iw], &c__1);
+                F77_FUNC(scopy, SCOPY)
+                (ncv, &workl[iq + *ncv * (rghtptr - 1)], &c__1, &workl[iq + *ncv * (leftptr - 1)], &c__1);
+                F77_FUNC(scopy, SCOPY)
+                (ncv, &workl[iw], &c__1, &workl[iq + *ncv * (rghtptr - 1)], &c__1);
                 ++leftptr;
                 --rghtptr;
-
             }
 
             if (leftptr < rghtptr)
@@ -5583,37 +5315,33 @@ L20:
                 goto L20;
             }
 
-L30:
-            ;
+        L30:;
         }
 
-        F77_FUNC(scopy, SCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
-
+        F77_FUNC(scopy, SCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
     }
     else
     {
 
-        F77_FUNC(scopy, SCOPY) (&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
-        F77_FUNC(scopy, SCOPY) (ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
-
+        F77_FUNC(scopy, SCOPY)(&nconv, &workl[ritz], &c__1, &d__[1], &c__1);
+        F77_FUNC(scopy, SCOPY)(ncv, &workl[ritz], &c__1, &workl[ihd], &c__1);
     }
     if (!std::strncmp(type__, "REGULR", 6))
     {
 
         if (*rvec)
         {
-            F77_FUNC(ssesrt, SSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+            F77_FUNC(ssesrt, SSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
         }
         else
         {
-            F77_FUNC(scopy, SCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+            F77_FUNC(scopy, SCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
         }
-
     }
     else
     {
 
-        F77_FUNC(scopy, SCOPY) (ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
+        F77_FUNC(scopy, SCOPY)(ncv, &workl[ihd], &c__1, &workl[iw], &c__1);
         if (!std::strncmp(type__, "SHIFTI", 6))
         {
             i__1 = *ncv;
@@ -5627,8 +5355,7 @@ L30:
             i__1 = *ncv;
             for (k = 1; k <= i__1; ++k)
             {
-                workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd
-                                                                          + k - 1] - 1.);
+                workl[ihd + k - 1] = *sigma * workl[ihd + k - 1] / (workl[ihd + k - 1] - 1.);
             }
         }
         else if (!std::strncmp(type__, "CAYLEY", 6))
@@ -5636,36 +5363,35 @@ L30:
             i__1 = *ncv;
             for (k = 1; k <= i__1; ++k)
             {
-                workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (
-                        workl[ihd + k - 1] - 1.);
+                workl[ihd + k - 1] = *sigma * (workl[ihd + k - 1] + 1.) / (workl[ihd + k - 1] - 1.);
             }
         }
 
-        F77_FUNC(scopy, SCOPY) (&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
-        F77_FUNC(ssortr, SSORTR) ("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
+        F77_FUNC(scopy, SCOPY)(&nconv, &workl[ihd], &c__1, &d__[1], &c__1);
+        F77_FUNC(ssortr, SSORTR)("LA", &c__1, &nconv, &workl[ihd], &workl[iw]);
         if (*rvec)
         {
-            F77_FUNC(ssesrt, SSESRT) ("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
+            F77_FUNC(ssesrt, SSESRT)("LA", rvec, &nconv, &d__[1], ncv, &workl[iq], &ldq);
         }
         else
         {
-            F77_FUNC(scopy, SCOPY) (ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
+            F77_FUNC(scopy, SCOPY)(ncv, &workl[bounds], &c__1, &workl[ihb], &c__1);
             d__1 = bnorm2 / rnorm;
-            F77_FUNC(sscal, SSCAL) (ncv, &d__1, &workl[ihb], &c__1);
-            F77_FUNC(ssortr, SSORTR) ("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
+            F77_FUNC(sscal, SSCAL)(ncv, &d__1, &workl[ihb], &c__1);
+            F77_FUNC(ssortr, SSORTR)("LA", &c__1, &nconv, &d__[1], &workl[ihb]);
         }
-
     }
 
     if (*rvec && *howmny == 'A')
     {
 
-        F77_FUNC(sgeqr2, SGEQR2) (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
-                                  &ierr);
+        F77_FUNC(sgeqr2, SGEQR2)
+        (ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb], &ierr);
 
-        F77_FUNC(sorm2r, SORM2R) ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &
-                                  workl[iw + *ncv], &v[v_offset], ldv, &workd[*n + 1], &ierr);
-        F77_FUNC(slacpy, SLACPY) ("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
+        F77_FUNC(sorm2r, SORM2R)
+        ("Right", "Notranspose", n, ncv, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &v[v_offset],
+         ldv, &workd[*n + 1], &ierr);
+        F77_FUNC(slacpy, SLACPY)("All", n, &nconv, &v[v_offset], ldv, &z__[z_offset], ldz);
 
         i__1 = *ncv - 1;
         for (j = 1; j <= i__1; ++j)
@@ -5673,13 +5399,12 @@ L30:
             workl[ihb + j - 1] = 0.;
         }
         workl[ihb + *ncv - 1] = 1.;
-        F77_FUNC(sorm2r, SORM2R) ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &
-                                  workl[iw + *ncv], &workl[ihb], ncv, &temp, &ierr);
-
+        F77_FUNC(sorm2r, SORM2R)
+        ("Left", "Transpose", ncv, &c__1, &nconv, &workl[iq], &ldq, &workl[iw + *ncv], &workl[ihb],
+         ncv, &temp, &ierr);
     }
     else if (*rvec && *howmny == 'S')
     {
-
     }
 
     if (!std::strncmp(type__, "REGULR", 6) && *rvec)
@@ -5690,12 +5415,11 @@ L30:
         {
             workl[ihb + j - 1] = rnorm * std::abs(workl[ihb + j - 1]);
         }
-
     }
     else if (std::strncmp(type__, "REGULR", 6) && *rvec)
     {
 
-        F77_FUNC(sscal, SSCAL) (ncv, &bnorm2, &workl[ihb], &c__1);
+        F77_FUNC(sscal, SSCAL)(ncv, &bnorm2, &workl[ihb], &c__1);
         if (!std::strncmp(type__, "SHIFTI", 6))
         {
 
@@ -5703,9 +5427,8 @@ L30:
             for (k = 1; k <= i__1; ++k)
             {
                 d__2               = workl[iw + k - 1];
-                workl[ihb + k - 1] = std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+                workl[ihb + k - 1] = std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
             }
-
         }
         else if (!std::strncmp(type__, "BUCKLE", 6))
         {
@@ -5714,9 +5437,8 @@ L30:
             for (k = 1; k <= i__1; ++k)
             {
                 d__2               = workl[iw + k - 1] - 1.;
-                workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1])/(d__2 * d__2);
+                workl[ihb + k - 1] = *sigma * std::abs(workl[ihb + k - 1]) / (d__2 * d__2);
             }
-
         }
         else if (!std::strncmp(type__, "CAYLEY", 6))
         {
@@ -5724,12 +5446,10 @@ L30:
             i__1 = *ncv;
             for (k = 1; k <= i__1; ++k)
             {
-                workl[ihb + k - 1] = std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
-
+                workl[ihb + k - 1] =
+                        std::abs(workl[ihb + k - 1] / workl[iw + k - 1] * (workl[iw + k - 1] - 1.));
             }
-
         }
-
     }
 
     if (*rvec && (!std::strncmp(type__, "SHIFTI", 6) || !std::strncmp(type__, "CAYLEY", 6)))
@@ -5740,7 +5460,6 @@ L30:
         {
             workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / workl[iw + k];
         }
-
     }
     else if (*rvec && !std::strncmp(type__, "BUCKLE", 6))
     {
@@ -5748,20 +5467,19 @@ L30:
         i__1 = nconv - 1;
         for (k = 0; k <= i__1; ++k)
         {
-            workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] -
-                                                              1.);
+            workl[iw + k] = workl[iq + k * ldq + *ncv - 1] / (workl[iw + k] - 1.);
         }
-
     }
 
     if (std::strncmp(type__, "REGULR", 6))
     {
-        F77_FUNC(sger, SGER) (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[
-                                  z_offset], ldz);
+        F77_FUNC(sger, SGER)
+        (n, &nconv, &c_b102, &resid[1], &c__1, &workl[iw], &c__1, &z__[z_offset], ldz);
     }
 
 L9000:
 
     return;
-
 }
+
+#endif