(CSETQ $TRACE
(LAMBDA (DB-AL . DB-L)
        (CSETQ DB-E1 (CSETQ DB-L1 (CSETQ DB-E2 T)))
        (CSETQ DB-L2 '($VAL))
        (COND [DB-L <CSETQ DB-E1 (CSETQ DB-E2 (CAR DB-L))>
                    <COND [<SETQ DB-L (CDR DB-L)>
                            <CSETQ DB-L1 (CAR DB-L)>
                            <COND [<SETQ DB-L (CDR DB-L)>
                                    <CSETQ DB-E2 (CAR DB-L)>
                                    <COND [<SETQ DB-L (CDR DB-L)>
                                            <CSETQ DB-L2 (CAR DB-L)>]>]>
                           ]>])
        ((MANIFEST MAPC) (DB-LIST DB-AL)
         (LAMBDA (DB-F)
                 ((MANIFEST UNBREAK) DB-F)
                 (DB-DEF DB-F)
                 ((MANIFEST PUT) DB-F 'DB-L2 DB-L2)
                 ((MANIFEST PUT) DB-F 'DB-L1
                  (COND [<NOT (EQ DB-L1 T)> DB-L1]
                        [<OR [NULL DB-PAR]
                             [EQ DB-PAR T]> DB-PAR]
                        [T <DB-LIST DB-PAR>]))
                 ((MANIFEST PUT) DB-F 'DB-E2 DB-E2)
                 ((MANIFEST PUT) DB-F 'DB-E1 DB-E1)
                 ((MANIFEST PUT) DB-F 'DB-BFUNC ((MANIFEST EVAL) ((
                  MANIFEST LIST) 'LAMBDA
                  (COND [<EQ DB-PAR T> NIL]
                        [T DB-PAR]) '(DB-BFUNC1 T))))
                 ((MANIFEST BREAK) DB-F DB-BFUNC)))
        T))

(CSETQ $BREAK
(LAMBDA (DB-AL . DB-L)
        (CSETQ DB-E1 (CSETQ DB-E2 T))
        (COND [DB-L <CSETQ DB-E1 (CSETQ DB-E2 (CAR DB-L))>
                    <COND [<SETQ DB-L (CDR DB-L)>
                            <CSETQ DB-E2 (CAR DB-L)>]>])
        ((MANIFEST MAPC) (DB-LIST DB-AL)
         (LAMBDA (DB-F)
                 ((MANIFEST UNBREAK) DB-F)
                 (DB-DEF DB-F)
                 ((MANIFEST PUT) DB-F 'DB-E2 DB-E2)
                 ((MANIFEST PUT) DB-F 'DB-E1 DB-E1)
                 ((MANIFEST PUT) DB-F 'DB-BFUNC ((MANIFEST EVAL) ((
                  MANIFEST LIST) 'LAMBDA
                  (COND [<EQ DB-PAR T> NIL]
                        [T DB-PAR]) '(DB-BFUNC1 F))))
                 ((MANIFEST BREAK) DB-F DB-BFUNC)))
        T))

(CSETQ $TRACEV
(LAMBDA (DB-AL . DB-L)
        (CSETQ DB-E1
         (OR DB-L
             T))
        (COND [<ZEROP DB-TV>
                <(MANIFEST BREAK) 'CSET DB-BFUNCV>
                <(MANIFEST BREAK) 'SET DB-BFUNCV>
                <(MANIFEST BREAK) 'CSETQ DB-BCSETQ>
                <(MANIFEST BREAK) 'SETQ DB-BSETQ>])
        ((MANIFEST MAPC) (DB-LIST DB-AL)
         (LAMBDA (DB-F)
                 (COND [<NOT (GET DB-F 'DB-TV)>
                         <CSETQ DB-TV ((MANIFEST ADD1) DB-TV)>])
                 ((MANIFEST PUT) DB-F 'DB-TV DB-E1)))
        T))

(CSETQ $UNBUG
(LAMBDA DB-AL
        (COND [<NULL DB-AL>
                <(MANIFEST OBLIST) DB-UNBUG>
                <CSETQ DB-TLEV (CSETQ DB-BLEV 0)>]
              [T <(MANIFEST MAPC) (DB-LIST (CAR DB-AL)) DB-UNBUG>])
        T))

(CSETQ DB-UNBUG
(LAMBDA (DB-F)
        ((MANIFEST UNBREAK) DB-F)
        ((MANIFEST REMPROP) DB-F 'DB-BFUNC)
        ((MANIFEST REMPROP) DB-F 'DB-E1)
        ((MANIFEST REMPROP) DB-F 'DB-E2)
        ((MANIFEST REMPROP) DB-F 'DB-L1)
        ((MANIFEST REMPROP) DB-F 'DB-L2)
        (COND [<(MANIFEST GET) DB-F 'DB-TV>
                <(MANIFEST REMPROP) DB-F 'DB-TV>
                <COND [<ZEROP (CSETQ DB-TV ((MANIFEST SUB1) DB-TV))>
                        <(MANIFEST UNBREAK) 'CSET>
                        <(MANIFEST UNBREAK) 'SET>
                        <(MANIFEST UNBREAK) 'CSETQ>
                        <(MANIFEST UNBREAK) 'SETQ>]>])))

(CSETQ DB-LIST
(LAMBDA (DB-AL)
        (COND [<ATOM DB-AL> <(MANIFEST LIST) DB-AL>]
              [T DB-AL])))

(CSETQ DB-DEF
(LAMBDA (DB-F)
        (CSETQ DB-PAR (CAR
         (OR [(MANIFEST *DEF) DB-F]
             [(MANIFEST *DEF) ((MANIFEST RPLACA) 0Q ((MANIFEST *SPEC)
              DB-F))]
             [(MANIFEST *DEF) ((MANIFEST RPLACA) 0Q ((MANIFEST *MACRO)
              DB-F))]
             '[T])))))

(CSETQ DB-BFUNC
(LAMBDA (DB-FNN DB-FN . DB-ARGS)
        (PROG <($ARGS DB-ARGS)>
              <AND [(MANIFEST MINUSP) DB-FNN]
                   DB-ARGS
                   [SETQ $ARGS (CAR DB-ARGS)]>
              <RETURN (((MANIFEST GET) DB-FNN 'DB-BFUNC) (STACK $ARGS))>
         )))

(CSETQ DB-BFUNC1
(LAMBDA (DB-F)
        (PROG <$VAL DB-T>
              <COND [<(MANIFEST EVAL) ((MANIFEST GET) DB-FNN 'DB-E1)>
                      <COND [DB-F <DB-TDUMP DB-ETEXT 'DB-L1>
                                  <CSETQ DB-TLEV ((MANIFEST ADD1) (SETQ
                                   DB-T DB-TLEV))>]
                            [T <DB-PRINT DB-ETEXT DB-BLEV 1>
                               <$BRKPT "BREAK:">
                               <CSETQ DB-BLEV ((MANIFEST ADD1) (SETQ
                                DB-T DB-BLEV))>]>]>
              <SETQ $VAL (DB-FN (STACK DB-ARGS))>
              <COND [DB-T <COND [DB-F <CSETQ DB-TLEV DB-T>]
                                [T <CSETQ DB-BLEV DB-T>]>]>
              <COND [<(MANIFEST EVAL) ((MANIFEST GET) DB-FNN 'DB-E2)>
                      <COND [DB-F <DB-TDUMP DB-LTEXT 'DB-L2>]
                            [T <DB-PRINT DB-LTEXT DB-BLEV 1>
                               <$BRKPT "BREAK:">]>]>
              <RETURN $VAL>)))

(CSETQ DB-BFUNCV
(LAMBDA (DB-SETFN DB-SETF DB-SNM $VAL)
        (PROG <(DB-SE ((MANIFEST GET) DB-SNM 'DB-TV))>
              <COND [<AND DB-SE
                          [OR [ATOM DB-SE]
                              [(MANIFEST EVAL) (CAR DB-SE)]]>
                      <(MANIFEST TERPRI)>
                      <(MANIFEST PRIN1) "*">
                      <(MANIFEST PRIN1) DB-SETFN>
                      <(MANIFEST PRIN1) " ">
                      <(MANIFEST PRIN1) DB-SNM>
                      <(MANIFEST PRIN1) ": ">
                      <DB-PRIN1 $VAL>
                      <COND [<NOT (ATOM DB-SE)> <$BRKPT "BREAK:">]>]>
              <RETURN (DB-SETF DB-SNM $VAL)>)))

(CSETQ DB-BCSETQ
(LAMBDA (DB-SETFN DB-SETF DB-SNM)
        (DB-BFUNCV DB-SETFN DB-CSET (CAR DB-SNM) ((MANIFEST EVAL) (CADR
         DB-SNM)))))

(CSETQ DB-BSETQ
(LAMBDA (DB-SETFN DB-SETF DB-SNM)
        (DB-BFUNCV DB-SETFN DB-SET (CAR DB-SNM) ((MANIFEST EVAL) (CADR
         DB-SNM)))))

(CSETQ $
(LAMBDA (DB-N)
        (CAR (COND [<(MANIFEST NTH) $ARGS DB-N>]
                   [T '<**UNDEF**>]))))

(CSETQ DB-TDUMP
(LAMBDA (DB-TEXT DB-L)
        (PROG <DB-N DB-E DB-V (DB-COL ((MANIFEST PLUS) ((MANIFEST TIMES)
               DB-TLEV 4) 2))>
              <DB-PRINT DB-TEXT DB-TLEV ((MANIFEST SUB1) DB-COL)>
              <SETQ DB-L ((MANIFEST GET) DB-FNN DB-L)>
              <COND [<NULL DB-L> <RETURN NIL>]
                    [<ATOM DB-L>
                      <SETQ DB-N 0>
                      <SETQ DB-L $ARGS>]>
         LOOP <COND [<NULL DB-L> <RETURN T>]
                    [DB-N <SETQ DB-E ((MANIFEST LIST) '$ (SETQ DB-N ((
                           MANIFEST ADD1) DB-N)))>
                          <SETQ DB-V (CAR DB-L)>]
                    [T <SETQ DB-E (CAR DB-L)>
                       <SETQ DB-V ((MANIFEST EVAL) DB-E)>]>
              <(MANIFEST PRIN1) DB-E DB-COL>
              <(MANIFEST PRIN1) ": ">
              <DB-PRIN1 DB-V>
              <SETQ DB-L (CDR DB-L)>
              <GO LOOP>)))

(CSETQ $BRKPT
(LAMBDA (DB-BV)
        (PROG NIL
              <(MANIFEST TERPRI)>
              <(MANIFEST PRINT) DB-BV>
         LOOP <(MANIFEST CLEARBUFF)>
              <AND [EQ (SETQ DB-BV ((MANIFEST READ))) T]
                   [RETURN T]>
              <SETQ DB-BV ((MANIFEST EVAL) DB-BV)>
              <(MANIFEST PRIN1) "-->">
              <DB-PRIN1 DB-BV>
              <GO LOOP>)))

(CSETQ DB-PRINT
(LAMBDA (DB-TEXT DB-L DB-N)
        ((MANIFEST TERPRI))
        ((MANIFEST PRIN1) DB-TEXT DB-N)
        ((MANIFEST PRIN1) DB-FNN)
        ((MANIFEST PRIN1) " [")
        ((MANIFEST PRIN1) DB-L)
        ((MANIFEST PRINT) "]")))

(CSETQ DB-PRIN1
(LAMBDA (DB-L)
        (CSETQ DB-SAVE ((MANIFEST PLIMIT) DB-LIMIT))
        ((MANIFEST PRIN1) DB-L ((MANIFEST CURRCOL)))
        ((MANIFEST PLIMIT) DB-SAVE)
        ((MANIFEST TERPRI))))

(CSETQ DB-CSET CSET)
(CSETQ DB-SET SET)
(CSETQ DB-TV 0)
(CSETQ DB-ETEXT ">ENTERING ")
(CSETQ DB-LTEXT "<LEAVING  ")
(CSETQ DB-TLEV 0)
(CSETQ DB-BLEV 0)
(CSETQ DB-LIMIT '(3 . 5))
(CSETQ DB-E1 'NIL)
(CSETQ DB-L1 'NIL)
(CSETQ DB-E2 'NIL)
(CSETQ DB-L2 'NIL)
(CSETQ DB-PAR 'NIL)
(CSETQ DB-SAVE 'NIL)

(CSETQ DB-DUMP '($TRACE $BREAK $TRACEV $UNBUG DB-UNBUG DB-LIST DB-DEF
         DB-BFUNC DB-BFUNC1 DB-BFUNCV DB-BCSETQ DB-BSETQ $ DB-TDUMP
         $BRKPT DB-PRINT DB-PRIN1 DB-CSET DB-SET DB-TV DB-ETEXT DB-LTEXT
         DB-TLEV DB-BLEV DB-LIMIT DB-E1 DB-L1 DB-E2 DB-L2 DB-PAR DB-SAVE
         DB-DUMP))

"DEBUG PACKAGE LOADED"