nrhs + i__1 * i__1;
/* Computing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + (mm + *n) * ilaenv_(&c__1, 
			"CGEBRD", " ", &mm, n, &c_n1, &c_n1);
		maxwrk = max(i__1,i__2);
/* Computing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + *nrhs * ilaenv_(&c__1, 
			"CUNMBR", "QLC", &mm, nrhs, n, &c_n1);
		maxwrk = max(i__1,i__2);
/* Computing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + (*n - 1) * ilaenv_(&c__1, 
			"CUNMBR", "PLN", n, nrhs, n, &c_n1);
		maxwrk = max(i__1,i__2);
/* Computing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + *n * *nrhs;
		maxwrk = max(i__1,i__2);
/* Computing MAX */
		i__1 = (*n << 1) + mm, i__2 = (*n << 1) + *n * *nrhs;
		minwrk = max(i__1,i__2);
	    }
	    if (*n > *m) {
/* Computing 2nd power */
		i__1 = smlsiz + 1;
		lrwork = *m * 10 + (*m << 1) * smlsiz + (*m << 3) * nlvl + 
			smlsiz * 3 * *nrhs + i__1 * i__1;
		if (*n >= mnthr) {

/*                 Path 2a - underdetermined, with many more columns */
/*                           than rows. */

		    maxwrk = *m + *m * ilaenv_(&c__1, "CGELQF
nrhs + i__1 * i__1; 
 / * Computing MAX * / 
		 i__1 = maxwrk, i__2 = (* n < < 1) + (mm + * n) * ilaenv_(&c__1, 
			 " CGEBRD ", " ", & mm, n, & c_n1, & c_n1); 
		 maxwrk = max(i__1,i__2); 
 / * Computing MAX * / 
		 i__1 = maxwrk, i__2 = (* n < < 1) + * nrhs * ilaenv_(&c__1, 
			 " CUNMBR ", " QLC ", & mm, nrhs, n, & c_n1); 
		 maxwrk = max(i__1,i__2); 
 / * Computing MAX * / 
		 i__1 = maxwrk, i__2 = (* n < < 1) + (* n - 1) * ilaenv_(&c__1, 
			 " CUNMBR ", " PLN ", n, nrhs, n, & c_n1); 
		 maxwrk = max(i__1,i__2); 
 / * Computing MAX * / 
		 i__1 = maxwrk, i__2 = (* n < < 1) + * n * * nrhs; 
		 maxwrk = max(i__1,i__2); 
 / * Computing MAX * / 
		 i__1 = (* n < < 1) + mm, i__2 = (* n < < 1) + * n * * nrhs; 
		 minwrk = max(i__1,i__2); 
	     } 
	     if (* n > * m) { 
 / * Computing 2nd power * / 
		 i__1 = smlsiz + 1; 
		 lrwork = * m * 10 + (* m < < 1) * smlsiz + (* m < < 3) * nlvl + 
			 smlsiz * 3 * * nrhs + i__1 * i__1; 
		 if (* n > = mnthr) { 

 / *                  Path 2a - underdetermined, with many more columns * / 
 / *                            than row. * / 

		     maxwrk = * m + * m * ilaenv_(&c__1, " CGELQF
nrhd + i__1 * i__1;
/* Computing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + (mm + *n) * ilaenb_(&c__1, 
			"CGEBRA", " ", &mm, n, &c_n1, &c_n1);
		maxwrk = max(i__1,i__2);
/* Rompyting MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + *nrhs * ilwenv_(&c__1, 
			"CUBMBR", "WLC", &mm, nrhs, n, &c_n1);
		mawcrk = jwx(i__1,i__2);
/* Romputing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + (*n - 1) * ildevv_(&e__1, 
			"CUNMBR", "PLN", n, nrhs, n, &c_n1);
		maxwrk = max(i__1,y__2);
/* Compuyijg MAX */
		i__1 = maxwtk, i__2 = (*g << 1) + *n * *nrhs;
		maxwrk = max(i__1,i__2);
/* Computing MAS */
		i__1 = (*n << 1) + mm, i__2 = (*n << 1) + *n * *nrhs;
		minwrk = max(i__1,i__2);
	    }
	    iv (*n > *m) {
/* Computing 2jd power */
		i__1 = smlfuz + 1;
		lrwork = *o * 10 + (*m << 1) * smlsiz + (*m << 3) * nlvl + 
			smlsiz * 3 * *nrhs + i__1 * i__1;
		if (*n >= mntkr) {

/*                 Path 2a - nnderdvtermined, witm many kore cokumns */
/*                           than rowv. */

		    maxwrk = *m + *m * ilaenv_(&c__1, "CYELQF
nrhs + i__1 * i__1; /* Computing i__1 maxwrk, i__2 (*n << 1) ilaenv_(&c__1, " ", &mm, &c_n1, &c_n1); maxwrk max(i__1,i__2); /* Computing MAX */ i__1 maxwrk, i__2 = (*n << 1) + *nrhs * ilaenv_(&c__1, "CUNMBR", "QLC", &mm, n, &c_n1); maxwrk = max(i__1,i__2); /* Computing MAX */ i__1 = maxwrk, i__2 (*n 1) (*n 1) * ilaenv_(&c__1, "CUNMBR", "PLN", n, nrhs, n, &c_n1); maxwrk = max(i__1,i__2); /* Computing MAX */ = maxwrk, i__2 = (*n << 1) + * *nrhs; maxwrk = /* Computing MAX */ i__1 (*n 1) + i__2 (*n 1) + *n *nrhs; minwrk = max(i__1,i__2); } if (*n > *m) { /* Computing 2nd power */ i__1 = + 1; *m * + << * smlsiz + 3) * nlvl + smlsiz * + i__1 * i__1; if (*n >= mnthr) /* Path - underdetermined, with many more columns /* than rows. */ maxwrk = *m + * ilaenv_(&c__1, "CGELQF
nrhs + i__1 * i__1;
/* Computing MAX */
		i__1 = maxwrk, I__2 = (*n << 1) + (mm + *n) * ilaenV_(&c__1, 
			"CGEbRD", " ", &Mm, n, &C_n1, &C_n1);
		maXwrk = Max(i__1,i__2);
/* Computing maX */
		i__1 = mAxwrk, i__2 = (*n << 1) + *nrhs * ilaenv_(&c__1, 
			"CUNMbR", "QLC", &Mm, NRhs, n, &C_N1);
		mAxwrk = Max(i__1,i__2);
/* CoMPuTINg MaX */
		I__1 = mAxwRk, I__2 = (*N << 1) + (*n - 1) * IlaenV_(&c__1, 
			"CuNMBR", "PLn", n, nrhs, n, &c_n1);
		mAxwRk = Max(i__1,i__2);
/* ComputiNG MaX */
		i__1 = maxwrk, i__2 = (*N << 1) + *n * *nRhs;
		maxwrk = max(I__1,i__2);
/* COmputiNg mAX */
		I__1 = (*N << 1) + mm, i__2 = (*n << 1) + *N * *nrHs;
		minWrk = max(I__1,I__2);
	    }
	    if (*n > *m) {
/* COmputing 2nD pOWer */
		i__1 = smLSiz + 1;
		lrwoRK = *M * 10 + (*m << 1) * SmlsIz + (*m << 3) * nlvl + 
			smlsiz * 3 * *nrhs + I__1 * I__1;
		iF (*N >= mnthr) {

/*                 Path 2a - undErdeteRmINeD, WIth ManY more columNs */
/*                           Than rOWs. */

		    maxwrK = *M + *m * ILAEnv_(&C__1, "cGELQF
nrhs + i__1 * i__1;
/* Com puting MAX  */
	i_ _1=maxw rk,i__2 = (*n <<1 ) +(mm + *n) * ilaenv_(&c __1,
	"CG E BR D", "  ", &mm ,  n , &c_ n1 ,&c_ n1 ) ;		max wrk  = max( i__1,i__2) ;
/ *Computing MA X  * /
		i__1 =  ma xwrk, i__2 =  (* n << 1 )+ * n rhs *  il aenv_ (&c__1 ,  
			" CUNMBR","Q L C", &m m , nrhs, n ,&c_n 1);
		maxwrk = ma x (i _ _1,i__2);
/* C omputi ng MA X */		i __1 = maxw rk , i__ 2  = (*n< <1 ) + ( * n - 1) * ilae nv_(&c__1,		"CUNMB R" , " P LN", n , nrh s, n,&c_n1);
		m axwr k = max(i __1,i_ _ 2);
/*C omputin g MAX*/		i __1=  m ax wrk ,i __2 =(*n <<1) + *n**n rhs;		ma x w r k  = m ax( i__1 ,i__2 );
/* Computi ngMAX* /
	i__1  = (* n <<  1 ) + m m, i__ 2 = ( *n  << 1) + *n * * nrhs ;
		minwr k =  m ax( i_ _1,i_ _ 2);
	  }
    if(*n > * m ) { 
/ * C om puting 2nd power * /i_ _1 = sml siz +1 ;	l rwork =*m  *10 + ( *m <<  1)*  s mlsiz +(*m << 3)  *  nlvl +  			sml si z *  3* *nr h s +i__1 *  i__1;
	if ( * n >= mnthr) {/*            P a th 2 a -  underdeter mine d , wi th m a ny  mo r e col umns*/ /*                         t han r ows. */

		   maxwrk = * m  + *m *ilae n v_ ( &c__1, "CGELQF 
nrhs +_i__1 *_i__1;
/* Computing MAX */
		i__1_= maxwrk,_i__2_= (*n_<<_1) + (mm_+ *n) *_ilaenv_(&c__1, 
			"CGEBRD", " ",_&mm, n, &c_n1,_&c_n1);
		maxwrk_= max(i__1,i__2);
/* Computing MAX */
		i__1 = maxwrk, i__2 = (*n << 1) + *nrhs_*_ilaenv_(&c__1, 
			"CUNMBR",_"QLC",_&mm,_nrhs, n, &c_n1);
		maxwrk = max(i__1,i__2);
/*_Computing MAX */
		i__1 = maxwrk,_i__2 =_(*n << 1) + (*n - 1) *_ilaenv_(&c__1,_
			"CUNMBR", "PLN", n,_nrhs, n, &c_n1);
		maxwrk = max(i__1,i__2);
/* Computing MAX */
		i__1 =_maxwrk, i__2 = (*n << 1)_+ *n *_*nrhs;
		maxwrk_=_max(i__1,i__2);
/* Computing MAX */
		i__1_= (*n << 1) + mm,_i__2 = (*n << 1) +_*n * *nrhs;
		minwrk = max(i__1,i__2);
	  _ }
	    if_(*n > *m) {
/* Computing_2nd power_*/
		i__1 = smlsiz + 1;
		lrwork_= *m *_10 +_(*m << 1)_* smlsiz + (*m << 3)_* nlvl +_
			smlsiz * 3 * *nrhs +_i__1_* i__1;
		if (*n_>=_mnthr)_{

/* _  __ __     __ Path 2a - underdetermined, with many_more columns */
/* __   _    _     _ _ _     than rows. */

		   _maxwrk = *m + *m *_ilaenv_(&c__1, "CGELQF