```01:       INTEGER FUNCTION ILADLR(M, N, A, LDA)
02:       IMPLICIT NONE
03: *
04: *  -- LAPACK auxiliary routine (version 3.2.1)                        --
05: *
06: *  -- April 2009                                                      --
07: *
08: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
09: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
10: *
11: *     .. Scalar Arguments ..
12:       INTEGER            M, N, LDA
13: *     ..
14: *     .. Array Arguments ..
15:       DOUBLE PRECISION   A( LDA, * )
16: *     ..
17: *
18: *  Purpose
19: *  =======
20: *
21: *  ILADLR scans A for its last non-zero row.
22: *
23: *  Arguments
24: *  =========
25: *
26: *  M       (input) INTEGER
27: *          The number of rows of the matrix A.
28: *
29: *  N       (input) INTEGER
30: *          The number of columns of the matrix A.
31: *
32: *  A       (input) DOUBLE PRECISION array, dimension (LDA,N)
33: *          The m by n matrix A.
34: *
35: *  LDA     (input) INTEGER
36: *          The leading dimension of the array A. LDA >= max(1,M).
37: *
38: *  =====================================================================
39: *
40: *     .. Parameters ..
41:       DOUBLE PRECISION ZERO
42:       PARAMETER ( ZERO = 0.0D+0 )
43: *     ..
44: *     .. Local Scalars ..
45:       INTEGER I, J
46: *     ..
47: *     .. Executable Statements ..
48: *
49: *     Quick test for the common case where one corner is non-zero.
50:       IF( M.EQ.0 ) THEN
52:       ELSE IF( A(M, 1).NE.ZERO .OR. A(M, N).NE.ZERO ) THEN