summaryrefslogtreecommitdiffstats
path: root/all_pairs/source/epic/epic.c
blob: ed08040c6f8585852156989c4761461139d568ce (plain) (blame)
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
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
/*

  This program is part of the TACLeBench benchmark suite.
  Version V 2.0

  Name: epic

  Author: Designed by Eero P. Simoncelli and Edward H. Adelson
          Written by Eero P. Simoncelli
          Developed at the Vision Science Group, The Media Laboratory
          Copyright 1989, Massachusetts Institute of Technology
          All rights reserved.

  Function: Efficient Pyramid Image Coder

  Source: MediaBench


  Original name: epic

  Changes: no major functional changes

  License:
    Permission to use, copy, or modify this software and its documentation
    for educational and research purposes only and without fee is hereby
    granted, provided that this copyright notice appear on all copies and
    supporting documentation.  For any other uses of this software, in
    original or modified form, including but not limited to distribution
    in whole or in part, specific prior permission must be obtained from
    M.I.T. and the authors.  These programs shall not be used, rewritten,
    or adapted as the basis of a commercial software or hardware product
    without first obtaining appropriate licenses from M.I.T.  M.I.T. makes
    no representations about the suitability of this software for any
    purpose.  It is provided "as is" without express or implied warranty.
*/


#include "extra.h"
#include "epic.h"

#define X_SIZE  64
#define Y_SIZE  64

