-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathnano_jpeg.64.asm
4025 lines (3570 loc) · 86.7 KB
/
nano_jpeg.64.asm
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
############################################################
# ../Cwerg/nanojpeg.c
############################################################
.mem __static_4_counts 1 RW
.data 16 [0]
.fun mymemset NORMAL [] = [A64 S32 U64]
.bbl %start
poparg ptr:A64
poparg value:S32
poparg num:U64
.reg S32 [i]
mov i = 0
bra for_1_cond
.bbl for_1
conv %S8_1:S8 = value
lea %A64_2:A64 = ptr i
st %A64_2 0 = %S8_1
.bbl for_1_next
add %S32_3:S32 = i 1
mov i = %S32_3
.bbl for_1_cond
conv %U64_4:U64 = i
blt %U64_4 num for_1
bra for_1_exit
.bbl for_1_exit
ret
.fun mymemcpy NORMAL [] = [A64 A64 U64]
.bbl %start
poparg destination:A64
poparg source:A64
poparg num:U64
.reg S32 [i]
mov i = 0
bra for_1_cond
.bbl for_1
lea %A64_5:A64 = source i
ld %S8_6:S8 = %A64_5 0
lea %A64_7:A64 = destination i
st %A64_7 0 = %S8_6
.bbl for_1_next
add %S32_8:S32 = i 1
mov i = %S32_8
.bbl for_1_cond
conv %U64_9:U64 = i
blt %U64_9 num for_1
bra for_1_exit
.bbl for_1_exit
ret
.mem nj 8 RW
.data 525032 [0]
.mem njZZ 1 RW
.data 1 [0 1 8 16 9 2 3 10 17 24 32 25 18 11 4 5 12 19 26 33 40 48 41 34 27 20 13 6 7 14 21 28 35 42 49 56 57 50 43 36 29 22 15 23 30 37 44 51 58 59 52 45 38 31 39 46 53 60 61 54 47 55 62 63]
.fun njGetWidth NORMAL [S32] = []
.reg S32 [%out]
.bbl %start
lea %A64_10:A64 = nj
lea %A64_11:A64 = %A64_10 24
ld %S32_12:S32 = %A64_11 0
mov %out = %S32_12
pusharg %out
ret
.fun njGetHeight NORMAL [S32] = []
.reg S32 [%out]
.bbl %start
lea %A64_13:A64 = nj
lea %A64_14:A64 = %A64_13 28
ld %S32_15:S32 = %A64_14 0
mov %out = %S32_15
pusharg %out
ret
.fun njIsColor NORMAL [S32] = []
.reg S32 [%out]
.bbl %start
lea %A64_16:A64 = nj
lea %A64_17:A64 = %A64_16 48
ld %U32_18:U32 = %A64_17 0
bne %U32_18 1 if_1_true
bra if_1_false
.bbl if_1_true
mov %out = 1
pusharg %out
ret
bra if_1_end
.bbl if_1_false
mov %out = 0
pusharg %out
ret
.bbl if_1_end
.fun njGetImage NORMAL [A64] = []
.reg A64 [%out]
.bbl %start
lea %A64_19:A64 = nj
lea %A64_20:A64 = %A64_19 48
ld %U32_21:U32 = %A64_20 0
beq %U32_21 1 if_1_true
bra if_1_false
.bbl if_1_true
lea %A64_22:A64 = nj
lea %A64_23:A64 = %A64_22 52
lea %A64_24:A64 = %A64_23 40
ld %A64_25:A64 = %A64_24 0
mov %out = %A64_25
pusharg %out
ret
bra if_1_end
.bbl if_1_false
lea %A64_26:A64 = nj
lea %A64_27:A64 = %A64_26 525020
ld %A64_28:A64 = %A64_27 0
mov %out = %A64_28
pusharg %out
ret
.bbl if_1_end
.fun njGetImageSize NORMAL [S32] = []
.reg S32 [%out]
.bbl %start
lea %A64_29:A64 = nj
lea %A64_30:A64 = %A64_29 24
ld %S32_31:S32 = %A64_30 0
lea %A64_32:A64 = nj
lea %A64_33:A64 = %A64_32 28
ld %S32_34:S32 = %A64_33 0
mul %S32_35:S32 = %S32_31 %S32_34
conv %U32_36:U32 = %S32_35
lea %A64_37:A64 = nj
lea %A64_38:A64 = %A64_37 48
ld %U32_39:U32 = %A64_38 0
mul %U32_40:U32 = %U32_36 %U32_39
conv %S32_41:S32 = %U32_40
mov %out = %S32_41
pusharg %out
ret
.fun njClip NORMAL [U8] = [S32]
.reg U8 [%out]
.bbl %start
poparg x:S32
blt x 0 if_2_true
bra if_2_false
.bbl if_2_true
mov %out = 0
pusharg %out
ret
bra if_2_end
.bbl if_2_false
blt 255:S32 x if_1_true
bra if_2_end
.bbl if_1_true
mov %out = 255
pusharg %out
ret
.bbl if_2_end
conv %U8_42:U8 = x
mov %out = %U8_42
pusharg %out
ret
.fun njRowIDCT NORMAL [] = [A64]
.bbl %start
poparg blk:A64
.reg S32 [x0]
.reg S32 [x1]
.reg S32 [x2]
.reg S32 [x3]
.reg S32 [x4]
.reg S32 [x5]
.reg S32 [x6]
.reg S32 [x7]
.reg S32 [x8]
lea %A64_43:A64 = blk 16
ld %S32_44:S32 = %A64_43 0
shl %S32_45:S32 = %S32_44 11
mov x1 = %S32_45
lea %A64_46:A64 = blk 24
ld %S32_47:S32 = %A64_46 0
mov x2 = %S32_47
or %S32_48:S32 = %S32_45 %S32_47
lea %A64_49:A64 = blk 8
ld %S32_50:S32 = %A64_49 0
mov x3 = %S32_50
or %S32_51:S32 = %S32_48 %S32_50
lea %A64_52:A64 = blk 4
ld %S32_53:S32 = %A64_52 0
mov x4 = %S32_53
or %S32_54:S32 = %S32_51 %S32_53
lea %A64_55:A64 = blk 28
ld %S32_56:S32 = %A64_55 0
mov x5 = %S32_56
or %S32_57:S32 = %S32_54 %S32_56
lea %A64_58:A64 = blk 20
ld %S32_59:S32 = %A64_58 0
mov x6 = %S32_59
or %S32_60:S32 = %S32_57 %S32_59
lea %A64_61:A64 = blk 12
ld %S32_62:S32 = %A64_61 0
mov x7 = %S32_62
or %S32_63:S32 = %S32_60 %S32_62
bne %S32_63 0 if_1_end
bra if_1_true
.bbl if_1_true
ld %S32_64:S32 = blk 0
shl %S32_65:S32 = %S32_64 3
lea %A64_66:A64 = blk 28
st %A64_66 0 = %S32_65
lea %A64_67:A64 = blk 24
st %A64_67 0 = %S32_65
lea %A64_68:A64 = blk 20
st %A64_68 0 = %S32_65
lea %A64_69:A64 = blk 16
st %A64_69 0 = %S32_65
lea %A64_70:A64 = blk 12
st %A64_70 0 = %S32_65
lea %A64_71:A64 = blk 8
st %A64_71 0 = %S32_65
lea %A64_72:A64 = blk 4
st %A64_72 0 = %S32_65
st blk 0 = %S32_65
ret
.bbl if_1_end
ld %S32_73:S32 = blk 0
shl %S32_74:S32 = %S32_73 11
add %S32_75:S32 = %S32_74 128
mov x0 = %S32_75
add %S32_76:S32 = x4 x5
mul %S32_77:S32 = %S32_76 565
mov x8 = %S32_77
sub %S32_78:S32 = 2841:S32 565
mul %S32_79:S32 = x4 %S32_78
add %S32_80:S32 = x8 %S32_79
mov x4 = %S32_80
add %S32_81:S32 = 2841:S32 565
mul %S32_82:S32 = x5 %S32_81
sub %S32_83:S32 = x8 %S32_82
mov x5 = %S32_83
add %S32_84:S32 = x6 x7
mul %S32_85:S32 = %S32_84 2408
mov x8 = %S32_85
sub %S32_86:S32 = 2408:S32 1609
mul %S32_87:S32 = x6 %S32_86
sub %S32_88:S32 = x8 %S32_87
mov x6 = %S32_88
add %S32_89:S32 = 2408:S32 1609
mul %S32_90:S32 = x7 %S32_89
sub %S32_91:S32 = x8 %S32_90
mov x7 = %S32_91
add %S32_92:S32 = x0 x1
mov x8 = %S32_92
sub %S32_93:S32 = x0 x1
mov x0 = %S32_93
add %S32_94:S32 = x3 x2
mul %S32_95:S32 = %S32_94 1108
mov x1 = %S32_95
add %S32_96:S32 = 2676:S32 1108
mul %S32_97:S32 = x2 %S32_96
sub %S32_98:S32 = x1 %S32_97
mov x2 = %S32_98
sub %S32_99:S32 = 2676:S32 1108
mul %S32_100:S32 = x3 %S32_99
add %S32_101:S32 = x1 %S32_100
mov x3 = %S32_101
add %S32_102:S32 = x4 x6
mov x1 = %S32_102
sub %S32_103:S32 = x4 x6
mov x4 = %S32_103
add %S32_104:S32 = x5 x7
mov x6 = %S32_104
sub %S32_105:S32 = x5 x7
mov x5 = %S32_105
add %S32_106:S32 = x8 x3
mov x7 = %S32_106
sub %S32_107:S32 = x8 x3
mov x8 = %S32_107
add %S32_108:S32 = x0 x2
mov x3 = %S32_108
sub %S32_109:S32 = x0 x2
mov x0 = %S32_109
add %S32_110:S32 = x4 x5
mul %S32_111:S32 = %S32_110 181
add %S32_112:S32 = %S32_111 128
shr %S32_113:S32 = %S32_112 8
mov x2 = %S32_113
sub %S32_114:S32 = x4 x5
mul %S32_115:S32 = %S32_114 181
add %S32_116:S32 = %S32_115 128
shr %S32_117:S32 = %S32_116 8
mov x4 = %S32_117
add %S32_118:S32 = x7 x1
shr %S32_119:S32 = %S32_118 8
st blk 0 = %S32_119
add %S32_120:S32 = x3 x2
shr %S32_121:S32 = %S32_120 8
lea %A64_122:A64 = blk 4
st %A64_122 0 = %S32_121
add %S32_123:S32 = x0 x4
shr %S32_124:S32 = %S32_123 8
lea %A64_125:A64 = blk 8
st %A64_125 0 = %S32_124
add %S32_126:S32 = x8 x6
shr %S32_127:S32 = %S32_126 8
lea %A64_128:A64 = blk 12
st %A64_128 0 = %S32_127
sub %S32_129:S32 = x8 x6
shr %S32_130:S32 = %S32_129 8
lea %A64_131:A64 = blk 16
st %A64_131 0 = %S32_130
sub %S32_132:S32 = x0 x4
shr %S32_133:S32 = %S32_132 8
lea %A64_134:A64 = blk 20
st %A64_134 0 = %S32_133
sub %S32_135:S32 = x3 x2
shr %S32_136:S32 = %S32_135 8
lea %A64_137:A64 = blk 24
st %A64_137 0 = %S32_136
sub %S32_138:S32 = x7 x1
shr %S32_139:S32 = %S32_138 8
lea %A64_140:A64 = blk 28
st %A64_140 0 = %S32_139
ret
.fun njColIDCT NORMAL [] = [A64 A64 S32]
.bbl %start
poparg blk:A64
poparg out:A64
poparg stride:S32
.reg S32 [x0]
.reg S32 [x1]
.reg S32 [x2]
.reg S32 [x3]
.reg S32 [x4]
.reg S32 [x5]
.reg S32 [x6]
.reg S32 [x7]
.reg S32 [x8]
mul %S32_141:S32 = 8:S32 4
mul %S32_142:S32 = %S32_141 4
lea %A64_143:A64 = blk %S32_142
ld %S32_144:S32 = %A64_143 0
shl %S32_145:S32 = %S32_144 8
mov x1 = %S32_145
mul %S32_146:S32 = 8:S32 6
mul %S32_147:S32 = %S32_146 4
lea %A64_148:A64 = blk %S32_147
ld %S32_149:S32 = %A64_148 0
mov x2 = %S32_149
or %S32_150:S32 = %S32_145 %S32_149
mul %S32_151:S32 = 8:S32 2
mul %S32_152:S32 = %S32_151 4
lea %A64_153:A64 = blk %S32_152
ld %S32_154:S32 = %A64_153 0
mov x3 = %S32_154
or %S32_155:S32 = %S32_150 %S32_154
mul %S32_156:S32 = 8:S32 1
mul %S32_157:S32 = %S32_156 4
lea %A64_158:A64 = blk %S32_157
ld %S32_159:S32 = %A64_158 0
mov x4 = %S32_159
or %S32_160:S32 = %S32_155 %S32_159
mul %S32_161:S32 = 8:S32 7
mul %S32_162:S32 = %S32_161 4
lea %A64_163:A64 = blk %S32_162
ld %S32_164:S32 = %A64_163 0
mov x5 = %S32_164
or %S32_165:S32 = %S32_160 %S32_164
mul %S32_166:S32 = 8:S32 5
mul %S32_167:S32 = %S32_166 4
lea %A64_168:A64 = blk %S32_167
ld %S32_169:S32 = %A64_168 0
mov x6 = %S32_169
or %S32_170:S32 = %S32_165 %S32_169
mul %S32_171:S32 = 8:S32 3
mul %S32_172:S32 = %S32_171 4
lea %A64_173:A64 = blk %S32_172
ld %S32_174:S32 = %A64_173 0
mov x7 = %S32_174
or %S32_175:S32 = %S32_170 %S32_174
bne %S32_175 0 if_3_end
bra if_3_true
.bbl if_3_true
ld %S32_176:S32 = blk 0
add %S32_177:S32 = %S32_176 32
shr %S32_178:S32 = %S32_177 6
add %S32_179:S32 = %S32_178 128
pusharg %S32_179
bsr njClip
poparg %U8_180:U8
conv %S32_181:S32 = %U8_180
mov x1 = %S32_181
mov x0 = 8
bra for_1_cond
.bbl for_1
conv %U8_182:U8 = x1
st out 0 = %U8_182
lea %A64_183:A64 = out stride
mov out = %A64_183
.bbl for_1_next
sub %S32_184:S32 = x0 1
mov x0 = %S32_184
.bbl for_1_cond
bne x0 0 for_1
bra for_1_exit
.bbl for_1_exit
ret
.bbl if_3_end
ld %S32_185:S32 = blk 0
shl %S32_186:S32 = %S32_185 8
add %S32_187:S32 = %S32_186 8192
mov x0 = %S32_187
add %S32_188:S32 = x4 x5
mul %S32_189:S32 = %S32_188 565
add %S32_190:S32 = %S32_189 4
mov x8 = %S32_190
sub %S32_191:S32 = 2841:S32 565
mul %S32_192:S32 = x4 %S32_191
add %S32_193:S32 = x8 %S32_192
shr %S32_194:S32 = %S32_193 3
mov x4 = %S32_194
add %S32_195:S32 = 2841:S32 565
mul %S32_196:S32 = x5 %S32_195
sub %S32_197:S32 = x8 %S32_196
shr %S32_198:S32 = %S32_197 3
mov x5 = %S32_198
add %S32_199:S32 = x6 x7
mul %S32_200:S32 = %S32_199 2408
add %S32_201:S32 = %S32_200 4
mov x8 = %S32_201
sub %S32_202:S32 = 2408:S32 1609
mul %S32_203:S32 = x6 %S32_202
sub %S32_204:S32 = x8 %S32_203
shr %S32_205:S32 = %S32_204 3
mov x6 = %S32_205
add %S32_206:S32 = 2408:S32 1609
mul %S32_207:S32 = x7 %S32_206
sub %S32_208:S32 = x8 %S32_207
shr %S32_209:S32 = %S32_208 3
mov x7 = %S32_209
add %S32_210:S32 = x0 x1
mov x8 = %S32_210
sub %S32_211:S32 = x0 x1
mov x0 = %S32_211
add %S32_212:S32 = x3 x2
mul %S32_213:S32 = %S32_212 1108
add %S32_214:S32 = %S32_213 4
mov x1 = %S32_214
add %S32_215:S32 = 2676:S32 1108
mul %S32_216:S32 = x2 %S32_215
sub %S32_217:S32 = x1 %S32_216
shr %S32_218:S32 = %S32_217 3
mov x2 = %S32_218
sub %S32_219:S32 = 2676:S32 1108
mul %S32_220:S32 = x3 %S32_219
add %S32_221:S32 = x1 %S32_220
shr %S32_222:S32 = %S32_221 3
mov x3 = %S32_222
add %S32_223:S32 = x4 x6
mov x1 = %S32_223
sub %S32_224:S32 = x4 x6
mov x4 = %S32_224
add %S32_225:S32 = x5 x7
mov x6 = %S32_225
sub %S32_226:S32 = x5 x7
mov x5 = %S32_226
add %S32_227:S32 = x8 x3
mov x7 = %S32_227
sub %S32_228:S32 = x8 x3
mov x8 = %S32_228
add %S32_229:S32 = x0 x2
mov x3 = %S32_229
sub %S32_230:S32 = x0 x2
mov x0 = %S32_230
add %S32_231:S32 = x4 x5
mul %S32_232:S32 = %S32_231 181
add %S32_233:S32 = %S32_232 128
shr %S32_234:S32 = %S32_233 8
mov x2 = %S32_234
sub %S32_235:S32 = x4 x5
mul %S32_236:S32 = %S32_235 181
add %S32_237:S32 = %S32_236 128
shr %S32_238:S32 = %S32_237 8
mov x4 = %S32_238
add %S32_239:S32 = x7 x1
shr %S32_240:S32 = %S32_239 14
add %S32_241:S32 = %S32_240 128
pusharg %S32_241
bsr njClip
poparg %U8_242:U8
st out 0 = %U8_242
lea %A64_243:A64 = out stride
mov out = %A64_243
add %S32_244:S32 = x3 x2
shr %S32_245:S32 = %S32_244 14
add %S32_246:S32 = %S32_245 128
pusharg %S32_246
bsr njClip
poparg %U8_247:U8
st out 0 = %U8_247
lea %A64_248:A64 = out stride
mov out = %A64_248
add %S32_249:S32 = x0 x4
shr %S32_250:S32 = %S32_249 14
add %S32_251:S32 = %S32_250 128
pusharg %S32_251
bsr njClip
poparg %U8_252:U8
st out 0 = %U8_252
lea %A64_253:A64 = out stride
mov out = %A64_253
add %S32_254:S32 = x8 x6
shr %S32_255:S32 = %S32_254 14
add %S32_256:S32 = %S32_255 128
pusharg %S32_256
bsr njClip
poparg %U8_257:U8
st out 0 = %U8_257
lea %A64_258:A64 = out stride
mov out = %A64_258
sub %S32_259:S32 = x8 x6
shr %S32_260:S32 = %S32_259 14
add %S32_261:S32 = %S32_260 128
pusharg %S32_261
bsr njClip
poparg %U8_262:U8
st out 0 = %U8_262
lea %A64_263:A64 = out stride
mov out = %A64_263
sub %S32_264:S32 = x0 x4
shr %S32_265:S32 = %S32_264 14
add %S32_266:S32 = %S32_265 128
pusharg %S32_266
bsr njClip
poparg %U8_267:U8
st out 0 = %U8_267
lea %A64_268:A64 = out stride
mov out = %A64_268
sub %S32_269:S32 = x3 x2
shr %S32_270:S32 = %S32_269 14
add %S32_271:S32 = %S32_270 128
pusharg %S32_271
bsr njClip
poparg %U8_272:U8
st out 0 = %U8_272
lea %A64_273:A64 = out stride
mov out = %A64_273
sub %S32_274:S32 = x7 x1
shr %S32_275:S32 = %S32_274 14
add %S32_276:S32 = %S32_275 128
pusharg %S32_276
bsr njClip
poparg %U8_277:U8
st out 0 = %U8_277
ret
.fun __static_1_njShowBits NORMAL [S32] = [S32]
.reg S32 [%out]
.bbl %start
poparg bits:S32
.reg U8 [newbyte]
bne bits 0 if_2_end
bra if_2_true
.bbl if_2_true
mov %out = 0
pusharg %out
ret
.bbl if_2_end
bra while_1_cond
.bbl while_1
lea %A64_278:A64 = nj
lea %A64_279:A64 = %A64_278 16
ld %S32_280:S32 = %A64_279 0
ble %S32_280 0 if_3_true
bra if_3_end
.bbl if_3_true
lea %A64_281:A64 = nj
lea %A64_282:A64 = %A64_281 524752
ld %S32_283:S32 = %A64_282 0
shl %S32_284:S32 = %S32_283 8
or %S32_285:S32 = %S32_284 255
lea %A64_286:A64 = nj
lea %A64_287:A64 = %A64_286 524752
st %A64_287 0 = %S32_285
lea %A64_288:A64 = nj
lea %A64_289:A64 = %A64_288 524756
ld %S32_290:S32 = %A64_289 0
add %S32_291:S32 = %S32_290 8
lea %A64_292:A64 = nj
lea %A64_293:A64 = %A64_292 524756
st %A64_293 0 = %S32_291
bra while_1_cond
.bbl if_3_end
lea %A64_294:A64 = nj
lea %A64_295:A64 = %A64_294 4
ld %A64_296:A64 = %A64_295 0
ld %U8_297:U8 = %A64_296 0
mov newbyte = %U8_297
lea %A64_298:A64 = nj
lea %A64_299:A64 = %A64_298 4
ld %A64_300:A64 = %A64_299 0
lea %A64_301:A64 = %A64_300 1
lea %A64_302:A64 = nj
lea %A64_303:A64 = %A64_302 4
st %A64_303 0 = %A64_301
lea %A64_304:A64 = nj
lea %A64_305:A64 = %A64_304 16
ld %S32_306:S32 = %A64_305 0
sub %S32_307:S32 = %S32_306 1
lea %A64_308:A64 = nj
lea %A64_309:A64 = %A64_308 16
st %A64_309 0 = %S32_307
lea %A64_310:A64 = nj
lea %A64_311:A64 = %A64_310 524756
ld %S32_312:S32 = %A64_311 0
add %S32_313:S32 = %S32_312 8
lea %A64_314:A64 = nj
lea %A64_315:A64 = %A64_314 524756
st %A64_315 0 = %S32_313
lea %A64_316:A64 = nj
lea %A64_317:A64 = %A64_316 524752
ld %S32_318:S32 = %A64_317 0
shl %S32_319:S32 = %S32_318 8
conv %S32_320:S32 = newbyte
or %S32_321:S32 = %S32_319 %S32_320
lea %A64_322:A64 = nj
lea %A64_323:A64 = %A64_322 524752
st %A64_323 0 = %S32_321
conv %S32_324:S32 = newbyte
beq %S32_324 255 if_6_true
bra while_1_cond
.bbl if_6_true
lea %A64_325:A64 = nj
lea %A64_326:A64 = %A64_325 16
ld %S32_327:S32 = %A64_326 0
bne %S32_327 0 if_5_true
bra if_5_false
.bbl if_5_true
.reg U8 [marker]
lea %A64_328:A64 = nj
lea %A64_329:A64 = %A64_328 4
ld %A64_330:A64 = %A64_329 0
ld %U8_331:U8 = %A64_330 0
mov marker = %U8_331
lea %A64_332:A64 = nj
lea %A64_333:A64 = %A64_332 4
ld %A64_334:A64 = %A64_333 0
lea %A64_335:A64 = %A64_334 1
lea %A64_336:A64 = nj
lea %A64_337:A64 = %A64_336 4
st %A64_337 0 = %A64_335
lea %A64_338:A64 = nj
lea %A64_339:A64 = %A64_338 16
ld %S32_340:S32 = %A64_339 0
sub %S32_341:S32 = %S32_340 1
lea %A64_342:A64 = nj
lea %A64_343:A64 = %A64_342 16
st %A64_343 0 = %S32_341
blt 255:U8 marker switch_344_default
.jtb switch_344_tab 256 switch_344_default [0 switch_344_0 255 switch_344_255 217 switch_344_217]
switch marker switch_344_tab
.bbl switch_344_0
.bbl switch_344_255
bra switch_344_end
.bbl switch_344_217
lea %A64_345:A64 = nj
lea %A64_346:A64 = %A64_345 16
mov %S32_347:S32 = 0
st %A64_346 0 = %S32_347
bra switch_344_end
.bbl switch_344_default
conv %S32_348:S32 = marker
and %S32_349:S32 = %S32_348 248
bne %S32_349 208 if_4_true
bra if_4_false
.bbl if_4_true
lea %A64_350:A64 = nj
mov %S32_351:S32 = 5
st %A64_350 0 = %S32_351
bra if_4_end
.bbl if_4_false
lea %A64_352:A64 = nj
lea %A64_353:A64 = %A64_352 524752
ld %S32_354:S32 = %A64_353 0
shl %S32_355:S32 = %S32_354 8
conv %S32_356:S32 = marker
or %S32_357:S32 = %S32_355 %S32_356
lea %A64_358:A64 = nj
lea %A64_359:A64 = %A64_358 524752
st %A64_359 0 = %S32_357
lea %A64_360:A64 = nj
lea %A64_361:A64 = %A64_360 524756
ld %S32_362:S32 = %A64_361 0
add %S32_363:S32 = %S32_362 8
lea %A64_364:A64 = nj
lea %A64_365:A64 = %A64_364 524756
st %A64_365 0 = %S32_363
.bbl if_4_end
.bbl switch_344_end
bra while_1_cond
.bbl if_5_false
lea %A64_366:A64 = nj
mov %S32_367:S32 = 5
st %A64_366 0 = %S32_367
.bbl while_1_cond
lea %A64_368:A64 = nj
lea %A64_369:A64 = %A64_368 524756
ld %S32_370:S32 = %A64_369 0
blt %S32_370 bits while_1
bra while_1_exit
.bbl while_1_exit
lea %A64_371:A64 = nj
lea %A64_372:A64 = %A64_371 524752
ld %S32_373:S32 = %A64_372 0
lea %A64_374:A64 = nj
lea %A64_375:A64 = %A64_374 524756
ld %S32_376:S32 = %A64_375 0
sub %S32_377:S32 = %S32_376 bits
shr %S32_378:S32 = %S32_373 %S32_377
shl %S32_379:S32 = 1:S32 bits
sub %S32_380:S32 = %S32_379 1
and %S32_381:S32 = %S32_378 %S32_380
mov %out = %S32_381
pusharg %out
ret
.fun njSkipBits NORMAL [] = [S32]
.bbl %start
poparg bits:S32
lea %A64_382:A64 = nj
lea %A64_383:A64 = %A64_382 524756
ld %S32_384:S32 = %A64_383 0
blt %S32_384 bits if_1_true
bra if_1_end
.bbl if_1_true
pusharg bits
bsr __static_1_njShowBits
poparg %S32_385:S32
.bbl if_1_end
lea %A64_386:A64 = nj
lea %A64_387:A64 = %A64_386 524756
ld %S32_388:S32 = %A64_387 0
sub %S32_389:S32 = %S32_388 bits
lea %A64_390:A64 = nj
lea %A64_391:A64 = %A64_390 524756
st %A64_391 0 = %S32_389
ret
.fun njGetBits NORMAL [S32] = [S32]
.reg S32 [%out]
.bbl %start
poparg bits:S32
.reg S32 [res]
pusharg bits
bsr __static_1_njShowBits
poparg %S32_392:S32
mov res = %S32_392
pusharg bits
bsr njSkipBits
mov %out = res
pusharg %out
ret
.fun njByteAlign NORMAL [] = []
.bbl %start
lea %A64_393:A64 = nj
lea %A64_394:A64 = %A64_393 524756
ld %S32_395:S32 = %A64_394 0
and %S32_396:S32 = %S32_395 248
lea %A64_397:A64 = nj
lea %A64_398:A64 = %A64_397 524756
st %A64_398 0 = %S32_396
ret
.fun __static_2_njSkip NORMAL [] = [S32]
.bbl %start
poparg count:S32
lea %A64_399:A64 = nj
lea %A64_400:A64 = %A64_399 4
ld %A64_401:A64 = %A64_400 0
lea %A64_402:A64 = %A64_401 count
lea %A64_403:A64 = nj
lea %A64_404:A64 = %A64_403 4
st %A64_404 0 = %A64_402
lea %A64_405:A64 = nj
lea %A64_406:A64 = %A64_405 16
ld %S32_407:S32 = %A64_406 0
sub %S32_408:S32 = %S32_407 count
lea %A64_409:A64 = nj
lea %A64_410:A64 = %A64_409 16
st %A64_410 0 = %S32_408
lea %A64_411:A64 = nj
lea %A64_412:A64 = %A64_411 20
ld %S32_413:S32 = %A64_412 0
sub %S32_414:S32 = %S32_413 count
lea %A64_415:A64 = nj
lea %A64_416:A64 = %A64_415 20
st %A64_416 0 = %S32_414
lea %A64_417:A64 = nj
lea %A64_418:A64 = %A64_417 16
ld %S32_419:S32 = %A64_418 0
blt %S32_419 0 if_1_true
bra if_1_end
.bbl if_1_true
lea %A64_420:A64 = nj
mov %S32_421:S32 = 5
st %A64_420 0 = %S32_421
.bbl if_1_end
ret
.fun njDecode16 NORMAL [U16] = [A64]
.reg U16 [%out]
.bbl %start
poparg pos:A64
ld %U8_422:U8 = pos 0
conv %S32_423:S32 = %U8_422
shl %S32_424:S32 = %S32_423 8
lea %A64_425:A64 = pos 1
ld %U8_426:U8 = %A64_425 0
conv %S32_427:S32 = %U8_426
or %S32_428:S32 = %S32_424 %S32_427
conv %U16_429:U16 = %S32_428
mov %out = %U16_429
pusharg %out
ret
.fun __static_3_njDecodeLength NORMAL [] = []
.bbl %start
lea %A64_430:A64 = nj
lea %A64_431:A64 = %A64_430 16
ld %S32_432:S32 = %A64_431 0
blt %S32_432 2 while_1
bra if_4_end
.bbl while_1
lea %A64_433:A64 = nj
mov %S32_434:S32 = 5
st %A64_433 0 = %S32_434
ret
.bbl while_1_cond
bne 0:S32 0 while_1
bra if_4_end
.bbl if_4_end
lea %A64_435:A64 = nj
lea %A64_436:A64 = %A64_435 4
ld %A64_437:A64 = %A64_436 0
pusharg %A64_437
bsr njDecode16
poparg %U16_438:U16
conv %S32_439:S32 = %U16_438
lea %A64_440:A64 = nj
lea %A64_441:A64 = %A64_440 20
st %A64_441 0 = %S32_439
lea %A64_442:A64 = nj
lea %A64_443:A64 = %A64_442 20
ld %S32_444:S32 = %A64_443 0
lea %A64_445:A64 = nj
lea %A64_446:A64 = %A64_445 16
ld %S32_447:S32 = %A64_446 0
blt %S32_447 %S32_444 while_2
bra if_6_end
.bbl while_2
lea %A64_448:A64 = nj
mov %S32_449:S32 = 5
st %A64_448 0 = %S32_449
ret
.bbl while_2_cond
bne 0:S32 0 while_2
bra if_6_end
.bbl if_6_end
mov %S32_450:S32 = 2
pusharg %S32_450
bsr __static_2_njSkip
ret
.fun njSkipMarker NORMAL [] = []
.bbl %start
bsr __static_3_njDecodeLength
lea %A64_451:A64 = nj
lea %A64_452:A64 = %A64_451 20
ld %S32_453:S32 = %A64_452 0
pusharg %S32_453
bsr __static_2_njSkip
ret
.fun njDecodeSOF NORMAL [] = []
.bbl %start
.reg S32 [i]
.reg S32 [ssxmax]
mov ssxmax = 0
.reg S32 [ssymax]
mov ssymax = 0
.reg A64 [c]
bsr __static_3_njDecodeLength
.bbl while_1
lea %A64_454:A64 = nj
lea %A64_455:A64 = %A64_454 0
ld %S32_456:S32 = %A64_455 0
bne %S32_456 0 if_17_true
bra while_1_cond
.bbl if_17_true
ret
.bbl while_1_cond
bne 0:S32 0 while_1
bra while_1_exit