This repository has been archived by the owner on Aug 20, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
fec.S.980624a
1459 lines (1457 loc) · 22.1 KB
/
fec.S.980624a
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 "fec.c"
gcc2_compiled.:
___gnu_compiled_c:
.data
.align 2
.type _allPp,@object
_allPp:
.long 0
.long 0
.long LC0
.long LC1
.long LC2
.long LC3
.long LC4
.long LC5
.long LC6
.long LC7
.long LC8
.long LC9
.long LC10
.long LC11
.long LC12
.long LC13
.long LC14
.text
LC14:
.ascii "11010000000010001\0"
LC13:
.ascii "1100000000000001\0"
LC12:
.ascii "110000100010001\0"
LC11:
.ascii "11011000000001\0"
LC10:
.ascii "1100101000001\0"
LC9:
.ascii "101000000001\0"
LC8:
.ascii "10010000001\0"
LC7:
.ascii "1000100001\0"
LC6:
.ascii "101110001\0"
LC5:
.ascii "10010001\0"
LC4:
.ascii "1100001\0"
LC3:
.ascii "101001\0"
LC2:
.ascii "11001\0"
LC1:
.ascii "1101\0"
LC0:
.ascii "111\0"
.size _allPp,68
.align 2
.type _init_mul_table,@function
_init_mul_table:
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
xorl %ebx,%ebx
.align 2,0x90
L24:
xorl %ecx,%ecx
movl %ebx,%eax
sall $8,%eax
leal _gf_mul_table(%eax),%esi
.align 2,0x90
L28:
movl _gf_log(,%ebx,4),%eax
addl _gf_log(,%ecx,4),%eax
cmpl $254,%eax
jle L31
.align 2,0x90
L32:
addl $-255,%eax
movl %eax,%edx
sarl $8,%edx
andl $255,%eax
addl %edx,%eax
cmpl $254,%eax
jg L32
L31:
andl $255,%eax
movb _gf_exp(%eax),%al
movb %al,(%ecx,%esi)
incl %ecx
cmpl $255,%ecx
jle L28
incl %ebx
cmpl $255,%ebx
jle L24
xorl %ecx,%ecx
.align 2,0x90
L39:
movl %ecx,%eax
sall $8,%eax
movb $0,_gf_mul_table(%eax)
movb $0,_gf_mul_table(%ecx)
incl %ecx
cmpl $255,%ecx
jle L39
leal -8(%ebp),%esp
popl %ebx
popl %esi
leave
ret
Lfe1:
.size _init_mul_table,Lfe1-_init_mul_table
LC15:
.ascii "-- malloc failure allocating %s\12\0"
.align 2
.type _my_malloc,@function
_my_malloc:
pushl %ebp
movl %esp,%ebp
pushl 8(%ebp)
call _malloc
addl $4,%esp
testl %eax,%eax
jne L42
pushl 12(%ebp)
pushl $LC15
pushl $___sF+176
call _fprintf
pushl $1
call _exit
.align 2,0x90
L42:
leave
ret
Lfe2:
.size _my_malloc,Lfe2-_my_malloc
.align 2
.type _generate_gf,@function
_generate_gf:
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
movl _allPp+32,%esi
movb $1,%cl
movb $0,_gf_exp+8
xorl %edx,%edx
.align 2,0x90
L47:
movb %cl,_gf_exp(%edx)
movzbl %cl,%eax
movl %edx,_gf_log(,%eax,4)
cmpb $49,(%edx,%esi)
jne L46
xorb %cl,_gf_exp+8
L46:
incl %edx
addb %cl,%cl
cmpl $7,%edx
jle L47
movzbl _gf_exp+8,%eax
movl $8,_gf_log(,%eax,4)
movb $128,%cl
movl $9,%edx
.align 2,0x90
L53:
cmpb %cl,_gf_exp-1(%edx)
jb L54
movb %cl,%al
xorb _gf_exp-1(%edx),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,_gf_exp(%edx)
jmp L55
.align 2,0x90
L54:
movb _gf_exp-1(%edx),%bl
addb %bl,%bl
movb %bl,_gf_exp(%edx)
L55:
movzbl _gf_exp(%edx),%eax
movl %edx,_gf_log(,%eax,4)
incl %edx
cmpl $254,%edx
jle L53
movl $255,_gf_log
xorl %edx,%edx
.align 2,0x90
L60:
movb _gf_exp(%edx),%al
movb %al,_gf_exp+255(%edx)
incl %edx
cmpl $254,%edx
jle L60
movb $0,_inverse
movb $1,_inverse+1
movl $2,%edx
.align 2,0x90
L65:
movl $_gf_exp+255,%eax
subl _gf_log(,%edx,4),%eax
movb (%eax),%al
movb %al,_inverse(%edx)
incl %edx
cmpl $255,%edx
jle L65
leal -8(%ebp),%esp
popl %ebx
popl %esi
leave
ret
Lfe3:
.size _generate_gf,Lfe3-_generate_gf
.align 2
.type _addmul1,@function
_addmul1:
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
movl 8(%ebp),%edx
movl 12(%ebp),%ecx
movl 20(%ebp),%eax
addl $-15,%eax
leal (%eax,%edx),%esi
movzbl 16(%ebp),%eax
sall $8,%eax
leal _gf_mul_table(%eax),%ebx
pushl %edi
cmpl %esi,%edx
jae L69
.align 2,0x90
L71:
#define XYZ_0(n) /* this is basic code */ \
movzbl (n)(%ecx),%eax ; \
movb (%eax,%ebx),%al ; \
xorb %al,(n)(%edx) ;
#if 0
#define XYZ(n) \
XYZ_0(n) ; \
XYZ_0(n+1) ; \
XYZ_0(n+2) ; \
XYZ_0(n+3) ;
#else
#define XYZ(n) /* this is x4 code */ \
movl n(%ecx),%eax ; \
movzbl %al, %edi ; \
movb (%edi,%ebx),%al ; \
movzbl %ah, %edi ; \
movb (%edi,%ebx),%ah ; \
roll $16, %eax ; \
movzbl %al, %edi ; \
movb (%edi,%ebx),%al ; \
movzbl %ah, %edi ; \
movb (%edi,%ebx),%ah ; \
roll $16, %eax ; \
xorl %eax,n(%edx) ;
#endif
XYZ(0)
XYZ(4)
XYZ(8)
XYZ(12)
addl $16,%edx
addl $16,%ecx
cmpl %esi,%edx
jb L71
L69:
addl $15,%esi
cmpl %esi,%edx
jae L74
.align 2,0x90
L76:
movzbl (%ecx),%eax
movb (%eax,%ebx),%al
xorb %al,(%edx)
incl %edx
incl %ecx
cmpl %esi,%edx
jb L76
L74:
popl %edi
leal -8(%ebp),%esp
popl %ebx
popl %esi
leave
ret
Lfe4:
.size _addmul1,Lfe4-_addmul1
.align 2
.type _matmul,@function
_matmul:
pushl %ebp
movl %esp,%ebp
subl $28,%esp
pushl %edi
pushl %esi
pushl %ebx
movl $0,-4(%ebp)
movl 20(%ebp),%eax
cmpl %eax,-4(%ebp)
jge L80
.align 2,0x90
L82:
xorl %ebx,%ebx
cmpl %ebx,28(%ebp)
jle L81
movl -4(%ebp),%esi
imull 24(%ebp),%esi
movl %esi,-8(%ebp)
movl -4(%ebp),%edi
imull 28(%ebp),%edi
movl %edi,-16(%ebp)
.align 2,0x90
L86:
movl 8(%ebp),%eax
addl -8(%ebp),%eax
movl %eax,-28(%ebp)
movl 12(%ebp),%esi
addl %ebx,%esi
movl %esi,-24(%ebp)
movb $0,-12(%ebp)
xorl %ecx,%ecx
cmpl %ecx,24(%ebp)
jle L88
.align 2,0x90
L90:
movl -28(%ebp),%edi
movzbl (%edi),%edx
sall $8,%edx
movl -24(%ebp),%eax
movzbl (%eax),%eax
movb _gf_mul_table(%eax,%edx),%dl
xorb %dl,-12(%ebp)
incl %ecx
incl %edi
movl %edi,-28(%ebp)
movl 28(%ebp),%esi
addl %esi,-24(%ebp)
cmpl %ecx,24(%ebp)
jg L90
L88:
movl -16(%ebp),%edi
addl %ebx,%edi
movb -12(%ebp),%al
movl 16(%ebp),%esi
movb %al,(%edi,%esi)
incl %ebx
cmpl %ebx,28(%ebp)
jg L86
L81:
incl -4(%ebp)
movl 20(%ebp),%edi
cmpl %edi,-4(%ebp)
jl L82
L80:
leal -40(%ebp),%esp
popl %ebx
popl %esi
popl %edi
leave
ret
Lfe5:
.size _matmul,Lfe5-_matmul
LC16:
.ascii "indxc\0"
LC17:
.ascii "indxr\0"
LC18:
.ascii "ipiv\0"
LC19:
.ascii " ## __LINE__ ## \0"
LC20:
.ascii "singular matrix\12\0"
LC21:
.ascii "XXX pivot not found!\12\0"
LC22:
.ascii "singular matrix 2\12\0"
LC23:
.ascii "AARGH, indxr[col] %d\12\0"
LC24:
.ascii "AARGH, indxc[col] %d\12\0"
.align 2
.type _invert_mat,@function
_invert_mat:
pushl %ebp
movl %esp,%ebp
subl $52,%esp
pushl %edi
pushl %esi
pushl %ebx
movl $1,-16(%ebp)
pushl $LC16
movl 12(%ebp),%edx
sall $2,%edx
movl %edx,-52(%ebp)
pushl %edx
call _my_malloc
movl %eax,-20(%ebp)
pushl $LC17
pushl -52(%ebp)
call _my_malloc
movl %eax,-24(%ebp)
pushl $LC18
pushl -52(%ebp)
call _my_malloc
movl %eax,-28(%ebp)
pushl $LC19
pushl 12(%ebp)
call _my_malloc
movl %eax,-32(%ebp)
addl $32,%esp
pushl $LC19
pushl 12(%ebp)
call _my_malloc
movl %eax,-36(%ebp)
pushl 12(%ebp)
pushl -32(%ebp)
call _bzero
xorl %eax,%eax
addl $16,%esp
cmpl %eax,12(%ebp)
jle L96
.align 2,0x90
L98:
movl -28(%ebp),%ecx
movl $0,(%ecx,%eax,4)
incl %eax
cmpl %eax,12(%ebp)
jg L98
L96:
movl $0,-12(%ebp)
movl 12(%ebp),%ebx
cmpl %ebx,-12(%ebp)
jge L101
.align 2,0x90
L103:
movl $-1,-8(%ebp)
movl $-1,-4(%ebp)
movl -12(%ebp),%edx
movl -28(%ebp),%ecx
cmpl $1,(%ecx,%edx,4)
je L104
movl %edx,%eax
imull 12(%ebp),%eax
addl %edx,%eax
movl 8(%ebp),%ebx
cmpb $0,(%eax,%ebx)
je L104
movl %edx,-4(%ebp)
movl %edx,-8(%ebp)
jmp L105
.align 2,0x90
L104:
xorl %edi,%edi
cmpl %edi,12(%ebp)
jle L107
.align 2,0x90
L109:
movl -28(%ebp),%edx
cmpl $1,(%edx,%edi,4)
je L108
xorl %esi,%esi
cmpl %esi,12(%ebp)
jle L108
.align 2,0x90
L114:
movl -28(%ebp),%ecx
cmpl $0,(%ecx,%esi,4)
jne L115
movl 12(%ebp),%eax
imull %edi,%eax
addl %esi,%eax
movl 8(%ebp),%ebx
cmpb $0,(%eax,%ebx)
je L113
movl %edi,-4(%ebp)
movl %esi,-8(%ebp)
jmp L105
.align 2,0x90
L115:
movl -28(%ebp),%edx
cmpl $1,(%edx,%esi,4)
jle L113
pushl $LC20
jmp L162
.align 2,0x90
L113:
incl %esi
cmpl %esi,12(%ebp)
jg L114
L108:
incl %edi
cmpl %edi,12(%ebp)
jg L109
L107:
cmpl $-1,-8(%ebp)
jne L105
pushl $LC21
jmp L162
.align 2,0x90
L105:
movl -8(%ebp),%ecx
movl -28(%ebp),%ebx
incl (%ebx,%ecx,4)
cmpl %ecx,-4(%ebp)
je L123
xorl %esi,%esi
cmpl %esi,12(%ebp)
jle L123
movl -4(%ebp),%edx
imull 12(%ebp),%edx
movl %edx,-40(%ebp)
movl -8(%ebp),%edi
imull 12(%ebp),%edi
.align 2,0x90
L127:
movl -40(%ebp),%ecx
addl %esi,%ecx
movl %ecx,-44(%ebp)
movl 8(%ebp),%ebx
movb (%ecx,%ebx),%bl
movb %bl,-52(%ebp)
leal (%esi,%edi),%edx
movl 8(%ebp),%ecx
movb (%edx,%ecx),%al
movl -44(%ebp),%ebx
movb %al,(%ebx,%ecx)
movb -52(%ebp),%bl
movb %bl,(%edx,%ecx)
incl %esi
cmpl %esi,12(%ebp)
jg L127
L123:
movl -4(%ebp),%ebx
movl -12(%ebp),%edx
movl -24(%ebp),%ecx
movl %ebx,(%ecx,%edx,4)
movl -8(%ebp),%ecx
movl -20(%ebp),%ebx
movl %ecx,(%ebx,%edx,4)
movl -8(%ebp),%eax
imull 12(%ebp),%eax
movl 8(%ebp),%edi
addl %eax,%edi
movb (%ecx,%edi),%al
testb %al,%al
jne L129
pushl $LC22
L162:
pushl $___sF+176
call _fprintf
addl $8,%esp
jmp L119
.align 2,0x90
L129:
cmpb $1,%al
je L130
andl $255,%eax
movb _inverse(%eax),%al
movl -8(%ebp),%edx
movb $1,(%edx,%edi)
xorl %esi,%esi
cmpl %esi,12(%ebp)
jle L130
andl $255,%eax
sall $8,%eax
addl $_gf_mul_table,%eax
movl %eax,-52(%ebp)
.align 2,0x90
L134:
movzbl (%esi,%edi),%eax
movl -52(%ebp),%ecx
movb (%eax,%ecx),%al
movb %al,(%esi,%edi)
incl %esi
cmpl %esi,12(%ebp)
jg L134
L130:
movl -32(%ebp),%ebx
movl -8(%ebp),%edx
movb $1,(%edx,%ebx)
pushl 12(%ebp)
pushl %ebx
pushl %edi
call _bcmp
addl $12,%esp
testl %eax,%eax
je L136
movl 8(%ebp),%ecx
movl %ecx,-52(%ebp)
xorl %esi,%esi
cmpl %esi,12(%ebp)
jle L136
.align 2,0x90
L140:
cmpl %esi,-8(%ebp)
je L139
movl -52(%ebp),%ebx
movl -8(%ebp),%edx
movb (%edx,%ebx),%al
movb $0,(%edx,%ebx)
testb %al,%al
je L139
pushl 12(%ebp)
andl $255,%eax
pushl %eax
pushl %edi
pushl %ebx
call _addmul1
addl $16,%esp
L139:
incl %esi
movl 12(%ebp),%ecx
addl %ecx,-52(%ebp)
cmpl %ecx,%esi
jl L140
L136:
movl -32(%ebp),%ebx
movl -8(%ebp),%edx
movb $0,(%edx,%ebx)
incl -12(%ebp)
movl 12(%ebp),%ecx
cmpl %ecx,-12(%ebp)
jl L103
L101:
movl 12(%ebp),%ebx
decl %ebx
movl %ebx,-12(%ebp)
js L146
.align 2,0x90
L148:
movl -12(%ebp),%edx
movl -24(%ebp),%ecx
cmpl $0,(%ecx,%edx,4)
jl L150
movl 12(%ebp),%ebx
cmpl %ebx,(%ecx,%edx,4)
jl L149
L150:
movl -12(%ebp),%edx
movl -24(%ebp),%ecx
pushl (%ecx,%edx,4)
pushl $LC23
jmp L163
.align 2,0x90
L149:
movl -12(%ebp),%ebx
movl -20(%ebp),%edx
cmpl $0,(%edx,%ebx,4)
jl L153
movl 12(%ebp),%ecx
cmpl %ecx,(%edx,%ebx,4)
jl L152
L153:
movl -12(%ebp),%ebx
movl -20(%ebp),%edx
pushl (%edx,%ebx,4)
pushl $LC24
L163:
pushl $___sF+176
call _fprintf
addl $12,%esp
jmp L147
.align 2,0x90
L152:
movl -12(%ebp),%ecx
movl -24(%ebp),%ebx
movl (%ebx,%ecx,4),%eax
movl -20(%ebp),%edx
cmpl %eax,(%edx,%ecx,4)
je L147
xorl %edi,%edi
cmpl %edi,12(%ebp)
jle L147
.align 2,0x90
L159:
movl 12(%ebp),%ecx
imull %edi,%ecx
movl %ecx,-48(%ebp)
movl -12(%ebp),%ebx
movl -24(%ebp),%edx
addl (%edx,%ebx,4),%ecx
movl %ecx,-44(%ebp)
movl 8(%ebp),%ebx
movb (%ecx,%ebx),%cl
movb %cl,-52(%ebp)
movl -48(%ebp),%eax
movl -12(%ebp),%edx
movl -20(%ebp),%ecx
addl (%ecx,%edx,4),%eax
movb (%eax,%ebx),%al
movl -44(%ebp),%edx
movb %al,(%edx,%ebx)
movl -48(%ebp),%edx
movl -12(%ebp),%ebx
addl (%ecx,%ebx,4),%edx
movb -52(%ebp),%cl
movl 8(%ebp),%ebx
movb %cl,(%edx,%ebx)
incl %edi
cmpl %edi,12(%ebp)
jg L159
L147:
decl -12(%ebp)
jns L148
L146:
movl $0,-16(%ebp)
L119:
pushl -20(%ebp)
call _free
pushl -24(%ebp)
call _free
pushl -28(%ebp)
call _free
pushl -32(%ebp)
call _free
pushl -36(%ebp)
call _free
movl -16(%ebp),%eax
leal -64(%ebp),%esp
popl %ebx
popl %esi
popl %edi
leave
ret
Lfe6:
.size _invert_mat,Lfe6-_invert_mat
.align 2
.globl _invert_vdm
.type _invert_vdm,@function
_invert_vdm:
pushl %ebp
movl %esp,%ebp
subl $32,%esp
pushl %edi
pushl %esi
pushl %ebx
movl 12(%ebp),%esi
cmpl $1,%esi
je L197
pushl $LC19
pushl %esi
call _my_malloc
movl %eax,-8(%ebp)
pushl $LC19
pushl %esi
call _my_malloc
movl %eax,-4(%ebp)
pushl $LC19
pushl %esi
call _my_malloc
movl %eax,-12(%ebp)
movl $1,%ecx
xorl %edx,%edx
addl $24,%esp
cmpl %esi,%edx
jge L167
.align 2,0x90
L169:
movl -8(%ebp),%ebx
movb $0,(%edx,%ebx)
movl 8(%ebp),%edi
movb (%ecx,%edi),%al
movl -12(%ebp),%ebx
movb %al,(%edx,%ebx)
incl %edx
addl %esi,%ecx
cmpl %esi,%edx
jl L169
L167:
movl -12(%ebp),%edi
movb (%edi),%al
movl -8(%ebp),%ebx
movb %al,-1(%ebx,%esi)
movl $1,%edx
cmpl %esi,%edx
jge L172
leal -1(%esi),%edi
movl %edi,-32(%ebp)
.align 2,0x90
L174:
movl -12(%ebp),%ebx
movb (%edx,%ebx),%bl
movb %bl,-20(%ebp)
movl %esi,%ecx
subl %edx,%ecx
cmpl %ecx,-32(%ebp)
jle L176
movzbl %bl,%eax
sall $8,%eax
addl $_gf_mul_table,%eax
movl %eax,-28(%ebp)
.align 2,0x90
L178:
movl -8(%ebp),%edi
movzbl 1(%edi,%ecx),%eax
movl -28(%ebp),%ebx
movb (%eax,%ebx),%al
xorb %al,(%ecx,%edi)
incl %ecx
cmpl %ecx,-32(%ebp)
jg L178
L176:
movb -20(%ebp),%bl
movl -8(%ebp),%edi
xorb %bl,-1(%edi,%esi)
incl %edx
cmpl %esi,%edx
jl L174
L172:
movl $0,-32(%ebp)
cmpl %esi,-32(%ebp)
jge L182
.align 2,0x90
L184:
movl -12(%ebp),%ebx
movl -32(%ebp),%edi
movb (%edi,%ebx),%al
movb $1,-16(%ebp)
movl -4(%ebp),%ebx
movb $1,-1(%ebx,%esi)
leal -2(%esi),%edx
testl %edx,%edx
jl L186
andl $255,%eax
sall $8,%eax
leal _gf_mul_table(%eax),%ecx
.align 2,0x90
L188:
movl -4(%ebp),%edi
movzbl 1(%edi,%edx),%eax
movl -8(%ebp),%ebx
movb 1(%ebx,%edx),%bl
xorb (%eax,%ecx),%bl
movb %bl,(%edx,%edi)
movzbl -16(%ebp),%eax
movb (%eax,%ecx),%al
xorb (%edx,%edi),%al
movb %al,-16(%ebp)
decl %edx
jns L188
L186:
movl $0,-28(%ebp)
cmpl %esi,-28(%ebp)
jge L183
movzbl -16(%ebp),%edi
movl %edi,-24(%ebp)
.align 2,0x90
L193:
movl -28(%ebp),%ecx
imull %esi,%ecx
addl -32(%ebp),%ecx
movl -24(%ebp),%ebx
movzbl _inverse(%ebx),%eax
sall $8,%eax
movl -4(%ebp),%edi
movl -28(%ebp),%ebx
movzbl (%ebx,%edi),%edx
movb _gf_mul_table(%edx,%eax),%al
movl 8(%ebp),%edi
movb %al,(%ecx,%edi)
incl %ebx
movl %ebx,-28(%ebp)
cmpl %esi,%ebx
jl L193
L183:
incl -32(%ebp)
cmpl %esi,-32(%ebp)
jl L184
L182:
pushl -8(%ebp)
call _free
pushl -4(%ebp)
call _free
pushl -12(%ebp)
call _free
L197:
xorl %eax,%eax
leal -44(%ebp),%esp
popl %ebx
popl %esi
popl %edi
leave
ret
Lfe7:
.size _invert_vdm,Lfe7-_invert_vdm
.data
.align 2
.type _fec_initialized,@object
.size _fec_initialized,4
_fec_initialized:
.long 0
.text
.align 2
.type _init_fec,@function
_init_fec:
pushl %ebp
movl %esp,%ebp
call _generate_gf
call _init_mul_table
movl $1,_fec_initialized
leave
ret
Lfe8:
.size _init_fec,Lfe8-_init_fec
LC25:
.ascii "bad parameters to fec_free\12\0"
.align 2
.globl _fec_free
.type _fec_free,@function
_fec_free:
pushl %ebp
movl %esp,%ebp
pushl %ebx
movl 8(%ebp),%ebx
testl %ebx,%ebx
je L201
movl 8(%ebx),%eax
xorl $-20181524,%eax
xorl 4(%ebx),%eax
xorl 12(%ebx),%eax
cmpl %eax,(%ebx)
je L200
L201:
pushl $LC25
pushl $___sF+176
call _fprintf
jmp L199
.align 2,0x90
L200:
pushl 12(%ebx)
call _free
pushl %ebx
call _free
L199:
movl -4(%ebp),%ebx
leave
ret
Lfe9:
.size _fec_free,Lfe9-_fec_free
LC26:
.ascii "Invalid parameters k %d n %d GF_SIZE %d\12\0"
LC27:
.ascii "new_code\0"
.align 2
.globl _fec_new
.type _fec_new,@function
_fec_new:
pushl %ebp
movl %esp,%ebp
subl $16,%esp
pushl %edi
pushl %esi
pushl %ebx
movl 8(%ebp),%edi
cmpl $0,_fec_initialized
jne L203
call _init_fec
L203:
cmpl $256,%edi
jg L205
cmpl $256,12(%ebp)
jg L205
cmpl %edi,12(%ebp)
jge L204
L205:
pushl $255
pushl 12(%ebp)
pushl %edi
pushl $LC26
pushl $___sF+176
call _fprintf
xorl %eax,%eax
jmp L231
.align 2,0x90
L204:
pushl $LC27
pushl $16
call _my_malloc
movl %eax,-8(%ebp)
movl %edi,4(%eax)
movl 12(%ebp),%esi
movl -8(%ebp),%edx
movl %esi,8(%edx)
pushl $LC19
movl 12(%ebp),%ebx
imull %edi,%ebx
pushl %ebx
call _my_malloc
movl -8(%ebp),%edx
movl %eax,12(%edx)
movl 12(%ebp),%eax
xorl $-20181524,%eax
xorl %edi,%eax
movl -8(%ebp),%edx
xorl 12(%edx),%eax
movl %eax,(%edx)
pushl $LC19