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.980621e
3315 lines (3305 loc) · 51.9 KB
/
fec.s.980621e
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:
.globl _allPp
.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
subl $4,%esp
pushl %edi
pushl %esi
pushl %ebx
movl $_gf_log,%esi
movl $_gf_mul_table,-4(%ebp)
.align 2,0x90
L24:
xorl %ecx,%ecx
movl -4(%ebp),%edi
.align 2,0x90
L28:
movl (%esi),%eax
addl _gf_log(,%ecx,4),%eax
cmpl $254,%eax
jle L75
.align 2,0x90
L76:
addl $-255,%eax
movl %eax,%edx
sarl $8,%edx
andl $255,%eax
addl %edx,%eax
cmpl $254,%eax
jg L76
L75:
andl $255,%eax
movb _gf_exp(%eax),%al
movb %al,(%ecx,%edi)
leal 1(%ecx),%ebx
movl (%esi),%eax
addl _gf_log(,%ebx,4),%eax
cmpl $254,%eax
jle L79
.align 2,0x90
L80:
addl $-255,%eax
movl %eax,%edx
sarl $8,%edx
andl $255,%eax
addl %edx,%eax
cmpl $254,%eax
jg L80
L79:
andl $255,%eax
movb _gf_exp(%eax),%al
movb %al,(%ebx,%edi)
leal 2(%ecx),%ebx
movl (%esi),%eax
addl _gf_log(,%ebx,4),%eax
cmpl $254,%eax
jle L83
.align 2,0x90
L84:
addl $-255,%eax
movl %eax,%edx
sarl $8,%edx
andl $255,%eax
addl %edx,%eax
cmpl $254,%eax
jg L84
L83:
andl $255,%eax
movb _gf_exp(%eax),%al
movb %al,(%ebx,%edi)
leal 3(%ecx),%ebx
movl (%esi),%eax
addl _gf_log(,%ebx,4),%eax
cmpl $254,%eax
jle L87
.align 2,0x90
L88:
addl $-255,%eax
movl %eax,%edx
sarl $8,%edx
andl $255,%eax
addl %edx,%eax
cmpl $254,%eax
jg L88
L87:
andl $255,%eax
movb _gf_exp(%eax),%al
movb %al,(%ebx,%edi)
addl $4,%ecx
cmpl $255,%ecx
jle L28
addl $4,%esi
addl $256,-4(%ebp)
cmpl $_gf_log+1020,%esi
jle L24
xorl %ecx,%ecx
movl $_gf_mul_table,%eax
.align 2,0x90
L39:
movb $0,(%eax)
movb $0,_gf_mul_table(%ecx)
movb $0,256(%eax)
movb $0,_gf_mul_table+1(%ecx)
movb $0,512(%eax)
movb $0,_gf_mul_table+2(%ecx)
movb $0,768(%eax)
movb $0,_gf_mul_table+3(%ecx)
movb $0,1024(%eax)
movb $0,_gf_mul_table+4(%ecx)
movb $0,1280(%eax)
movb $0,_gf_mul_table+5(%ecx)
movb $0,1536(%eax)
movb $0,_gf_mul_table+6(%ecx)
movb $0,1792(%eax)
movb $0,_gf_mul_table+7(%ecx)
movb $0,2048(%eax)
movb $0,_gf_mul_table+8(%ecx)
movb $0,2304(%eax)
movb $0,_gf_mul_table+9(%ecx)
movb $0,2560(%eax)
movb $0,_gf_mul_table+10(%ecx)
movb $0,2816(%eax)
movb $0,_gf_mul_table+11(%ecx)
movb $0,3072(%eax)
movb $0,_gf_mul_table+12(%ecx)
movb $0,3328(%eax)
movb $0,_gf_mul_table+13(%ecx)
movb $0,3584(%eax)
movb $0,_gf_mul_table+14(%ecx)
movb $0,3840(%eax)
movb $0,_gf_mul_table+15(%ecx)
addl $4096,%eax
addl $16,%ecx
cmpl $255,%ecx
jle L39
leal -16(%ebp),%esp
popl %ebx
popl %esi
popl %edi
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 L91
pushl 12(%ebp)
pushl $LC15
pushl $___sF+176
call _fprintf
pushl $1
call _exit
.align 2,0x90
L91:
leave
ret
Lfe2:
.size _my_malloc,Lfe2-_my_malloc
.align 2
.type _generate_gf,@function
_generate_gf:
pushl %ebp
movl %esp,%ebp
subl $40,%esp
pushl %edi
pushl %esi
pushl %ebx
movl _allPp+32,%ecx
movb $1,%dl
movb $0,_gf_exp+8
movb $1,_gf_exp
movl $0,_gf_log+4
cmpb $49,(%ecx)
jne L139
movb $1,_gf_exp+8
L139:
addb %dl,%dl
movb %dl,_gf_exp+1
movzbl %dl,%eax
movl $1,_gf_log(,%eax,4)
cmpb $49,1(%ecx)
jne L142
xorb %dl,_gf_exp+8
L142:
addb %dl,%dl
movb %dl,_gf_exp+2
movzbl %dl,%eax
movl $2,_gf_log(,%eax,4)
cmpb $49,2(%ecx)
jne L145
xorb %dl,_gf_exp+8
L145:
addb %dl,%dl
movb %dl,_gf_exp+3
movzbl %dl,%eax
movl $3,_gf_log(,%eax,4)
cmpb $49,3(%ecx)
jne L148
xorb %dl,_gf_exp+8
L148:
addb %dl,%dl
movb %dl,_gf_exp+4
movzbl %dl,%eax
movl $4,_gf_log(,%eax,4)
cmpb $49,4(%ecx)
jne L151
xorb %dl,_gf_exp+8
L151:
addb %dl,%dl
movb %dl,_gf_exp+5
movzbl %dl,%eax
movl $5,_gf_log(,%eax,4)
cmpb $49,5(%ecx)
jne L154
xorb %dl,_gf_exp+8
L154:
addb %dl,%dl
movb %dl,_gf_exp+6
movzbl %dl,%eax
movl $6,_gf_log(,%eax,4)
cmpb $49,6(%ecx)
jne L157
xorb %dl,_gf_exp+8
L157:
addb %dl,%dl
movb %dl,_gf_exp+7
movzbl %dl,%eax
movl $7,_gf_log(,%eax,4)
cmpb $49,7(%ecx)
jne L160
xorb %dl,_gf_exp+8
L160:
movzbl _gf_exp+8,%eax
movl $8,_gf_log(,%eax,4)
movb $128,%dl
movl $9,%ecx
movl $_gf_exp+9,-4(%ebp)
movl $_gf_exp+9,-8(%ebp)
movl $_gf_exp+8,-12(%ebp)
movl $_gf_exp+9,%edi
movl $_gf_exp+8,-40(%ebp)
movl $_gf_exp+8,-36(%ebp)
.align 2,0x90
L102:
movl -36(%ebp),%ebx
cmpb %dl,(%ebx)
jb L116
movb %dl,%al
movl -40(%ebp),%esi
xorb (%esi),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,(%edi)
jmp L117
.align 2,0x90
L116:
movl -12(%ebp),%ebx
movb (%ebx),%bl
addb %bl,%bl
movl -8(%ebp),%esi
movb %bl,(%esi)
L117:
movl -4(%ebp),%esi
movzbl (%esi),%eax
movl %ecx,_gf_log(,%eax,4)
leal 1(%ecx),%ebx
movl %ebx,-16(%ebp)
movl -36(%ebp),%esi
cmpb %dl,1(%esi)
jb L120
movb %dl,%al
movl -40(%ebp),%ebx
xorb 1(%ebx),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,1(%edi)
jmp L121
.align 2,0x90
L120:
movl -12(%ebp),%ebx
movb 1(%ebx),%bl
addb %bl,%bl
movl -8(%ebp),%esi
movb %bl,1(%esi)
L121:
movl -4(%ebp),%esi
movzbl 1(%esi),%eax
movl -16(%ebp),%ebx
movl %ebx,_gf_log(,%eax,4)
leal 2(%ecx),%esi
movl %esi,-20(%ebp)
movl -36(%ebp),%ebx
cmpb %dl,2(%ebx)
jb L124
movb %dl,%al
movl -40(%ebp),%esi
xorb 2(%esi),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,2(%edi)
jmp L125
.align 2,0x90
L124:
movl -12(%ebp),%ebx
movb 2(%ebx),%bl
addb %bl,%bl
movl -8(%ebp),%esi
movb %bl,2(%esi)
L125:
movl -4(%ebp),%esi
movzbl 2(%esi),%eax
movl -20(%ebp),%ebx
movl %ebx,_gf_log(,%eax,4)
leal 3(%ecx),%esi
movl %esi,-24(%ebp)
movl -36(%ebp),%ebx
cmpb %dl,3(%ebx)
jb L128
movb %dl,%al
movl -40(%ebp),%esi
xorb 3(%esi),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,3(%edi)
jmp L129
.align 2,0x90
L128:
movl -12(%ebp),%ebx
movb 3(%ebx),%bl
addb %bl,%bl
movl -8(%ebp),%esi
movb %bl,3(%esi)
L129:
movl -4(%ebp),%esi
movzbl 3(%esi),%eax
movl -24(%ebp),%ebx
movl %ebx,_gf_log(,%eax,4)
leal 4(%ecx),%esi
movl %esi,-28(%ebp)
movl -36(%ebp),%ebx
cmpb %dl,4(%ebx)
jb L132
movb %dl,%al
movl -40(%ebp),%esi
xorb 4(%esi),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,4(%edi)
jmp L133
.align 2,0x90
L132:
movl -12(%ebp),%ebx
movb 4(%ebx),%bl
addb %bl,%bl
movl -8(%ebp),%esi
movb %bl,4(%esi)
L133:
movl -4(%ebp),%esi
movzbl 4(%esi),%eax
movl -28(%ebp),%ebx
movl %ebx,_gf_log(,%eax,4)
leal 5(%ecx),%esi
movl %esi,-32(%ebp)
movl -36(%ebp),%ebx
cmpb %dl,5(%ebx)
jb L136
movb %dl,%al
movl -40(%ebp),%esi
xorb 5(%esi),%al
addb %al,%al
xorb _gf_exp+8,%al
movb %al,5(%edi)
jmp L137
.align 2,0x90
L136:
movl -12(%ebp),%ebx
movb 5(%ebx),%bl
addb %bl,%bl
movl -8(%ebp),%esi
movb %bl,5(%esi)
L137:
movl -4(%ebp),%esi
movzbl 5(%esi),%eax
movl -32(%ebp),%ebx
movl %ebx,_gf_log(,%eax,4)
addl $6,%esi
movl %esi,-4(%ebp)
addl $6,-8(%ebp)
addl $6,%edi
addl $6,-12(%ebp)
addl $6,-40(%ebp)
addl $6,-36(%ebp)
addl $6,%ecx
cmpl $254,%ecx
jle L102
movl $255,_gf_log
movb $0,_gf_exp+255
movb $0,_inverse
movb $1,_inverse+1
movl $2,%ecx
.align 2,0x90
L109:
movl $_gf_exp+255,%eax
subl _gf_log(,%ecx,4),%eax
movb (%eax),%al
movb %al,_inverse(%ecx)
leal 1(%ecx),%edx
movl $_gf_exp+255,%eax
subl _gf_log(,%edx,4),%eax
movb (%eax),%al
movb %al,_inverse(%edx)
addl $2,%ecx
cmpl $255,%ecx
jle L109
leal -52(%ebp),%esp
popl %ebx
popl %esi
popl %edi
leave
ret
Lfe3:
.size _generate_gf,Lfe3-_generate_gf
.align 2
.type _addmul1,@function
_addmul1:
pushl %ebp
movl %esp,%ebp
subl $16,%esp
pushl %edi
pushl %esi
pushl %ebx
movl 8(%ebp),%ebx
movl 12(%ebp),%esi
movb 16(%ebp),%cl
movb %cl,-4(%ebp)
xorl %edx,%edx
movl 20(%ebp),%edi
addl $-16,%edi
movl %edi,-8(%ebp)
cmpl %edi,%edx
jge L165
movzbl %cl,%eax
sall $8,%eax
addl $_gf_mul_table,%eax
movl %eax,-12(%ebp)
movl %ebx,-16(%ebp)
movl -12(%ebp),%edi
.align 2,0x90
L167:
movw (%edx,%esi),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,0(%ebx,%edx)
movw 2(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,2(%ebx,%edx)
movw 4(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,4(%ebx,%edx)
movw 6(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,6(%ebx,%edx)
movw 8(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,8(%ebx,%edx)
movw 10(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,10(%ebx,%edx)
movw 12(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,12(%ebx,%edx)
movw 14(%esi,%edx),%cx
movzbl %cl, %eax
movzbl %ch, %ecx
movb (%eax,%edi),%al
movb (%ecx,%edi),%ah
xorw %ax,14(%ebx,%edx)
addl $16,%edx
cmpl %edx,-8(%ebp)
jg L167
L165:
cmpl %edx,20(%ebp)
jle L174
movzbl -4(%ebp),%eax
sall $8,%eax
addl $_gf_mul_table,%eax
movl %eax,-16(%ebp)
addl %edx,%ebx
movl %ebx,-12(%ebp)
movl 20(%ebp),%eax
subl %edx,%eax
andl $3,%eax
je L176
cmpl $1,%eax
jle L177
cmpl $2,%eax
jle L178
movzbl (%edx,%esi),%eax
movl -16(%ebp),%ecx
movb (%eax,%ecx),%al
xorb %al,(%ebx)
incl -12(%ebp)
incl %edx
L178:
movzbl (%edx,%esi),%eax
movl -16(%ebp),%edi
movb (%eax,%edi),%al
movl -12(%ebp),%edi
xorb %al,(%edi)
incl %edi
movl %edi,-12(%ebp)
incl %edx
L177:
movzbl (%edx,%esi),%eax
movl -16(%ebp),%ecx
movb (%eax,%ecx),%al
movl -12(%ebp),%ecx
xorb %al,(%ecx)
incl %ecx
movl %ecx,-12(%ebp)
incl %edx
cmpl %edx,20(%ebp)
jle L174
L176:
movl -12(%ebp),%ebx
movl %ebx,-12(%ebp)
.align 2,0x90
L172:
movzbl (%edx,%esi),%eax
movl -12(%ebp),%ecx
movb (%ecx),%cl
movl -16(%ebp),%edi
xorb (%eax,%edi),%cl
movb %cl,(%ebx)
movzbl 1(%esi,%edx),%eax
movl -12(%ebp),%ecx
movb 1(%ecx),%cl
xorb (%eax,%edi),%cl
movb %cl,1(%ebx)
movzbl 2(%esi,%edx),%eax
movl -12(%ebp),%ecx
movb 2(%ecx),%cl
xorb (%eax,%edi),%cl
movb %cl,2(%ebx)
movzbl 3(%esi,%edx),%eax
movl -12(%ebp),%ecx
movb 3(%ecx),%cl
xorb (%eax,%edi),%cl
movb %cl,3(%ebx)
addl $4,%ebx
addl $4,-12(%ebp)
addl $4,%edx
cmpl %edx,20(%ebp)
jg L172
L174:
leal -28(%ebp),%esp
popl %ebx
popl %esi
popl %edi
leave
ret
Lfe4:
.size _addmul1,Lfe4-_addmul1
.align 2
.type _matmul,@function
_matmul:
pushl %ebp
movl %esp,%ebp
subl $20,%esp
pushl %edi
pushl %esi
pushl %ebx
movl $0,-4(%ebp)
movl 20(%ebp),%edi
cmpl %edi,-4(%ebp)
jge L196
movl $0,-12(%ebp)
movl $0,-16(%ebp)
.align 2,0x90
L198:
movl $0,-8(%ebp)
jmp L229
.align 2,0x90
.align 2,0x90
L202:
movl 8(%ebp),%esi
addl -16(%ebp),%esi
movl 12(%ebp),%ecx
addl -8(%ebp),%ecx
xorb %bl,%bl
movl $0,-20(%ebp)
movl 24(%ebp),%edi
cmpl %edi,-20(%ebp)
jge L204
movl %edi,%eax
andl $3,%eax
je L206
cmpl $1,%eax
jle L212
cmpl $2,%eax
jle L213
movzbl (%esi),%eax
sall $8,%eax
movzbl (%ecx),%edx
movb _gf_mul_table(%edx,%eax),%bl
incl -20(%ebp)
incl %esi
addl 28(%ebp),%ecx
L213:
movzbl (%esi),%eax
sall $8,%eax
movzbl (%ecx),%edx
xorb _gf_mul_table(%edx,%eax),%bl
incl -20(%ebp)
incl %esi
addl 28(%ebp),%ecx
L212:
movzbl (%esi),%eax
sall $8,%eax
movzbl (%ecx),%edx
xorb _gf_mul_table(%edx,%eax),%bl
incl -20(%ebp)
incl %esi
jmp L230
.align 2,0x90
.align 2,0x90
L206:
movzbl (%esi),%edx
sall $8,%edx
movzbl (%ecx),%eax
xorb _gf_mul_table(%eax,%edx),%bl
addl 28(%ebp),%ecx
movzbl 1(%esi),%edx
sall $8,%edx
movzbl (%ecx),%eax
xorb _gf_mul_table(%eax,%edx),%bl
addl 28(%ebp),%ecx
movzbl 2(%esi),%edx
sall $8,%edx
movzbl (%ecx),%eax
xorb _gf_mul_table(%eax,%edx),%bl
addl 28(%ebp),%ecx
movzbl 3(%esi),%edx
sall $8,%edx
movzbl (%ecx),%eax
xorb _gf_mul_table(%eax,%edx),%bl
addl $4,-20(%ebp)
addl $4,%esi
L230:
addl 28(%ebp),%ecx
movl 24(%ebp),%edi
cmpl %edi,-20(%ebp)
jl L206
L204:
movl -12(%ebp),%eax
addl -8(%ebp),%eax
movl 16(%ebp),%edi
movb %bl,(%eax,%edi)
incl -8(%ebp)
L229:
movl 28(%ebp),%edi
cmpl %edi,-8(%ebp)
jl L202
movl 28(%ebp),%edi
addl %edi,-12(%ebp)
movl 24(%ebp),%edi
addl %edi,-16(%ebp)
incl -4(%ebp)
movl 20(%ebp),%edi
cmpl %edi,-4(%ebp)
jl L198
L196:
leal -32(%ebp),%esp
popl %ebx
popl %esi
popl %edi
leave
ret
Lfe5:
.size _matmul,Lfe5-_matmul
.align 2
.type _is_identity,@function
_is_identity:
pushl %ebp
movl %esp,%ebp
pushl %esi
pushl %ebx
movl 8(%ebp),%edx
movl 12(%ebp),%esi
xorl %ebx,%ebx
cmpl %esi,%ebx
jge L233
.align 2,0x90
L235:
xorl %ecx,%ecx
cmpl %esi,%ecx
jge L234
movl %esi,%eax
andl $3,%eax
je L239
cmpl $1,%eax
jle L250
cmpl $2,%eax
jle L251
testl %ebx,%ebx
jne L256
cmpb $1,(%edx)
jne L285
jmp L254
.align 2,0x90
L256:
cmpb $0,(%edx)
jne L285
L254:
incl %edx
incl %ecx
L251:
cmpl %ecx,%ebx
jne L261
cmpb $1,(%edx)
jne L285
jmp L259
.align 2,0x90
L261:
cmpb $0,(%edx)
jne L285
L259:
incl %edx
incl %ecx
L250:
cmpl %ecx,%ebx
jne L266
cmpb $1,(%edx)
jne L285
jmp L264
.align 2,0x90
L266:
cmpb $0,(%edx)
jne L285
L264:
incl %edx
incl %ecx
cmpl %esi,%ecx
jge L234
.align 2,0x90
L239:
cmpl %ecx,%ebx
jne L271
cmpb $1,(%edx)
jne L285
jmp L269
.align 2,0x90
L271:
cmpb $0,(%edx)
jne L285
L269:
incl %edx
leal 1(%ecx),%eax
cmpl %eax,%ebx
jne L276
cmpb $1,(%edx)
jne L285
jmp L274
.align 2,0x90
L276:
cmpb $0,(%edx)
jne L285
L274:
incl %edx
leal 2(%ecx),%eax
cmpl %eax,%ebx
jne L281
cmpb $1,(%edx)
jne L285
jmp L279
.align 2,0x90
L281:
cmpb $0,(%edx)
jne L285
L279:
incl %edx
leal 3(%ecx),%eax
cmpl %eax,%ebx
jne L286
cmpb $1,(%edx)
jne L285
jmp L284
.align 2,0x90
L286:
cmpb $0,(%edx)
je L284
L285:
xorl %eax,%eax
jmp L246
.align 2,0x90
L284:
incl %edx
addl $4,%ecx
cmpl %esi,%ecx
jl L239
L234:
incl %ebx
cmpl %esi,%ebx
jl L235
L233:
movl $1,%eax
L246:
leal -8(%ebp),%esp
popl %ebx
popl %esi
leave
ret
Lfe6:
.size _is_identity,Lfe6-_is_identity
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 $80,%esp
pushl %edi
pushl %esi
pushl %ebx
movl $1,-16(%ebp)
pushl $LC16
movl 12(%ebp),%edx
leal 0(,%edx,4),%ebx
pushl %ebx
call _my_malloc
movl %eax,-20(%ebp)
pushl $LC17
pushl %ebx
call _my_malloc
movl %eax,-24(%ebp)
pushl $LC18
pushl %ebx
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 L290
movl 12(%ebp),%ebx
andl $3,%ebx
je L292
cmpl $1,%ebx
jle L474
cmpl $2,%ebx
jle L475
movl -28(%ebp),%ecx
movl $0,(%ecx)
incl %eax
L475:
movl -28(%ebp),%edi
movl $0,(%edi,%eax,4)
incl %eax
L474:
movl -28(%ebp),%edx
movl $0,(%edx,%eax,4)
incl %eax
cmpl %eax,12(%ebp)
jle L290
.align 2,0x90
L292:
movl -28(%ebp),%ecx
movl $0,(%ecx,%eax,4)
movl $0,4(%ecx,%eax,4)
movl $0,8(%ecx,%eax,4)
movl $0,12(%ecx,%eax,4)
addl $4,%eax
cmpl %eax,12(%ebp)
jg L292
L290:
movl $0,-12(%ebp)