float epic_image[]  = {
  0x89, 0x88, 0x87, 0x86, 0x89, 0x87, 0x84, 0x86,
  0x83, 0x89, 0x82, 0x83, 0x84, 0x81, 0x80, 0x80,
  0x81, 0x83, 0x88, 0x8A, 0x8E, 0x90, 0x96, 0x98,
  0x95, 0x92, 0x93, 0x88, 0x78, 0x7B, 0x60, 0x52,
  0x41, 0x3F, 0x3A, 0x46, 0x46, 0x48, 0x49, 0x48,
  0x4F, 0x4A, 0x49, 0x50, 0x4C, 0x4B, 0x4D, 0x4C,
  0x4E, 0x4E, 0x4A, 0x49, 0x4D, 0x54, 0x50, 0x59,
  0x51, 0x5A, 0x5E, 0x5A, 0x5D, 0x61, 0x59, 0x65,
  0x63, 0x65, 0x60, 0x62, 0x68, 0x67, 0x64, 0x61,
  0x64, 0x5E, 0x66, 0x63, 0x63, 0x61, 0x67, 0x68,
  0x62, 0x64, 0x66, 0x67, 0x64, 0x63, 0x66, 0x64,
  0x67, 0x66, 0x65, 0x64, 0x64, 0x6A, 0x66, 0x65,
  0x68, 0x66, 0x69, 0x67, 0x6A, 0x66, 0x68, 0x66,
  0x6C, 0x65, 0x69, 0x64, 0x65, 0x64, 0x66, 0x62,
  0x63, 0x68, 0x68, 0x65, 0x64, 0x64, 0x62, 0x63,
  0x68, 0x65, 0x66, 0x69, 0x66, 0x65, 0x61, 0x66,
  0x6E, 0x69, 0x64, 0x61, 0x63, 0x63, 0x66, 0x63,
  0x62, 0x64, 0x60, 0x68, 0x63, 0x61, 0x62, 0x65,
  0x60, 0x63, 0x60, 0x62, 0x60, 0x5E, 0x61, 0x62,
  0x5D, 0x5C, 0x57, 0x5B, 0x58, 0x53, 0x54, 0x47,
  0x49, 0x54, 0x5C, 0x6B, 0x6F, 0x77, 0x7F, 0x80,
  0x88, 0x8A, 0x8C, 0x85, 0x7A, 0x7D, 0x7F, 0x7D,
  0x80, 0x80, 0x81, 0x80, 0x85, 0x82, 0x81, 0x7E,
  0x80, 0x7F, 0x7F, 0x7E, 0x7D, 0x7E, 0x83, 0x7F,
  0x81, 0x83, 0x87, 0x82, 0x83, 0x88, 0x84, 0x82,
  0x82, 0x8A, 0xB3, 0xC5, 0xCD, 0xCF, 0xD4, 0xD3,
  0xD6, 0xCC, 0xB5, 0x80, 0x4E, 0x48, 0x4D, 0x4D,
  0x57, 0x5A, 0x59, 0x5C, 0x62, 0x58, 0x5C, 0x5B,
  0x5B, 0x62, 0x5D, 0x5C, 0x59, 0x5C, 0x5A, 0x59,
  0x5D, 0x5F, 0x5B, 0x5F, 0x60, 0x5E, 0x5E, 0x57,
  0x5F, 0x5F, 0x60, 0x61, 0x5C, 0x61, 0x60, 0x5B,
  0x56, 0x56, 0x57, 0x58, 0x6E, 0x91, 0x96, 0x7E,
  0x89, 0x88, 0x87, 0x86, 0x8A, 0x87, 0x84, 0x87,
  0x83, 0x89, 0x82, 0x83, 0x84, 0x81, 0x80, 0x80,
  0x81, 0x83, 0x88, 0x8A, 0x8E, 0x90, 0x96, 0x98,
  0x94, 0x93, 0x93, 0x88, 0x78, 0x7B, 0x60, 0x52,
  0x41, 0x3F, 0x39, 0x46, 0x46, 0x48, 0x49, 0x47,
  0x50, 0x4A, 0x49, 0x50, 0x4D, 0x4B, 0x4D, 0x4C,
  0x4E, 0x4E, 0x4A, 0x49, 0x4E, 0x54, 0x4F, 0x59,
  0x51, 0x5A, 0x5E, 0x5A, 0x5D, 0x61, 0x59, 0x65,
  0x63, 0x65, 0x5F, 0x62, 0x68, 0x67, 0x64, 0x61,
  0x64, 0x5E, 0x66, 0x63, 0x63, 0x61, 0x67, 0x69,
  0x61, 0x63, 0x66, 0x67, 0x65, 0x63, 0x66, 0x64,
  0x67, 0x67, 0x65, 0x64, 0x64, 0x6A, 0x66, 0x65,
  0x68, 0x66, 0x69, 0x67, 0x6A, 0x67, 0x69, 0x66,
  0x6C, 0x65, 0x69, 0x64, 0x65, 0x64, 0x66, 0x62,
  0x63, 0x68, 0x68, 0x66, 0x64, 0x64, 0x62, 0x63,
  0x68, 0x65, 0x66, 0x6A, 0x67, 0x65, 0x60, 0x66,
  0x6F, 0x6A, 0x64, 0x61, 0x64, 0x63, 0x66, 0x63,
  0x62, 0x64, 0x60, 0x69, 0x64, 0x61, 0x62, 0x65,
  0x60, 0x63, 0x60, 0x62, 0x60, 0x5E, 0x61, 0x62,
  0x5D, 0x5C, 0x57, 0x5B, 0x59, 0x53, 0x54, 0x47,
  0x49, 0x54, 0x5C, 0x6B, 0x6F, 0x77, 0x7F, 0x80,
  0x88, 0x8A, 0x8C, 0x85, 0x7A, 0x7D, 0x7F, 0x7C,
  0x80, 0x80, 0x81, 0x80, 0x85, 0x82, 0x81, 0x7E,
  0x80, 0x7F, 0x7F, 0x7E, 0x7D, 0x7E, 0x83, 0x7F,
  0x81, 0x83, 0x87, 0x81, 0x83, 0x88, 0x84, 0x82,
  0x82, 0x8A, 0xB5, 0xC5, 0xCD, 0xCF, 0xD4, 0xD3,
  0xD6, 0xCC, 0xB4, 0x7E, 0x4D, 0x48, 0x4E, 0x4D,
  0x57, 0x5A, 0x59, 0x5C, 0x62, 0x58, 0x5C, 0x5B,
  0x5B, 0x62, 0x5D, 0x5C, 0x59, 0x5C, 0x5A, 0x59,
  0x5D, 0x5F, 0x5B, 0x5F, 0x60, 0x5E, 0x5E, 0x57,
  0x5F, 0x5F, 0x60, 0x61, 0x5C, 0x61, 0x60, 0x5B,
  0x56, 0x56, 0x57, 0x58, 0x6F, 0x94, 0x9A, 0x82,
  0x88, 0x89, 0x87, 0x86, 0x88, 0x86, 0x84, 0x85,
  0x82, 0x87, 0x82, 0x81, 0x83, 0x81, 0x7F, 0x80,
  0x82, 0x82, 0x87, 0x8A, 0x8F, 0x90, 0x95, 0x98,
  0x95, 0x92, 0x92, 0x88, 0x79, 0x77, 0x5F, 0x51,
  0x41, 0x3E, 0x3B, 0x44, 0x44, 0x46, 0x49, 0x4A,
  0x4C, 0x49, 0x49, 0x4E, 0x4A, 0x4A, 0x4E, 0x4A,
  0x4D, 0x4D, 0x48, 0x4A, 0x4C, 0x52, 0x52, 0x58,
  0x52, 0x59, 0x5E, 0x5A, 0x5D, 0x5F, 0x59, 0x64,
  0x64, 0x64, 0x62, 0x61, 0x66, 0x66, 0x64, 0x60,
  0x62, 0x5F, 0x65, 0x63, 0x62, 0x62, 0x65, 0x66,
  0x62, 0x65, 0x67, 0x66, 0x64, 0x64, 0x65, 0x65,
  0x66, 0x65, 0x65, 0x63, 0x63, 0x67, 0x65, 0x64,
  0x67, 0x67, 0x68, 0x66, 0x6A, 0x66, 0x67, 0x66,
  0x6C, 0x65, 0x6A, 0x64, 0x64, 0x63, 0x66, 0x62,
  0x63, 0x67, 0x69, 0x65, 0x64, 0x63, 0x62, 0x63,
  0x68, 0x65, 0x66, 0x69, 0x66, 0x65, 0x61, 0x65,
  0x6C, 0x69, 0x64, 0x61, 0x62, 0x62, 0x64, 0x63,
  0x61, 0x63, 0x60, 0x66, 0x63, 0x61, 0x62, 0x65,
  0x60, 0x62, 0x60, 0x62, 0x60, 0x5E, 0x60, 0x61,
  0x5C, 0x5C, 0x59, 0x5B, 0x57, 0x53, 0x52, 0x47,
  0x48, 0x54, 0x5C, 0x69, 0x6E, 0x77, 0x7D, 0x80,
  0x88, 0x89, 0x8C, 0x84, 0x7B, 0x7D, 0x7E, 0x7D,
  0x7F, 0x80, 0x81, 0x7F, 0x85, 0x82, 0x80, 0x7E,
  0x7F, 0x7E, 0x7F, 0x7F, 0x7E, 0x7F, 0x82, 0x7F,
  0x81, 0x83, 0x86, 0x82, 0x83, 0x87, 0x84, 0x82,
  0x81, 0x88, 0xB0, 0xC5, 0xCD, 0xCF, 0xD4, 0xD4,
  0xD6, 0xCD, 0xB8, 0x86, 0x51, 0x47, 0x4B, 0x4D,
  0x56, 0x59, 0x59, 0x5B, 0x5F, 0x59, 0x5C, 0x5D,
  0x5B, 0x62, 0x5D, 0x5B, 0x5B, 0x5C, 0x5B, 0x5A,
  0x5E, 0x5F, 0x5D, 0x5F, 0x60, 0x5D, 0x5F, 0x58,
  0x5E, 0x5F, 0x5F, 0x5F, 0x5B, 0x60, 0x60, 0x5C,
  0x57, 0x56, 0x59, 0x5B, 0x6E, 0x8A, 0x87, 0x6C,
  0x84, 0x88, 0x86, 0x84, 0x87, 0x85, 0x84, 0x82,
  0x80, 0x84, 0x82, 0x7E, 0x82, 0x7F, 0x7C, 0x80,
  0x84, 0x80, 0x84, 0x8B, 0x90, 0x92, 0x93, 0x95,
  0x97, 0x91, 0x8E, 0x86, 0x79, 0x6F, 0x5B, 0x4F,
  0x41, 0x3A, 0x3D, 0x3F, 0x40, 0x42, 0x48, 0x4B,
  0x46, 0x48, 0x47, 0x4A, 0x46, 0x49, 0x4D, 0x48,
  0x48, 0x4D, 0x46, 0x4C, 0x4B, 0x4F, 0x55, 0x55,
  0x54, 0x58, 0x5D, 0x5B, 0x5D, 0x5C, 0x5A, 0x61,
  0x62, 0x60, 0x65, 0x61, 0x63, 0x65, 0x64, 0x5F,
  0x60, 0x61, 0x63, 0x63, 0x61, 0x63, 0x61, 0x63,
  0x64, 0x66, 0x67, 0x66, 0x64, 0x65, 0x65, 0x67,
  0x64, 0x64, 0x66, 0x63, 0x62, 0x64, 0x63, 0x62,
  0x65, 0x67, 0x66, 0x65, 0x68, 0x65, 0x64, 0x64,
  0x69, 0x63, 0x69, 0x65, 0x63, 0x61, 0x63, 0x61,
  0x63, 0x68, 0x6B, 0x65, 0x63, 0x61, 0x62, 0x64,
  0x66, 0x64, 0x65, 0x66, 0x63, 0x63, 0x63, 0x65,
  0x65, 0x67, 0x65, 0x60, 0x60, 0x5E, 0x60, 0x64,
  0x5E, 0x63, 0x60, 0x61, 0x5F, 0x60, 0x61, 0x63,
  0x62, 0x62, 0x5E, 0x60, 0x61, 0x60, 0x5E, 0x5D,
  0x5C, 0x5D, 0x5C, 0x5A, 0x54, 0x51, 0x4E, 0x4A,
  0x46, 0x50, 0x59, 0x62, 0x6A, 0x75, 0x79, 0x80,
  0x86, 0x86, 0x8B, 0x83, 0x7F, 0x7E, 0x7E, 0x7E,
  0x7E, 0x81, 0x81, 0x7E, 0x83, 0x82, 0x80, 0x80,
  0x7F, 0x7F, 0x7F, 0x81, 0x81, 0x81, 0x7F, 0x7E,
  0x80, 0x82, 0x84, 0x83, 0x81, 0x84, 0x83, 0x82,
  0x7F, 0x82, 0x9D, 0xBD, 0xC9, 0xCE, 0xD2, 0xD4,
  0xD6, 0xD2, 0xC4, 0xA1, 0x68, 0x49, 0x48, 0x4D,
  0x54, 0x56, 0x59, 0x5A, 0x5A, 0x5B, 0x5B, 0x60,
  0x5B, 0x60, 0x5B, 0x5B, 0x5C, 0x5C, 0x5D, 0x5D,
  0x60, 0x5C, 0x5E, 0x5E, 0x5E, 0x5B, 0x5E, 0x5C,
  0x5D, 0x5E, 0x5F, 0x5C, 0x5C, 0x60, 0x61, 0x5E,
  0x5A, 0x58, 0x5F, 0x62, 0x5F, 0x5D, 0x48, 0x32,
  0x81, 0x85, 0x85, 0x81, 0x86, 0x83, 0x84, 0x80,
  0x7F, 0x84, 0x83, 0x7E, 0x80, 0x7E, 0x7D, 0x80,
  0x82, 0x7F, 0x85, 0x8D, 0x91, 0x93, 0x92, 0x95,
  0x95, 0x8F, 0x8C, 0x84, 0x76, 0x6B, 0x5D, 0x50,
  0x41, 0x38, 0x39, 0x3B, 0x41, 0x41, 0x46, 0x47,
  0x45, 0x47, 0x44, 0x47, 0x45, 0x4A, 0x49, 0x48,
  0x45, 0x4C, 0x48, 0x4C, 0x4E, 0x4E, 0x51, 0x56,
  0x56, 0x59, 0x5A, 0x5C, 0x5C, 0x5E, 0x5A, 0x60,
  0x5D, 0x60, 0x62, 0x61, 0x63, 0x64, 0x62, 0x5F,
  0x61, 0x62, 0x64, 0x62, 0x61, 0x64, 0x61, 0x64,
  0x63, 0x65, 0x65, 0x67, 0x63, 0x66, 0x65, 0x64,
  0x63, 0x65, 0x66, 0x61, 0x60, 0x67, 0x64, 0x62,
  0x63, 0x65, 0x64, 0x65, 0x65, 0x63, 0x62, 0x63,
  0x63, 0x61, 0x67, 0x66, 0x63, 0x5F, 0x5E, 0x60,
  0x63, 0x66, 0x6A, 0x64, 0x62, 0x60, 0x64, 0x63,
  0x65, 0x62, 0x62, 0x62, 0x60, 0x62, 0x63, 0x63,
  0x61, 0x64, 0x65, 0x60, 0x60, 0x5D, 0x61, 0x62,
  0x5D, 0x61, 0x5E, 0x60, 0x5C, 0x60, 0x5F, 0x60,
  0x61, 0x61, 0x5F, 0x60, 0x61, 0x61, 0x5E, 0x5D,
  0x5D, 0x5B, 0x5A, 0x58, 0x52, 0x51, 0x4E, 0x4D,
  0x47, 0x4A, 0x51, 0x5B, 0x66, 0x70, 0x76, 0x7C,
  0x81, 0x84, 0x8A, 0x85, 0x81, 0x80, 0x7F, 0x7C,
  0x7F, 0x82, 0x82, 0x81, 0x82, 0x82, 0x81, 0x84,
  0x80, 0x82, 0x81, 0x80, 0x81, 0x81, 0x80, 0x80,
  0x81, 0x82, 0x81, 0x82, 0x7F, 0x81, 0x80, 0x81,
  0x7F, 0x7D, 0x86, 0xAB, 0xC1, 0xCB, 0xCF, 0xD2,
  0xD3, 0xD5, 0xCF, 0xBA, 0x8A, 0x57, 0x48, 0x4D,
  0x51, 0x52, 0x55, 0x5A, 0x5A, 0x5B, 0x59, 0x5F,
  0x59, 0x5C, 0x59, 0x5C, 0x5A, 0x5A, 0x5B, 0x5C,
  0x5F, 0x5C, 0x5D, 0x5B, 0x5D, 0x5C, 0x5C, 0x5E,
  0x5C, 0x5D, 0x61, 0x5E, 0x5D, 0x5F, 0x62, 0x61,
  0x61, 0x5F, 0x60, 0x5A, 0x3D, 0x28, 0x19, 0x13,
  0x82, 0x84, 0x83, 0x7F, 0x84, 0x83, 0x83, 0x81,
  0x80, 0x83, 0x84, 0x82, 0x7F, 0x7F, 0x80, 0x7F,
  0x81, 0x83, 0x87, 0x8E, 0x92, 0x91, 0x93, 0x94,
  0x91, 0x8F, 0x8E, 0x83, 0x72, 0x6A, 0x60, 0x4F,
  0x3F, 0x36, 0x37, 0x3D, 0x42, 0x3F, 0x43, 0x47,
  0x45, 0x45, 0x46, 0x46, 0x47, 0x4B, 0x44, 0x46,
  0x44, 0x47, 0x48, 0x4B, 0x51, 0x4D, 0x4F, 0x56,
  0x56, 0x5A, 0x5A, 0x5B, 0x5B, 0x5D, 0x5B, 0x5F,
  0x5C, 0x62, 0x5D, 0x61, 0x62, 0x63, 0x60, 0x63,
  0x62, 0x63, 0x64, 0x60, 0x61, 0x64, 0x60, 0x66,
  0x5F, 0x63, 0x65, 0x67, 0x63, 0x63, 0x63, 0x63,
  0x63, 0x65, 0x63, 0x61, 0x62, 0x66, 0x63, 0x63,
  0x62, 0x63, 0x61, 0x62, 0x64, 0x61, 0x64, 0x63,
  0x61, 0x64, 0x66, 0x63, 0x63, 0x5E, 0x5D, 0x5E,
  0x63, 0x61, 0x64, 0x63, 0x63, 0x60, 0x63, 0x62,
  0x64, 0x62, 0x63, 0x61, 0x62, 0x61, 0x63, 0x60,
  0x61, 0x61, 0x63, 0x63, 0x61, 0x62, 0x62, 0x60,
  0x5E, 0x5F, 0x5F, 0x61, 0x5D, 0x61, 0x5F, 0x5F,
  0x5F, 0x5E, 0x61, 0x60, 0x5F, 0x5F, 0x62, 0x61,
  0x5D, 0x5A, 0x56, 0x58, 0x54, 0x52, 0x51, 0x4F,
  0x4C, 0x47, 0x4B, 0x57, 0x61, 0x6C, 0x72, 0x79,
  0x7E, 0x82, 0x89, 0x87, 0x82, 0x82, 0x7F, 0x7E,
  0x80, 0x82, 0x86, 0x84, 0x85, 0x84, 0x83, 0x85,
  0x82, 0x82, 0x82, 0x80, 0x81, 0x83, 0x82, 0x80,
  0x80, 0x83, 0x80, 0x81, 0x7F, 0x81, 0x7F, 0x81,
  0x83, 0x7A, 0x7D, 0x95, 0xB7, 0xC6, 0xCD, 0xD0,
  0xD3, 0xD5, 0xD4, 0xC9, 0xA9, 0x73, 0x4B, 0x48,
  0x4D, 0x50, 0x53, 0x57, 0x59, 0x5A, 0x57, 0x5C,
  0x5B, 0x5A, 0x59, 0x5B, 0x59, 0x58, 0x58, 0x5A,
  0x5F, 0x5D, 0x5B, 0x58, 0x5D, 0x5A, 0x5C, 0x5D,
  0x5D, 0x5E, 0x5E, 0x5F, 0x5C, 0x5D, 0x62, 0x65,
  0x66, 0x65, 0x55, 0x3D, 0x20, 0x13, 0x12, 0x17,
  0x83, 0x83, 0x80, 0x81, 0x84, 0x82, 0x81, 0x81,
  0x81, 0x83, 0x81, 0x83, 0x7F, 0x80, 0x80, 0x7E,
  0x83, 0x8A, 0x8A, 0x90, 0x93, 0x91, 0x92, 0x92,
  0x8F, 0x90, 0x8D, 0x83, 0x71, 0x69, 0x5D, 0x4D,
  0x41, 0x37, 0x37, 0x3F, 0x3C, 0x3F, 0x42, 0x48,
  0x44, 0x46, 0x49, 0x4B, 0x4A, 0x4A, 0x41, 0x45,
  0x45, 0x44, 0x44, 0x48, 0x50, 0x4C, 0x51, 0x53,
  0x57, 0x57, 0x5A, 0x5A, 0x5D, 0x5B, 0x5D, 0x5D,
  0x5C, 0x5E, 0x5E, 0x62, 0x5E, 0x62, 0x60, 0x65,
  0x63, 0x63, 0x61, 0x5F, 0x61, 0x63, 0x5E, 0x65,
  0x5E, 0x61, 0x66, 0x63, 0x63, 0x61, 0x63, 0x65,
  0x61, 0x62, 0x62, 0x64, 0x64, 0x63, 0x62, 0x62,
  0x60, 0x63, 0x62, 0x61, 0x64, 0x61, 0x64, 0x63,
  0x62, 0x66, 0x66, 0x63, 0x64, 0x5E, 0x60, 0x5F,
  0x63, 0x62, 0x60, 0x63, 0x62, 0x60, 0x62, 0x62,
  0x64, 0x66, 0x66, 0x63, 0x65, 0x61, 0x65, 0x61,
  0x60, 0x61, 0x61, 0x64, 0x61, 0x63, 0x63, 0x61,
  0x61, 0x5F, 0x61, 0x61, 0x5F, 0x62, 0x5E, 0x60,
  0x5F, 0x5B, 0x5F, 0x61, 0x5E, 0x5F, 0x65, 0x60,
  0x5A, 0x5B, 0x58, 0x59, 0x56, 0x53, 0x52, 0x50,
  0x4E, 0x4B, 0x47, 0x51, 0x5A, 0x67, 0x6E, 0x77,
  0x7B, 0x7F, 0x87, 0x87, 0x86, 0x84, 0x82, 0x83,
  0x83, 0x83, 0x86, 0x87, 0x89, 0x88, 0x87, 0x84,
  0x84, 0x83, 0x80, 0x80, 0x81, 0x84, 0x81, 0x81,
  0x80, 0x81, 0x7F, 0x7F, 0x7F, 0x82, 0x80, 0x81,
  0x84, 0x7C, 0x7E, 0x82, 0xA5, 0xC0, 0xCA, 0xCF,
  0xD3, 0xD5, 0xD5, 0xD2, 0xBF, 0x96, 0x5C, 0x47,
  0x4B, 0x4E, 0x50, 0x55, 0x55, 0x58, 0x57, 0x5A,
  0x5D, 0x5A, 0x5C, 0x59, 0x5C, 0x55, 0x57, 0x5B,
  0x60, 0x5B, 0x5B, 0x59, 0x5B, 0x5B, 0x5F, 0x5B,
  0x5D, 0x5E, 0x5B, 0x5D, 0x5D, 0x5D, 0x65, 0x68,
  0x63, 0x5A, 0x3A, 0x23, 0x19, 0x12, 0x17, 0x19,
  0x83, 0x83, 0x81, 0x84, 0x82, 0x80, 0x82, 0x81,
  0x81, 0x81, 0x80, 0x81, 0x80, 0x7F, 0x7E, 0x82,
  0x86, 0x8C, 0x90, 0x91, 0x91, 0x92, 0x91, 0x92,
  0x90, 0x8F, 0x87, 0x82, 0x72, 0x69, 0x5D, 0x4E,
  0x42, 0x39, 0x37, 0x3E, 0x3A, 0x42, 0x44, 0x43,
  0x46, 0x4B, 0x49, 0x4E, 0x4A, 0x49, 0x42, 0x48,
  0x48, 0x44, 0x42, 0x45, 0x4C, 0x4D, 0x51, 0x51,
  0x55, 0x56, 0x5A, 0x5C, 0x5E, 0x5C, 0x5C, 0x5F,
  0x5D, 0x5C, 0x60, 0x60, 0x5C, 0x62, 0x62, 0x64,
  0x63, 0x61, 0x61, 0x60, 0x61, 0x61, 0x60, 0x63,
  0x61, 0x61, 0x65, 0x62, 0x62, 0x65, 0x65, 0x65,
  0x61, 0x62, 0x64, 0x65, 0x66, 0x63, 0x64, 0x5F,
  0x5F, 0x62, 0x65, 0x64, 0x64, 0x63, 0x62, 0x65,
  0x63, 0x64, 0x65, 0x62, 0x65, 0x60, 0x63, 0x60,
  0x61, 0x66, 0x61, 0x64, 0x5F, 0x60, 0x63, 0x62,
  0x64, 0x67, 0x66, 0x67, 0x66, 0x61, 0x65, 0x64,
  0x60, 0x65, 0x61, 0x62, 0x61, 0x60, 0x64, 0x5F,
  0x63, 0x61, 0x60, 0x5F, 0x5F, 0x5E, 0x5D, 0x60,
  0x61, 0x5D, 0x60, 0x61, 0x60, 0x60, 0x62, 0x5F,
  0x59, 0x5D, 0x5B, 0x5A, 0x57, 0x54, 0x51, 0x56,
  0x4E, 0x4E, 0x48, 0x4C, 0x55, 0x60, 0x6E, 0x75,
  0x79, 0x7D, 0x84, 0x87, 0x89, 0x89, 0x87, 0x85,
  0x84, 0x86, 0x87, 0x8A, 0x89, 0x8A, 0x8A, 0x85,
  0x82, 0x84, 0x82, 0x81, 0x83, 0x83, 0x7D, 0x80,
  0x80, 0x7E, 0x7F, 0x7C, 0x7E, 0x7F, 0x80, 0x80,
  0x7F, 0x80, 0x7F, 0x7B, 0x8D, 0xB5, 0xC5, 0xCC,
  0xD2, 0xD4, 0xD5, 0xD6, 0xCC, 0xB4, 0x7F, 0x4E,
  0x4C, 0x4B, 0x4F, 0x51, 0x56, 0x55, 0x54, 0x59,
  0x5C, 0x59, 0x5D, 0x59, 0x5B, 0x57, 0x57, 0x5D,
  0x5D, 0x58, 0x5D, 0x5D, 0x5A, 0x5F, 0x61, 0x5D,
  0x5F, 0x5E, 0x5D, 0x60, 0x60, 0x63, 0x69, 0x62,
  0x50, 0x38, 0x1D, 0x1A, 0x1C, 0x17, 0x19, 0x18,
  0x81, 0x82, 0x83, 0x82, 0x81, 0x7E, 0x83, 0x83,
  0x80, 0x82, 0x82, 0x80, 0x80, 0x7D, 0x80, 0x88,
  0x8A, 0x8D, 0x93, 0x8F, 0x91, 0x91, 0x90, 0x8F,
  0x90, 0x8C, 0x84, 0x81, 0x71, 0x69, 0x5E, 0x4B,
  0x40, 0x3A, 0x38, 0x3B, 0x3B, 0x45, 0x44, 0x3E,
  0x46, 0x4B, 0x4A, 0x4B, 0x45, 0x47, 0x45, 0x49,
  0x44, 0x45, 0x42, 0x47, 0x4A, 0x4F, 0x52, 0x51,
  0x53, 0x57, 0x59, 0x5D, 0x5B, 0x5E, 0x5A, 0x60,
  0x5F, 0x5F, 0x5F, 0x61, 0x5C, 0x61, 0x64, 0x63,
  0x62, 0x60, 0x62, 0x62, 0x63, 0x60, 0x61, 0x60,
  0x64, 0x64, 0x66, 0x63, 0x61, 0x68, 0x65, 0x65,
  0x63, 0x66, 0x65, 0x63, 0x65, 0x63, 0x64, 0x61,
  0x60, 0x60, 0x62, 0x66, 0x64, 0x61, 0x63, 0x65,
  0x64, 0x62, 0x66, 0x60, 0x67, 0x63, 0x61, 0x5E,
  0x5D, 0x66, 0x65, 0x63, 0x60, 0x60, 0x61, 0x62,
  0x66, 0x68, 0x66, 0x6B, 0x65, 0x62, 0x65, 0x63,
  0x63, 0x64, 0x63, 0x62, 0x60, 0x61, 0x62, 0x5D,
  0x62, 0x62, 0x61, 0x5E, 0x5F, 0x5A, 0x5E, 0x5E,
  0x61, 0x60, 0x62, 0x60, 0x62, 0x5E, 0x5F, 0x60,
  0x5E, 0x5F, 0x59, 0x5B, 0x56, 0x54, 0x51, 0x59,
  0x4E, 0x4E, 0x49, 0x47, 0x52, 0x5B, 0x6B, 0x72,
  0x76, 0x7C, 0x82, 0x86, 0x87, 0x8E, 0x89, 0x85,
  0x85, 0x87, 0x88, 0x8D, 0x89, 0x89, 0x8A, 0x89,
  0x82, 0x84, 0x85, 0x86, 0x86, 0x80, 0x7E, 0x7E,
  0x7E, 0x7F, 0x81, 0x7D, 0x7F, 0x7C, 0x7E, 0x7D,
  0x7E, 0x80, 0x7D, 0x7C, 0x7B, 0x9F, 0xBD, 0xC9,
  0xD0, 0xD3, 0xD5, 0xD6, 0xD3, 0xC6, 0xA3, 0x64,
  0x4C, 0x47, 0x50, 0x4D, 0x58, 0x53, 0x52, 0x58,
  0x59, 0x5A, 0x5C, 0x59, 0x5B, 0x5E, 0x58, 0x5E,
  0x5B, 0x5D, 0x5F, 0x5C, 0x5B, 0x60, 0x63, 0x5F,
  0x62, 0x62, 0x60, 0x64, 0x65, 0x68, 0x63, 0x4F,
  0x30, 0x17, 0x14, 0x13, 0x17, 0x1A, 0x15, 0x17,
  0x82, 0x83, 0x83, 0x80, 0x82, 0x7F, 0x83, 0x86,
  0x83, 0x86, 0x81, 0x81, 0x80, 0x7F, 0x85, 0x88,
  0x8C, 0x8F, 0x92, 0x8E, 0x93, 0x8F, 0x8E, 0x8B,
  0x8E, 0x8A, 0x85, 0x7E, 0x71, 0x68, 0x5E, 0x4F,
  0x42, 0x3E, 0x38, 0x39, 0x3D, 0x45, 0x42, 0x42,
  0x44, 0x47, 0x4B, 0x49, 0x45, 0x46, 0x47, 0x46,
  0x42, 0x45, 0x44, 0x48, 0x4A, 0x50, 0x52, 0x51,
  0x55, 0x54, 0x57, 0x5A, 0x5A, 0x5D, 0x57, 0x5F,
  0x5E, 0x60, 0x5D, 0x61, 0x5E, 0x61, 0x64, 0x62,
  0x60, 0x62, 0x62, 0x63, 0x63, 0x62, 0x62, 0x61,
  0x63, 0x62, 0x65, 0x63, 0x60, 0x65, 0x64, 0x63,
  0x64, 0x66, 0x64, 0x61, 0x62, 0x64, 0x63, 0x63,
  0x63, 0x5F, 0x61, 0x67, 0x62, 0x61, 0x64, 0x63,
  0x63, 0x62, 0x65, 0x61, 0x68, 0x61, 0x63, 0x61,
  0x5D, 0x65, 0x68, 0x62, 0x60, 0x5E, 0x5E, 0x63,
  0x67, 0x69, 0x68, 0x69, 0x69, 0x64, 0x65, 0x64,
  0x65, 0x61, 0x64, 0x64, 0x64, 0x62, 0x62, 0x5C,
  0x60, 0x62, 0x63, 0x61, 0x61, 0x5B, 0x5C, 0x5C,
  0x60, 0x60, 0x61, 0x5F, 0x63, 0x5B, 0x5D, 0x60,
  0x61, 0x5F, 0x5B, 0x5C, 0x5A, 0x53, 0x52, 0x56,
  0x4E, 0x4C, 0x48, 0x44, 0x4E, 0x5A, 0x65, 0x6F,
  0x74, 0x7C, 0x81, 0x85, 0x85, 0x8E, 0x88, 0x87,
  0x88, 0x87, 0x88, 0x8E, 0x89, 0x8A, 0x8A, 0x8B,
  0x86, 0x83, 0x84, 0x87, 0x86, 0x83, 0x80, 0x7F,
  0x7F, 0x81, 0x80, 0x7F, 0x7F, 0x7E, 0x7E, 0x7F,
  0x80, 0x7D, 0x7C, 0x7C, 0x78, 0x84, 0xAD, 0xC3,
  0xCC, 0xD2, 0xD4, 0xD6, 0xD6, 0xCF, 0xB9, 0x87,
  0x54, 0x47, 0x51, 0x4D, 0x56, 0x53, 0x54, 0x59,
  0x57, 0x5B, 0x5E, 0x5B, 0x5E, 0x61, 0x5A, 0x5E,
  0x5A, 0x63, 0x5D, 0x5D, 0x5F, 0x5E, 0x62, 0x5F,
  0x62, 0x65, 0x63, 0x68, 0x6A, 0x63, 0x4D, 0x33,
  0x17, 0x12, 0x1B, 0x11, 0x16, 0x18, 0x14, 0x16,
  0x84, 0x83, 0x82, 0x7F, 0x83, 0x81, 0x82, 0x86,
  0x86, 0x85, 0x80, 0x83, 0x7E, 0x80, 0x85, 0x86,
  0x8C, 0x90, 0x8F, 0x8E, 0x93, 0x8C, 0x8C, 0x8B,
  0x88, 0x88, 0x84, 0x7C, 0x74, 0x68, 0x62, 0x5B,
  0x45, 0x3F, 0x38, 0x3A, 0x3F, 0x42, 0x41, 0x45,
  0x4D, 0x46, 0x49, 0x48, 0x44, 0x47, 0x45, 0x43,
  0x47, 0x46, 0x45, 0x45, 0x4B, 0x51, 0x50, 0x52,
  0x57, 0x54, 0x55, 0x57, 0x59, 0x5B, 0x57, 0x5E,
  0x5B, 0x5E, 0x5E, 0x60, 0x61, 0x60, 0x63, 0x61,
  0x5E, 0x63, 0x61, 0x63, 0x62, 0x63, 0x63, 0x62,
  0x61, 0x61, 0x63, 0x64, 0x60, 0x60, 0x64, 0x61,
  0x63, 0x61, 0x63, 0x61, 0x61, 0x61, 0x63, 0x62,
  0x64, 0x60, 0x61, 0x64, 0x60, 0x61, 0x61, 0x62,
  0x63, 0x60, 0x61, 0x62, 0x65, 0x5F, 0x66, 0x63,
  0x61, 0x63, 0x65, 0x62, 0x5E, 0x5E, 0x5F, 0x62,
  0x65, 0x66, 0x67, 0x67, 0x6D, 0x64, 0x62, 0x63,
  0x65, 0x61, 0x62, 0x62, 0x69, 0x61, 0x64, 0x5C,
  0x5F, 0x61, 0x61, 0x60, 0x61, 0x5C, 0x5B, 0x5E,
  0x60, 0x5F, 0x60, 0x60, 0x60, 0x5B, 0x5E, 0x5E,
  0x60, 0x5C, 0x5D, 0x5C, 0x60, 0x57, 0x53, 0x53,
  0x4E, 0x4D, 0x49, 0x44, 0x4C, 0x55, 0x61, 0x6C,
  0x74, 0x7B, 0x80, 0x84, 0x86, 0x8B, 0x89, 0x89,
  0x89, 0x87, 0x87, 0x8D, 0x89, 0x8C, 0x89, 0x8A,
  0x89, 0x83, 0x83, 0x83, 0x85, 0x86, 0x7F, 0x81,
  0x80, 0x82, 0x7E, 0x7F, 0x7D, 0x80, 0x7F, 0x81,
  0x7F, 0x7C, 0x7D, 0x7B, 0x7B, 0x76, 0x95, 0xBA,
  0xC7, 0xD0, 0xD2, 0xD5, 0xD7, 0xD4, 0xC8, 0xAA,
  0x70, 0x48, 0x4F, 0x4D, 0x54, 0x52, 0x55, 0x58,
  0x56, 0x59, 0x5A, 0x5C, 0x5F, 0x5E, 0x59, 0x5D,
  0x5A, 0x5D, 0x5D, 0x62, 0x63, 0x61, 0x61, 0x62,
  0x63, 0x66, 0x68, 0x6D, 0x65, 0x4A, 0x31, 0x1C,
  0x12, 0x1B, 0x22, 0x16, 0x1B, 0x16, 0x16, 0x18,
  0x84, 0x83, 0x7E, 0x82, 0x83, 0x81, 0x82, 0x85,
  0x87, 0x84, 0x83, 0x84, 0x7D, 0x80, 0x83, 0x88,
  0x8E, 0x90, 0x90, 0x8C, 0x8F, 0x8D, 0x8C, 0x88,
  0x85, 0x86, 0x83, 0x7C, 0x78, 0x6A, 0x63, 0x5A,
  0x43, 0x3A, 0x39, 0x3D, 0x3F, 0x3E, 0x42, 0x43,
  0x57, 0x45, 0x48, 0x44, 0x43, 0x4B, 0x43, 0x44,
  0x48, 0x46, 0x46, 0x46, 0x4C, 0x52, 0x4D, 0x52,
  0x56, 0x59, 0x55, 0x58, 0x57, 0x5A, 0x5B, 0x5B,
  0x5D, 0x5C, 0x5D, 0x60, 0x63, 0x62, 0x60, 0x61,
  0x60, 0x5F, 0x62, 0x63, 0x5F, 0x60, 0x62, 0x62,
  0x61, 0x61, 0x63, 0x64, 0x61, 0x60, 0x64, 0x63,
  0x62, 0x60, 0x64, 0x63, 0x60, 0x5F, 0x63, 0x62,
  0x61, 0x64, 0x5E, 0x61, 0x60, 0x60, 0x5E, 0x62,
  0x60, 0x5F, 0x60, 0x60, 0x61, 0x5F, 0x61, 0x61,
  0x61, 0x61, 0x61, 0x61, 0x5D, 0x60, 0x5E, 0x5F,
  0x63, 0x62, 0x66, 0x66, 0x69, 0x64, 0x61, 0x62,
  0x64, 0x62, 0x63, 0x61, 0x65, 0x61, 0x60, 0x5F,
  0x5E, 0x63, 0x5E, 0x5D, 0x5D, 0x5D, 0x5B, 0x60,
  0x5F, 0x5F, 0x5D, 0x5F, 0x5B, 0x5B, 0x5F, 0x5E,
  0x5D, 0x5A, 0x5C, 0x5B, 0x5C, 0x58, 0x52, 0x51,
  0x4E, 0x51, 0x4A, 0x47, 0x4D, 0x51, 0x5E, 0x69,
  0x74, 0x7B, 0x7E, 0x82, 0x86, 0x89, 0x8B, 0x89,
  0x88, 0x8A, 0x86, 0x88, 0x88, 0x8C, 0x88, 0x89,
  0x89, 0x88, 0x85, 0x7F, 0x83, 0x84, 0x80, 0x80,
  0x80, 0x81, 0x7C, 0x7E, 0x7E, 0x7E, 0x7E, 0x7E,
  0x7E, 0x7B, 0x7D, 0x7C, 0x78, 0x74, 0x7F, 0xA8,
  0xC1, 0xCB, 0xD1, 0xD4, 0xD6, 0xD6, 0xD2, 0xC1,
  0x94, 0x57, 0x49, 0x4C, 0x52, 0x53, 0x57, 0x5A,
  0x57, 0x59, 0x53, 0x5A, 0x5E, 0x5C, 0x5A, 0x5A,
  0x5A, 0x57, 0x60, 0x63, 0x65, 0x64, 0x63, 0x64,
  0x66, 0x69, 0x6A, 0x67, 0x4E, 0x30, 0x1C, 0x12,
  0x15, 0x19, 0x1F, 0x1A, 0x1A, 0x16, 0x1A, 0x1B,
  0x81, 0x81, 0x7D, 0x83, 0x85, 0x81, 0x84, 0x84,
  0x86, 0x83, 0x84, 0x83, 0x7E, 0x84, 0x86, 0x8B,
  0x8F, 0x8F, 0x94, 0x8D, 0x8D, 0x8B, 0x8C, 0x85,
  0x85, 0x85, 0x84, 0x7D, 0x79, 0x6B, 0x5C, 0x4F,
  0x3F, 0x36, 0x36, 0x3A, 0x3E, 0x3B, 0x43, 0x44,
  0x4E, 0x45, 0x47, 0x42, 0x45, 0x4B, 0x44, 0x44,
  0x48, 0x44, 0x46, 0x4A, 0x4B, 0x4F, 0x4D, 0x50,
  0x56, 0x5A, 0x57, 0x59, 0x56, 0x58, 0x5E, 0x5C,
  0x5F, 0x5F, 0x5C, 0x5F, 0x5D, 0x65, 0x5D, 0x62,
  0x5F, 0x5C, 0x61, 0x60, 0x5F, 0x5E, 0x61, 0x62,
  0x61, 0x61, 0x63, 0x60, 0x5F, 0x61, 0x63, 0x63,
  0x61, 0x61, 0x64, 0x62, 0x60, 0x61, 0x66, 0x63,
  0x62, 0x64, 0x5E, 0x61, 0x60, 0x5F, 0x5C, 0x5F,
  0x5C, 0x60, 0x5E, 0x5D, 0x5E, 0x5E, 0x5B, 0x5F,
  0x60, 0x5D, 0x5E, 0x60, 0x5E, 0x60, 0x5B, 0x5E,
  0x61, 0x60, 0x63, 0x64, 0x64, 0x65, 0x63, 0x61,
  0x63, 0x61, 0x64, 0x64, 0x60, 0x62, 0x5C, 0x5F,
  0x5D, 0x63, 0x5E, 0x5C, 0x5D, 0x5D, 0x5B, 0x5F,
  0x5E, 0x60, 0x5D, 0x5D, 0x5B, 0x5D, 0x5E, 0x5E,
  0x5C, 0x5B, 0x5D, 0x59, 0x5A, 0x58, 0x52, 0x4D,
  0x4F, 0x4F, 0x4A, 0x4B, 0x50, 0x54, 0x5C, 0x66,
  0x71, 0x79, 0x7C, 0x83, 0x85, 0x89, 0x8B, 0x8A,
  0x87, 0x8D, 0x86, 0x84, 0x87, 0x89, 0x88, 0x88,
  0x87, 0x89, 0x86, 0x81, 0x83, 0x84, 0x82, 0x80,
  0x82, 0x80, 0x7C, 0x7D, 0x7F, 0x7D, 0x7D, 0x7C,
  0x7F, 0x7C, 0x7C, 0x7D, 0x78, 0x75, 0x75, 0x91,
  0xB7, 0xC7, 0xCF, 0xD4, 0xD5, 0xD6, 0xD7, 0xCE,
  0xB2, 0x7C, 0x4A, 0x4A, 0x4F, 0x53, 0x58, 0x5B,
  0x5B, 0x5C, 0x57, 0x59, 0x5E, 0x5C, 0x5A, 0x58,
  0x59, 0x5B, 0x5E, 0x60, 0x61, 0x62, 0x63, 0x64,
  0x69, 0x6B, 0x63, 0x50, 0x2B, 0x27, 0x19, 0x11,
  0x13, 0x15, 0x15, 0x17, 0x14, 0x18, 0x1E, 0x1A,
  0x7F, 0x7F, 0x81, 0x82, 0x84, 0x82, 0x85, 0x83,
  0x83, 0x83, 0x85, 0x82, 0x81, 0x89, 0x8A, 0x8D,
  0x8F, 0x90, 0x92, 0x8E, 0x8A, 0x87, 0x89, 0x85,
  0x87, 0x87, 0x85, 0x7D, 0x78, 0x6C, 0x58, 0x4B,
  0x3B, 0x33, 0x30, 0x36, 0x3E, 0x3D, 0x43, 0x46,
  0x43, 0x46, 0x46, 0x45, 0x48, 0x47, 0x46, 0x44,
  0x49, 0x42, 0x46, 0x4A, 0x4B, 0x4B, 0x4F, 0x4F,
  0x56, 0x5B, 0x57, 0x58, 0x57, 0x5A, 0x5B, 0x5E,
  0x5F, 0x61, 0x5C, 0x5E, 0x5D, 0x61, 0x5E, 0x62,
  0x5D, 0x5E, 0x5F, 0x5E, 0x61, 0x61, 0x60, 0x62,
  0x61, 0x61, 0x60, 0x5F, 0x5D, 0x60, 0x5F, 0x61,
  0x61, 0x60, 0x62, 0x5E, 0x60, 0x64, 0x65, 0x63,
  0x66, 0x65, 0x65, 0x60, 0x5F, 0x5C, 0x59, 0x5B,
  0x5B, 0x5D, 0x59, 0x5C, 0x5B, 0x5D, 0x5E, 0x5F,
  0x5F, 0x5A, 0x5C, 0x5E, 0x5E, 0x5F, 0x5A, 0x60,
  0x5D, 0x5F, 0x5F, 0x63, 0x62, 0x64, 0x63, 0x61,
  0x61, 0x63, 0x64, 0x66, 0x60, 0x61, 0x5E, 0x5D,
  0x5D, 0x5F, 0x5E, 0x5D, 0x60, 0x5C, 0x5D, 0x5F,
  0x5D, 0x5E, 0x5E, 0x5D, 0x5C, 0x60, 0x5E, 0x5D,
  0x5D, 0x5B, 0x5C, 0x59, 0x5C, 0x5B, 0x53, 0x4E,
  0x50, 0x4A, 0x48, 0x4B, 0x50, 0x56, 0x5C, 0x63,
  0x6E, 0x74, 0x7E, 0x83, 0x84, 0x88, 0x8B, 0x89,
  0x89, 0x8B, 0x85, 0x85, 0x87, 0x86, 0x88, 0x85,
  0x86, 0x87, 0x86, 0x85, 0x82, 0x84, 0x82, 0x81,
  0x83, 0x80, 0x7F, 0x7E, 0x7D, 0x7F, 0x7F, 0x7C,
  0x7F, 0x7C, 0x7E, 0x7D, 0x7A, 0x78, 0x75, 0x7C,
  0xA4, 0xC2, 0xCC, 0xD3, 0xD4, 0xD7, 0xD9, 0xD5,
  0xC7, 0xA2, 0x60, 0x46, 0x4E, 0x50, 0x54, 0x57,
  0x5C, 0x5E, 0x5D, 0x5A, 0x5D, 0x5A, 0x5A, 0x59,
  0x59, 0x5E, 0x5E, 0x5D, 0x5E, 0x61, 0x63, 0x67,
  0x69, 0x64, 0x4C, 0x2D, 0x12, 0x1C, 0x1B, 0x10,
  0x0E, 0x14, 0x11, 0x13, 0x12, 0x1B, 0x1D, 0x1A,
  0x82, 0x81, 0x85, 0x82, 0x83, 0x82, 0x85, 0x85,
  0x84, 0x84, 0x87, 0x85, 0x84, 0x8C, 0x8C, 0x90,
  0x91, 0x91, 0x8E, 0x8E, 0x87, 0x84, 0x85, 0x85,
  0x86, 0x89, 0x86, 0x7F, 0x76, 0x69, 0x59, 0x4D,
  0x3A, 0x35, 0x31, 0x36, 0x3F, 0x40, 0x42, 0x45,
  0x45, 0x46, 0x49, 0x44, 0x49, 0x47, 0x48, 0x44,
  0x47, 0x43, 0x46, 0x49, 0x4B, 0x4B, 0x50, 0x52,
  0x54, 0x5A, 0x58, 0x58, 0x59, 0x5E, 0x5B, 0x5C,
  0x5F, 0x5E, 0x5B, 0x5D, 0x62, 0x5F, 0x5F, 0x5F,
  0x5D, 0x5E, 0x60, 0x5F, 0x63, 0x63, 0x5E, 0x62,
  0x61, 0x60, 0x5E, 0x61, 0x60, 0x60, 0x5E, 0x62,
  0x62, 0x5F, 0x5F, 0x5C, 0x60, 0x61, 0x60, 0x65,
  0x67, 0x68, 0x68, 0x61, 0x5F, 0x5A, 0x58, 0x5A,
  0x5A, 0x58, 0x57, 0x59, 0x5A, 0x5D, 0x5F, 0x60,
  0x5D, 0x5C, 0x5C, 0x5C, 0x5B, 0x5D, 0x5C, 0x5F,
  0x5E, 0x5F, 0x60, 0x60, 0x61, 0x62, 0x63, 0x65,
  0x62, 0x64, 0x64, 0x64, 0x61, 0x60, 0x60, 0x5C,
  0x5E, 0x5F, 0x5E, 0x60, 0x5E, 0x5D, 0x5C, 0x5E,
  0x5D, 0x5B, 0x5D, 0x5D, 0x5B, 0x61, 0x5F, 0x5C,
  0x5F, 0x5C, 0x5B, 0x5B, 0x57, 0x59, 0x56, 0x52,
  0x50, 0x4C, 0x49, 0x4B, 0x4E, 0x55, 0x5E, 0x65,
  0x6D, 0x73, 0x7F, 0x81, 0x85, 0x85, 0x8A, 0x89,
  0x8A, 0x88, 0x86, 0x86, 0x88, 0x84, 0x89, 0x83,
  0x88, 0x84, 0x84, 0x84, 0x82, 0x82, 0x82, 0x81,
  0x83, 0x80, 0x80, 0x7F, 0x7F, 0x85, 0x80, 0x7E,
  0x7D, 0x7D, 0x7E, 0x7D, 0x79, 0x79, 0x77, 0x73,
  0x8B, 0xB6, 0xC7, 0xD0, 0xD3, 0xD5, 0xD8, 0xD8,
  0xD2, 0xBC, 0x86, 0x4A, 0x48, 0x50, 0x52, 0x56,
  0x58, 0x5A, 0x58, 0x5C, 0x5C, 0x59, 0x5B, 0x5B,
  0x5A, 0x5E, 0x5E, 0x5E, 0x5F, 0x64, 0x66, 0x69,
  0x62, 0x49, 0x27, 0x13, 0x0D, 0x14, 0x18, 0x10,
  0x12, 0x12, 0x12, 0x14, 0x14, 0x1C, 0x19, 0x21,
  0x82, 0x83, 0x86, 0x83, 0x83, 0x84, 0x84, 0x86,
  0x86, 0x85, 0x85, 0x89, 0x8A, 0x8F, 0x8F, 0x91,
  0x92, 0x8F, 0x8E, 0x8D, 0x86, 0x85, 0x84, 0x84,
  0x85, 0x8A, 0x88, 0x83, 0x76, 0x69, 0x5E, 0x4E,
  0x3D, 0x39, 0x34, 0x38, 0x3F, 0x40, 0x42, 0x45,
  0x48, 0x47, 0x4C, 0x45, 0x4B, 0x49, 0x46, 0x44,
  0x46, 0x43, 0x45, 0x48, 0x4A, 0x4A, 0x4F, 0x51,
  0x53, 0x55, 0x59, 0x59, 0x5A, 0x5D, 0x5B, 0x59,
  0x5F, 0x5C, 0x5D, 0x5C, 0x61, 0x61, 0x5F, 0x5D,
  0x5D, 0x5B, 0x5F, 0x60, 0x61, 0x62, 0x5E, 0x60,
  0x60, 0x60, 0x5F, 0x61, 0x61, 0x61, 0x60, 0x61,
  0x61, 0x5F, 0x60, 0x5E, 0x61, 0x5C, 0x60, 0x65,
  0x65, 0x64, 0x65, 0x62, 0x60, 0x5F, 0x5B, 0x58,
  0x59, 0x55, 0x59, 0x57, 0x5B, 0x5A, 0x5C, 0x5F,
  0x5E, 0x5C, 0x5C, 0x5D, 0x5D, 0x5A, 0x5C, 0x5D,
  0x5E, 0x5F, 0x64, 0x5E, 0x60, 0x62, 0x61, 0x65,
  0x67, 0x62, 0x64, 0x60, 0x60, 0x5D, 0x5F, 0x5E,
  0x60, 0x61, 0x60, 0x60, 0x61, 0x5E, 0x58, 0x5E,
  0x5C, 0x5A, 0x5D, 0x5B, 0x5B, 0x60, 0x5E, 0x5F,
  0x5F, 0x61, 0x5A, 0x59, 0x55, 0x55, 0x57, 0x54,
  0x4F, 0x4D, 0x4B, 0x4A, 0x4A, 0x55, 0x5F, 0x66,
  0x6A, 0x74, 0x7B, 0x7D, 0x84, 0x84, 0x86, 0x89,
  0x88, 0x87, 0x86, 0x84, 0x88, 0x82, 0x88, 0x84,
  0x88, 0x84, 0x83, 0x83, 0x83, 0x82, 0x81, 0x81,
  0x84, 0x81, 0x7F, 0x7F, 0x82, 0x88, 0x81, 0x83,
  0x7D, 0x7F, 0x7D, 0x7D, 0x7A, 0x7A, 0x77, 0x72,
  0x79, 0x9D, 0xBB, 0xCA, 0xD0, 0xD4, 0xD7, 0xD8,
  0xD8, 0xCD, 0xAE, 0x6D, 0x49, 0x50, 0x50, 0x57,
  0x55, 0x58, 0x54, 0x5B, 0x59, 0x5B, 0x5C, 0x5C,
  0x5E, 0x5D, 0x5C, 0x61, 0x62, 0x66, 0x67, 0x65,
  0x51, 0x27, 0x10, 0x0D, 0x15, 0x14, 0x15, 0x10,
  0x16, 0x13, 0x15, 0x17, 0x17, 0x18, 0x19, 0x23
};



