File: bug002.lisp

package info (click to toggle)
clisp 1%3A2.49.20241228.gitc3ec11b-2
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 57,724 kB
  • sloc: lisp: 124,909; ansic: 83,890; xml: 27,431; sh: 11,074; fortran: 7,307; makefile: 1,456; perl: 164; sed: 13
file content (226 lines) | stat: -rw-r--r-- 8,985 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
(declaim (special *s1* *s2* *s3* *s4* *s5* *s6* *s7* *s8* *s9*))

(let ((vars '(a b c d e f g h))
      (var-types
       '((integer -10156883949 -308945276) (integer -10238129190247 4942)
         (integer -13 430071204) (integer 636299151392 1316378644139)
         (integer -4178997 150763) (integer -106672607540 118536683934)
         (integer 2 1648136180958) (integer -234451072 182015592)) )
      (vals-list
       '((-6471154533 -252139422192 298074672 864413032888 -3027364
          -35189361672 1119416506309 69109593)))
      (form
       '(+
         (+
          (+
           (if
            (if (and (= 103360 3005)
                     (eql g e))
                (or (and (/= h 16959)
                         (<= a 364235))
                    (ldb-test (byte 22 17) -6421))
		(or
		 (logbitp 22 h)
		 (<= -39441685)))
	      (* (let* ((*s2*
                         (ash
                          (let ((*s8* (if (<= f d) (coerce b 'integer) h)))
                            -30686)
                          79)))
                   c))
              (lognor
               (labels ((%f2 (f2-1)
                          (labels ((%f2 (f2-1 f2-2)
                                     (declare (ignore f2-1 f2-2))
                                     (- -280859370 440819981)))
                            (%f2 g f2-1))))
                 (lognor
                  (labels ((%f16 (f16-1 f16-2) (declare (ignore f16-1 f16-2))
                                 (%f2 1504872262)))
                    (- (if (equal (%f16 371066235 -188) f)
                           (- f)
                           g)))
                  (let* ((*s1* 66)) e)))
               (lcm (dotimes (iv3 2 -2876)) 3072)))
           (+
            (+
             (case d
               ((1882) (dpb e (byte 16 24) a))
               ((1721) c)
               ((173) d)
               ((1944)
                (logior
                 0
                 (let ((v8
                        (flet ((%f5 ()
                                 (logorc1 f (mask-field (byte 3 16) e))))
                          (min
                           (%f5)
                           (gcd
                            (dotimes
                                (iv1 1
                                 (if (ldb-test (byte 33 17) a)
                                     (lcm (logxor -22 d) f a)
                                     -1))))))))
                   (declare (ignore v8))
                   -1746)))
               (t g))
             (block b3
               (logior
                -1154444
                (if (eql e d)
                    g
                    (flet ((%f17 (f17-1 f17-2) (declare (ignore f17-1 f17-2))
                                 -309530764))
                      (if
		       (and (> -574942  -63058285)
			    (typep
			     (multiple-value-prog1
                                 (logand
                                  (logcount -92)
                                  (truncate 16256 (max 77 a))
                                  (case e
                                    ((3) 16)
                                    ((-15) 0)
                                    ((-6) e)
                                    ((-16) 1)
                                    ((-14) (return-from b3 -180))
                                    ((-1) 12)
                                    ((-7) 100)
                                    (t b))))
			     '(integer 62572038))
			    (< (+ (ldb (byte 32 24) d) c) a))
		       (return-from b3 -2858)
                       (%f17 30967 -403468604)))))))
            (if (not
                 (if (logbitp 10 478)
                     (= -36 c)
                     (typep
                      (prog1 11452525 (unwind-protect d))
                      '(integer -1815287 1107737))))
                (if (> (logxor c (mask-field (byte 29 1) (floor b)))
                       2)
                    (logeqv 1062524 b)
                    0)
                (logorc1 h (if (> 1737453 f) d f)))
            (truncate
             -50347453
             (min -24 (- (+ e -293586) 1187228)))
            (dpb
             (if (> 62325 5162518) c 5758514)
             (byte 9 3)
             (ldb (byte 2 5) 311)))
           (ldb (byte 7 15)
                (deposit-field e (byte 7 19)
                               (dotimes (iv3 1 1024366)))))
          (block b6
            (if
             (if
              (logbitp 3
                       (lognor
                        (logand -39609 99668265
                                (dpb -3121 (byte 24 13) 6))
                        (logandc1
                         (- -43 (+ -437))
                         47)))
              (not
               (and
                (if
                 (logbitp 5 (gcd
                             (let ((*s8* 267159)) b)
                             1 (catch 'ct6 h) c))
                 (logbitp 26 (max (lognor f (catch 'ct5
                                              (logxor e 1552895971 -31267
                                                      41816870)))))
                 (ldb-test (byte 5 12)
                           (dotimes (iv3 2 g)
                             (let* ((v9 (gcd 37467
                                             (ignore-errors b)
                                             (ignore-errors e)
                                             -382551)))
                               (declare (ignore v9))))))
                (< -2399
                   (let ((*s3* (if (= a d) h  14)))
                     (ash g 81)))))
              (not
               (ldb-test (byte 27 16)
                         (flet ((%f18 ()
                                  (deposit-field a (byte 29 2)
                                                 (progv '(*s6* *s5* *s1*)
                                                     (list 0 1131 -685394175)
                                                   217))))
                           (deposit-field (%f18) (byte 12 13) e)))))
             (gcd
              (case f
                ((91) (if (equal -83 a) (return-from b6 g) 0))
                (t
                 (catch 'ct1
                   (labels ((%f10 ()
                              (return-from b6
                                (if (not t) h (catch 'ct1 (- b c))))))
                     (catch 'ct2
			 (flet ((%f18 (f18-1)
                                  (ignore-errors c)
                                  (tagbody (go tag3) (%f10) tag3)
                                  f18-1))
			   (mask-field (byte 1 7) (%f18 -293))))))))
              (if (and (or (eql g f)
                           (return-from b6 (dotimes (iv4 3 -1491648))))
                       (if (= a -36) t))
                  (return-from b6 0)
		  (if (> e 13)
		      (return-from b6 0)
                      0)))
	     (block b4
	       (labels ((%f17 (f17-1 f17-2 f17-3 &optional f17-4 f17-5)
                          (declare (ignore f17-1 f17-2 f17-3 f17-4 f17-5))
                          0))
		 (%f17
		  (if (= (%f17 8313 h b) -27267375)
		      (max h
			   (progn
			     (%f17 244 45 b)
			     (ldb (byte 28 18) d)))
                      (logorc2
                       (if (> b -32743995)
                           b
                           (if (<= h (%f17 h -223 -2849  468003267))
                               (%f17 g a (%f17 f -21460141 e) 25)
                               (truncate 119531 (min -32 1003261))))
                       e))
		  (dotimes
		      (iv4 3
                       (%f17 (labels ((%f11 ()
                                        (if (= 0 1) (return-from b4 0) d))) 0)
                             0 0))
		    (catch 'ct6
                      (restart-case
                          (dotimes
                              (iv2 3
                               (%f17
                                (dotimes (iv1 0 iv4)
                                  (apply #'%f17 174 iv1 -62 -23980698 nil))
                                1
                                (%f17
                                 (catch 'ct7 1783873)
                                 (mask-field (byte 28 3)
                                             (throw 'ct6
                                               (%f17 -16 e 0
                                                     (%f17 -377458758
                                                           2273 g))))
                                 g)))
                            (case (dotimes (iv3 0 f) (%f17 h b iv2 0))
			   ((-126253 -99432 -123213) 0)
			   (t 1))))))
		  0)))))))))
  (let* ((fn (coerce `(lambda ,vars ,form) 'function)) e c
         (cfn (compile nil fn)))
    (fresh-line)
    (finish-output)
    ;; (disassemble cfn)
    (dolist (vals vals-list)
      (format t "~& ---- ~S ----~%EVAL: ~S~%COMPILE: ~S~%" vals
              (setq e (apply fn vals))
              (setq c (apply cfn vals)))
      (assert (equal e c))
      (finish-output))))