
(/VERSIONCHECK 2) 

(DEFUN |MHROWRED;nonzero?| (|v| $)
  (SPADCALL (CONS #'|MHROWRED;nonzero?!0| $) |v| (QREFELT $ 14))) 

(DEFUN |MHROWRED;nonzero?!0| (|#1| $)
  (COND
    ((SPADCALL |#1| (|spadConstant| $ 7) (QREFELT $ 9))
     (|spadConstant| $ 10))
    ('T (|spadConstant| $ 11)))) 

(DEFUN |MHROWRED;non0| (|v| |rown| $)
  (PROG (|i| #0=#:G1848 |allZero| |ans| #1=#:G1847)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |allZero| 'T . #2=(|MHROWRED;non0|))
                      (SEQ (LETT |i|
                                 (SPADCALL |v| (QREFELT $ 16)) . #2#)
                           (LETT #0# (QVSIZE |v|) . #2#) G190
                           (COND ((> |i| #0#) (GO G191)))
                           (SEQ (EXIT (COND
                                        ((NULL
                                          (SPADCALL
                                           (SPADCALL |v| |i|
                                            (QREFELT $ 17))
                                           (|spadConstant| $ 7)
                                           (QREFELT $ 9)))
                                         (COND
                                           (|allZero|
                                            (SEQ
                                             (LETT |allZero|
                                              'NIL . #2#)
                                             (EXIT
                                              (LETT |ans|
                                               (VECTOR
                                                (SPADCALL |v| |i|
                                                 (QREFELT $ 17))
                                                |i| |rown|) . #2#))))
                                           ('T
                                            (PROGN
                                              (LETT #1#
                                               (CONS 1 "failed") . #2#)
                                              (GO #1#))))))))
                           (LETT |i| (+ |i| 1) . #2#) (GO G190) G191
                           (EXIT NIL))
                      (EXIT (COND
                              (|allZero| (CONS 1 "failed"))
                              ('T (CONS 0 |ans|))))))
           #1# (EXIT #1#))))) 

(DEFUN |MHROWRED;mkMat| (|x| |l| $)
  (PROG (#0=#:G1865 |i| #1=#:G1866 |ll|)
    (RETURN
      (SEQ (COND
             ((NULL (LETT |ll|
                          (PROGN
                            (LETT #0# NIL . #2=(|MHROWRED;mkMat|))
                            (SEQ (LETT |i|
                                       (SPADCALL |x| (QREFELT $ 19)) . #2#)
                                 (LETT #1#
                                       (SPADCALL |x| (QREFELT $ 20)) . #2#)
                                 G190 (COND ((> |i| #1#) (GO G191)))
                                 (SEQ (EXIT
                                       (COND
                                         ((COND
                                            ((SPADCALL |i| |l|
                                              (QREFELT $ 22))
                                             'NIL)
                                            ('T
                                             (|MHROWRED;nonzero?|
                                              (SPADCALL |x| |i|
                                               (QREFELT $ 23))
                                              $)))
                                          (LETT #0#
                                           (CONS
                                            (SPADCALL
                                             (SPADCALL |x| |i|
                                              (QREFELT $ 23))
                                             (QREFELT $ 25))
                                            #0#) . #2#)))))
                                 (LETT |i| (+ |i| 1) . #2#) (GO G190)
                                 G191 (EXIT (NREVERSE0 #0#)))) . #2#))
              (SPADCALL 1 (SPADCALL |x| (QREFELT $ 28)) (QREFELT $ 29)))
             ('T (SPADCALL |ll| (QREFELT $ 31)))))))) 

(DEFUN |MHROWRED;diagSubMatrix| (|x| $)
  (PROG (#0=#:G1915 |i| #1=#:G1916 |u| #2=#:G1873 |l| |a| #3=#:G1918
            #4=#:G1919 #5=#:G1917 #6=#:G1920 #7=#:G1921 #8=#:G1922 |z|
            #9=#:G1923 #10=#:G1924 |r| #11=#:G1925 #12=#:G1914
            #13=#:G1912)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |l|
                            (PROGN
                              (LETT #0# NIL
                                    . #14=(|MHROWRED;diagSubMatrix|))
                              (SEQ (LETT |i|
                                    (SPADCALL |x| (QREFELT $ 19)) . #14#)
                                   (LETT #1#
                                    (SPADCALL |x| (QREFELT $ 20)) . #14#)
                                   G190
                                   (COND ((> |i| #1#) #15=(GO G191)))
                                   (SEQ
                                    (EXIT
                                     (COND
                                       ((QEQCAR
                                         (LETT |u|
                                          (|MHROWRED;non0|
                                           (SPADCALL |x| |i|
                                            (QREFELT $ 23))
                                           |i| $) . #14#)
                                         0)
                                        (LETT #0#
                                         (CONS
                                          (PROG2 (LETT #2# |u| . #14#)
                                           (QCDR #2#)
                                            (|check-union|
                                             (QEQCAR #2# 0)
                                             (|Record|
                                              (|:| |val| (QREFELT $ 6))
                                              (|:| |cl| (|Integer|))
                                              (|:| |rw| (|Integer|)))
                                             #2#))
                                          #0#) . #14#)))))
                                   (LETT |i| (+ |i| 1) . #14#)
                                   #16=(GO G190) G191
                                   (EXIT (NREVERSE0 #0#)))) . #14#)
                      (SEQ (EXIT (SEQ (LETT |a| NIL . #14#)
                                      (LETT #5#
                                       (SPADCALL
                                        (PROGN
                                          (LETT #3# NIL . #14#)
                                          (SEQ (LETT |r| NIL . #14#)
                                           (LETT #4# |l| . #14#) G190
                                           (COND
                                             ((OR (ATOM #4#)
                                               (PROGN
                                                 (LETT |r|
                                                  (CAR #4#) . #14#)
                                                 NIL))
                                              #15#))
                                           (SEQ
                                            (EXIT
                                             (LETT #3#
                                              (CONS (QVELT |r| 0) #3#) . #14#)))
                                           (LETT #4# (CDR #4#) . #14#)
                                           #16# G191
                                           (EXIT (NREVERSE0 #3#))))
                                        (QREFELT $ 32)) . #14#)
                                      G190
                                      (COND
                                        ((OR (ATOM #5#)
                                          (PROGN
                                            (LETT |a| (CAR #5#) . #14#)
                                            NIL))
                                         #15#))
                                      (SEQ
                                       (EXIT
                                        (COND
                                          ((SPADCALL
                                            (SPADCALL
                                             (PROGN
                                               (LETT #6# NIL . #14#)
                                               (SEQ
                                                (LETT |r| NIL . #14#)
                                                (LETT #7# |l| . #14#)
                                                G190
                                                (COND
                                                  ((OR (ATOM #7#)
                                                    (PROGN
                                                      (LETT |r|
                                                       (CAR #7#) . #14#)
                                                      NIL))
                                                   #15#))
                                                (SEQ
                                                 (EXIT
                                                  (COND
                                                    ((SPADCALL
                                                      (QVELT |r| 0) |a|
                                                      (QREFELT $ 9))
                                                     (LETT #6#
                                                      (CONS
                                                       (QVELT |r| 1)
                                                       #6#) . #14#)))))
                                                (LETT #7#
                                                 (CDR #7#) . #14#)
                                                #16# G191
                                                (EXIT (NREVERSE0 #6#))))
                                             (QREFELT $ 35))
                                            (SPADCALL
                                             (PROGN
                                               (LETT #8# NIL . #14#)
                                               (SEQ
                                                (LETT |z|
                                                 (SPADCALL |x|
                                                  (QREFELT $ 36)) . #14#)
                                                (LETT #9#
                                                 (SPADCALL |x|
                                                  (QREFELT $ 37)) . #14#)
                                                G190
                                                (COND
                                                  ((> |z| #9#) #15#))
                                                (SEQ
                                                 (EXIT
                                                  (LETT #8#
                                                   (CONS |z| #8#) . #14#)))
                                                (LETT |z|
                                                 (+ |z| 1) . #14#)
                                                #16# G191
                                                (EXIT (NREVERSE0 #8#))))
                                             (QREFELT $ 35))
                                            (QREFELT $ 38))
                                           (PROGN
                                             (LETT #13#
                                              (PROGN
                                                (LETT #12#
                                                 (CONS 0
                                                  (CONS |a|
                                                   (|MHROWRED;mkMat|
                                                    |x|
                                                    (PROGN
                                                      (LETT #10#
                                                       NIL . #14#)
                                                      (SEQ
                                                       (LETT |r|
                                                        NIL . #14#)
                                                       (LETT #11#
                                                        |l| . #14#)
                                                       G190
                                                       (COND
                                                         ((OR
                                                           (ATOM #11#)
                                                           (PROGN
                                                             (LETT |r|
                                                              (CAR
                                                               #11#) . #14#)
                                                             NIL))
                                                          #15#))
                                                       (SEQ
                                                        (EXIT
                                                         (COND
                                                           ((SPADCALL
                                                             |a|
                                                             (QVELT |r|
                                                              0)
                                                             (QREFELT $
                                                              9))
                                                            (LETT #10#
                                                             (CONS
                                                              (QVELT
                                                               |r| 2)
                                                              #10#) . #14#)))))
                                                       (LETT #11#
                                                        (CDR #11#) . #14#)
                                                       #16# G191
                                                       (EXIT
                                                        (NREVERSE0
                                                         #10#))))
                                                    $))) . #14#)
                                                (GO #12#)) . #14#)
                                             (GO #13#))))))
                                      (LETT #5# (CDR #5#) . #14#) #16#
                                      G191 (EXIT NIL)))
                           #13# (EXIT #13#))
                      (EXIT (CONS 1 "failed"))))
           #12# (EXIT #12#))))) 

(DEFUN |MHROWRED;determinantOfMinor| (|x| $)
  (PROG (|nc| |nr| #0=#:G1932 #1=#:G1934 #2=#:G1935 |lc| #3=#:G1936
              #4=#:G1937 |lr| |i| |n| #5=#:G1938 |d| |j| #6=#:G1933
              #7=#:G1931)
    (RETURN
      (SEQ (EXIT (SEQ (EXIT (SEQ (SEQ (LETT |nc|
                                       (SPADCALL |x| (QREFELT $ 28))
                                       . #8=(|MHROWRED;determinantOfMinor|))
                                      (LETT |nr|
                                       (SPADCALL |x| (QREFELT $ 39)) . #8#)
                                      (EXIT
                                       (COND
                                         ((NULL (< |nc| |nr|))
                                          (PROGN
                                            (LETT #0#
                                             (|spadConstant| $ 7) . #8#)
                                            (GO #0#))))))
                                 (LETT |lc|
                                       (PROGN
                                         (LETT #1# NIL . #8#)
                                         (SEQ
                                          (LETT |i|
                                           (SPADCALL |x|
                                            (QREFELT $ 36)) . #8#)
                                          (LETT #2#
                                           (SPADCALL |x|
                                            (QREFELT $ 37)) . #8#)
                                          G190
                                          (COND
                                            ((> |i| #2#) #9=(GO G191)))
                                          (SEQ
                                           (EXIT
                                            (LETT #1#
                                             (CONS |i| #1#) . #8#)))
                                          (LETT |i| (+ |i| 1) . #8#)
                                          #10=(GO G190) G191
                                          (EXIT (NREVERSE0 #1#)))) . #8#)
                                 (LETT |lr|
                                       (PROGN
                                         (LETT #3# NIL . #8#)
                                         (SEQ
                                          (LETT |i|
                                           (SPADCALL |x|
                                            (QREFELT $ 19)) . #8#)
                                          (LETT #4#
                                           (SPADCALL |x|
                                            (QREFELT $ 20)) . #8#)
                                          G190 (COND ((> |i| #4#) #9#))
                                          (SEQ
                                           (EXIT
                                            (LETT #3#
                                             (CONS |i| #3#) . #8#)))
                                          (LETT |i| (+ |i| 1) . #8#)
                                          #10# G191
                                          (EXIT (NREVERSE0 #3#)))) . #8#)
                                 (SEQ (EXIT
                                       (SEQ (LETT |i| 1 . #8#)
                                        (LETT #5#
                                         (LETT |n|
                                          (SPADCALL |nr| |nc|
                                           (QREFELT $ 40)) . #8#) . #8#)
                                        G190
                                        (COND
                                          ((QSGREATERP |i| #5#) #9#))
                                        (SEQ
                                         (LETT |d|
                                          (SPADCALL
                                           (SPADCALL |x|
                                            (|MHROWRED;enumerateBinomial|
                                             |lr| |nc| |i| $)
                                            |lc| (QREFELT $ 41))
                                           (QREFELT $ 42)) . #8#)
                                         (EXIT
                                          (COND
                                            ((NULL
                                              (SPADCALL |d|
                                               (|spadConstant| $ 7)
                                               (QREFELT $ 9)))
                                             (PROGN
                                               (LETT #7#
                                                (SEQ
                                                 (LETT |j|
                                                  (+ (+ |i| 1)
                                                   (RANDOM (- |n| |i|))) . #8#)
                                                 (EXIT
                                                  (PROGN
                                                    (LETT #6#
                                                     (SPADCALL |d|
                                                      (SPADCALL
                                                       (SPADCALL |x|
                                                        (|MHROWRED;enumerateBinomial|
                                                         |lr| |nc| |j|
                                                         $)
                                                        |lc|
                                                        (QREFELT $ 41))
                                                       (QREFELT $ 42))
                                                      (QREFELT $ 43)) . #8#)
                                                    (GO #6#)))) . #8#)
                                               (GO #7#))))))
                                        (LETT |i| (QSADD1 |i|) . #8#)
                                        #10# G191 (EXIT NIL)))
                                      #7# (EXIT #7#))
                                 (EXIT (|spadConstant| $ 7))))
                      #0# (EXIT #0#)))
           #6# (EXIT #6#))))) 

(DEFUN |MHROWRED;enumerateBinomial| (|l| |m| |i| $)
  (PROG (|m1| |j| |n| #0=#:G1945 |b| #1=#:G1944 #2=#:G1940)
    (RETURN
      (SEQ (EXIT (SEQ (LETT |m1| (- (SPADCALL |l| (QREFELT $ 44)) 1)
                            . #3=(|MHROWRED;enumerateBinomial|))
                      (EXIT (COND
                              ((ZEROP (LETT |m| (- |m| 1) . #3#))
                               (LIST (SPADCALL |l| (+ |m1| |i|)
                                      (QREFELT $ 45))))
                              ('T
                               (SEQ (SEQ (LETT |j| 1 . #3#)
                                     (LETT #0#
                                      (LETT |n| (LENGTH |l|) . #3#) . #3#)
                                     G190
                                     (COND
                                       ((QSGREATERP |j| #0#) (GO G191)))
                                     (SEQ
                                      (EXIT
                                       (SEQ
                                        (SEQ
                                         (LETT |b|
                                          (SPADCALL (- |n| |j|) |m|
                                           (QREFELT $ 40)) . #3#)
                                         (EXIT
                                          (COND
                                            ((NULL (< |b| |i|))
                                             (PROGN
                                               (LETT #2#
                                                (PROGN
                                                  (LETT #1#
                                                   (CONS
                                                    (SPADCALL |l|
                                                     (+ |m1| |j|)
                                                     (QREFELT $ 45))
                                                    (|MHROWRED;enumerateBinomial|
                                                     (SPADCALL |l| |j|
                                                      (QREFELT $ 46))
                                                     |m| |i| $)) . #3#)
                                                  (GO #1#)) . #3#)
                                               (GO #2#))))))
                                        (EXIT
                                         (LETT |i| (- |i| |b|) . #3#))))
                                      #2# (EXIT #2#))
                                     (LETT |j| (QSADD1 |j|) . #3#)
                                     (GO G190) G191 (EXIT NIL))
                                    (EXIT
                                     (|error| "Should not happen"))))))))
           #1# (EXIT #1#))))) 

(DEFUN |MHROWRED;rowEch;2M;7| (|x| $)
  (PROG (|u| |d|)
    (RETURN
      (SEQ (LETT |u| (|MHROWRED;diagSubMatrix| |x| $)
                 . #0=(|MHROWRED;rowEch;2M;7|))
           (EXIT (COND
                   ((QEQCAR |u| 1)
                    (COND
                      ((SPADCALL
                           (LETT |d|
                                 (|MHROWRED;determinantOfMinor| |x| $) . #0#)
                           (QREFELT $ 47))
                       (SPADCALL |x| (QREFELT $ 48)))
                      ('T (SPADCALL |x| |d| (QREFELT $ 49)))))
                   ('T
                    (SPADCALL (QCDR (QCDR |u|)) (QCAR (QCDR |u|))
                        (QREFELT $ 49))))))))) 

(DEFUN |MHROWRED;vconc| (|y| |m| $)
  (SPADCALL
      (SPADCALL
          (SPADCALL (SPADCALL |y| (QREFELT $ 28)) |m| (QREFELT $ 51))
          (QREFELT $ 52))
      (SPADCALL (CONS #'|MHROWRED;vconc!0| (VECTOR $ |m|)) |y|
          (QREFELT $ 55))
      (QREFELT $ 56))) 

(DEFUN |MHROWRED;vconc!0| (|#1| $$)
  (SPADCALL |#1| (QREFELT $$ 1) (QREFELT (QREFELT $$ 0) 53))) 

(DEFUN |MHROWRED;order| (|m| |p| $)
  (PROG (|i| |mm| #0=#:G1964)
    (RETURN
      (SEQ (EXIT (COND
                   ((SPADCALL |m| (QREFELT $ 47)) -1)
                   ('T
                    (SEQ (LETT |i| 0 . #1=(|MHROWRED;order|)) G190 NIL
                         (SEQ (LETT |mm|
                                    (SPADCALL |m| |p| (QREFELT $ 58)) . #1#)
                              (EXIT (COND
                                      ((QEQCAR |mm| 1)
                                       (PROGN
                                         (LETT #0# |i| . #1#)
                                         (GO #0#)))
                                      ('T (LETT |m| (QCDR |mm|) . #1#)))))
                         (LETT |i| (QSADD1 |i|) . #1#) (GO G190) G191
                         (EXIT NIL)))))
           #0# (EXIT #0#))))) 

(DEFUN |MHROWRED;normalizedDivide;2RR;10| (|n| |d| $)
  (PROG (|qr|)
    (RETURN
      (SEQ (LETT |qr| (SPADCALL |n| |d| (QREFELT $ 60))
                 |MHROWRED;normalizedDivide;2RR;10|)
           (COND
             ((NULL (SPADCALL (QCDR |qr|) (|spadConstant| $ 7)
                        (QREFELT $ 61)))
              (EXIT |qr|)))
           (EXIT (COND
                   ((SPADCALL (|spadConstant| $ 7) |d| (QREFELT $ 61))
                    (SEQ (PROGN
                           (RPLACD |qr|
                                   (SPADCALL (QCDR |qr|) |d|
                                    (QREFELT $ 62)))
                           (QCDR |qr|))
                         (PROGN
                           (RPLACA |qr|
                                   (SPADCALL (QCAR |qr|)
                                    (|spadConstant| $ 26)
                                    (QREFELT $ 63)))
                           (QCAR |qr|))
                         (EXIT |qr|)))
                   ('T
                    (SEQ (PROGN
                           (RPLACD |qr|
                                   (SPADCALL (QCDR |qr|) |d|
                                    (QREFELT $ 63)))
                           (QCDR |qr|))
                         (PROGN
                           (RPLACA |qr|
                                   (SPADCALL (QCAR |qr|)
                                    (|spadConstant| $ 26)
                                    (QREFELT $ 62)))
                           (QCAR |qr|))
                         (EXIT |qr|))))))))) 

(DEFUN |MHROWRED;normalizedDivide;2RR;11| (|n| |d| $)
  (SPADCALL |n| |d| (QREFELT $ 60))) 

(DEFUN |MHROWRED;rowEchLocal;MRM;12| (|x| |p| $)
  (PROG (|u| |d|)
    (RETURN
      (SEQ (LETT |u| (|MHROWRED;diagSubMatrix| |x| $)
                 . #0=(|MHROWRED;rowEchLocal;MRM;12|))
           (EXIT (COND
                   ((QEQCAR |u| 1)
                    (COND
                      ((SPADCALL
                           (LETT |d|
                                 (|MHROWRED;determinantOfMinor| |x| $) . #0#)
                           (QREFELT $ 47))
                       (SPADCALL |x| (QREFELT $ 48)))
                      ('T (SPADCALL |x| |d| |p| (QREFELT $ 66)))))
                   ('T
                    (SPADCALL (QCDR (QCDR |u|)) (QCAR (QCDR |u|)) |p|
                        (QREFELT $ 66))))))))) 

(DEFUN |MHROWRED;rowEchelonLocal;M2RM;13| (|y| |m| |p| $)
  (PROG (#0=#:G1983 |nrows| |ncols| |minr| |j| #1=#:G2007 |npivord|
            |rown| |pivord| #2=#:G1986 |x| |#G79| |a| |b| |d| |pivot|
            #3=#:G1993 |q| |v2| |k| #4=#:G2010 |qr| |k1| #5=#:G2011
            |i|)
    (RETURN
      (SEQ (LETT |m|
                 (SPADCALL |p|
                     (PROG1 (LETT #0# (|MHROWRED;order| |m| |p| $)
                                  . #6=(|MHROWRED;rowEchelonLocal;M2RM;13|))
                       (|check-subtype| (>= #0# 0)
                           '(|NonNegativeInteger|) #0#))
                     (QREFELT $ 68)) . #6#)
           (LETT |x| (|MHROWRED;vconc| |y| |m| $) . #6#)
           (LETT |nrows| (SPADCALL |x| (QREFELT $ 20)) . #6#)
           (LETT |ncols| (SPADCALL |x| (QREFELT $ 37)) . #6#)
           (LETT |minr|
                 (LETT |i| (SPADCALL |x| (QREFELT $ 19)) . #6#) . #6#)
           (SEQ (EXIT (SEQ (LETT |j|
                                 (SPADCALL |x| (QREFELT $ 36)) . #6#)
                           G190 (COND ((> |j| |ncols|) #7=(GO G191)))
                           (SEQ (COND
                                  ((< |nrows| |i|)
                                   (PROGN
                                     (LETT #1# |x| . #6#)
                                     (GO #1#))))
                                (LETT |rown| (- |minr| 1) . #6#)
                                (SEQ (LETT |k| |i| . #6#) G190
                                     (COND ((> |k| |nrows|) #7#))
                                     (SEQ
                                      (EXIT
                                       (COND
                                         ((SPADCALL
                                           (SPADCALL |x| |k| |j|
                                            (QREFELT $ 69))
                                           (|spadConstant| $ 7)
                                           (QREFELT $ 9))
                                          "next k")
                                         ('T
                                          (SEQ
                                           (EXIT
                                            (SEQ
                                             (LETT |npivord|
                                              (|MHROWRED;order|
                                               (SPADCALL |x| |k| |j|
                                                (QREFELT $ 69))
                                               |p| $) . #6#)
                                             (EXIT
                                              (COND
                                                ((OR
                                                  (EQL |rown|
                                                   (- |minr| 1))
                                                  (< |npivord|
                                                   |pivord|))
                                                 (PROGN
                                                   (LETT #2#
                                                    (SEQ
                                                     (LETT |rown|
                                                      |k| . #6#)
                                                     (EXIT
                                                      (LETT |pivord|
                                                       |npivord| . #6#))) . #6#)
                                                   (GO #2#)))))))
                                           #2# (EXIT #2#))))))
                                     (LETT |k| (+ |k| 1) . #6#)
                                     #8=(GO G190) G191 (EXIT NIL))
                                (EXIT (COND
                                        ((EQL |rown| (- |minr| 1))
                                         "enuf")
                                        ('T
                                         (SEQ
                                          (LETT |x|
                                           (SPADCALL |x| |i| |rown|
                                            (QREFELT $ 70)) . #6#)
                                          (PROGN
                                            (LETT |#G79|
                                             (SPADCALL
                                              (SPADCALL |x| |i| |j|
                                               (QREFELT $ 69))
                                              |m| (QREFELT $ 72)) . #6#)
                                            (LETT |a|
                                             (QVELT |#G79| 0) . #6#)
                                            (LETT |b|
                                             (QVELT |#G79| 1) . #6#)
                                            (LETT |d|
                                             (QVELT |#G79| 2) . #6#)
                                            |#G79|)
                                          (SPADCALL |x| |i| |j| |d|
                                           (QREFELT $ 73))
                                          (LETT |pivot| |d| . #6#)
                                          (SEQ
                                           (LETT |k| (+ |j| 1) . #6#)
                                           G190
                                           (COND
                                             ((> |k| |ncols|) #7#))
                                           (SEQ
                                            (EXIT
                                             (SPADCALL |x| |i| |k|
                                              (SPADCALL
                                               (SPADCALL |a|
                                                (SPADCALL |x| |i| |k|
                                                 (QREFELT $ 69))
                                                (QREFELT $ 74))
                                               |m| (QREFELT $ 53))
                                              (QREFELT $ 73))))
                                           (LETT |k| (+ |k| 1) . #6#)
                                           #8# G191 (EXIT NIL))
                                          (SEQ
                                           (LETT |k| (+ |i| 1) . #6#)
                                           G190
                                           (COND
                                             ((> |k| |nrows|) #7#))
                                           (SEQ
                                            (EXIT
                                             (COND
                                               ((SPADCALL
                                                 (SPADCALL |x| |k| |j|
                                                  (QREFELT $ 69))
                                                 (QREFELT $ 47))
                                                "next k")
                                               ('T
                                                (SEQ
                                                 (LETT |q|
                                                  (PROG2
                                                   (LETT #3#
                                                    (SPADCALL
                                                     (SPADCALL |x| |k|
                                                      |j|
                                                      (QREFELT $ 69))
                                                     |pivot|
                                                     (QREFELT $ 58)) . #6#)
                                                   (QCDR #3#)
                                                    (|check-union|
                                                     (QEQCAR #3# 0)
                                                     (QREFELT $ 6) #3#)) . #6#)
                                                 (SEQ
                                                  (LETT |k1|
                                                   (+ |j| 1) . #6#)
                                                  G190
                                                  (COND
                                                    ((> |k1| |ncols|)
                                                     #7#))
                                                  (SEQ
                                                   (LETT |v2|
                                                    (SPADCALL
                                                     (SPADCALL
                                                      (SPADCALL |x| |k|
                                                       |k1|
                                                       (QREFELT $ 69))
                                                      (SPADCALL |q|
                                                       (SPADCALL |x|
                                                        |i| |k1|
                                                        (QREFELT $ 69))
                                                       (QREFELT $ 74))
                                                      (QREFELT $ 63))
                                                     |m|
                                                     (QREFELT $ 53)) . #6#)
                                                   (EXIT
                                                    (SPADCALL |x| |k|
                                                     |k1| |v2|
                                                     (QREFELT $ 73))))
                                                  (LETT |k1|
                                                   (+ |k1| 1) . #6#)
                                                  #8# G191 (EXIT NIL))
                                                 (EXIT
                                                  (SPADCALL |x| |k| |j|
                                                   (|spadConstant| $ 7)
                                                   (QREFELT $ 73))))))))
                                           (LETT |k| (+ |k| 1) . #6#)
                                           #8# G191 (EXIT NIL))
                                          (SEQ (LETT |k| |minr| . #6#)
                                           (LETT #4# (- |i| 1) . #6#)
                                           G190
                                           (COND ((> |k| #4#) #7#))
                                           (SEQ
                                            (EXIT
                                             (COND
                                               ((SPADCALL
                                                 (SPADCALL |x| |k| |j|
                                                  (QREFELT $ 69))
                                                 (QREFELT $ 47))
                                                "enuf")
                                               ('T
                                                (SEQ
                                                 (LETT |qr|
                                                  (SPADCALL
                                                   (SPADCALL |x| |k|
                                                    |j| (QREFELT $ 69))
                                                   |pivot|
                                                   (QREFELT $ 65)) . #6#)
                                                 (SPADCALL |x| |k| |j|
                                                  (QCDR |qr|)
                                                  (QREFELT $ 73))
                                                 (EXIT
                                                  (SEQ
                                                   (LETT |k1|
                                                    (+ |j| 1) . #6#)
                                                   (LETT #5#
                                                    (SPADCALL |x|
                                                     (QREFELT $ 28)) . #6#)
                                                   G190
                                                   (COND
                                                     ((> |k1| #5#) #7#))
                                                   (SEQ
                                                    (EXIT
                                                     (SPADCALL |x| |k|
                                                      |k1|
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (SPADCALL |x|
                                                         |k| |k1|
                                                         (QREFELT $ 69))
                                                        (SPADCALL
                                                         (QCAR |qr|)
                                                         (SPADCALL |x|
                                                          |i| |k1|
                                                          (QREFELT $
                                                           69))
                                                         (QREFELT $ 74))
                                                        (QREFELT $ 63))
                                                       |m|
                                                       (QREFELT $ 53))
                                                      (QREFELT $ 73))))
                                                   (LETT |k1|
                                                    (+ |k1| 1) . #6#)
                                                   #8# G191 (EXIT NIL))))))))
                                           (LETT |k| (+ |k| 1) . #6#)
                                           #8# G191 (EXIT NIL))
                                          (EXIT
                                           (LETT |i| (+ |i| 1) . #6#)))))))
                           (LETT |j| (+ |j| 1) . #6#) #8# G191
                           (EXIT NIL)))
                #1# (EXIT #1#))
           (EXIT |x|))))) 

(DEFUN |MHROWRED;rowEchelon;MRM;14| (|y| |m| $)
  (SPADCALL (|MHROWRED;vconc| |y| |m| $) (QREFELT $ 48))) 

(DEFUN |MHROWRED;rowEchelon;MRM;15| (|y| |m| $)
  (PROG (|nrows| |ncols| |minr| |j| #0=#:G2037 |rown| |x| |#G92| |a|
                 |b| |d| |#G93| #1=#:G2019 |#G94| |b1| |a1| |v1| |v2|
                 |un| |jj| |xij| |k| #2=#:G2040 |qr| |k1| #3=#:G2041
                 |i|)
    (RETURN
      (SEQ (LETT |x| (|MHROWRED;vconc| |y| |m| $)
                 . #4=(|MHROWRED;rowEchelon;MRM;15|))
           (LETT |nrows| (SPADCALL |x| (QREFELT $ 20)) . #4#)
           (LETT |ncols| (SPADCALL |x| (QREFELT $ 37)) . #4#)
           (LETT |minr|
                 (LETT |i| (SPADCALL |x| (QREFELT $ 19)) . #4#) . #4#)
           (SEQ (EXIT (SEQ (LETT |j|
                                 (SPADCALL |x| (QREFELT $ 36)) . #4#)
                           G190 (COND ((> |j| |ncols|) #5=(GO G191)))
                           (SEQ (COND
                                  ((< |nrows| |i|)
                                   (PROGN
                                     (LETT #0# |$NoValue| . #4#)
                                     (GO #0#))))
                                (LETT |rown| (- |minr| 1) . #4#)
                                (SEQ (LETT |k| |i| . #4#) G190
                                     (COND ((> |k| |nrows|) #5#))
                                     (SEQ
                                      (EXIT
                                       (COND
                                         ((NULL
                                           (SPADCALL
                                            (SPADCALL |x| |k| |j|
                                             (QREFELT $ 69))
                                            (|spadConstant| $ 7)
                                            (QREFELT $ 9)))
                                          (COND
                                            ((OR
                                              (EQL |rown| (- |minr| 1))
                                              (SPADCALL
                                               (SPADCALL |x| |k| |j|
                                                (QREFELT $ 69))
                                               (SPADCALL |x| |rown| |j|
                                                (QREFELT $ 69))
                                               (QREFELT $ 75)))
                                             (LETT |rown| |k| . #4#)))))))
                                     (LETT |k| (+ |k| 1) . #4#)
                                     #6=(GO G190) G191 (EXIT NIL))
                                (EXIT (COND
                                        ((EQL |rown| (- |minr| 1))
                                         "next j")
                                        ('T
                                         (SEQ
                                          (LETT |x|
                                           (SPADCALL |x| |i| |rown|
                                            (QREFELT $ 70)) . #4#)
                                          (SEQ
                                           (LETT |k| (+ |i| 1) . #4#)
                                           G190
                                           (COND
                                             ((> |k| |nrows|) #5#))
                                           (SEQ
                                            (EXIT
                                             (COND
                                               ((SPADCALL
                                                 (SPADCALL |x| |k| |j|
                                                  (QREFELT $ 69))
                                                 (QREFELT $ 47))
                                                "next k")
                                               ('T
                                                (SEQ
                                                 (PROGN
                                                   (LETT |#G92|
                                                    (SPADCALL
                                                     (SPADCALL |x| |i|
                                                      |j|
                                                      (QREFELT $ 69))
                                                     (SPADCALL |x| |k|
                                                      |j|
                                                      (QREFELT $ 69))
                                                     (QREFELT $ 72)) . #4#)
                                                   (LETT |a|
                                                    (QVELT |#G92| 0) . #4#)
                                                   (LETT |b|
                                                    (QVELT |#G92| 1) . #4#)
                                                   (LETT |d|
                                                    (QVELT |#G92| 2) . #4#)
                                                   |#G92|)
                                                 (PROGN
                                                   (LETT |#G93|
                                                    (PROG2
                                                     (LETT #1#
                                                      (SPADCALL
                                                       (SPADCALL |x|
                                                        |i| |j|
                                                        (QREFELT $ 69))
                                                       |d|
                                                       (QREFELT $ 58)) . #4#)
                                                     (QCDR #1#)
                                                      (|check-union|
                                                       (QEQCAR #1# 0)
                                                       (QREFELT $ 6)
                                                       #1#)) . #4#)
                                                   (LETT |#G94|
                                                    (PROG2
                                                     (LETT #1#
                                                      (SPADCALL
                                                       (SPADCALL |x|
                                                        |k| |j|
                                                        (QREFELT $ 69))
                                                       |d|
                                                       (QREFELT $ 58)) . #4#)
                                                     (QCDR #1#)
                                                      (|check-union|
                                                       (QEQCAR #1# 0)
                                                       (QREFELT $ 6)
                                                       #1#)) . #4#)
                                                   (LETT |b1|
                                                    |#G93| . #4#)
                                                   (LETT |a1|
                                                    |#G94| . #4#))
                                                 (SEQ
                                                  (LETT |k1|
                                                   (+ |j| 1) . #4#)
                                                  G190
                                                  (COND
                                                    ((> |k1| |ncols|)
                                                     #5#))
                                                  (SEQ
                                                   (LETT |v1|
                                                    (SPADCALL
                                                     (SPADCALL
                                                      (SPADCALL |a|
                                                       (SPADCALL |x|
                                                        |i| |k1|
                                                        (QREFELT $ 69))
                                                       (QREFELT $ 74))
                                                      (SPADCALL |b|
                                                       (SPADCALL |x|
                                                        |k| |k1|
                                                        (QREFELT $ 69))
                                                       (QREFELT $ 74))
                                                      (QREFELT $ 62))
                                                     |m|
                                                     (QREFELT $ 53)) . #4#)
                                                   (LETT |v2|
                                                    (SPADCALL
                                                     (SPADCALL
                                                      (SPADCALL |b1|
                                                       (SPADCALL |x|
                                                        |k| |k1|
                                                        (QREFELT $ 69))
                                                       (QREFELT $ 74))
                                                      (SPADCALL |a1|
                                                       (SPADCALL |x|
                                                        |i| |k1|
                                                        (QREFELT $ 69))
                                                       (QREFELT $ 74))
                                                      (QREFELT $ 63))
                                                     |m|
                                                     (QREFELT $ 53)) . #4#)
                                                   (SPADCALL |x| |i|
                                                    |k1| |v1|
                                                    (QREFELT $ 73))
                                                   (EXIT
                                                    (SPADCALL |x| |k|
                                                     |k1| |v2|
                                                     (QREFELT $ 73))))
                                                  (LETT |k1|
                                                   (+ |k1| 1) . #4#)
                                                  #6# G191 (EXIT NIL))
                                                 (SPADCALL |x| |i| |j|
                                                  |d| (QREFELT $ 73))
                                                 (EXIT
                                                  (SPADCALL |x| |k| |j|
                                                   (|spadConstant| $ 7)
                                                   (QREFELT $ 73))))))))
                                           (LETT |k| (+ |k| 1) . #4#)
                                           #6# G191 (EXIT NIL))
                                          (LETT |un|
                                           (SPADCALL
                                            (SPADCALL |x| |i| |j|
                                             (QREFELT $ 69))
                                            (QREFELT $ 77)) . #4#)
                                          (SPADCALL |x| |i| |j|
                                           (QVELT |un| 1)
                                           (QREFELT $ 73))
                                          (COND
                                            ((NULL
                                              (SPADCALL (QVELT |un| 2)
                                               (|spadConstant| $ 26)
                                               (QREFELT $ 9)))
                                             (SEQ
                                              (LETT |jj|
                                               (+ |j| 1) . #4#)
                                              G190
                                              (COND
                                                ((> |jj| |ncols|) #5#))
                                              (SEQ
                                               (EXIT
                                                (SPADCALL |x| |i| |jj|
                                                 (SPADCALL
                                                  (QVELT |un| 2)
                                                  (SPADCALL |x| |i|
                                                   |jj| (QREFELT $ 69))
                                                  (QREFELT $ 74))
                                                 (QREFELT $ 73))))
                                              (LETT |jj|
                                               (+ |jj| 1) . #4#)
                                              #6# G191 (EXIT NIL))))
                                          (LETT |xij|
                                           (SPADCALL |x| |i| |j|
                                            (QREFELT $ 69)) . #4#)
                                          (SEQ (LETT |k| |minr| . #4#)
                                           (LETT #2# (- |i| 1) . #4#)
                                           G190
                                           (COND ((> |k| #2#) #5#))
                                           (SEQ
                                            (EXIT
                                             (COND
                                               ((SPADCALL
                                                 (SPADCALL |x| |k| |j|
                                                  (QREFELT $ 69))
                                                 (QREFELT $ 47))
                                                "next k")
                                               ('T
                                                (SEQ
                                                 (LETT |qr|
                                                  (SPADCALL
                                                   (SPADCALL |x| |k|
                                                    |j| (QREFELT $ 69))
                                                   |xij|
                                                   (QREFELT $ 65)) . #4#)
                                                 (SPADCALL |x| |k| |j|
                                                  (QCDR |qr|)
                                                  (QREFELT $ 73))
                                                 (EXIT
                                                  (SEQ
                                                   (LETT |k1|
                                                    (+ |j| 1) . #4#)
                                                   (LETT #3#
                                                    (SPADCALL |x|
                                                     (QREFELT $ 28)) . #4#)
                                                   G190
                                                   (COND
                                                     ((> |k1| #3#) #5#))
                                                   (SEQ
                                                    (EXIT
                                                     (SPADCALL |x| |k|
                                                      |k1|
                                                      (SPADCALL
                                                       (SPADCALL
                                                        (SPADCALL |x|
                                                         |k| |k1|
                                                         (QREFELT $ 69))
                                                        (SPADCALL
                                                         (QCAR |qr|)
                                                         (SPADCALL |x|
                                                          |i| |k1|
                                                          (QREFELT $
                                                           69))
                                                         (QREFELT $ 74))
                                                        (QREFELT $ 63))
                                                       |m|
                                                       (QREFELT $ 53))
                                                      (QREFELT $ 73))))
                                                   (LETT |k1|
                                                    (+ |k1| 1) . #4#)
                                                   #6# G191 (EXIT NIL))))))))
                                           (LETT |k| (+ |k| 1) . #4#)
                                           #6# G191 (EXIT NIL))
                                          (EXIT
                                           (LETT |i| (+ |i| 1) . #4#)))))))
                           (LETT |j| (+ |j| 1) . #4#) #6# G191
                           (EXIT NIL)))
                #0# (EXIT #0#))
           (EXIT |x|))))) 

(DEFUN |ModularHermitianRowReduction| (#0=#:G2042)
  (PROG ()
    (RETURN
      (PROG (#1=#:G2043)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (LIST (|devaluate| #0#))
                       (HGET |$ConstructorCache|
                             '|ModularHermitianRowReduction|)
                       '|domainEqualList|)
                   . #2=(|ModularHermitianRowReduction|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (|ModularHermitianRowReduction;| #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|ModularHermitianRowReduction|))))))))))) 

(DEFUN |ModularHermitianRowReduction;| (|#1|)
  (PROG (DV$1 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|ModularHermitianRowReduction|))
        (LETT |dv$| (LIST '|ModularHermitianRowReduction| DV$1) . #0#)
        (LETT $ (GETREFV 78) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache| '|ModularHermitianRowReduction|
            (LIST DV$1) (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (COND
          ((|HasCategory| |#1| '(|IntegerNumberSystem|))
           (QSETREFV $ 65
               (CONS (|dispatchFunction|
                         |MHROWRED;normalizedDivide;2RR;10|)
                     $)))
          ('T
           (QSETREFV $ 65
               (CONS (|dispatchFunction|
                         |MHROWRED;normalizedDivide;2RR;11|)
                     $))))
        (COND
          ((|HasCategory| |#1| '(|Field|))
           (QSETREFV $ 49
               (CONS (|dispatchFunction| |MHROWRED;rowEchelon;MRM;14|)
                     $)))
          ('T
           (QSETREFV $ 49
               (CONS (|dispatchFunction| |MHROWRED;rowEchelon;MRM;15|)
                     $))))
        $)))) 

(MAKEPROP '|ModularHermitianRowReduction| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (0 . |Zero|)
             (|Boolean|) (4 . =) (10 . |false|) (14 . |true|)
             (|Mapping| 8 6) (|Vector| 6) (18 . |any?|) (|Integer|)
             (24 . |minIndex|) (29 . |qelt|) (|Matrix| 6)
             (35 . |minRowIndex|) (40 . |maxRowIndex|) (|List| 15)
             (45 . |member?|) (51 . |row|) (|List| 6) (57 . |parts|)
             (62 . |One|) (|NonNegativeInteger|) (66 . |ncols|)
             (71 . |zero|) (|List| 24) (77 . |matrix|)
             (82 . |removeDuplicates|) (|Set| 15) (87 . |construct|)
             (92 . |brace|) (97 . |minColIndex|) (102 . |maxColIndex|)
             (107 . =) (113 . |nrows|) (118 . |binomial|) (124 . |elt|)
             (131 . |determinant|) (136 . |gcd|) (142 . |minIndex|)
             (147 . |elt|) (153 . |rest|) (159 . |zero?|)
             (164 . |rowEchelon|) (169 . |rowEchelon|)
             |MHROWRED;rowEch;2M;7| (175 . |new|)
             (181 . |diagonalMatrix|) (186 . |rem|) (|Mapping| 6 6)
             (192 . |map|) (198 . |vertConcat|) (|Union| $ '"failed")
             (204 . |exquo|)
             (|Record| (|:| |quotient| $) (|:| |remainder| $))
             (210 . |divide|) (216 . <) (222 . +) (228 . -)
             (|Record| (|:| |quotient| 6) (|:| |remainder| 6))
             (234 . |normalizedDivide|)
             |MHROWRED;rowEchelonLocal;M2RM;13|
             |MHROWRED;rowEchLocal;MRM;12| (240 . **) (246 . |qelt|)
             (253 . |swapRows!|)
             (|Record| (|:| |coef1| $) (|:| |coef2| $)
                 (|:| |generator| $))
             (260 . |extendedEuclidean|) (266 . |qsetelt!|) (274 . *)
             (280 . |sizeLess?|)
             (|Record| (|:| |unit| $) (|:| |canonical| $)
                       (|:| |associate| $))
             (286 . |unitNormal|))
          '#(|rowEchelonLocal| 291 |rowEchelon| 298 |rowEchLocal| 304
             |rowEch| 310 |normalizedDivide| 315)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 77
                                '(0 6 0 7 2 6 8 0 0 9 0 8 0 10 0 8 0 11
                                  2 13 8 12 0 14 1 13 15 0 16 2 13 6 0
                                  15 17 1 18 15 0 19 1 18 15 0 20 2 21
                                  8 15 0 22 2 18 13 0 15 23 1 13 24 0
                                  25 0 6 0 26 1 18 27 0 28 2 18 0 27 27
                                  29 1 18 0 30 31 1 24 0 0 32 1 33 0 21
                                  34 1 33 0 21 35 1 18 15 0 36 1 18 15
                                  0 37 2 33 8 0 0 38 1 18 27 0 39 2 15
                                  0 0 0 40 3 18 0 0 21 21 41 1 18 6 0
                                  42 2 6 0 0 0 43 1 21 15 0 44 2 21 15
                                  0 15 45 2 21 0 0 27 46 1 6 8 0 47 1
                                  18 0 0 48 2 0 18 18 6 49 2 13 0 27 6
                                  51 1 18 0 13 52 2 6 0 0 0 53 2 18 0
                                  54 0 55 2 18 0 0 0 56 2 6 57 0 0 58 2
                                  6 59 0 0 60 2 6 8 0 0 61 2 6 0 0 0 62
                                  2 6 0 0 0 63 2 0 64 6 6 65 2 6 0 0 27
                                  68 3 18 6 0 15 15 69 3 18 0 0 15 15
                                  70 2 6 71 0 0 72 4 18 6 0 15 15 6 73
                                  2 6 0 0 0 74 2 6 8 0 0 75 1 6 76 0 77
                                  3 0 18 18 6 6 66 2 0 18 18 6 49 2 0
                                  18 18 6 67 1 0 18 18 50 2 0 64 6 6
                                  65)))))
          '|lookupComplete|)) 