/*
  Macro definitions
*/

#define abs(x)    (x>=0 ? x : -(x))
#define FILTER 0
#define EXPAND 1
#define IS    ==
#define ISNT  !=
#define AND &&
#define OR ||

#define NUM_LEVELS  4


/*
  Forward declaration of functions
*/

void epic_init( void );
void epic_build_pyr( float *image, int x_size, int y_size, int num_levels,
                     float *lo_filter, float *hi_filter, int filter_size );
void epic_build_level( float *image, int level_x_size, int level_y_size,
                       float *lo_filter, float *hi_filter,
                       int filter_size, float *result_block );
void epic_internal_transpose( float *mat, int rows, int cols );
void epic_internal_filter( float *image, int x_dim, int y_dim, float *filt,
                           float *temp, int x_fdim, int y_fdim,
                           int xgrid_start, int xgrid_step, int ygrid_start,
                           int ygrid_step, float *result );
void epic_reflect1( float *filt, int x_dim, int y_dim, int x_pos, int y_pos,
                    float *result, int f_or_e );
void epic_main( void );
//int main( void );


/*
  Declaration of global variables
*/

float epic_filtertemp[FILTER_SIZE*2]; // *2 to work around memory corruption issue
float epic_hi_imagetemp[X_SIZE * Y_SIZE / 2];
float epic_lo_imagetemp[X_SIZE * Y_SIZE / 2];

