kusano 2b45e8
#include "common.h"
kusano 2b45e8
#ifdef FUNCTION_PROFILE
kusano 2b45e8
#include "functable.h"
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
#ifndef CBLAS
kusano 2b45e8
kusano 2b45e8
void NAME(blasint *N, FLOAT *dx, blasint *INCX, FLOAT *dy, blasint *INCY, FLOAT *dparam){
kusano 2b45e8
kusano 2b45e8
  blasint n = *N;
kusano 2b45e8
  blasint incx = *INCX;
kusano 2b45e8
  blasint incy = *INCY;
kusano 2b45e8
kusano 2b45e8
#else
kusano 2b45e8
kusano 2b45e8
void CNAME(blasint n, FLOAT *dx, blasint incx, FLOAT *dy, blasint incy, FLOAT *dparam){
kusano 2b45e8
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
  blasint i__1, i__2;
kusano 2b45e8
  
kusano 2b45e8
  blasint i__;
kusano 2b45e8
  FLOAT w, z__;
kusano 2b45e8
  blasint kx, ky;
kusano 2b45e8
  FLOAT dh11, dh12, dh22, dh21, dflag;
kusano 2b45e8
  blasint nsteps;
kusano 2b45e8
  
kusano 2b45e8
#ifndef CBLAS
kusano 2b45e8
  PRINT_DEBUG_CNAME;
kusano 2b45e8
#else
kusano 2b45e8
  PRINT_DEBUG_CNAME;
kusano 2b45e8
#endif
kusano 2b45e8
kusano 2b45e8
  --dparam;
kusano 2b45e8
  --dy;
kusano 2b45e8
  --dx;
kusano 2b45e8
  
kusano 2b45e8
  dflag = dparam[1];
kusano 2b45e8
    if (n <= 0 || dflag == - 2.0) goto L140;
kusano 2b45e8
kusano 2b45e8
    if (! (incx == incy && incx > 0)) goto L70;
kusano 2b45e8
kusano 2b45e8
    nsteps = n * incx;
kusano 2b45e8
    if (dflag < 0.) {
kusano 2b45e8
	goto L50;
kusano 2b45e8
    } else if (dflag == 0) {
kusano 2b45e8
	goto L10;
kusano 2b45e8
    } else {
kusano 2b45e8
	goto L30;
kusano 2b45e8
    }
kusano 2b45e8
L10:
kusano 2b45e8
    dh12 = dparam[4];
kusano 2b45e8
    dh21 = dparam[3];
kusano 2b45e8
    i__1 = nsteps;
kusano 2b45e8
    i__2 = incx;
kusano 2b45e8
    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
kusano 2b45e8
	w = dx[i__];
kusano 2b45e8
	z__ = dy[i__];
kusano 2b45e8
	dx[i__] = w + z__ * dh12;
kusano 2b45e8
	dy[i__] = w * dh21 + z__;
kusano 2b45e8
/* L20: */
kusano 2b45e8
    }
kusano 2b45e8
    goto L140;
kusano 2b45e8
L30:
kusano 2b45e8
    dh11 = dparam[2];
kusano 2b45e8
    dh22 = dparam[5];
kusano 2b45e8
    i__2 = nsteps;
kusano 2b45e8
    i__1 = incx;
kusano 2b45e8
    for (i__ = 1; i__1 < 0 ? i__ >= i__2 : i__ <= i__2; i__ += i__1) {
kusano 2b45e8
	w = dx[i__];
kusano 2b45e8
	z__ = dy[i__];
kusano 2b45e8
	dx[i__] = w * dh11 + z__;
kusano 2b45e8
	dy[i__] = -w + dh22 * z__;
kusano 2b45e8
/* L40: */
kusano 2b45e8
    }
kusano 2b45e8
    goto L140;
kusano 2b45e8
L50:
kusano 2b45e8
    dh11 = dparam[2];
kusano 2b45e8
    dh12 = dparam[4];
kusano 2b45e8
    dh21 = dparam[3];
kusano 2b45e8
    dh22 = dparam[5];
kusano 2b45e8
    i__1 = nsteps;
kusano 2b45e8
    i__2 = incx;
kusano 2b45e8
    for (i__ = 1; i__2 < 0 ? i__ >= i__1 : i__ <= i__1; i__ += i__2) {
kusano 2b45e8
	w = dx[i__];
kusano 2b45e8
	z__ = dy[i__];
kusano 2b45e8
	dx[i__] = w * dh11 + z__ * dh12;
kusano 2b45e8
	dy[i__] = w * dh21 + z__ * dh22;
kusano 2b45e8
/* L60: */
kusano 2b45e8
    }
kusano 2b45e8
    goto L140;
kusano 2b45e8
L70:
kusano 2b45e8
    kx = 1;
kusano 2b45e8
    ky = 1;
kusano 2b45e8
    if (incx < 0) {
kusano 2b45e8
	kx = (1 - n) * incx + 1;
kusano 2b45e8
    }
kusano 2b45e8
    if (incy < 0) {
kusano 2b45e8
	ky = (1 - n) * incy + 1;
kusano 2b45e8
    }
kusano 2b45e8
kusano 2b45e8
    if (dflag < 0.) {
kusano 2b45e8
	goto L120;
kusano 2b45e8
    } else if (dflag == 0) {
kusano 2b45e8
	goto L80;
kusano 2b45e8
    } else {
kusano 2b45e8
	goto L100;
kusano 2b45e8
    }
kusano 2b45e8
L80:
kusano 2b45e8
    dh12 = dparam[4];
kusano 2b45e8
    dh21 = dparam[3];
kusano 2b45e8
    i__2 = n;
kusano 2b45e8
    for (i__ = 1; i__ <= i__2; ++i__) {
kusano 2b45e8
	w = dx[kx];
kusano 2b45e8
	z__ = dy[ky];
kusano 2b45e8
	dx[kx] = w + z__ * dh12;
kusano 2b45e8
	dy[ky] = w * dh21 + z__;
kusano 2b45e8
	kx += incx;
kusano 2b45e8
	ky += incy;
kusano 2b45e8
/* L90: */
kusano 2b45e8
    }
kusano 2b45e8
    goto L140;
kusano 2b45e8
L100:
kusano 2b45e8
    dh11 = dparam[2];
kusano 2b45e8
    dh22 = dparam[5];
kusano 2b45e8
    i__2 = n;
kusano 2b45e8
    for (i__ = 1; i__ <= i__2; ++i__) {
kusano 2b45e8
	w = dx[kx];
kusano 2b45e8
	z__ = dy[ky];
kusano 2b45e8
	dx[kx] = w * dh11 + z__;
kusano 2b45e8
	dy[ky] = -w + dh22 * z__;
kusano 2b45e8
	kx += incx;
kusano 2b45e8
	ky += incy;
kusano 2b45e8
/* L110: */
kusano 2b45e8
    }
kusano 2b45e8
    goto L140;
kusano 2b45e8
L120:
kusano 2b45e8
    dh11 = dparam[2];
kusano 2b45e8
    dh12 = dparam[4];
kusano 2b45e8
    dh21 = dparam[3];
kusano 2b45e8
    dh22 = dparam[5];
kusano 2b45e8
    i__2 = n;
kusano 2b45e8
    for (i__ = 1; i__ <= i__2; ++i__) {
kusano 2b45e8
	w = dx[kx];
kusano 2b45e8
	z__ = dy[ky];
kusano 2b45e8
	dx[kx] = w * dh11 + z__ * dh12;
kusano 2b45e8
	dy[ky] = w * dh21 + z__ * dh22;
kusano 2b45e8
	kx += incx;
kusano 2b45e8
	ky += incy;
kusano 2b45e8
/* L130: */
kusano 2b45e8
    }
kusano 2b45e8
L140:
kusano 2b45e8
    return;
kusano 2b45e8
}
kusano 2b45e8