1acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* ctbmv.f -- translated by f2c (version 20100827).
2acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray   You must link the resulting object file with libf2c:
3acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	on Microsoft Windows system, link with libf2c.lib;
4acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	on Linux or Unix systems, link with .../path/to/libf2c.a -lm
5acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	or, if you install libf2c.a in a standard place, with -lf2c -lm
6acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	-- in that order, at the end of the command line, as in
7acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		cc *.o -lf2c -lm
8acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	Source for libf2c is in /netlib/f2c/libf2c.zip, e.g.,
9acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
10acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		http://www.netlib.org/f2c/libf2c.zip
11acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray*/
12acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
13acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray#include "datatypes.h"
14acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
15acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Subroutine */ int ctbmv_(char *uplo, char *trans, char *diag, integer *n,
16acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	integer *k, complex *a, integer *lda, complex *x, integer *incx,
17acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	ftnlen uplo_len, ftnlen trans_len, ftnlen diag_len)
18acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray{
19acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    /* System generated locals */
20acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    integer a_dim1, a_offset, i__1, i__2, i__3, i__4, i__5;
21acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    complex q__1, q__2, q__3;
22acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
23acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    /* Builtin functions */
24acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    void r_cnjg(complex *, complex *);
25acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
26acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    /* Local variables */
27acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    integer i__, j, l, ix, jx, kx, info;
28acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    complex temp;
29acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    extern logical lsame_(char *, char *, ftnlen, ftnlen);
30acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    integer kplus1;
31acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    extern /* Subroutine */ int xerbla_(char *, integer *, ftnlen);
32acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    logical noconj, nounit;
33acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
34acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. Scalar Arguments .. */
35acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
36acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. Array Arguments .. */
37acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
38acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
39acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  Purpose */
40acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  ======= */
41acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
42acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  CTBMV  performs one of the matrix-vector operations */
43acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
44acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     x := A*x,   or   x := A'*x,   or   x := conjg( A' )*x, */
45acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
46acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  where x is an n element vector and  A is an n by n unit, or non-unit, */
47acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  upper or lower triangular band matrix, with ( k + 1 ) diagonals. */
48acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
49acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  Arguments */
50acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  ========== */
51acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
52acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  UPLO   - CHARACTER*1. */
53acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry, UPLO specifies whether the matrix is an upper or */
54acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           lower triangular matrix as follows: */
55acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
56acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              UPLO = 'U' or 'u'   A is an upper triangular matrix. */
57acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
58acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              UPLO = 'L' or 'l'   A is a lower triangular matrix. */
59acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
60acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
61acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
62acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  TRANS  - CHARACTER*1. */
63acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry, TRANS specifies the operation to be performed as */
64acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           follows: */
65acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
66acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              TRANS = 'N' or 'n'   x := A*x. */
67acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
68acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              TRANS = 'T' or 't'   x := A'*x. */
69acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
70acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              TRANS = 'C' or 'c'   x := conjg( A' )*x. */
71acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
72acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
73acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
74acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  DIAG   - CHARACTER*1. */
75acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry, DIAG specifies whether or not A is unit */
76acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           triangular as follows: */
77acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
78acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              DIAG = 'U' or 'u'   A is assumed to be unit triangular. */
79acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
80acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              DIAG = 'N' or 'n'   A is not assumed to be unit */
81acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                                  triangular. */
82acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
83acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
84acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
85acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  N      - INTEGER. */
86acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry, N specifies the order of the matrix A. */
87acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           N must be at least zero. */
88acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
89acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
90acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  K      - INTEGER. */
91acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry with UPLO = 'U' or 'u', K specifies the number of */
92acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           super-diagonals of the matrix A. */
93acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry with UPLO = 'L' or 'l', K specifies the number of */
94acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           sub-diagonals of the matrix A. */
95acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           K must satisfy  0 .le. K. */
96acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
97acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
98acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  A      - COMPLEX          array of DIMENSION ( LDA, n ). */
99acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) */
100acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           by n part of the array A must contain the upper triangular */
101acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           band part of the matrix of coefficients, supplied column by */
102acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           column, with the leading diagonal of the matrix in row */
103acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           ( k + 1 ) of the array, the first super-diagonal starting at */
104acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           position 2 in row k, and so on. The top left k by k triangle */
105acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           of the array A is not referenced. */
106acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           The following program segment will transfer an upper */
107acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           triangular band matrix from conventional full matrix storage */
108acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           to band storage: */
109acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
110acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                 DO 20, J = 1, N */
111acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                    M = K + 1 - J */
112acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                    DO 10, I = MAX( 1, J - K ), J */
113acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                       A( M + I, J ) = matrix( I, J ) */
114acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              10    CONTINUE */
115acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              20 CONTINUE */
116acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
117acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) */
118acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           by n part of the array A must contain the lower triangular */
119acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           band part of the matrix of coefficients, supplied column by */
120acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           column, with the leading diagonal of the matrix in row 1 of */
121acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           the array, the first sub-diagonal starting at position 1 in */
122acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           row 2, and so on. The bottom right k by k triangle of the */
123acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           array A is not referenced. */
124acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           The following program segment will transfer a lower */
125acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           triangular band matrix from conventional full matrix storage */
126acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           to band storage: */
127acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
128acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                 DO 20, J = 1, N */
129acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                    M = 1 - J */
130acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                    DO 10, I = J, MIN( N, J + K ) */
131acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*                       A( M + I, J ) = matrix( I, J ) */
132acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              10    CONTINUE */
133acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*              20 CONTINUE */
134acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
135acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Note that when DIAG = 'U' or 'u' the elements of the array A */
136acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           corresponding to the diagonal elements of the matrix are not */
137acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           referenced, but are assumed to be unity. */
138acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
139acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
140acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  LDA    - INTEGER. */
141acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry, LDA specifies the first dimension of A as declared */
142acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           in the calling (sub) program. LDA must be at least */
143acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           ( k + 1 ). */
144acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
145acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
146acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  X      - COMPLEX          array of dimension at least */
147acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           ( 1 + ( n - 1 )*abs( INCX ) ). */
148acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Before entry, the incremented array X must contain the n */
149acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           element vector x. On exit, X is overwritten with the */
150acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           tranformed vector x. */
151acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
152acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  INCX   - INTEGER. */
153acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           On entry, INCX specifies the increment for the elements of */
154acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           X. INCX must not be zero. */
155acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*           Unchanged on exit. */
156acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
157acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  Further Details */
158acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  =============== */
159acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
160acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  Level 2 Blas routine. */
161acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
162acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  -- Written on 22-October-1986. */
163acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Jack Dongarra, Argonne National Lab. */
164acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Jeremy Du Croz, Nag Central Office. */
165acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Sven Hammarling, Nag Central Office. */
166acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Richard Hanson, Sandia National Labs. */
167acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
168acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*  ===================================================================== */
169acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
170acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. Parameters .. */
171acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
172acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. Local Scalars .. */
173acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
174acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. External Functions .. */
175acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
176acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. External Subroutines .. */
177acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
178acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. Intrinsic Functions .. */
179acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     .. */
180acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
181acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Test the input parameters. */
182acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
183acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    /* Parameter adjustments */
184acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    a_dim1 = *lda;
185acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    a_offset = 1 + a_dim1;
186acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    a -= a_offset;
187acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    --x;
188acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
189acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    /* Function Body */
190acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    info = 0;
191acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    if (! lsame_(uplo, "U", (ftnlen)1, (ftnlen)1) && ! lsame_(uplo, "L", (
192acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    ftnlen)1, (ftnlen)1)) {
193acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 1;
194acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (! lsame_(trans, "N", (ftnlen)1, (ftnlen)1) && ! lsame_(trans,
195acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    "T", (ftnlen)1, (ftnlen)1) && ! lsame_(trans, "C", (ftnlen)1, (
196acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    ftnlen)1)) {
197acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 2;
198acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (! lsame_(diag, "U", (ftnlen)1, (ftnlen)1) && ! lsame_(diag,
199acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    "N", (ftnlen)1, (ftnlen)1)) {
200acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 3;
201acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (*n < 0) {
202acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 4;
203acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (*k < 0) {
204acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 5;
205acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (*lda < *k + 1) {
206acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 7;
207acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (*incx == 0) {
208acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	info = 9;
209acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    }
210acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    if (info != 0) {
211acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	xerbla_("CTBMV ", &info, (ftnlen)6);
212acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	return 0;
213acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    }
214acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
215acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Quick return if possible. */
216acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
217acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    if (*n == 0) {
218acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	return 0;
219acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    }
220acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
221acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    noconj = lsame_(trans, "T", (ftnlen)1, (ftnlen)1);
222acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    nounit = lsame_(diag, "N", (ftnlen)1, (ftnlen)1);
223acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
224acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Set up the start point in X if the increment is not unity. This */
225acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     will be  ( N - 1 )*INCX   too small for descending loops. */
226acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
227acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    if (*incx <= 0) {
228acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	kx = 1 - (*n - 1) * *incx;
229acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else if (*incx != 1) {
230acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	kx = 1;
231acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    }
232acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
233acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     Start the operations. In this version the elements of A are */
234acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     accessed sequentially with one pass through A. */
235acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
236acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    if (lsame_(trans, "N", (ftnlen)1, (ftnlen)1)) {
237acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
238acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*         Form  x := A*x. */
239acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
240acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) {
241acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    kplus1 = *k + 1;
242acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    if (*incx == 1) {
243acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		i__1 = *n;
244acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = 1; j <= i__1; ++j) {
245acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__2 = j;
246acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (x[i__2].r != 0.f || x[i__2].i != 0.f) {
247acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__2 = j;
248acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			temp.r = x[i__2].r, temp.i = x[i__2].i;
249acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			l = kplus1 - j;
250acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MAX */
251acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__2 = 1, i__3 = j - *k;
252acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = j - 1;
253acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = max(i__2,i__3); i__ <= i__4; ++i__) {
254acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = i__;
255acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = i__;
256acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__5 = l + i__ + j * a_dim1;
257acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i,
258acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = temp.r * a[i__5].i + temp.i * a[
259acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__5].r;
260acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__3].r + q__2.r, q__1.i = x[i__3].i +
261acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
262acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__2].r = q__1.r, x[i__2].i = q__1.i;
263acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L10: */
264acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
265acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
266acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = j;
267acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = j;
268acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = kplus1 + j * a_dim1;
269acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__2].r * a[i__3].r - x[i__2].i * a[
270acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__3].i, q__1.i = x[i__2].r * a[i__3].i +
271acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    x[i__2].i * a[i__3].r;
272acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__4].r = q__1.r, x[i__4].i = q__1.i;
273acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
274acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
275acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L20: */
276acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
277acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    } else {
278acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		jx = kx;
279acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		i__1 = *n;
280acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = 1; j <= i__1; ++j) {
281acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__4 = jx;
282acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (x[i__4].r != 0.f || x[i__4].i != 0.f) {
283acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = jx;
284acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			temp.r = x[i__4].r, temp.i = x[i__4].i;
285acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			ix = kx;
286acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			l = kplus1 - j;
287acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MAX */
288acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = 1, i__2 = j - *k;
289acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__3 = j - 1;
290acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = max(i__4,i__2); i__ <= i__3; ++i__) {
291acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = ix;
292acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = ix;
293acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__5 = l + i__ + j * a_dim1;
294acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = temp.r * a[i__5].r - temp.i * a[i__5].i,
295acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = temp.r * a[i__5].i + temp.i * a[
296acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__5].r;
297acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__2].r + q__2.r, q__1.i = x[i__2].i +
298acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
299acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__4].r = q__1.r, x[i__4].i = q__1.i;
300acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    ix += *incx;
301acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L30: */
302acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
303acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
304acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = jx;
305acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = jx;
306acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = kplus1 + j * a_dim1;
307acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__4].r * a[i__2].r - x[i__4].i * a[
308acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__2].i, q__1.i = x[i__4].r * a[i__2].i +
309acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    x[i__4].i * a[i__2].r;
310acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__3].r = q__1.r, x[i__3].i = q__1.i;
311acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
312acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
313acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    jx += *incx;
314acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (j > *k) {
315acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			kx += *incx;
316acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
317acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L40: */
318acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
319acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    }
320acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	} else {
321acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    if (*incx == 1) {
322acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = *n; j >= 1; --j) {
323acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__1 = j;
324acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (x[i__1].r != 0.f || x[i__1].i != 0.f) {
325acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__1 = j;
326acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			temp.r = x[i__1].r, temp.i = x[i__1].i;
327acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			l = 1 - j;
328acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MIN */
329acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__1 = *n, i__3 = j + *k;
330acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = j + 1;
331acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = min(i__1,i__3); i__ >= i__4; --i__) {
332acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = i__;
333acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = i__;
334acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = l + i__ + j * a_dim1;
335acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = temp.r * a[i__2].r - temp.i * a[i__2].i,
336acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = temp.r * a[i__2].i + temp.i * a[
337acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__2].r;
338acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__3].r + q__2.r, q__1.i = x[i__3].i +
339acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
340acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__1].r = q__1.r, x[i__1].i = q__1.i;
341acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L50: */
342acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
343acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
344acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = j;
345acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = j;
346acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = j * a_dim1 + 1;
347acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__1].r * a[i__3].r - x[i__1].i * a[
348acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__3].i, q__1.i = x[i__1].r * a[i__3].i +
349acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    x[i__1].i * a[i__3].r;
350acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__4].r = q__1.r, x[i__4].i = q__1.i;
351acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
352acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
353acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L60: */
354acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
355acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    } else {
356acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		kx += (*n - 1) * *incx;
357acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		jx = kx;
358acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = *n; j >= 1; --j) {
359acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__4 = jx;
360acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (x[i__4].r != 0.f || x[i__4].i != 0.f) {
361acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = jx;
362acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			temp.r = x[i__4].r, temp.i = x[i__4].i;
363acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			ix = kx;
364acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			l = 1 - j;
365acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MIN */
366acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = *n, i__1 = j + *k;
367acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__3 = j + 1;
368acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = min(i__4,i__1); i__ >= i__3; --i__) {
369acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = ix;
370acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = ix;
371acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = l + i__ + j * a_dim1;
372acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = temp.r * a[i__2].r - temp.i * a[i__2].i,
373acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = temp.r * a[i__2].i + temp.i * a[
374acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__2].r;
375acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__1].r + q__2.r, q__1.i = x[i__1].i +
376acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
377acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__4].r = q__1.r, x[i__4].i = q__1.i;
378acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    ix -= *incx;
379acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L70: */
380acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
381acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
382acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = jx;
383acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = jx;
384acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = j * a_dim1 + 1;
385acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = x[i__4].r * a[i__1].r - x[i__4].i * a[
386acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__1].i, q__1.i = x[i__4].r * a[i__1].i +
387acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    x[i__4].i * a[i__1].r;
388acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    x[i__3].r = q__1.r, x[i__3].i = q__1.i;
389acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
390acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
391acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    jx -= *incx;
392acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (*n - j >= *k) {
393acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			kx -= *incx;
394acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
395acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L80: */
396acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
397acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    }
398acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	}
399acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    } else {
400acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
401acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*        Form  x := A'*x  or  x := conjg( A' )*x. */
402acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
403acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	if (lsame_(uplo, "U", (ftnlen)1, (ftnlen)1)) {
404acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    kplus1 = *k + 1;
405acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    if (*incx == 1) {
406acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = *n; j >= 1; --j) {
407acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__3 = j;
408acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    temp.r = x[i__3].r, temp.i = x[i__3].i;
409acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    l = kplus1 - j;
410acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (noconj) {
411acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
412acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = kplus1 + j * a_dim1;
413acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * a[i__3].r - temp.i * a[i__3].i,
414acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * a[i__3].i + temp.i * a[
415acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__3].r;
416acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
417acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
418acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MAX */
419acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = 1, i__1 = j - *k;
420acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__3 = max(i__4,i__1);
421acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j - 1; i__ >= i__3; --i__) {
422acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = l + i__ + j * a_dim1;
423acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = i__;
424acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = a[i__4].r * x[i__1].r - a[i__4].i * x[
425acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__1].i, q__2.i = a[i__4].r * x[i__1].i +
426acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    a[i__4].i * x[i__1].r;
427acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
428acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
429acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
430acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L90: */
431acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
432acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    } else {
433acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
434acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__2, &a[kplus1 + j * a_dim1]);
435acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * q__2.r - temp.i * q__2.i,
436acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * q__2.i + temp.i *
437acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.r;
438acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
439acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
440acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MAX */
441acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = 1, i__1 = j - *k;
442acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__3 = max(i__4,i__1);
443acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j - 1; i__ >= i__3; --i__) {
444acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);
445acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = i__;
446acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i,
447acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = q__3.r * x[i__4].i + q__3.i * x[
448acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__4].r;
449acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
450acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
451acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
452acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L100: */
453acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
454acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
455acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__3 = j;
456acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    x[i__3].r = temp.r, x[i__3].i = temp.i;
457acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L110: */
458acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
459acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    } else {
460acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		kx += (*n - 1) * *incx;
461acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		jx = kx;
462acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = *n; j >= 1; --j) {
463acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__3 = jx;
464acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    temp.r = x[i__3].r, temp.i = x[i__3].i;
465acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    kx -= *incx;
466acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    ix = kx;
467acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    l = kplus1 - j;
468acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (noconj) {
469acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
470acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__3 = kplus1 + j * a_dim1;
471acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * a[i__3].r - temp.i * a[i__3].i,
472acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * a[i__3].i + temp.i * a[
473acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__3].r;
474acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
475acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
476acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MAX */
477acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = 1, i__1 = j - *k;
478acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__3 = max(i__4,i__1);
479acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j - 1; i__ >= i__3; --i__) {
480acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = l + i__ + j * a_dim1;
481acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = ix;
482acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = a[i__4].r * x[i__1].r - a[i__4].i * x[
483acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__1].i, q__2.i = a[i__4].r * x[i__1].i +
484acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    a[i__4].i * x[i__1].r;
485acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
486acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
487acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
488acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    ix -= *incx;
489acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L120: */
490acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
491acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    } else {
492acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
493acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__2, &a[kplus1 + j * a_dim1]);
494acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * q__2.r - temp.i * q__2.i,
495acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * q__2.i + temp.i *
496acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.r;
497acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
498acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
499acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MAX */
500acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = 1, i__1 = j - *k;
501acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__3 = max(i__4,i__1);
502acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j - 1; i__ >= i__3; --i__) {
503acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);
504acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = ix;
505acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = q__3.r * x[i__4].r - q__3.i * x[i__4].i,
506acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = q__3.r * x[i__4].i + q__3.i * x[
507acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__4].r;
508acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
509acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
510acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
511acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    ix -= *incx;
512acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L130: */
513acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
514acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
515acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__3 = jx;
516acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    x[i__3].r = temp.r, x[i__3].i = temp.i;
517acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    jx -= *incx;
518acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L140: */
519acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
520acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    }
521acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	} else {
522acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    if (*incx == 1) {
523acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		i__3 = *n;
524acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = 1; j <= i__3; ++j) {
525acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__4 = j;
526acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    temp.r = x[i__4].r, temp.i = x[i__4].i;
527acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    l = 1 - j;
528acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (noconj) {
529acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
530acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = j * a_dim1 + 1;
531acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * a[i__4].r - temp.i * a[i__4].i,
532acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * a[i__4].i + temp.i * a[
533acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__4].r;
534acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
535acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
536acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MIN */
537acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__1 = *n, i__2 = j + *k;
538acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = min(i__1,i__2);
539acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j + 1; i__ <= i__4; ++i__) {
540acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = l + i__ + j * a_dim1;
541acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = i__;
542acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = a[i__1].r * x[i__2].r - a[i__1].i * x[
543acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__2].i, q__2.i = a[i__1].r * x[i__2].i +
544acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    a[i__1].i * x[i__2].r;
545acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
546acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
547acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
548acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L150: */
549acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
550acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    } else {
551acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
552acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__2, &a[j * a_dim1 + 1]);
553acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * q__2.r - temp.i * q__2.i,
554acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * q__2.i + temp.i *
555acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.r;
556acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
557acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
558acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MIN */
559acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__1 = *n, i__2 = j + *k;
560acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = min(i__1,i__2);
561acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j + 1; i__ <= i__4; ++i__) {
562acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);
563acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = i__;
564acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = q__3.r * x[i__1].r - q__3.i * x[i__1].i,
565acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = q__3.r * x[i__1].i + q__3.i * x[
566acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__1].r;
567acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
568acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
569acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
570acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L160: */
571acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
572acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
573acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__4 = j;
574acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    x[i__4].r = temp.r, x[i__4].i = temp.i;
575acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L170: */
576acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
577acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    } else {
578acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		jx = kx;
579acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		i__3 = *n;
580acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		for (j = 1; j <= i__3; ++j) {
581acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__4 = jx;
582acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    temp.r = x[i__4].r, temp.i = x[i__4].i;
583acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    kx += *incx;
584acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    ix = kx;
585acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    l = 1 - j;
586acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    if (noconj) {
587acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
588acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__4 = j * a_dim1 + 1;
589acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * a[i__4].r - temp.i * a[i__4].i,
590acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * a[i__4].i + temp.i * a[
591acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__4].r;
592acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
593acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
594acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MIN */
595acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__1 = *n, i__2 = j + *k;
596acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = min(i__1,i__2);
597acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j + 1; i__ <= i__4; ++i__) {
598acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = l + i__ + j * a_dim1;
599acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__2 = ix;
600acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = a[i__1].r * x[i__2].r - a[i__1].i * x[
601acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__2].i, q__2.i = a[i__1].r * x[i__2].i +
602acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    a[i__1].i * x[i__2].r;
603acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
604acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
605acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
606acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    ix += *incx;
607acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L180: */
608acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
609acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    } else {
610acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			if (nounit) {
611acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__2, &a[j * a_dim1 + 1]);
612acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r * q__2.r - temp.i * q__2.i,
613acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__1.i = temp.r * q__2.i + temp.i *
614acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.r;
615acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
616acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
617acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* Computing MIN */
618acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__1 = *n, i__2 = j + *k;
619acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			i__4 = min(i__1,i__2);
620acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			for (i__ = j + 1; i__ <= i__4; ++i__) {
621acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    r_cnjg(&q__3, &a[l + i__ + j * a_dim1]);
622acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    i__1 = ix;
623acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__2.r = q__3.r * x[i__1].r - q__3.i * x[i__1].i,
624acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i = q__3.r * x[i__1].i + q__3.i * x[
625acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    i__1].r;
626acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    q__1.r = temp.r + q__2.r, q__1.i = temp.i +
627acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray				    q__2.i;
628acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    temp.r = q__1.r, temp.i = q__1.i;
629acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			    ix += *incx;
630acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L190: */
631acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray			}
632acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    }
633acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    i__4 = jx;
634acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    x[i__4].r = temp.r, x[i__4].i = temp.i;
635acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		    jx += *incx;
636acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/* L200: */
637acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray		}
638acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	    }
639acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray	}
640acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    }
641acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
642acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray    return 0;
643acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
644acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray/*     End of CTBMV . */
645acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
646acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray} /* ctbmv_ */
647acf83bd421067e7a2b828c5fe61594a4fda5e9a5Tim Murray
648