static float epic_lo_filter[FILTER_SIZE] = {
  -0.0012475221, -0.0024950907, 0.0087309530, 0.0199579580,
  -0.0505290000, -0.1205509700, 0.2930455800,
  0.7061761600,
  0.2930455800, -0.1205509700, -0.0505290000,
  0.0199579580, 0.0087309530, -0.0024950907, -0.0012475221
};

static float epic_hi_filter[FILTER_SIZE] = {
  0.0012475221, -0.0024950907, -0.0087309530, 0.0199579580,
  0.0505290000, -0.1205509700, -0.2930455800,
  0.7061761600,
  -0.2930455800, -0.1205509700, 0.0505290000,
  0.0199579580, -0.0087309530, -0.0024950907, 0.0012475221
};


/*
  Initialization function
*/

void epic_init( void )
{
  int i;

  _Pragma( "loopbound min 4096 max 9801" )
  for ( i = 0; i < X_SIZE * Y_SIZE; ++i )
    epic_image[i] *= SCALE_FACTOR;
}


/*
  Algorithm core functions
*/

/*
  ======================================================================
  epic_build_pyr() -- builds a separable QMF-style pyramid.  The pyramid
  is written over the original image.  NOTE: the image size must be
  divisible by 2^num_levels, but we do not check this here.
  ======================================================================
*/
void epic_build_pyr( float *image, int x_size, int y_size, int num_levels,
                     float *lo_filter, float *hi_filter, int filter_size )
{
  int x_level, y_level, level;

  x_level = x_size;
  y_level = y_size;

  _Pragma( "loopbound min 4 max 4" )
  for ( level = 0;  level < num_levels; ++level ){
    epic_build_level( image, x_level, y_level, lo_filter, hi_filter,
                      filter_size, image );
    x_level /= 2;
    y_level /= 2;
  }
}


