-
Notifications
You must be signed in to change notification settings - Fork 21
/
jpeg.S
2829 lines (2805 loc) · 52.7 KB
/
jpeg.S
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
.file "jpeg.S"
.text
.globl jpeg_decode
.globl jpeg_get_size
.equ in, 0
.equ dhuff, 16
.equ quant, 5664
.equ dscans, 5920
.equ comps, 6032
.equ info, 6080
.equ decdata, 6092
.equ datap, 9996
.equ tmp_img, 10000
aaidct:
.long 724
.long 1004
.long 946
.long 851
.long 724
.long 569
.long 392
.long 200
zig:
.byte 0
.byte 1
.byte 5
.byte 6
.byte 14
.byte 15
.byte 27
.byte 28
.byte 2
.byte 4
.byte 7
.byte 13
.byte 16
.byte 26
.byte 29
.byte 42
.byte 3
.byte 8
.byte 12
.byte 17
.byte 25
.byte 30
.byte 41
.byte 43
.byte 9
.byte 11
.byte 18
.byte 24
.byte 31
.byte 40
.byte 44
.byte 53
.byte 10
.byte 19
.byte 23
.byte 32
.byte 39
.byte 45
.byte 52
.byte 54
.byte 20
.byte 22
.byte 33
.byte 38
.byte 46
.byte 51
.byte 55
.byte 60
.byte 21
.byte 34
.byte 37
.byte 47
.byte 50
.byte 56
.byte 59
.byte 61
.byte 35
.byte 36
.byte 48
.byte 49
.byte 57
.byte 58
.byte 62
.byte 63
zig2:
.byte 0
.byte 2
.byte 3
.byte 9
.byte 10
.byte 20
.byte 21
.byte 35
.byte 14
.byte 16
.byte 25
.byte 31
.byte 39
.byte 46
.byte 50
.byte 57
.byte 5
.byte 7
.byte 12
.byte 18
.byte 23
.byte 33
.byte 37
.byte 48
.byte 27
.byte 29
.byte 41
.byte 44
.byte 52
.byte 55
.byte 59
.byte 62
.byte 15
.byte 26
.byte 30
.byte 40
.byte 45
.byte 51
.byte 56
.byte 58
.byte 1
.byte 4
.byte 8
.byte 11
.byte 19
.byte 22
.byte 34
.byte 36
.byte 28
.byte 42
.byte 43
.byte 53
.byte 54
.byte 60
.byte 61
.byte 63
.byte 6
.byte 13
.byte 17
.byte 24
.byte 32
.byte 38
.byte 47
.byte 49
getword:
# datap = %fs:datap
movl %fs:datap, %edx
# (%edx) = %es:jpg+4
movzwl %es:(%edx), %eax
addl $2, %edx
xchgb %al, %ah
# datap = %fs:datap
movl %edx, %fs:datap
ret
idctqtab:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
pushl %ecx
movl %edx, %ebp
# (%esp) = %ss:stack+688
movl %eax, (%esp)
xorl %edi, %edi
.L4:
leal zig(%edi,%edi), %ebx
movl $aaidct, %esi
.L5:
# (%ebx) = %cs:zig
movzbl %cs:(%ebx), %ecx
# (%esp) = %ss:stack+688
movl (%esp), %eax
incl %ebx
# (%eax,%ecx) = %fs:quant+?
movzbl %fs:(%eax,%ecx), %edx
# (%esi) = %cs:aaidct
movl %cs:(%esi), %eax
addl $4, %esi
# aaidct(%edi) = %cs:aaidct
imull %cs:aaidct(%edi), %eax
sarl $11, %eax
imull %eax, %edx
cmpl $aaidct+32, %esi
# (%ebp,%ecx,4) = %fs:decdata+?
movl %edx, %fs:(%ebp,%ecx,4)
jne .L5
addl $4, %edi
cmpl $32, %edi
jne .L4
popl %eax
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
idct:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $388, %esp
# 8(%esp) = %ss:stack+304
movl %edx, 8(%esp)
# 12(%esp) = %ss:stack+308
movl %eax, 12(%esp)
# 4(%esp) = %ss:stack+300
movl %ecx, 4(%esp)
# 408(%esp) = %ss:stack+704
movl 408(%esp), %edx
# 412(%esp) = %ss:stack+708
cmpl $1, 412(%esp)
jne .L14
# (%ecx) = %fs:decdata+3136
movl %fs:(%ecx), %eax
# 12(%esp) = %ss:stack+308
movl 12(%esp), %ecx
# (%ecx) = %fs:decdata
imull %fs:(%ecx), %eax
leal (%edx,%eax), %ecx
movl $1, %edx
.L16:
movl %ecx, %eax
# 8(%esp) = %ss:stack+304
movl 8(%esp), %ebx
sarl $11, %eax
# -4(%ebx,%edx,4) = %fs:decdata+1600
movl %eax, %fs:-4(%ebx,%edx,4)
incl %edx
cmpl $65, %edx
je .L21
jmp .L16
.L14:
leal 136(%esp), %edi
# 40(%esp) = %ss:stack+336
movl $zig2+8, 40(%esp)
# 44(%esp) = %ss:stack+340
movl %edi, 44(%esp)
movl %edx, %ecx
.L18:
# 40(%esp) = %ss:stack+336
movl 40(%esp), %edx
# 12(%esp) = %ss:stack+308
movl 12(%esp), %ebx
# 4(%esp) = %ss:stack+300
movl 4(%esp), %edi
# -8(%edx) = %cs:zig2
movzbl %cs:-8(%edx), %eax
# (%ebx,%eax,4) = %fs:decdata+?
movl %fs:(%ebx,%eax,4), %edx
# (%edi,%eax,4) = %fs:decdata+?
imull %fs:(%edi,%eax,4), %edx
leal (%ecx,%edx), %edx
# 48(%esp) = %ss:stack+344
movl %edx, 48(%esp)
# 40(%esp) = %ss:stack+336
movl 40(%esp), %edx
# -7(%edx) = %cs:zig2+1
movzbl %cs:-7(%edx), %eax
# (%ebx,%eax,4) = %fs:decdata+?
movl %fs:(%ebx,%eax,4), %ecx
# (%edi,%eax,4) = %fs:decdata+?
imull %fs:(%edi,%eax,4), %ecx
# 80(%esp) = %ss:stack+376
movl %ecx, 80(%esp)
# 4(%esp) = %ss:stack+300
movl 4(%esp), %ecx
# -6(%edx) = %cs:zig2+2
movzbl %cs:-6(%edx), %edx
# (%ebx,%edx,4) = %fs:decdata+?
movl %fs:(%ebx,%edx,4), %eax
# 40(%esp) = %ss:stack+336
movl 40(%esp), %ebx
# (%edi,%edx,4) = %fs:decdata+?
imull %fs:(%edi,%edx,4), %eax
# -5(%ebx) = %cs:zig2+3
movzbl %cs:-5(%ebx), %edx
# 12(%esp) = %ss:stack+308
movl 12(%esp), %edi
# (%edi,%edx,4) = %fs:decdata+?
movl %fs:(%edi,%edx,4), %edi
# (%ecx,%edx,4) = %fs:decdata+?
imull %fs:(%ecx,%edx,4), %edi
# 100(%esp) = %ss:stack+396
movl %edi, 100(%esp)
# 40(%esp) = %ss:stack+336
movl 40(%esp), %edi
# -4(%ebx) = %cs:zig2+4
movzbl %cs:-4(%ebx), %edx
# 12(%esp) = %ss:stack+308
movl 12(%esp), %ebx
# (%ebx,%edx,4) = %fs:decdata+?
movl %fs:(%ebx,%edx,4), %ebx
# (%ecx,%edx,4) = %fs:decdata+?
imull %fs:(%ecx,%edx,4), %ebx
# 124(%esp) = %ss:stack+420
movl %ebx, 124(%esp)
# 12(%esp) = %ss:stack+308
movl 12(%esp), %ecx
# -3(%edi) = %cs:zig2+5
movzbl %cs:-3(%edi), %edx
# 4(%esp) = %ss:stack+300
movl 4(%esp), %ebx
# (%ecx,%edx,4) = %fs:decdata+?
movl %fs:(%ecx,%edx,4), %ecx
# (%ebx,%edx,4) = %fs:decdata+?
imull %fs:(%ebx,%edx,4), %ecx
# 56(%esp) = %ss:stack+352
movl %ecx, 56(%esp)
# -2(%edi) = %cs:zig2+6
movzbl %cs:-2(%edi), %edx
# 12(%esp) = %ss:stack+308
movl 12(%esp), %edi
# (%edi,%edx,4) = %fs:decdata+?
movl %fs:(%edi,%edx,4), %ecx
# (%ebx,%edx,4) = %fs:decdata+?
imull %fs:(%ebx,%edx,4), %ecx
# 40(%esp) = %ss:stack+336
movl 40(%esp), %ebx
# -1(%ebx) = %cs:zig2+7
movzbl %cs:-1(%ebx), %edx
# (%edi,%edx,4) = %fs:decdata+?
movl %fs:(%edi,%edx,4), %ebp
# 4(%esp) = %ss:stack+300
movl 4(%esp), %edi
# (%edi,%edx,4) = %fs:decdata+?
imull %fs:(%edi,%edx,4), %ebp
# 48(%esp) = %ss:stack+344
movl 48(%esp), %edx
# 48(%esp) = %ss:stack+344
movl 48(%esp), %edi
# 124(%esp) = %ss:stack+420
subl 124(%esp), %edx
# 124(%esp) = %ss:stack+420
addl 124(%esp), %edi
# 128(%esp) = %ss:stack+424
movl %edx, 128(%esp)
leal (%eax,%ecx), %edx
subl %ecx, %eax
# 128(%esp) = %ss:stack+424
movl 128(%esp), %ebx
imull $2896, %eax, %eax
sarl $11, %eax
leal (%edi,%edx), %ecx
subl %edx, %edi
subl %edx, %eax
# 116(%esp) = %ss:stack+412
movl %edi, 116(%esp)
# 128(%esp) = %ss:stack+424
movl 128(%esp), %edi
addl %eax, %ebx
subl %eax, %edi
# 72(%esp) = %ss:stack+368
movl %ecx, 72(%esp)
# 56(%esp) = %ss:stack+352
movl 56(%esp), %eax
# 56(%esp) = %ss:stack+352
movl 56(%esp), %ecx
# 100(%esp) = %ss:stack+396
addl 100(%esp), %eax
# 100(%esp) = %ss:stack+396
subl 100(%esp), %ecx
# 76(%esp) = %ss:stack+372
movl %ebx, 76(%esp)
# 80(%esp) = %ss:stack+376
movl 80(%esp), %edx
# 80(%esp) = %ss:stack+376
movl 80(%esp), %ebx
subl %ebp, %ebx
addl %ebp, %edx
# 112(%esp) = %ss:stack+408
movl %edi, 112(%esp)
leal (%edx,%eax), %ebp
subl %eax, %edx
leal (%ecx,%ebx), %eax
imull $5351, %ebx, %edi
imull $1567, %eax, %eax
imull $2217, %ecx, %ecx
imull $2896, %edx, %edx
sarl $11, %eax
# 44(%esp) = %ss:stack+340
movl 44(%esp), %ebx
sarl $11, %edi
sarl $11, %ecx
subl %eax, %edi
subl %ebp, %edi
addl %eax, %ecx
sarl $11, %edx
# 72(%esp) = %ss:stack+368
movl 72(%esp), %eax
subl %edi, %edx
addl %ebp, %eax
# -4(%ebx) = %ss:stack+428
movl %eax, %ss:-4(%ebx)
# 76(%esp) = %ss:stack+372
movl 76(%esp), %eax
addl %edi, %eax
subl %edx, %ecx
# 28(%ebx) = %ss:stack+460
movl %eax, %ss:28(%ebx)
# 112(%esp) = %ss:stack+408
movl 112(%esp), %eax
addl %edx, %eax
# 88(%esp) = %ss:stack+384
movl %edi, 88(%esp)
# 60(%ebx) = %ss:stack+492
movl %eax, %ss:60(%ebx)
# 112(%esp) = %ss:stack+408
subl %edx, 112(%esp)
# 116(%esp) = %ss:stack+412
movl 116(%esp), %eax
# 88(%esp) = %ss:stack+384
movl 88(%esp), %edx
# 116(%esp) = %ss:stack+412
subl %ecx, 116(%esp)
addl %ecx, %eax
# 76(%esp) = %ss:stack+372
subl %edx, 76(%esp)
# 116(%esp) = %ss:stack+412
movl 116(%esp), %edi
# 72(%esp) = %ss:stack+368
subl %ebp, 72(%esp)
# 92(%ebx) = %ss:stack+524
movl %eax, %ss:92(%ebx)
# 40(%esp) = %ss:stack+336
addl $8, 40(%esp)
# 124(%ebx) = %ss:stack+556
movl %edi, %ss:124(%ebx)
# 76(%esp) = %ss:stack+372
movl 76(%esp), %ecx
# 112(%esp) = %ss:stack+408
movl 112(%esp), %eax
# 72(%esp) = %ss:stack+368
movl 72(%esp), %edi
# 188(%ebx) = %ss:stack+620
movl %ecx, %ss:188(%ebx)
# 156(%ebx) = %ss:stack+588
movl %eax, %ss:156(%ebx)
# 220(%ebx) = %ss:stack+652
movl %edi, %ss:220(%ebx)
addl $4, %ebx
xorl %ecx, %ecx
# 44(%esp) = %ss:stack+340
movl %ebx, 44(%esp)
# 40(%esp) = %ss:stack+336
cmpl $zig2+72, 40(%esp)
jne .L18
# 32(%esp) = %ss:stack+328
movl $0, 32(%esp)
.L20:
leal 132(%esp), %eax
# 32(%esp) = %ss:stack+328
movl 32(%esp), %ecx
# 32(%esp) = %ss:stack+328
movl 32(%esp), %edx
# 16(%eax,%ecx) = %ss:stack+?
movl %ss:16(%eax,%ecx), %edi
# 4(%eax,%ecx) = %ss:stack+?
movl %ss:4(%eax,%ecx), %ebx
# 20(%esp) = %ss:stack+316
movl %edi, 20(%esp)
movl %ecx, %edi
# (%edx,%eax) = %ss:stack+?
movl %ss:(%edx,%eax), %edx
# 12(%eax,%ecx) = %ss:stack+?
movl %ss:12(%eax,%ecx), %esi
# 24(%eax,%edi) = %ss:stack+?
movl %ss:24(%eax,%edi), %edi
# 16(%esp) = %ss:stack+312
movl %edx, 16(%esp)
# 24(%esp) = %ss:stack+320
movl %edi, 24(%esp)
# 32(%esp) = %ss:stack+328
movl 32(%esp), %edi
# 8(%eax,%ecx) = %ss:stack+?
movl %ss:8(%eax,%ecx), %edx
# 20(%eax,%ecx) = %ss:stack+?
movl %ss:20(%eax,%ecx), %ecx
# 28(%eax,%edi) = %ss:stack+?
movl %ss:28(%eax,%edi), %eax
# 16(%esp) = %ss:stack+312
movl 16(%esp), %ebp
# 28(%esp) = %ss:stack+324
movl %eax, 28(%esp)
# 16(%esp) = %ss:stack+312
movl 16(%esp), %eax
subl %ebx, %eax
addl %ebx, %ebp
# 120(%esp) = %ss:stack+416
movl %eax, 120(%esp)
leal (%edx,%esi), %eax
subl %esi, %edx
# 120(%esp) = %ss:stack+416
movl 120(%esp), %edi
imull $2896, %edx, %edx
sarl $11, %edx
leal (%ebp,%eax), %ebx
subl %eax, %edx
subl %eax, %ebp
# 120(%esp) = %ss:stack+416
movl 120(%esp), %eax
addl %edx, %edi
subl %edx, %eax
# 20(%esp) = %ss:stack+316
movl 20(%esp), %edx
# 28(%esp) = %ss:stack+324
subl 28(%esp), %edx
# 60(%esp) = %ss:stack+356
movl %ebx, 60(%esp)
# 64(%esp) = %ss:stack+360
movl %edi, 64(%esp)
# 20(%esp) = %ss:stack+316
movl 20(%esp), %ebx
# 24(%esp) = %ss:stack+320
movl 24(%esp), %edi
# 68(%esp) = %ss:stack+364
movl %edx, 68(%esp)
# 28(%esp) = %ss:stack+324
addl 28(%esp), %ebx
# 108(%esp) = %ss:stack+404
movl %eax, 108(%esp)
leal (%ecx,%edi), %edx
# 68(%esp) = %ss:stack+364
movl 68(%esp), %eax
subl %edi, %ecx
# 92(%esp) = %ss:stack+388
movl %ebx, 92(%esp)
addl %ecx, %eax
addl %edx, %ebx
# 96(%esp) = %ss:stack+392
movl %ebx, 96(%esp)
# 92(%esp) = %ss:stack+388
subl 92(%esp), %edx
# 68(%esp) = %ss:stack+364
imull $2217, 68(%esp), %ebx
imull $1567, %eax, %eax
imull $5351, %ecx, %ecx
imull $2896, %edx, %edx
sarl $11, %eax
sarl $11, %ebx
sarl $11, %ecx
# (%esp) = %ss:stack+296
movl %ebx, (%esp)
subl %eax, %ecx
addl %eax, %ebx
# 32(%esp) = %ss:stack+328
movl 32(%esp), %edi
# 60(%esp) = %ss:stack+356
movl 60(%esp), %eax
# 8(%esp) = %ss:stack+304
addl 8(%esp), %edi
# 96(%esp) = %ss:stack+392
addl 96(%esp), %eax
# 96(%esp) = %ss:stack+392
subl 96(%esp), %ecx
# 52(%esp) = %ss:stack+348
movl %ebx, 52(%esp)
sarl $11, %eax
# 36(%esp) = %ss:stack+332
movl %edi, 36(%esp)
sarl $11, %edx
# (%edi) = %fs:decdata+?
movl %eax, %fs:(%edi)
# 64(%esp) = %ss:stack+360
movl 64(%esp), %eax
subl %ecx, %edx
addl %ecx, %eax
subl %edx, %ebx
sarl $11, %eax
# 4(%edi) = %fs:decdata+?
movl %eax, %fs:4(%edi)
# 108(%esp) = %ss:stack+404
movl 108(%esp), %eax
addl %edx, %eax
# 64(%esp) = %ss:stack+360
subl %ecx, 64(%esp)
# 96(%esp) = %ss:stack+392
movl 96(%esp), %ecx
# 108(%esp) = %ss:stack+404
subl %edx, 108(%esp)
sarl $11, %eax
# 60(%esp) = %ss:stack+356
subl %ecx, 60(%esp)
# 108(%esp) = %ss:stack+404
sarl $11, 108(%esp)
# 64(%esp) = %ss:stack+360
sarl $11, 64(%esp)
# 60(%esp) = %ss:stack+356
sarl $11, 60(%esp)
# 8(%edi) = %fs:decdata+?
movl %eax, %fs:8(%edi)
leal (%ebp,%ebx), %eax
sarl $11, %eax
subl %ebx, %ebp
# 12(%edi) = %fs:decdata+?
movl %eax, %fs:12(%edi)
# 64(%esp) = %ss:stack+360
movl 64(%esp), %edx
sarl $11, %ebp
# 108(%esp) = %ss:stack+404
movl 108(%esp), %eax
# 60(%esp) = %ss:stack+356
movl 60(%esp), %ebx
# 16(%edi) = %fs:decdata+?
movl %ebp, %fs:16(%edi)
# 20(%edi) = %fs:decdata+?
movl %eax, %fs:20(%edi)
# 24(%edi) = %fs:decdata+?
movl %edx, %fs:24(%edi)
# 28(%edi) = %fs:decdata+?
movl %ebx, %fs:28(%edi)
# 32(%esp) = %ss:stack+328
addl $32, 32(%esp)
# 32(%esp) = %ss:stack+328
cmpl $256, 32(%esp)
jne .L20
.L21:
addl $388, %esp
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
scaleidctqtab:
pushl %ebx
leal 4(%eax), %ecx
movl %edx, %ebx
leal 260(%eax), %edx
.L27:
# -4(%ecx) = %fs:decdata+3392
movl %fs:-4(%ecx), %eax
imull %ebx, %eax
sarl $11, %eax
# -4(%ecx) = %fs:decdata+3392
movl %eax, %fs:-4(%ecx)
addl $4, %ecx
cmpl %edx, %ecx
jne .L27
popl %ebx
ret
store_16:
imull $31, %eax, %eax
imull $63, %edx, %edx
imull $31, %ecx, %ecx
pushl %ebx
# 8(%esp) = %ss:stack+708
movl 8(%esp), %ebx
addl %ebx, %eax
addl %ebx, %edx
shrl $8, %eax
addl %ebx, %ecx
shrl $8, %edx
popl %ebx
sall $11, %eax
sall $5, %edx
shrl $8, %ecx
addl %edx, %eax
addl %ecx, %eax
ret
store_8:
imull $7, %edx, %edx
imull $7, %ecx, %ecx
pushl %ebx
leal (%eax,%eax,2), %eax
# 8(%esp) = %ss:stack+708
movl 8(%esp), %ebx
addl %ebx, %eax
addl %ebx, %edx
shrl $8, %eax
addl %ebx, %ecx
sall $6, %eax
popl %ebx
shrl $8, %edx
shrl $8, %ecx
leal (%eax,%edx,8), %edx
leal (%edx,%ecx), %eax
ret
fillbits:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
pushl %esi
movl %eax, %ebp
movl %edx, %ebx
# 8(%eax) = %fs:in+8
cmpl $0, %fs:8(%eax)
jne .L37
# datap = %fs:datap
movl %fs:datap, %edx
jmp .L39
.L37:
cmpl $16, %edx
jg .L40
sall $16, %ecx
addl $16, %ebx
# (%eax) = %fs:in
movl %ecx, %fs:(%eax)
jmp .L40
.L42:
# (%edx) = %es:jpg+14
movb %es:(%edx), %al
movzbl %al, %esi
# (%esp) = %ss:stack+688
movl %esi, (%esp)
incb %al
leal 1(%edx), %esi
jne .L43
# 1(%edx) = %es:jpg+15
movb %es:1(%edx), %al
leal 2(%edx), %esi
movzbl %al, %edi
testb %al, %al
je .L43
# datap = %fs:datap
movl %esi, %fs:datap
# 8(%ebp) = %fs:in+8
movl %edi, %fs:8(%ebp)
cmpl $16, %ebx
jg .L46
sall $16, %ecx
addl $16, %ebx
jmp .L46
.L43:
sall $8, %ecx
addl $8, %ebx
# (%esp) = %ss:stack+688
orl (%esp), %ecx
movl %esi, %edx
.L39:
cmpl $24, %ebx
jle .L42
# datap = %fs:datap
movl %edx, %fs:datap
.L46:
# (%ebp) = %fs:in
movl %ecx, %fs:(%ebp)
.L40:
movl %ebx, %eax
popl %ebx
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
dec_rec2:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $20, %esp
movl %eax, %edi
# 4(%eax) = %fs:in+4
movl %fs:4(%eax), %esi
# (%eax) = %fs:in
movl %fs:(%eax), %ebp
# 4(%esp) = %ss:stack+668
movl %edx, 4(%esp)
# 44(%esp) = %ss:stack+708
movl 44(%esp), %edx
# (%esp) = %ss:stack+664
movl %ecx, (%esp)
# 40(%esp) = %ss:stack+704
movl 40(%esp), %ebx
testl %edx, %edx
jne .L51
# 4(%esp) = %ss:stack+668
movl 4(%esp), %eax
# 12(%esp) = %ss:stack+676
movl $8, 12(%esp)
# 8(%esp) = %ss:stack+672
movl %eax, 8(%esp)
jmp .L53
.L51:
movl %edx, %eax
# (%esp) = %ss:stack+664
movl (%esp), %ecx
sarl $8, %edx
andl $127, %eax
addl %eax, %esi
movl %edx, %ebx
sarl $8, %ebx
movl %edx, %eax
andl $15, %eax
# (%ecx) = %ss:stack+948
movl %eax, %ss:(%ecx)
jmp .L54
.L55:
# 12(%esp) = %ss:stack+676
incl 12(%esp)
.L53:
testl %esi, %esi
jg .L56
movl %ebp, %ecx
movl %esi, %edx
movl %edi, %eax
call fillbits
# (%edi) = %fs:in
movl %fs:(%edi), %ebp
movl %eax, %esi
.L56:
decl %esi
movl %ebp, %eax
movl %esi, %ecx
# 8(%esp) = %ss:stack+672
movl 8(%esp), %edx
sarl %cl, %eax
andl $1, %eax
addl %ebx, %ebx
orl %eax, %ebx
# 32(%edx) = %fs:dhuff+?
movl %fs:32(%edx), %eax
addl $4, %edx
cmpl %eax, %ebx
# 8(%esp) = %ss:stack+672
movl %edx, 8(%esp)
jge .L55
# 12(%esp) = %ss:stack+676
cmpl $15, 12(%esp)
jle .L59
# 8(%edi) = %fs:in+8
movl $-1, %fs:8(%edi)
jmp .L69
.L59:
# 12(%esp) = %ss:stack+676
movl 12(%esp), %ecx
# 4(%esp) = %ss:stack+668
movl 4(%esp), %edx
# -4(%edx,%ecx,4) = %fs:dhuff+?
movl %fs:-4(%edx,%ecx,4), %eax
# 68(%edx,%ecx,4) = %fs:dhuff+?
addl %fs:68(%edx,%ecx,4), %ebx
addl %eax, %eax
# (%esp) = %ss:stack+664
movl (%esp), %ecx
subl %eax, %ebx
# 132(%ebx,%edx) = %fs:dhuff+?
movzbl %fs:132(%ebx,%edx), %edx
movl %edx, %eax
movl %edx, %ebx
sarl $4, %eax
andl $15, %ebx
# (%ecx) = %ss:stack+948
movl %eax, %ss:(%ecx)
.L54:
testl %ebx, %ebx
jne .L62
# 4(%edi) = %fs:in+4
movl %esi, %fs:4(%edi)
# (%edi) = %fs:in
movl %ebp, %fs:(%edi)
.L69:
xorl %esi, %esi
jmp .L61
.L62:
cmpl %ebx, %esi
jge .L64
movl %ebp, %ecx
movl %esi, %edx
movl %edi, %eax
call fillbits
# (%edi) = %fs:in
movl %fs:(%edi), %ebp
movl %eax, %esi
.L64:
subl %ebx, %esi
movl $1, %eax
# 16(%esp) = %ss:stack+680
movl %esi, 16(%esp)
movl %ebp, %esi
# 16(%esp) = %ss:stack+680
movb 16(%esp), %cl
movl %eax, %edx
sarl %cl, %esi
movb %bl, %cl
sall %cl, %edx
decl %edx
leal -1(%ebx), %ecx
andl %edx, %esi
sall %cl, %eax
cmpl %eax, %esi
jge .L66
orl $-1, %eax
movb %bl, %cl
sall %cl, %eax
leal 1(%esi,%eax), %esi
.L66:
# 16(%esp) = %ss:stack+680
movl 16(%esp), %eax
# (%edi) = %fs:in
movl %ebp, %fs:(%edi)
# 4(%edi) = %fs:in+4
movl %eax, %fs:4(%edi)
.L61:
addl $20, %esp
movl %esi, %eax
popl %ebx
popl %esi
popl %edi
popl %ebp
ret
readtables:
pushl %ebp
pushl %edi
pushl %esi
pushl %ebx
subl $380, %esp
# 4(%esp) = %ss:stack+316
movl %eax, 4(%esp)
jmp .L145
.L138:
# datap = %fs:datap
movl %esi, %fs:datap
.L145:
# datap = %fs:datap
movl %fs:datap, %ecx
# (%ecx) = %es:jpg+4
movb %es:(%ecx), %dl
leal 1(%ecx), %eax
# datap = %fs:datap
movl %eax, %fs:datap
incb %dl
jne .L144
# 1(%ecx) = %es:jpg+5
movb %es:1(%ecx), %dl
leal 2(%ecx), %eax
# datap = %fs:datap
movl %eax, %fs:datap
movzbl %dl, %eax
# 4(%esp) = %ss:stack+316
cmpl 4(%esp), %eax
je .L76
cmpb $-60, %dl
je .L79
ja .L82
cmpb $-62, %dl
jne .L78
jmp .L76
.L82:
cmpb $-37, %dl
je .L80
cmpb $-35, %dl
jne .L78
jmp .L81
.L80:
call getword
# datap = %fs:datap
movl %fs:datap, %esi
movl %eax, %edi
jmp .L83
.L84:
# (%esi) = %es:jpg+4
movzbl %es:(%esi), %eax
movl %eax, %edx
leal 1(%esi), %ecx
andl $15, %edx
cmpl $3, %edx
jg .L126
sarl $4, %eax
testl %eax, %eax
jne .L126
sall $6, %edx
movl $64, %ebx
addl $quant, %edx
.L90:
# (%ecx) = %es:jpg+5
movzbl %es:(%ecx), %eax
incl %ecx
# (%edx) = %fs:quant+?
movb %al, %fs:(%edx)
incl %edx