-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathblandb.f90
1560 lines (1558 loc) · 90.6 KB
/
blandb.f90
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
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
! last edited Januar 2, 1997
subroutine blandb(org, nmax, varmax, lock, fil, low, lim, posn, posl, &
minj, maxj)
!...Translated by Pacific-Sierra Research 77to90 4.3E 14:44:54 12/27/06
!...Switches:
!-----------------------------------------------
! I n t e r f a c e B l o c k s
!-----------------------------------------------
use sluggo_I
implicit none
!-----------------------------------------------
! D u m m y A r g u m e n t s
!-----------------------------------------------
integer , intent(in) :: nmax
integer :: varmax
integer , intent(in) :: fil
integer :: minj
integer :: maxj
integer :: org(15,0:10)
integer :: low(15,0:10)
integer , intent(in) :: lim(15)
integer :: posn(110)
integer :: posl(110)
logical :: lock(15,0:10)
!-----------------------------------------------
! L o c a l P a r a m e t e r s
!-----------------------------------------------
integer, parameter :: fil_1 = 7
integer, parameter :: fil_2 = 8
!-----------------------------------------------
! L o c a l V a r i a b l e s
!-----------------------------------------------
integer , dimension(15,0:10) :: antel, start
integer :: skal, cf
integer , dimension(15,0:10,0:1) :: ansats
integer , dimension(15,0:10) :: varupp, varned
integer :: an10, an20, an21, an30, an31, an32, an40, an41, an42, an43, k&
, an50, an51, an52, an53, an54, an60, an61, an62, an63, an64, an65, &
an70, an71, an72, an73, an74, an75, an76
integer , dimension(15,0:10) :: stopp
integer :: an80, an81, an82, an83, an84, an85, an86, an87, an90, an91, &
an92, an93, an94, an95, an96, an97, an98, ana0, ana1, ana2, ana3, ana4&
, ana5, ana6, ana7, ana8, ana9, plus21, plus31, plus32, plus41, plus42&
, plus43, plus51, plus52, plus53, plus54, plus61, plus62, plus63, &
plus64, plus65, plus71, plus72, plus73, plus74, plus75, plus76, plus81&
, plus82, plus83, plus84, plus85, plus86, plus87, plus91, plus92, &
plus93, plus94, plus95, plus96, plus97, plus98, plusa1, plusa2, plusa3&
, plusa4, plusa5, plusa6, plusa7, plusa8, plusa9, par0, par, i, j, &
antal, dum, plusba, plusca, plusda, plusea, plusfa, plusb1, plusb2, &
plusb3, plusb4, plusb5, plusb6, plusb7, plusb8, plusb9, plusc1, plusc2&
, plusc3, plusc4, plusc5, plusc6, plusc7, plusc8, plusc9, plusd1, &
plusd2, plusd3, plusd4, plusd5, plusd6, plusd7, plusd8, plusd9, pluse1&
, pluse2, pluse3, pluse4, pluse5, pluse6, pluse7, pluse8, pluse9, &
plusf1, plusf2, plusf3, plusf4, plusf5, plusf6, plusf7, plusf8, plusf9&
, anba, anca, anda, anea, anfa, anb0, anb1, anb2, anb3, anb4, anb5, &
anb6, anb7, anb8, anb9, anc0, anc1, anc2, anc3, anc4, anc5, anc6, anc7&
, anc8, anc9, and0, and1, and2, and3, and4, and5, and6, and7, and8, &
and9, ane0, ane1, ane2, ane3, ane4, ane5, ane6, ane7, ane8, ane9, anf0&
, anf1, anf2, anf3, anf4, anf5, anf6, anf7, anf8, anf9
real :: elar
logical :: first, finns
!-----------------------------------------------
!
cf = 0
antal = 0
par0 = 0
finns = .FALSE.
do i = 1, 15
do j = 0, min(10,i - 1)
antal = antal + org(i,j)
par0 = mod(par0 + j*org(i,j),2)
end do
end do
if (nmax < 15) then
do i = nmax + 1, 15
org(i,:min(10,i-1)) = 0
end do
endif
! 1s
call sluggo (1, 0, varmax, varupp, varned, ansats, org, lock(1,0), low, &
start(1,0), stopp(1,0))
do an10 = start(1,0), stopp(1,0), -1
antel(1,0) = an10
if (antel(1,0)>antal .or. antel(1,0)<lim(1)) cycle
ansats(1,0,0) = an10
! 2s
call sluggo (2, 0, varmax, varupp, varned, ansats, org, lock(2,0), low&
, start(2,0), stopp(2,0))
do an20 = start(2,0), stopp(2,0), -1
antel(2,0) = an20 + antel(1,0)
if (antel(2,0) > antal) cycle
ansats(2,0,0) = an20
! 2p
call sluggo (2, 1, varmax, varupp, varned, ansats, org, lock(2,1), &
low, start(2,1), stopp(2,1))
do an21 = start(2,1), stopp(2,1), -1
antel(2,1) = an21 + antel(2,0)
if (antel(2,1)>antal .or. antel(2,1)<lim(2)) cycle
do plus21 = min(an21,4), max(an21 - 2,0), -1
ansats(2,1,1) = plus21
ansats(2,1,0) = an21 - plus21
! 3s
call sluggo (3, 0, varmax, varupp, varned, ansats, org, lock(&
3,0), low, start(3,0), stopp(3,0))
do an30 = start(3,0), stopp(3,0), -1
antel(3,0) = an30 + antel(2,1)
if (antel(3,0) > antal) cycle
ansats(3,0,0) = an30
! 3p
call sluggo (3, 1, varmax, varupp, varned, ansats, org, &
lock(3,1), low, start(3,1), stopp(3,1))
do an31 = start(3,1), stopp(3,1), -1
antel(3,1) = an31 + antel(3,0)
if (antel(3,1) > antal) cycle
do plus31 = min(an31,4), max(an31 - 2,0), -1
ansats(3,1,1) = plus31
ansats(3,1,0) = an31 - plus31
! 3d
call sluggo (3, 2, varmax, varupp, varned, ansats, &
org, lock(3,2), low, start(3,2), stopp(3,2))
do an32 = start(3,2), stopp(3,2), -1
antel(3,2) = an32 + antel(3,1)
if (antel(3,2)>antal .or. antel(3,2)<lim(3)) &
cycle
do plus32 = min(an32,6), max(an32 - 4,0), -1
ansats(3,2,1) = plus32
ansats(3,2,0) = an32 - plus32
! 4s
call sluggo (4, 0, varmax, varupp, varned, &
ansats, org, lock(4,0), low, start(4,0), &
stopp(4,0))
do an40 = start(4,0), stopp(4,0), -1
antel(4,0) = an40 + antel(3,2)
if (antel(4,0) > antal) cycle
ansats(4,0,0) = an40
! 4p
call sluggo (4, 1, varmax, varupp, varned, &
ansats, org, lock(4,1), low, start(4,1)&
, stopp(4,1))
do an41 = start(4,1), stopp(4,1), -1
antel(4,1) = an41 + antel(4,0)
if (antel(4,1) > antal) cycle
do plus41 = min(an41,4), max(an41 - 2,0), &
-1
ansats(4,1,1) = plus41
ansats(4,1,0) = an41 - plus41
! 4d
call sluggo (4, 2, varmax, varupp, varned, &
ansats, org, lock(4,2), low, start(4,2)&
, stopp(4,2))
do an42 = start(4,2), stopp(4,2), -1
antel(4,2) = an42 + antel(4,1)
if (antel(4,2) > antal) cycle
do plus42 = min(an42,6), max(an42 - 4,0), &
-1
ansats(4,2,1) = plus42
ansats(4,2,0) = an42 - plus42
! 4f
call sluggo (4, 3, varmax, varupp, varned, &
ansats, org, lock(4,3), low, start(4,3)&
, stopp(4,3))
do an43 = start(4,3), stopp(4,3), -1
antel(4,3) = an43 + antel(4,2)
if (antel(4,3)>antal .or. antel(4,3)<lim(4)&
) cycle
do plus43 = min(an43,8), max(an43 - 6,0), &
-1
ansats(4,3,1) = plus43
ansats(4,3,0) = an43 - plus43
! 5s
call sluggo (5, 0, varmax, varupp, varned, &
ansats, org, lock(5,0), low, start(5,0)&
, stopp(5,0))
do an50 = start(5,0), stopp(5,0), -1
antel(5,0) = an50 + antel(4,3)
if (antel(5,0) > antal) cycle
ansats(5,0,0) = an50
! 5p
call sluggo (5, 1, varmax, varupp, varned, &
ansats, org, lock(5,1), low, start(5,1)&
, stopp(5,1))
do an51 = start(5,1), stopp(5,1), -1
antel(5,1) = an51 + antel(5,0)
if (antel(5,1) > antal) cycle
do plus51 = min(an51,4), max(an51 - 2,0), &
-1
ansats(5,1,1) = plus51
ansats(5,1,0) = an51 - plus51
! 5d
call sluggo (5, 2, varmax, varupp, varned, &
ansats, org, lock(5,2), low, start(5,2)&
, stopp(5,2))
do an52 = start(5,2), stopp(5,2), -1
antel(5,2) = an52 + antel(5,1)
if (antel(5,2) > antal) cycle
do plus52 = min(an52,6), max(an52 - 4,0), &
-1
ansats(5,2,1) = plus52
ansats(5,2,0) = an52 - plus52
! 5f
call sluggo (5, 3, varmax, varupp, varned, &
ansats, org, lock(5,3), low, start(5,3)&
, stopp(5,3))
do an53 = start(5,3), stopp(5,3), -1
antel(5,3) = an53 + antel(5,2)
if (antel(5,3) > antal) cycle
do plus53 = min(an53,8), max(an53 - 6,0), &
-1
ansats(5,3,1) = plus53
ansats(5,3,0) = an53 - plus53
! 5g
call sluggo (5, 4, varmax, varupp, varned, &
ansats, org, lock(5,4), low, start(5,4)&
, stopp(5,4))
do an54 = start(5,4), stopp(5,4), -1
antel(5,4) = an54 + antel(5,3)
if (antel(5,4)>antal .or. antel(5,4)<lim(5)&
) cycle
do plus54 = min(an54,10), max(an54 - 8,0), &
-1
ansats(5,4,1) = plus54
ansats(5,4,0) = an54 - plus54
! 6s
call sluggo (6, 0, varmax, varupp, varned, &
ansats, org, lock(6,0), low, start(6,0)&
, stopp(6,0))
do an60 = start(6,0), stopp(6,0), -1
antel(6,0) = an60 + antel(5,4)
if (antel(6,0)>antal .or. ansats(5,4,1)>2) &
cycle
ansats(6,0,0) = an60
! 6p
call sluggo (6, 1, varmax, varupp, varned, &
ansats, org, lock(6,1), low, start(6,1)&
, stopp(6,1))
do an61 = start(6,1), stopp(6,1), -1
antel(6,1) = an61 + antel(6,0)
if (antel(6,1) > antal) cycle
do plus61 = min(an61,4), max(an61 - 2,0), &
-1
ansats(6,1,1) = plus61
ansats(6,1,0) = an61 - plus61
! 6d
call sluggo (6, 2, varmax, varupp, varned, &
ansats, org, lock(6,2), low, start(6,2)&
, stopp(6,2))
do an62 = start(6,2), stopp(6,2), -1
antel(6,2) = an62 + antel(6,1)
if (antel(6,2) > antal) cycle
do plus62 = min(an62,6), max(an62 - 4,0), &
-1
ansats(6,2,1) = plus62
ansats(6,2,0) = an62 - plus62
! 6f
call sluggo (6, 3, varmax, varupp, varned, &
ansats, org, lock(6,3), low, start(6,3)&
, stopp(6,3))
do an63 = start(6,3), stopp(6,3), -1
antel(6,3) = an63 + antel(6,2)
if (antel(6,3) > antal) cycle
do plus63 = min(an63,8), max(an63 - 6,0), &
-1
ansats(6,3,1) = plus63
ansats(6,3,0) = an63 - plus63
! 6g
call sluggo (6, 4, varmax, varupp, varned, &
ansats, org, lock(6,4), low, start(6,4)&
, stopp(6,4))
do an64 = start(6,4), stopp(6,4), -1
antel(6,4) = an64 + antel(6,3)
if (antel(6,4) > antal) cycle
do plus64 = min(an64,10), max(an64 - 8,0), &
-1
ansats(6,4,1) = plus64
ansats(6,4,0) = an64 - plus64
! 6h
call sluggo (6, 5, varmax, varupp, varned, &
ansats, org, lock(6,5), low, start(6,5)&
, stopp(6,5))
do an65 = start(6,5), stopp(6,5), -1
antel(6,5) = an65 + antel(6,4)
if (.not.(antel(6,5)<=antal .and. ansats(6,&
4,1)<=2 .and. antel(6,5)>=lim(6))) &
cycle
do plus65 = min(an65,12), max(an65 - 10,0)&
, -1
ansats(6,5,1) = plus65
ansats(6,5,0) = an65 - plus65
! 7s
call sluggo (7, 0, varmax, varupp, varned, &
ansats, org, lock(7,0), low, start(7,0)&
, stopp(7,0))
do an70 = start(7,0), stopp(7,0), -1
antel(7,0) = an70 + antel(6,5)
if (.not.(antel(7,0)<=antal .and. ansats(6,&
5,1)<=2 .and. ansats(6,5,0)<=2)) cycle
ansats(7,0,0) = an70
! 7p
call sluggo (7, 1, varmax, varupp, varned, &
ansats, org, lock(7,1), low, start(7,1)&
, stopp(7,1))
do an71 = start(7,1), stopp(7,1), -1
antel(7,1) = an71 + antel(7,0)
if (antel(7,1) > antal) cycle
do plus71 = min(an71,4), max(an71 - 2,0), &
-1
ansats(7,1,1) = plus71
ansats(7,1,0) = an71 - plus71
! 7d
call sluggo (7, 2, varmax, varupp, varned, &
ansats, org, lock(7,2), low, start(7,2)&
, stopp(7,2))
do an72 = start(7,2), stopp(7,2), -1
antel(7,2) = an72 + antel(7,1)
if (antel(7,2) > antal) cycle
do plus72 = min(an72,6), max(an72 - 4,0), &
-1
ansats(7,2,1) = plus72
ansats(7,2,0) = an72 - plus72
! 7f
call sluggo (7, 3, varmax, varupp, varned, &
ansats, org, lock(7,3), low, start(7,3)&
, stopp(7,3))
do an73 = start(7,3), stopp(7,3), -1
antel(7,3) = an73 + antel(7,2)
if (antel(7,3) > antal) cycle
do plus73 = min(an73,8), max(an73 - 6,0), &
-1
ansats(7,3,1) = plus73
ansats(7,3,0) = an73 - plus73
! 7g
call sluggo (7, 4, varmax, varupp, varned, &
ansats, org, lock(7,4), low, start(7,4)&
, stopp(7,4))
do an74 = start(7,4), stopp(7,4), -1
antel(7,4) = an74 + antel(7,3)
if (antel(7,4) > antal) cycle
do plus74 = min(an74,10), max(an74 - 8,0), &
-1
ansats(7,4,1) = plus74
ansats(7,4,0) = an74 - plus74
! 7h
call sluggo (7, 5, varmax, varupp, varned, &
ansats, org, lock(7,5), low, start(7,5)&
, stopp(7,5))
do an75 = start(7,5), stopp(7,5), -1
antel(7,5) = an75 + antel(7,4)
if (antel(7,5)>antal .or. ansats(7,4,1)>2) &
cycle
do plus75 = min(an75,12), max(an75 - 10,0)&
, -1
ansats(7,5,1) = plus75
ansats(7,5,0) = an75 - plus75
! 7i
call sluggo (7, 6, varmax, varupp, varned, &
ansats, org, lock(7,6), low, start(7,6)&
, stopp(7,6))
do an76 = start(7,6), stopp(7,6), -1
antel(7,6) = an76 + antel(7,5)
if (.not.(antel(7,6)<=antal .and. ansats(7,&
5,1)<=2 .and. ansats(7,5,0)<=2 .and. &
antel(7,6)>=lim(7))) cycle
do plus76 = min(an76,14), max(an76 - 12,0)&
, -1
ansats(7,6,1) = plus76
ansats(7,6,0) = an76 - plus76
! 8s
call sluggo (8, 0, varmax, varupp, varned, &
ansats, org, lock(8,0), low, start(8,0)&
, stopp(8,0))
do an80 = start(8,0), stopp(8,0), -1
antel(8,0) = an80 + antel(7,6)
if (.not.(antel(8,0)<=antal .and. ansats(7,&
6,1)<=2 .and. ansats(7,6,0)<=2)) cycle
ansats(8,0,0) = an80
! 8p
call sluggo (8, 1, varmax, varupp, varned, &
ansats, org, lock(8,1), low, start(8,1)&
, stopp(8,1))
do an81 = start(8,1), stopp(8,1), -1
antel(8,1) = an81 + antel(8,0)
if (antel(8,1) > antal) cycle
do plus81 = min(an81,4), max(an81 - 2,0), &
-1
ansats(8,1,1) = plus81
ansats(8,1,0) = an81 - plus81
! 8d
call sluggo (8, 2, varmax, varupp, varned, &
ansats, org, lock(8,2), low, start(8,2)&
, stopp(8,2))
do an82 = start(8,2), stopp(8,2), -1
antel(8,2) = an82 + antel(8,1)
if (antel(8,2) > antal) cycle
do plus82 = min(an82,6), max(an82 - 4,0), &
-1
ansats(8,2,1) = plus82
ansats(8,2,0) = an82 - plus82
! 8f
call sluggo (8, 3, varmax, varupp, varned, &
ansats, org, lock(8,3), low, start(8,3)&
, stopp(8,3))
do an83 = start(8,3), stopp(8,3), -1
antel(8,3) = an83 + antel(8,2)
if (antel(8,3) > antal) cycle
do plus83 = min(an83,8), max(an83 - 6,0), &
-1
ansats(8,3,1) = plus83
ansats(8,3,0) = an83 - plus83
! 8g
call sluggo (8, 4, varmax, varupp, varned, &
ansats, org, lock(8,4), low, start(8,4)&
, stopp(8,4))
do an84 = start(8,4), stopp(8,4), -1
antel(8,4) = an84 + antel(8,3)
if (antel(8,4) > antal) cycle
do plus84 = min(an84,10), max(an84 - 8,0), &
-1
ansats(8,4,1) = plus84
ansats(8,4,0) = an84 - plus84
! 8h
call sluggo (8, 5, varmax, varupp, varned, &
ansats, org, lock(8,5), low, start(8,5)&
, stopp(8,5))
do an85 = start(8,5), stopp(8,5), -1
antel(8,5) = an85 + antel(8,4)
if (antel(8,5)>antal .or. ansats(8,4,1)>2) &
cycle
do plus85 = min(an85,12), max(an85 - 10,0)&
, -1
ansats(8,5,1) = plus85
ansats(8,5,0) = an85 - plus85
! 8i
call sluggo (8, 6, varmax, varupp, varned, &
ansats, org, lock(8,6), low, start(8,6)&
, stopp(8,6))
do an86 = start(8,6), stopp(8,6), -1
antel(8,6) = an86 + antel(8,5)
if (.not.(antel(8,6)<=antal .and. ansats(8,&
5,1)<=2 .and. ansats(8,5,0)<=2)) cycle
do plus86 = min(an86,14), max(an86 - 12,0)&
, -1
ansats(8,6,1) = plus86
ansats(8,6,0) = an86 - plus86
! 8k
call sluggo (8, 7, varmax, varupp, varned, &
ansats, org, lock(8,7), low, start(8,7)&
, stopp(8,7))
do an87 = start(8,7), stopp(8,7), -1
antel(8,7) = an87 + antel(8,6)
if (.not.(antel(8,7)<=antal .and. ansats(8,&
6,1)<=2 .and. ansats(8,6,0)<=2 .and. &
antel(8,7)>=lim(8))) cycle
do plus87 = min(an87,16), max(an87 - 14,0)&
, -1
ansats(8,7,1) = plus87
ansats(8,7,0) = an87 - plus87
! 9s
call sluggo (9, 0, varmax, varupp, varned, &
ansats, org, lock(9,0), low, start(9,0)&
, stopp(9,0))
do an90 = start(9,0), stopp(9,0), -1
antel(9,0) = an90 + antel(8,7)
if (.not.(antel(9,0)<=antal .and. ansats(8,&
7,1)<=2 .and. ansats(8,7,0)<=2)) cycle
ansats(9,0,0) = an90
! 9p
call sluggo (9, 1, varmax, varupp, varned, &
ansats, org, lock(9,1), low, start(9,1)&
, stopp(9,1))
do an91 = start(9,1), stopp(9,1), -1
antel(9,1) = an91 + antel(9,0)
if (antel(9,1) > antal) cycle
do plus91 = min(an91,4), max(an91 - 2,0), &
-1
ansats(9,1,1) = plus91
ansats(9,1,0) = an91 - plus91
! 9d
call sluggo (9, 2, varmax, varupp, varned, &
ansats, org, lock(9,2), low, start(9,2)&
, stopp(9,2))
do an92 = start(9,2), stopp(9,2), -1
antel(9,2) = an92 + antel(9,1)
if (antel(9,2) > antal) cycle
do plus92 = min(an92,6), max(an92 - 4,0), &
-1
ansats(9,2,1) = plus92
ansats(9,2,0) = an92 - plus92
! 9f
call sluggo (9, 3, varmax, varupp, varned, &
ansats, org, lock(9,3), low, start(9,3)&
, stopp(9,3))
do an93 = start(9,3), stopp(9,3), -1
antel(9,3) = an93 + antel(9,2)
if (antel(9,3) > antal) cycle
do plus93 = min(an93,8), max(an93 - 6,0), &
-1
ansats(9,3,1) = plus93
ansats(9,3,0) = an93 - plus93
! 9g
call sluggo (9, 4, varmax, varupp, varned, &
ansats, org, lock(9,4), low, start(9,4)&
, stopp(9,4))
do an94 = start(9,4), stopp(9,4), -1
antel(9,4) = an94 + antel(9,3)
if (antel(9,4) > antal) cycle
do plus94 = min(an94,10), max(an94 - 8,0), &
-1
ansats(9,4,1) = plus94
ansats(9,4,0) = an94 - plus94
! 9h
call sluggo (9, 5, varmax, varupp, varned, &
ansats, org, lock(9,5), low, start(9,5)&
, stopp(9,5))
do an95 = start(9,5), stopp(9,5), -1
antel(9,5) = an95 + antel(9,4)
if (antel(9,5)>antal .or. ansats(9,4,1)>2) &
cycle
do plus95 = min(an95,12), max(an95 - 10,0)&
, -1
ansats(9,5,1) = plus95
ansats(9,5,0) = an95 - plus95
! 9i
call sluggo (9, 6, varmax, varupp, varned, &
ansats, org, lock(9,6), low, start(9,6)&
, stopp(9,6))
do an96 = start(9,6), stopp(9,6), -1
antel(9,6) = an96 + antel(9,5)
if (.not.(antel(9,6)<=antal .and. ansats(9,&
5,1)<=2 .and. ansats(9,5,0)<=2)) cycle
do plus96 = min(an96,14), max(an96 - 12,0)&
, -1
ansats(9,6,1) = plus96
ansats(9,6,0) = an96 - plus96
! 9k
call sluggo (9, 7, varmax, varupp, varned, &
ansats, org, lock(9,7), low, start(9,7)&
, stopp(9,7))
do an97 = start(9,7), stopp(9,7), -1
antel(9,7) = an97 + antel(9,6)
if (.not.(antel(9,7)<=antal .and. ansats(9,&
6,1)<=2 .and. ansats(9,6,0)<=2)) cycle
do plus97 = min(an97,16), max(an97 - 14,0)&
, -1
ansats(9,7,1) = plus97
ansats(9,7,0) = an97 - plus97
! 9l
call sluggo (9, 8, varmax, varupp, varned, &
ansats, org, lock(9,8), low, start(9,8)&
, stopp(9,8))
do an98 = start(9,8), stopp(9,8), -1
antel(9,8) = an98 + antel(9,7)
if (.not.(antel(9,8)<=antal .and. ansats(9,&
7,1)<=2 .and. ansats(9,7,0)<=2 .and. &
antel(9,8)>=lim(9))) cycle
do plus98 = min(an98,18), max(an98 - 16,0)&
, -1
ansats(9,8,1) = plus98
ansats(9,8,0) = an98 - plus98
! 10s
call sluggo (10, 0, varmax, varupp, varned&
, ansats, org, lock(10,0), low, start(10&
,0), stopp(10,0))
do ana0 = start(10,0), stopp(10,0), -1
antel(10,0) = ana0 + antel(9,8)
if (.not.(antel(10,0)<=antal .and. ansats(9&
,8,1)<=2 .and. ansats(9,8,0)<=2)) cycle
ansats(10,0,0) = ana0
! 10p
call sluggo (10, 1, varmax, varupp, varned&
, ansats, org, lock(10,1), low, start(10&
,1), stopp(10,1))
do ana1 = start(10,1), stopp(10,1), -1
antel(10,1) = ana1 + antel(10,0)
if (antel(10,1) > antal) cycle
do plusa1 = min(ana1,4), max(ana1 - 2,0), &
-1
ansats(10,1,1) = plusa1
ansats(10,1,0) = ana1 - plusa1
! 10d
call sluggo (10, 2, varmax, varupp, varned&
, ansats, org, lock(10,2), low, start(10&
,2), stopp(10,2))
do ana2 = start(10,2), stopp(10,2), -1
antel(10,2) = ana2 + antel(10,1)
if (antel(10,2) > antal) cycle
do plusa2 = min(ana2,6), max(ana2 - 4,0), &
-1
ansats(10,2,1) = plusa2
ansats(10,2,0) = ana2 - plusa2
! 10f
call sluggo (10, 3, varmax, varupp, varned&
, ansats, org, lock(10,3), low, start(10&
,3), stopp(10,3))
do ana3 = start(10,3), stopp(10,3), -1
antel(10,3) = ana3 + antel(10,2)
if (antel(10,3) > antal) cycle
do plusa3 = min(ana3,8), max(ana3 - 6,0), &
-1
ansats(10,3,1) = plusa3
ansats(10,3,0) = ana3 - plusa3
! 10g
call sluggo (10, 4, varmax, varupp, varned&
, ansats, org, lock(10,4), low, start(10&
,4), stopp(10,4))
do ana4 = start(10,4), stopp(10,4), -1
antel(10,4) = ana4 + antel(10,3)
if (antel(10,4) > antal) cycle
do plusa4 = min(ana4,10), max(ana4 - 8,0), &
-1
ansats(10,4,1) = plusa4
ansats(10,4,0) = ana4 - plusa4
! 10h
call sluggo (10, 5, varmax, varupp, varned&
, ansats, org, lock(10,5), low, start(10&
,5), stopp(10,5))
do ana5 = start(10,5), stopp(10,5), -1
antel(10,5) = ana5 + antel(10,4)
if (antel(10,5)>antal .or. ansats(10,4,1)>2&
) cycle
do plusa5 = min(ana5,12), max(ana5 - 10,0)&
, -1
ansats(10,5,1) = plusa5
ansats(10,5,0) = ana5 - plusa5
! 10i
call sluggo (10, 6, varmax, varupp, varned&
, ansats, org, lock(10,6), low, start(10&
,6), stopp(10,6))
do ana6 = start(10,6), stopp(10,6), -1
antel(10,6) = ana6 + antel(10,5)
if (.not.(antel(10,6)<=antal .and. ansats(&
10,5,1)<=2 .and. ansats(10,5,0)<=2)) &
cycle
do plusa6 = min(ana6,14), max(ana6 - 12,0)&
, -1
ansats(10,6,1) = plusa6
ansats(10,6,0) = ana6 - plusa6
! 10k
call sluggo (10, 7, varmax, varupp, varned&
, ansats, org, lock(10,7), low, start(10&
,7), stopp(10,7))
do ana7 = start(10,7), stopp(10,7), -1
antel(10,7) = ana7 + antel(10,6)
if (.not.(antel(10,7)<=antal .and. ansats(&
10,6,1)<=2 .and. ansats(10,6,0)<=2)) &
cycle
do plusa7 = min(ana7,16), max(ana7 - 14,0)&
, -1
ansats(10,7,1) = plusa7
ansats(10,7,0) = ana7 - plusa7
! 10l
call sluggo (10, 8, varmax, varupp, varned&
, ansats, org, lock(10,8), low, start(10&
,8), stopp(10,8))
do ana8 = start(10,8), stopp(10,8), -1
antel(10,8) = ana8 + antel(10,7)
if (.not.(antel(10,8)<=antal .and. ansats(&
10,7,1)<=2 .and. ansats(10,7,0)<=2)) &
cycle
do plusa8 = min(ana8,18), max(ana8 - 16,0)&
, -1
ansats(10,8,1) = plusa8
ansats(10,8,0) = ana8 - plusa8
! 10m
call sluggo (10, 9, varmax, varupp, varned&
, ansats, org, lock(10,9), low, start(10&
,9), stopp(10,9))
do ana9 = start(10,9), stopp(10,9), -1
antel(10,9) = ana9 + antel(10,8)
if (.not.(antel(10,9)<=antal .and. ansats(&
10,8,1)<=2 .and. ansats(10,8,0)<=2&
.and. antel(10,9)>=lim(10))) cycle
do plusa9 = min(ana9,20), max(ana9 - 18,0)&
, -1
ansats(10,9,1) = plusa9
ansats(10,9,0) = ana9 - plusa9
! 11s
call sluggo (11, 0, varmax, varupp, varned&
, ansats, org, lock(11,0), low, start(11&
,0), stopp(11,0))
do anb0 = start(11,0), stopp(11,0), -1
antel(11,0) = anb0 + antel(10,9)
if (.not.(antel(11,0)<=antal .and. ansats(&
10,9,1)<=2 .and. ansats(10,9,0)<=2)) &
cycle
ansats(11,0,0) = anb0
! 11p
call sluggo (11, 1, varmax, varupp, varned&
, ansats, org, lock(11,1), low, start(11&
,1), stopp(11,1))
do anb1 = start(11,1), stopp(11,1), -1
antel(11,1) = anb1 + antel(11,0)
if (antel(11,1) > antal) cycle
do plusb1 = min(anb1,4), max(anb1 - 2,0), &
-1
ansats(11,1,1) = plusb1
ansats(11,1,0) = anb1 - plusb1
! 11d
call sluggo (11, 2, varmax, varupp, varned&
, ansats, org, lock(11,2), low, start(11&
,2), stopp(11,2))
do anb2 = start(11,2), stopp(11,2), -1
antel(11,2) = anb2 + antel(11,1)
if (antel(11,2) > antal) cycle
do plusb2 = min(anb2,6), max(anb2 - 4,0), &
-1
ansats(11,2,1) = plusb2
ansats(11,2,0) = anb2 - plusb2
! 11f
call sluggo (11, 3, varmax, varupp, varned&
, ansats, org, lock(11,3), low, start(11&
,3), stopp(11,3))
do anb3 = start(11,3), stopp(11,3), -1
antel(11,3) = anb3 + antel(11,2)
if (antel(11,3) > antal) cycle
do plusb3 = min(anb3,8), max(anb3 - 6,0), &
-1
ansats(11,3,1) = plusb3
ansats(11,3,0) = anb3 - plusb3
! 11g
call sluggo (11, 4, varmax, varupp, varned&
, ansats, org, lock(11,4), low, start(11&
,4), stopp(11,4))
do anb4 = start(11,4), stopp(11,4), -1
antel(11,4) = anb4 + antel(11,3)
if (antel(11,4) > antal) cycle
do plusb4 = min(anb4,10), max(anb4 - 8,0), &
-1
ansats(11,4,1) = plusb4
ansats(11,4,0) = anb4 - plusb4
! 11h
call sluggo (11, 5, varmax, varupp, varned&
, ansats, org, lock(11,5), low, start(11&
,5), stopp(11,5))
do anb5 = start(11,5), stopp(11,5), -1
antel(11,5) = anb5 + antel(11,4)
if (antel(11,5)>antal .or. ansats(11,4,1)>2&
) cycle
do plusb5 = min(anb5,12), max(anb5 - 10,0)&
, -1
ansats(11,5,1) = plusb5
ansats(11,5,0) = anb5 - plusb5
! 11i
call sluggo (11, 6, varmax, varupp, varned&
, ansats, org, lock(11,6), low, start(11&
,6), stopp(11,6))
do anb6 = start(11,6), stopp(11,6), -1
antel(11,6) = anb6 + antel(11,5)
if (.not.(antel(11,6)<=antal .and. ansats(&
11,5,1)<=2 .and. ansats(11,5,0)<=2)) &
cycle
do plusb6 = min(anb6,14), max(anb6 - 12,0)&
, -1
ansats(11,6,1) = plusb6
ansats(11,6,0) = anb6 - plusb6
! 11k
call sluggo (11, 7, varmax, varupp, varned&
, ansats, org, lock(11,7), low, start(11&
,7), stopp(11,7))
do anb7 = start(11,7), stopp(11,7), -1
antel(11,7) = anb7 + antel(11,6)
if (.not.(antel(11,7)<=antal .and. ansats(&
11,6,1)<=2 .and. ansats(11,6,0)<=2)) &
cycle
do plusb7 = min(anb7,16), max(anb7 - 14,0)&
, -1
ansats(11,7,1) = plusb7
ansats(11,7,0) = anb7 - plusb7
! 11l
call sluggo (11, 8, varmax, varupp, varned&
, ansats, org, lock(11,8), low, start(11&
,8), stopp(11,8))
do anb8 = start(11,8), stopp(11,8), -1
antel(11,8) = anb8 + antel(11,7)
if (.not.(antel(11,8)<=antal .and. ansats(&
11,7,1)<=2 .and. ansats(11,7,0)<=2)) &
cycle
do plusb8 = min(anb8,18), max(anb8 - 16,0)&
, -1
ansats(11,8,1) = plusb8
ansats(11,8,0) = anb8 - plusb8
! 11m
call sluggo (11, 9, varmax, varupp, varned&
, ansats, org, lock(11,9), low, start(11&
,9), stopp(11,9))
do anb9 = start(11,9), stopp(11,9), -1
antel(11,9) = anb9 + antel(11,8)
if (.not.(antel(11,9)<=antal .and. ansats(&
11,8,1)<=2 .and. ansats(11,8,0)<=2)) &
cycle
do plusb9 = min(anb9,20), max(anb9 - 18,0)&
, -1
ansats(11,9,1) = plusb9
ansats(11,9,0) = anb9 - plusb9
! 11n
call sluggo (11, 10, varmax, varupp, varned&
, ansats, org, lock(11,10), low, start(&
11,10), stopp(11,10))
do anba = start(11,10), stopp(11,10), -1
antel(11,10) = anba + antel(11,9)
if (.not.(antel(11,10)<=antal .and. ansats(&
11,9,1)<=2 .and. ansats(11,9,0)<=2&
.and. antel(11,10)>=lim(11))) cycle
do plusba = min(anba,22), max(anba - 20,0)&
, -1
ansats(11,10,1) = plusba
ansats(11,10,0) = anba - plusba
! 12s
call sluggo (12, 0, varmax, varupp, varned&
, ansats, org, lock(12,0), low, start(12&
,0), stopp(12,0))
do anc0 = start(12,0), stopp(12,0), -1
antel(12,0) = anc0 + antel(11,10)
if (.not.(antel(12,0)<=antal .and. ansats(&
11,10,1)<=2 .and. ansats(11,10,0)<=2)) &
cycle
ansats(12,0,0) = anc0
! 12p
call sluggo (12, 1, varmax, varupp, varned&
, ansats, org, lock(12,1), low, start(12&
,1), stopp(12,1))
do anc1 = start(12,1), stopp(12,1), -1
antel(12,1) = anc1 + antel(12,0)
if (antel(12,1) > antal) cycle
do plusc1 = min(anc1,4), max(anc1 - 2,0), &
-1
ansats(12,1,1) = plusc1
ansats(12,1,0) = anc1 - plusc1
! 12d
call sluggo (12, 2, varmax, varupp, varned&
, ansats, org, lock(12,2), low, start(12&
,2), stopp(12,2))
do anc2 = start(12,2), stopp(12,2), -1
antel(12,2) = anc2 + antel(12,1)
if (antel(12,2) > antal) cycle
do plusc2 = min(anc2,6), max(anc2 - 4,0), &
-1
ansats(12,2,1) = plusc2
ansats(12,2,0) = anc2 - plusc2
! 12f
call sluggo (12, 3, varmax, varupp, varned&
, ansats, org, lock(12,3), low, start(12&
,3), stopp(12,3))
do anc3 = start(12,3), stopp(12,3), -1
antel(12,3) = anc3 + antel(12,2)
if (antel(12,3) > antal) cycle
do plusc3 = min(anc3,8), max(anc3 - 6,0), &
-1
ansats(12,3,1) = plusc3
ansats(12,3,0) = anc3 - plusc3
! 12g
call sluggo (12, 4, varmax, varupp, varned&
, ansats, org, lock(12,4), low, start(12&
,4), stopp(12,4))
do anc4 = start(12,4), stopp(12,4), -1
antel(12,4) = anc4 + antel(12,3)
if (antel(12,4) > antal) cycle
do plusc4 = min(anc4,10), max(anc4 - 8,0), &
-1
ansats(12,4,1) = plusc4
ansats(12,4,0) = anc4 - plusc4
! 12h
call sluggo (12, 5, varmax, varupp, varned&
, ansats, org, lock(12,5), low, start(12&
,5), stopp(12,5))
do anc5 = start(12,5), stopp(12,5), -1
antel(12,5) = anc5 + antel(12,4)
if (antel(12,5)>antal .or. ansats(12,4,1)>2&
) cycle
do plusc5 = min(anc5,12), max(anc5 - 10,0)&
, -1
ansats(12,5,1) = plusc5
ansats(12,5,0) = anc5 - plusc5
! 12i
call sluggo (12, 6, varmax, varupp, varned&
, ansats, org, lock(12,6), low, start(12&
,6), stopp(12,6))
do anc6 = start(12,6), stopp(12,6), -1
antel(12,6) = anc6 + antel(12,5)
if (.not.(antel(12,6)<=antal .and. ansats(&
12,5,1)<=2 .and. ansats(12,5,0)<=2)) &
cycle
do plusc6 = min(anc6,14), max(anc6 - 12,0)&
, -1
ansats(12,6,1) = plusc6
ansats(12,6,0) = anc6 - plusc6
! 12k
call sluggo (12, 7, varmax, varupp, varned&
, ansats, org, lock(12,7), low, start(12&
,7), stopp(12,7))
do anc7 = start(12,7), stopp(12,7), -1
antel(12,7) = anc7 + antel(12,6)
if (.not.(antel(12,7)<=antal .and. ansats(&
12,6,1)<=2 .and. ansats(12,6,0)<=2)) &
cycle
do plusc7 = min(anc7,16), max(anc7 - 14,0)&
, -1
ansats(12,7,1) = plusc7
ansats(12,7,0) = anc7 - plusc7
! 12l
call sluggo (12, 8, varmax, varupp, varned&
, ansats, org, lock(12,8), low, start(12&
,8), stopp(12,8))
do anc8 = start(12,8), stopp(12,8), -1
antel(12,8) = anc8 + antel(12,7)
if (.not.(antel(12,8)<=antal .and. ansats(&
12,7,1)<=2 .and. ansats(12,7,0)<=2)) &
cycle
do plusc8 = min(anc8,18), max(anc8 - 16,0)&
, -1
ansats(12,8,1) = plusc8
ansats(12,8,0) = anc8 - plusc8
! 12m
call sluggo (12, 9, varmax, varupp, varned&
, ansats, org, lock(12,9), low, start(12&
,9), stopp(12,9))
do anc9 = start(12,9), stopp(12,9), -1
antel(12,9) = anc9 + antel(12,8)
if (.not.(antel(12,9)<=antal .and. ansats(&
12,8,1)<=2 .and. ansats(12,8,0)<=2)) &
cycle
do plusc9 = min(anc9,20), max(anc9 - 18,0)&
, -1
ansats(12,9,1) = plusc9
ansats(12,9,0) = anc9 - plusc9
! 12n
call sluggo (12, 10, varmax, varupp, varned&
, ansats, org, lock(12,10), low, start(&
12,10), stopp(12,10))
do anca = start(12,10), stopp(12,10), -1
antel(12,10) = anca + antel(12,9)
if (.not.(antel(12,10)<=antal .and. ansats(&
12,9,1)<=2 .and. ansats(12,9,0)<=2&
.and. antel(12,10)>=lim(12))) cycle
do plusca = min(anca,22), max(anca - 20,0)&
, -1
ansats(12,10,1) = plusca
ansats(12,10,0) = anca - plusca
! 13s
call sluggo (13, 0, varmax, varupp, varned&
, ansats, org, lock(13,0), low, start(13&
,0), stopp(13,0))
do and0 = start(13,0), stopp(13,0), -1
antel(13,0) = and0 + antel(12,10)
if (.not.(antel(13,0)<=antal .and. ansats(&
12,10,1)<=2 .and. ansats(12,10,0)<=2)) &
cycle
ansats(13,0,0) = and0
! 13p
call sluggo (13, 1, varmax, varupp, varned&
, ansats, org, lock(13,1), low, start(13&
,1), stopp(13,1))
do and1 = start(13,1), stopp(13,1), -1
antel(13,1) = and1 + antel(13,0)
if (antel(13,1) > antal) cycle
do plusd1 = min(and1,4), max(and1 - 2,0), &
-1
ansats(13,1,1) = plusd1
ansats(13,1,0) = and1 - plusd1
! 13d
call sluggo (13, 2, varmax, varupp, varned&
, ansats, org, lock(13,2), low, start(13&
,2), stopp(13,2))
do and2 = start(13,2), stopp(13,2), -1
antel(13,2) = and2 + antel(13,1)
if (antel(13,2) > antal) cycle
do plusd2 = min(and2,6), max(and2 - 4,0), &
-1
ansats(13,2,1) = plusd2
ansats(13,2,0) = and2 - plusd2
! 13f
call sluggo (13, 3, varmax, varupp, varned&
, ansats, org, lock(13,3), low, start(13&
,3), stopp(13,3))
do and3 = start(13,3), stopp(13,3), -1
antel(13,3) = and3 + antel(13,2)
if (antel(13,3) > antal) cycle
do plusd3 = min(and3,8), max(and3 - 6,0), &
-1
ansats(13,3,1) = plusd3
ansats(13,3,0) = and3 - plusd3
! 13g
call sluggo (13, 4, varmax, varupp, varned&
, ansats, org, lock(13,4), low, start(13&
,4), stopp(13,4))
do and4 = start(13,4), stopp(13,4), -1
antel(13,4) = and4 + antel(13,3)
if (antel(13,4) > antal) cycle
do plusd4 = min(and4,10), max(and4 - 8,0), &
-1
ansats(13,4,1) = plusd4
ansats(13,4,0) = and4 - plusd4
! 13h
call sluggo (13, 5, varmax, varupp, varned&
, ansats, org, lock(13,5), low, start(13&
,5), stopp(13,5))
do and5 = start(13,5), stopp(13,5), -1
antel(13,5) = and5 + antel(13,4)
if (antel(13,5)>antal .or. ansats(13,4,1)>2&