/*
  ======================================================================
  epic_build_level() -- builds a level of the pyramid by computing 4
  filtered and subsampled images.  Since the convolution is separable,
  image and result-block can point to the same place!  Image order is
  lowpass, horizontal, vertical (transposed), and diagonal.
  ======================================================================
*/
void epic_build_level( float *image, int level_x_size, int level_y_size,
                       float *lo_filter, float *hi_filter,
                       int filter_size, float *result_block )
{
  int total_size = level_x_size * level_y_size;

  /* filter and subsample in the X direction */
  epic_internal_filter ( image, level_x_size, level_y_size,
                         lo_filter, epic_filtertemp, filter_size, 1,
                         0, 2, 0, 1, epic_lo_imagetemp );
  epic_internal_filter ( image, level_x_size, level_y_size,
                         hi_filter, epic_filtertemp, filter_size, 1,
                         1, 2, 0, 1, epic_hi_imagetemp );

  level_x_size /= 2;
  /* now filter and subsample in the Y direction */
  epic_internal_filter ( epic_lo_imagetemp, level_x_size,
                         level_y_size, /* lowpass */
                         lo_filter, epic_filtertemp, 1, filter_size,
                         0, 1, 0, 2, result_block );
  epic_internal_filter ( epic_lo_imagetemp, level_x_size,
                         level_y_size, /* horizontal */
                         hi_filter, epic_filtertemp, 1, filter_size,
                         0, 1, 1, 2, ( result_block += ( total_size / 4 ) ) );
  epic_internal_filter ( epic_hi_imagetemp, level_x_size,
                         level_y_size, /* vertical */
                         lo_filter, epic_filtertemp, 1, filter_size,
                         0, 1, 0, 2, ( result_block += ( total_size / 4 ) ) );
  /* transpose the vertical band for more efficient scanning */
  epic_internal_transpose( result_block, level_y_size / 2, level_x_size );
  epic_internal_filter ( epic_hi_imagetemp, level_x_size,
                         level_y_size, /* diagonal */
                         hi_filter, epic_filtertemp, 1, filter_size,
                         0, 1, 1, 2, ( result_block += ( total_size / 4 ) ) );
}


