
(/VERSIONCHECK 2) 

(DEFUN |NCODIV;leftDivide;2PR;1| (|a| |b| $)
  (PROG (|iv| #0=#:G1821 |h| |r| |q|)
    (RETURN
      (SEQ (LETT |q| (|spadConstant| $ 8)
                 . #1=(|NCODIV;leftDivide;2PR;1|))
           (LETT |r| |a| . #1#)
           (LETT |iv|
                 (SPADCALL (SPADCALL |b| (QREFELT $ 9)) (QREFELT $ 10)) . #1#)
           (SEQ G190
                (COND
                  ((NULL (COND
                           ((OR (< (SPADCALL |r| (QREFELT $ 12))
                                   (SPADCALL |b| (QREFELT $ 12)))
                                (SPADCALL |r| (|spadConstant| $ 8)
                                    (QREFELT $ 15)))
                            'NIL)
                           ('T 'T)))
                   (GO G191)))
                (SEQ (LETT |h|
                           (SPADCALL
                               (SPADCALL |iv|
                                   (SPADCALL |r| (QREFELT $ 9))
                                   (QREFELT $ 16))
                               (PROG1 (LETT #0#
                                       (- (SPADCALL |r| (QREFELT $ 12))
                                        (SPADCALL |b| (QREFELT $ 12))) . #1#)
                                 (|check-subtype| (>= #0# 0)
                                     '(|NonNegativeInteger|) #0#))
                               (QREFELT $ 17)) . #1#)
                     (LETT |r|
                           (SPADCALL |r|
                               (SPADCALL |b| |h| (QREFELT $ 18))
                               (QREFELT $ 19)) . #1#)
                     (EXIT (LETT |q|
                                 (SPADCALL |q| |h| (QREFELT $ 20)) . #1#)))
                NIL (GO G190) G191 (EXIT NIL))
           (EXIT (CONS |q| |r|)))))) 

(DEFUN |NCODIV;leftQuotient;3P;2| (|a| |b| $)
  (QCAR (SPADCALL |a| |b| (QREFELT $ 22)))) 

(DEFUN |NCODIV;leftRemainder;3P;3| (|a| |b| $)
  (QCDR (SPADCALL |a| |b| (QREFELT $ 22)))) 

(DEFUN |NCODIV;leftExactQuotient;2PU;4| (|a| |b| $)
  (PROG (|qr|)
    (RETURN
      (SEQ (LETT |qr| (SPADCALL |a| |b| (QREFELT $ 22))
                 |NCODIV;leftExactQuotient;2PU;4|)
           (EXIT (COND
                   ((SPADCALL (QCDR |qr|) (|spadConstant| $ 8)
                        (QREFELT $ 15))
                    (CONS 0 (QCAR |qr|)))
                   ('T (CONS 1 "failed")))))))) 

(DEFUN |NCODIV;leftGcd;3P;5| (|a| |b| $)
  (PROG (|#G14| |#G15|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |a| (|spadConstant| $ 8) (QREFELT $ 15)) |b|)
             ((SPADCALL |b| (|spadConstant| $ 8) (QREFELT $ 15)) |a|)
             (#0='T
              (SEQ (SEQ G190
                        (COND
                          ((NULL (< 0 (SPADCALL |b| (QREFELT $ 12))))
                           (GO G191)))
                        (SEQ (EXIT (PROGN
                                     (LETT |#G14| |b|
                                      . #1=(|NCODIV;leftGcd;3P;5|))
                                     (LETT |#G15|
                                      (SPADCALL |a| |b| (QREFELT $ 24)) . #1#)
                                     (LETT |a| |#G14| . #1#)
                                     (LETT |b| |#G15| . #1#))))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT (COND
                           ((SPADCALL |b| (|spadConstant| $ 8)
                                (QREFELT $ 15))
                            |a|)
                           (#0# |b|)))))))))) 

(DEFUN |NCODIV;leftLcm;3P;6| (|a| |b| $)
  (PROG (|b0| |qr| |#G18| |#G19| |#G20| |#G21| |u| |v|)
    (RETURN
      (SEQ (COND
             ((SPADCALL |a| (|spadConstant| $ 8) (QREFELT $ 15)) |b|)
             ((SPADCALL |b| (|spadConstant| $ 8) (QREFELT $ 15)) |a|)
             ('T
              (SEQ (LETT |b0| |b| . #0=(|NCODIV;leftLcm;3P;6|))
                   (LETT |u|
                         (SPADCALL (|spadConstant| $ 29) 0
                             (QREFELT $ 17)) . #0#)
                   (LETT |v| (|spadConstant| $ 8) . #0#)
                   (SEQ G190
                        (COND
                          ((NULL (COND
                                   ((SPADCALL
                                     (SPADCALL |b| (QREFELT $ 9))
                                     (|spadConstant| $ 13)
                                     (QREFELT $ 30))
                                    'NIL)
                                   ('T 'T)))
                           (GO G191)))
                        (SEQ (LETT |qr|
                                   (SPADCALL |a| |b| (QREFELT $ 22)) . #0#)
                             (PROGN
                               (LETT |#G18| |b| . #0#)
                               (LETT |#G19| (QCDR |qr|) . #0#)
                               (LETT |a| |#G18| . #0#)
                               (LETT |b| |#G19| . #0#))
                             (EXIT (PROGN
                                     (LETT |#G20|
                                      (SPADCALL
                                       (SPADCALL |u| (QCAR |qr|)
                                        (QREFELT $ 18))
                                       |v| (QREFELT $ 20)) . #0#)
                                     (LETT |#G21| |u| . #0#)
                                     (LETT |u| |#G20| . #0#)
                                     (LETT |v| |#G21| . #0#))))
                        NIL (GO G190) G191 (EXIT NIL))
                   (EXIT (SPADCALL |b0| |u| (QREFELT $ 18)))))))))) 

(DEFUN |NonCommutativeOperatorDivision| (&REST #0=#:G1849)
  (PROG ()
    (RETURN
      (PROG (#1=#:G1850)
        (RETURN
          (COND
            ((LETT #1#
                   (|lassocShiftWithFunction| (|devaluateList| #0#)
                       (HGET |$ConstructorCache|
                             '|NonCommutativeOperatorDivision|)
                       '|domainEqualList|)
                   . #2=(|NonCommutativeOperatorDivision|))
             (|CDRwithIncrement| #1#))
            ('T
             (UNWIND-PROTECT
               (PROG1 (APPLY (|function|
                                 |NonCommutativeOperatorDivision;|)
                             #0#)
                 (LETT #1# T . #2#))
               (COND
                 ((NOT #1#)
                  (HREM |$ConstructorCache|
                        '|NonCommutativeOperatorDivision|))))))))))) 

(DEFUN |NonCommutativeOperatorDivision;| (|#1| |#2|)
  (PROG (DV$1 DV$2 |dv$| $ |pv$|)
    (RETURN
      (PROGN
        (LETT DV$1 (|devaluate| |#1|)
              . #0=(|NonCommutativeOperatorDivision|))
        (LETT DV$2 (|devaluate| |#2|) . #0#)
        (LETT |dv$|
              (LIST '|NonCommutativeOperatorDivision| DV$1 DV$2) . #0#)
        (LETT $ (GETREFV 32) . #0#)
        (QSETREFV $ 0 |dv$|)
        (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #0#))
        (|haddProp| |$ConstructorCache|
            '|NonCommutativeOperatorDivision| (LIST DV$1 DV$2)
            (CONS 1 $))
        (|stuffDomainSlots| $)
        (QSETREFV $ 6 |#1|)
        (QSETREFV $ 7 |#2|)
        $)))) 

(MAKEPROP '|NonCommutativeOperatorDivision| '|infovec|
    (LIST '#(NIL NIL NIL NIL NIL NIL (|local| |#1|) (|local| |#2|)
             (0 . |Zero|) (4 . |leadingCoefficient|) (9 . |inv|)
             (|NonNegativeInteger|) (14 . |degree|) (19 . |Zero|)
             (|Boolean|) (23 . =) (29 . *) (35 . |monomial|) (41 . *)
             (47 . -) (53 . +)
             (|Record| (|:| |quotient| 6) (|:| |remainder| 6))
             |NCODIV;leftDivide;2PR;1| |NCODIV;leftQuotient;3P;2|
             |NCODIV;leftRemainder;3P;3| (|Union| 6 '"failed")
             |NCODIV;leftExactQuotient;2PU;4| |NCODIV;leftGcd;3P;5|
             (59 . |One|) (63 . |One|) (67 . =) |NCODIV;leftLcm;3P;6|)
          '#(|leftRemainder| 73 |leftQuotient| 79 |leftLcm| 85
             |leftGcd| 91 |leftExactQuotient| 97 |leftDivide| 103)
          'NIL
          (CONS (|makeByteWordVec2| 1 'NIL)
                (CONS '#()
                      (CONS '#()
                            (|makeByteWordVec2| 31
                                '(0 6 0 8 1 6 7 0 9 1 7 0 0 10 1 6 11 0
                                  12 0 7 0 13 2 6 14 0 0 15 2 7 0 0 0
                                  16 2 6 0 7 11 17 2 6 0 0 0 18 2 6 0 0
                                  0 19 2 6 0 0 0 20 0 6 0 28 0 7 0 29 2
                                  7 14 0 0 30 2 0 6 6 6 24 2 0 6 6 6 23
                                  2 0 6 6 6 31 2 0 6 6 6 27 2 0 25 6 6
                                  26 2 0 21 6 6 22)))))
          '|lookupComplete|)) 
