```01:       SUBROUTINE CPOTRI( UPLO, N, A, LDA, INFO )
02: *
03: *  -- LAPACK routine (version 3.2) --
04: *  -- LAPACK is a software package provided by Univ. of Tennessee,    --
05: *  -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
06: *     November 2006
07: *
08: *     .. Scalar Arguments ..
09:       CHARACTER          UPLO
10:       INTEGER            INFO, LDA, N
11: *     ..
12: *     .. Array Arguments ..
13:       COMPLEX            A( LDA, * )
14: *     ..
15: *
16: *  Purpose
17: *  =======
18: *
19: *  CPOTRI computes the inverse of a complex Hermitian positive definite
20: *  matrix A using the Cholesky factorization A = U**H*U or A = L*L**H
21: *  computed by CPOTRF.
22: *
23: *  Arguments
24: *  =========
25: *
26: *  UPLO    (input) CHARACTER*1
27: *          = 'U':  Upper triangle of A is stored;
28: *          = 'L':  Lower triangle of A is stored.
29: *
30: *  N       (input) INTEGER
31: *          The order of the matrix A.  N >= 0.
32: *
33: *  A       (input/output) COMPLEX array, dimension (LDA,N)
34: *          On entry, the triangular factor U or L from the Cholesky
35: *          factorization A = U**H*U or A = L*L**H, as computed by
36: *          CPOTRF.
37: *          On exit, the upper or lower triangle of the (Hermitian)
38: *          inverse of A, overwriting the input factor U or L.
39: *
40: *  LDA     (input) INTEGER
41: *          The leading dimension of the array A.  LDA >= max(1,N).
42: *
43: *  INFO    (output) INTEGER
44: *          = 0:  successful exit
45: *          < 0:  if INFO = -i, the i-th argument had an illegal value
46: *          > 0:  if INFO = i, the (i,i) element of the factor U or L is
47: *                zero, and the inverse could not be computed.
48: *
49: *  =====================================================================
50: *
51: *     .. External Functions ..
52:       LOGICAL            LSAME
53:       EXTERNAL           LSAME
54: *     ..
55: *     .. External Subroutines ..
56:       EXTERNAL           CLAUUM, CTRTRI, XERBLA
57: *     ..
58: *     .. Intrinsic Functions ..
59:       INTRINSIC          MAX
60: *     ..
61: *     .. Executable Statements ..
62: *
63: *     Test the input parameters.
64: *
65:       INFO = 0
66:       IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN
67:          INFO = -1
68:       ELSE IF( N.LT.0 ) THEN
69:          INFO = -2
70:       ELSE IF( LDA.LT.MAX( 1, N ) ) THEN
71:          INFO = -4
72:       END IF
73:       IF( INFO.NE.0 ) THEN
74:          CALL XERBLA( 'CPOTRI', -INFO )
75:          RETURN
76:       END IF
77: *
78: *     Quick return if possible
79: *
80:       IF( N.EQ.0 )
81:      \$   RETURN
82: *
83: *     Invert the triangular Cholesky factor U or L.
84: *
85:       CALL CTRTRI( UPLO, 'Non-unit', N, A, LDA, INFO )
86:       IF( INFO.GT.0 )
87:      \$   RETURN
88: *
89: *     Form inv(U)*inv(U)' or inv(L)'*inv(L).
90: *
91:       CALL CLAUUM( UPLO, N, A, LDA, INFO )
92: *
93:       RETURN
94: *
95: *     End of CPOTRI
96: *
97:       END
98: ```