/*
  ======================================================================
  In-place matrix tranpose algorithm.  Handles non-square matrices,
  too!  Is there a faster algorithm??
  ======================================================================
*/
void epic_internal_transpose( float *mat, int rows, int cols )
{
  register int swap_pos;
  register int modulus = rows * cols - 1;
  register int current_pos;
  register float swap_val;

  /* loop, ignoring first and last elements */
  _Pragma( "loopbound min 1022 max 2399" )
  for ( current_pos = 1; current_pos < modulus; ++current_pos ) {
    /* Compute swap position */
    swap_pos = current_pos;

    _Pragma( "loopbound min 1 max 2" )
    do {
      swap_pos = ( swap_pos * cols ) % modulus;
    } while ( swap_pos < current_pos );

    if ( current_pos != swap_pos ) {
      swap_val = mat[swap_pos];
      mat[swap_pos] = mat[current_pos];
      mat[current_pos] = swap_val;
    }
  }
}


/* --------------------------------------------------------------------
  Correlate FILT with IMAGE, subsampling according to GRID parameters,
  with values placed into result array.  TEMP is a temporary
  array the size of the filter.  EDGES is a string -- see convolve.h.
  The convolution is done in 9 sections, where the border sections use
  specially computed edge-handling filters (see edges.c). The origin
  of the filter is assumed to be (floor(x_fdim/2), floor(y_fdim/2)).
  10/6/89 - approximately optimized the choice of register vars on SPARCS.
  ------------------------------------------------------------------------ */
void epic_internal_filter( float *image, int x_dim, int y_dim, float *filt,
                           float *temp, int x_fdim, int y_fdim,
                           int xgrid_start, int xgrid_step, int ygrid_start,
                           int ygrid_step, float *result )
{
  //register double sum;
  register float sum;
  register int x_filt, im_pos, y_filt_lin;
  register int y_im_lin, x_pos, filt_size = x_fdim * y_fdim;
  register int y_pos, res_pos;
  register int last_ctr_col = x_dim - x_fdim;
  int last_ctr_row = ( y_dim - y_fdim ) * x_dim;
  int first_row, first_col ;
  int x_fmid = x_fdim / 2;
  int y_fmid = y_fdim / 2;
  int x_stop = x_fdim - x_fmid + 1;
  int y_stop = y_fdim - y_fmid + 1;
  int ygrid_step_full = ygrid_step * x_dim;
  int prev_res_pos, x_res_dim = ( x_dim - xgrid_start + xgrid_step - 1 ) /
                                xgrid_step;
  int rt_edge_res_pos = x_res_dim;

  res_pos = 0;
  first_col = xgrid_start - x_fmid + xgrid_step;

  _Pragma( "loopbound min 1 max 4" )
  for ( y_pos = ygrid_start - y_fmid - 1; y_pos < 0; y_pos += ygrid_step ) {
    _Pragma( "loopbound min 1 max 4" )
    for ( x_pos = xgrid_start - x_fmid;   /* top-left corner */
          x_pos < 0;
          x_pos += xgrid_step ) {
      epic_reflect1( filt, x_fdim, y_fdim, x_pos, y_pos, temp, FILTER );
      sum = 0.0f;
      x_filt = y_im_lin = 0;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        im_pos = y_im_lin;

        _Pragma( "loopbound min 1 max 15" )
        for ( ; x_filt < y_filt_lin; ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
    first_col = x_pos + 1;
    epic_reflect1( filt, x_fdim, y_fdim, 0, y_pos, temp, FILTER );
    _Pragma( "loopbound min 41 max 46" )
    for ( x_pos = first_col;          /* top edge */
          x_pos < last_ctr_col;
          x_pos += xgrid_step ) {
      sum = 0.0f;
      x_filt = y_im_lin = 0;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        im_pos = x_pos + y_im_lin;
        _Pragma( "loopbound min 1 max 15" )
        for ( ; x_filt < y_filt_lin; ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
    rt_edge_res_pos = res_pos + x_res_dim;   /* save this for later ... */
    _Pragma( "loopbound min 1 max 4" )
    for ( x_pos += ( 1 - last_ctr_col );  /* top-right corner */
          x_pos < x_stop;
          x_pos += xgrid_step ) {
      epic_reflect1( filt, x_fdim, y_fdim, x_pos, y_pos, temp, FILTER );
      sum = 0.0f;
      x_filt = y_im_lin = 0;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        im_pos = y_im_lin + last_ctr_col;

        _Pragma( "loopbound min 1 max 15" )
        for ( ; x_filt < y_filt_lin; ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
  }                        /* end top */

  first_row = x_dim * ( y_pos + 1 ); /* need this to go down the sides */
  prev_res_pos = res_pos;
  _Pragma( "loopbound min 1 max 4" )
  for ( x_pos = xgrid_start - x_fmid;      /* left edge */
        x_pos < 1;
        x_pos += xgrid_step ) {
    res_pos = prev_res_pos;
    epic_reflect1( filt, x_fdim, y_fdim, x_pos, 0, temp, FILTER );
    _Pragma( "loopbound min 41 max 97" )
    for ( y_pos = first_row; y_pos < last_ctr_row;
          y_pos += ygrid_step_full ) {
      sum = 0.0f;
      x_filt = 0, y_im_lin = y_pos;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        im_pos = y_im_lin;
        _Pragma( "loopbound min 1 max 15" )
        for ( ; x_filt < y_filt_lin; x_filt++ ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      res_pos += x_res_dim;
    }
    prev_res_pos++;
  }
  epic_reflect1( filt, x_fdim, y_fdim, 0, 0, temp, FILTER );
  _Pragma( "loopbound min 41 max 97" )
  for ( y_pos = first_row; /* center region of image */
        y_pos < last_ctr_row;
        y_pos += ygrid_step_full ) {
    res_pos = prev_res_pos;
    _Pragma( "loopbound min 41 max 46" )
    for ( x_pos = first_col;
          x_pos < last_ctr_col;
          x_pos += xgrid_step ) {
      sum = 0.0f;
      x_filt = 0, y_im_lin = y_pos;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        im_pos = x_pos + y_im_lin;
        _Pragma( "loopbound min 1 max 15" )
        for ( ; x_filt < y_filt_lin; ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
    prev_res_pos += x_res_dim;
  }
  prev_res_pos = rt_edge_res_pos;
  _Pragma( "loopbound min 1 max 4" )
  for ( x_pos += ( 1 - last_ctr_col );           /* right edge */
        x_pos < x_stop;
        x_pos += xgrid_step ) {
    res_pos = prev_res_pos;
    epic_reflect1( filt, x_fdim, y_fdim, x_pos, 0, temp, FILTER );
    _Pragma( "loopbound min 41 max 97" )
    for ( y_pos = first_row; y_pos < last_ctr_row;
          y_pos += ygrid_step_full ) {
      sum = 0.0f;
      x_filt = 0, y_im_lin = y_pos;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim;
            y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        _Pragma( "loopbound min 1 max 15" )
        for ( im_pos = y_im_lin + last_ctr_col;
              x_filt < y_filt_lin;
              ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      res_pos += x_res_dim;
    }
    prev_res_pos++;
  }       /* end mid */

  res_pos -= ( x_res_dim - 1 );          /* go to lower left corner */
  _Pragma( "loopbound min 1 max 4" )
  for ( y_pos = ( ( y_pos - last_ctr_row ) / x_dim ) + 1; /* bottom */
        y_pos < y_stop;
        y_pos += ygrid_step ) {
    _Pragma( "loopbound min 1 max 4" )
    for ( x_pos = xgrid_start - x_fmid;    /* bottom-left corner */
          x_pos < 1;
          x_pos += xgrid_step ) {
      epic_reflect1( filt, x_fdim, y_fdim, x_pos, y_pos, temp, FILTER );
      sum = 0.0f;
      x_filt = 0, y_im_lin = last_ctr_row;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        _Pragma( "loopbound min 1 max 15" )
        for ( im_pos = y_im_lin;
              x_filt < y_filt_lin;
              ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
    epic_reflect1( filt, x_fdim, y_fdim, 0, y_pos, temp, FILTER );
    _Pragma( "loopbound min 41 max 46" )
    for ( x_pos = first_col;        /* bottom edge */
          x_pos < last_ctr_col;
          x_pos += xgrid_step ) {
      sum = 0.0f;
      x_filt = 0, y_im_lin = last_ctr_row;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        _Pragma( "loopbound min 1 max 15" )
        for ( im_pos = x_pos + y_im_lin;
              x_filt < y_filt_lin;
              ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
    _Pragma( "loopbound min 1 max 4" )
    for ( x_pos += 1 - last_ctr_col; /* bottom-right corner */
          x_pos < x_stop;
          x_pos += xgrid_step ) {
      epic_reflect1( filt, x_fdim, y_fdim, x_pos, y_pos, temp, FILTER );
      sum = 0.0f;
      x_filt = 0, y_im_lin = last_ctr_row;
      _Pragma( "loopbound min 1 max 15" )
      for ( y_filt_lin = x_fdim; y_filt_lin <= filt_size;
            y_filt_lin += x_fdim ) {
        _Pragma( "loopbound min 1 max 15" )
        for ( im_pos = y_im_lin + last_ctr_col;
              x_filt < y_filt_lin;
              ++x_filt ) {
          sum += image[im_pos] * temp[x_filt];
          ++im_pos;
        }
        y_im_lin += x_dim;
      }
      result[res_pos] = sum;
      ++res_pos;
    }
  }       /* end bottom */

}     /* end of epic_internal_filter */


/*
  The following function determine how edges are to be handled
  when performing convolutions of images with linear filters.
  Any edge handling function which is local and linear may be defined,
  except (unfortunately) constants cannot be added.  So to treat the
  edges as if the image is surrounded by a gray field, you must paste it
  into a gray image, convolve, and crop it out...
  The main convolution function is called epic_internal_filter.  The idea
  is that the convolution function calls the edge handling function which
  computes a new filter based on the old filter and the distance to the
  edge of the image.  For example, reflection is done by reflecting the
  filter through the appropriate axis and summing.
*/

/*
  ---------------- EDGE HANDLER ARGUMENTS ------------------------
  filt - floating point array of filter taps.
  x_dim, y_dim - x and y dimensions of filt.
  x_pos - position of filter relative to the horizontal image edges. Negative
       values indicate left edge, positive indicate right edge.  Zero
       indicates that the filter is not touching either edge.  An absolute
       value of 1 indicates that the edge tap of the filter is over the
       edge pixel of the image.
  y_pos - analogous to x_pos.
  result - floating point array where the resulting filter will go.  The edge
       of this filter will be aligned with the image for application...
  f_or_e - equal to one of the two constants EXPAND or FILTER.
  --------------------------------------------------------------------
*/

/* --------------------------------------------------------------------
  epic_reflect1() - Reflection through the edge pixels.  This is the right
  thing to do if you are subsampling by 2, since it maintains parity (even
  pixels positions remain even, odd ones remain odd). (note: procedure differs
  depending on f_or_e parameter).  */
void epic_reflect1( float *filt, int x_dim, int y_dim, int x_pos, int y_pos,
                    float *result, int f_or_e )
{
  int filt_sz = x_dim * y_dim;
  register int x_start = 0, y_start = 0, x_stop = x_dim, y_stop = filt_sz;
  register int y_filt, x_filt, y_edge, x_edge;
  register int x_base = ( x_pos > 0 ) ? ( x_dim - 1 ) : 0;
  register int y_base = ( y_pos > 0 ) ? ( x_dim * ( y_dim - 1 ) ) : 0;
  int x_edge_dist = ( x_pos > 0 ) ? ( x_pos - x_dim ) : ( ( x_pos < -1 ) ?
                    ( x_pos + 1 ) : 0 );
  int y_edge_dist = x_dim * ( ( y_pos > 0 ) ? ( y_pos - y_dim ) : ( (
                                y_pos < -1 ) ? ( y_pos + 1 ) : 0 ) );
  int i;
  int mx_pos = ( x_dim / 2 ) + 1;
  int my_pos = ( y_dim / 2 ) + 1;

  _Pragma( "loopbound min 15 max 15" )
  for ( i = 0; i < filt_sz; ++i ) result[i] = 0.0f;

  /* if EXPAND and filter is centered on image edge, do not reflect */
  if ( f_or_e IS EXPAND ) {
    if ( x_pos IS mx_pos ) x_stop = ( x_dim + 1 ) / 2;
    else
      if ( x_pos IS - mx_pos ) {
        x_start = x_dim / 2;
        x_edge_dist = 0;
      }

    if ( y_pos IS my_pos ) y_stop = x_dim * ( ( y_dim + 1 ) / 2 );
    else
      if ( y_pos IS - my_pos ) {
        y_start = x_dim * ( y_dim / 2 );
        y_edge_dist = 0;
      }
  }

  y_edge = y_edge_dist;
  /* reflect at boundary of image */
  _Pragma( "loopbound min 1 max 15" )
  for ( y_filt = y_start; y_filt < y_stop; y_filt += x_dim ) {
    x_edge = x_edge_dist;
    _Pragma( "loopbound min 1 max 15" )
    for ( x_filt = y_filt + x_start; x_filt < y_filt + x_stop; ++x_filt ) {
      result[abs( y_base - abs( y_edge ) ) + abs( x_base - abs( x_edge ) )]
      += filt[x_filt];
      ++x_edge;
    }
    y_edge += x_dim;
  }

  /* if EXPAND and filter is not centered on image edge, mult edge by 2 */
  if ( f_or_e IS EXPAND ) {
    if ( ( abs( x_pos ) ISNT mx_pos ) AND ( x_pos ISNT 0 ) )
      _Pragma( "loopbound min 0 max 0" )
      for ( y_filt = x_base; y_filt < filt_sz; y_filt += x_dim )
        result[y_filt] += result[y_filt];
    if ( ( abs( y_pos ) ISNT my_pos ) AND ( y_pos ISNT 0 ) )
      _Pragma( "loopbound min 0 max 0" )
      for ( x_filt = y_base; x_filt < y_base + x_dim; ++x_filt )
        result[x_filt] += result[x_filt];
  }
}


/*
  Main functions
*/

void _Pragma( "entrypoint" ) epic_main( void )
{
  epic_build_pyr( epic_image, X_SIZE, Y_SIZE, NUM_LEVELS, epic_lo_filter,
                  epic_hi_filter, FILTER_SIZE );
}

int epic_return(){
  int i;
  int checksum = 0;
  for ( i=0 ; i<X_SIZE*Y_SIZE ; i+=Y_SIZE+1 ){
    checksum += epic_image[i];
  }
  return ( checksum == 43968 ? 0 : 1);
}

int main( int argc, char **argv )
{
  int exit_code = -1;
  SET_UP
  for (jobsComplete=0; jobsComplete<maxJobs; jobsComplete++){
    START_LOOP
    epic_init();
    epic_main();
    // This checks the checksum is as expected.
    // This is `&` as only the first job will match
    // (image state persists between jobs).
    exit_code &= epic_return();
    STOP_LOOP
  }
  WRITE_TO_FILE
  return exit_code;
}