-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlinked_list.s
1758 lines (1757 loc) · 41.9 KB
/
linked_list.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 "linked_list.c"
# GNU C11 (MinGW.org GCC-6.3.0-1) version 6.3.0 (mingw32)
# compiled by GNU C version 6.3.0, GMP version 6.1.2, MPFR version 3.1.5, MPC version 1.0.3, isl version 0.15
# GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
# options passed: -iprefix c:\mingw\bin\../lib/gcc/mingw32/6.3.0/
# linked_list.c -march=x86-64 -Wall -Wextra -fsanitize=address
# -fverbose-asm
# options enabled: -fasynchronous-unwind-tables -fauto-inc-dec
# -fchkp-check-incomplete-type -fchkp-check-read -fchkp-check-write
# -fchkp-instrument-calls -fchkp-narrow-bounds -fchkp-optimize
# -fchkp-store-bounds -fchkp-use-static-bounds
# -fchkp-use-static-const-bounds -fchkp-use-wrappers -fcommon
# -fdelete-null-pointer-checks -fdwarf2-cfi-asm -fearly-inlining
# -feliminate-unused-debug-types -ffunction-cse -fgcse-lm -fgnu-runtime
# -fgnu-unique -fident -finline-atomics -fira-hoist-pressure
# -fira-share-save-slots -fira-share-spill-slots -fivopts
# -fkeep-inline-dllexport -fkeep-static-consts -fleading-underscore
# -flifetime-dse -flto-odr-type-merging -fmath-errno -fmerge-debug-strings
# -fpeephole -fplt -fprefetch-loop-arrays -freg-struct-return
# -fsched-critical-path-heuristic -fsched-dep-count-heuristic
# -fsched-group-heuristic -fsched-interblock -fsched-last-insn-heuristic
# -fsched-rank-heuristic -fsched-spec -fsched-spec-insn-heuristic
# -fsched-stalled-insns-dep -fschedule-fusion -fsemantic-interposition
# -fset-stack-executable -fshow-column -fsigned-zeros
# -fsplit-ivs-in-unroller -fssa-backprop -fstdarg-opt
# -fstrict-volatile-bitfields -fsync-libcalls -ftrapping-math
# -ftree-cselim -ftree-forwprop -ftree-loop-if-convert -ftree-loop-im
# -ftree-loop-ivcanon -ftree-loop-optimize -ftree-parallelize-loops=
# -ftree-phiprop -ftree-reassoc -ftree-scev-cprop -funit-at-a-time
# -funwind-tables -fverbose-asm -fzero-initialized-in-bss -m32 -m80387
# -m96bit-long-double -maccumulate-outgoing-args -malign-double
# -malign-stringops -mavx256-split-unaligned-load
# -mavx256-split-unaligned-store -mfancy-math-387 -mfp-ret-in-387 -mfxsr
# -mieee-fp -mlong-double-80 -mmmx -mms-bitfields -mno-red-zone -mno-sse4
# -mpush-args -msahf -msse -msse2 -mstack-arg-probe -mstackrealign
# -mvzeroupper
.section .rdata,"dr"
.align 32
LC0:
.ascii "cant pop from empty array\0"
.space 38
.text
.globl _pop
.def _pop; .scl 2; .type 32; .endef
_pop:
LASANPC17:
LFB17:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %esi #
pushl %ebx #
subl $48, %esp #,
.cfi_offset 6, -12
.cfi_offset 3, -16
movl 8(%ebp), %eax # list, _17
movl %eax, %edx # _34, _35
shrl $3, %edx #, _35
addl $536870912, %edx #, _36
movzbl (%edx), %edx # *_37, _38
testb %dl, %dl # _38
setne %cl #, _39
movl %eax, %ebx # _34, _40
andl $7, %ebx #, _40
addl $3, %ebx #, _42
cmpb %dl, %bl # _38, _42
setge %dl #, _43
andl %ecx, %edx # _39, _44
testb %dl, %dl # _44
je L2 #,
movl %eax, (%esp) # _34,
call ___asan_report_load4 #
L2:
movl 8(%ebp), %eax # list, tmp188
movl (%eax), %eax # list_4(D)->head, tmp189
movl %eax, -12(%ebp) # tmp189, item
cmpl $0, -12(%ebp) #, item
jne L3 #,
movl $LC0, (%esp) #,
call _printf #
jmp L1 #
L3:
movl -12(%ebp), %eax # item, tmp190
addl $4, %eax #, _18
movl %eax, %edx # _45, _46
shrl $3, %edx #, _46
addl $536870912, %edx #, _47
movzbl (%edx), %edx # *_48, _49
testb %dl, %dl # _49
setne %cl #, _50
movl %eax, %ebx # _45, _51
andl $7, %ebx #, _51
addl $3, %ebx #, _53
cmpb %dl, %bl # _49, _53
setge %dl #, _54
andl %ecx, %edx # _50, _55
testb %dl, %dl # _55
je L5 #,
movl %eax, (%esp) # _45,
call ___asan_report_load4 #
L5:
movl -12(%ebp), %eax # item, tmp191
movl 4(%eax), %eax # item_5->next, _7
testl %eax, %eax # _7
jne L9 #,
movl 8(%ebp), %eax # list, _19
movl %eax, %edx # _56, _57
shrl $3, %edx #, _57
addl $536870912, %edx #, _58
movzbl (%edx), %edx # *_59, _60
testb %dl, %dl # _60
setne %cl #, _61
movl %eax, %ebx # _56, _62
andl $7, %ebx #, _62
addl $3, %ebx #, _64
cmpb %dl, %bl # _60, _64
setge %dl #, _65
andl %ecx, %edx # _61, _66
testb %dl, %dl # _66
je L7 #,
movl %eax, (%esp) # _56,
call ___asan_report_load4 #
L7:
movl 8(%ebp), %eax # list, tmp192
movl (%eax), %eax # list_4(D)->head, _8
movl %eax, (%esp) # _8,
call _free #
movl 8(%ebp), %eax # list, _20
movl %eax, %edx # _67, _68
shrl $3, %edx #, _68
addl $536870912, %edx #, _69
movzbl (%edx), %edx # *_70, _71
testb %dl, %dl # _71
setne %cl #, _72
movl %eax, %ebx # _67, _73
andl $7, %ebx #, _73
addl $3, %ebx #, _75
cmpb %dl, %bl # _71, _75
setge %dl #, _76
andl %ecx, %edx # _72, _77
testb %dl, %dl # _77
je L8 #,
movl %eax, (%esp) # _67,
call ___asan_report_store4 #
L8:
movl 8(%ebp), %eax # list, tmp193
movl $0, (%eax) #, list_4(D)->head
jmp L1 #
L13:
movl -12(%ebp), %eax # item, tmp194
addl $4, %eax #, _21
movl %eax, %edx # _78, _79
shrl $3, %edx #, _79
addl $536870912, %edx #, _80
movzbl (%edx), %edx # *_81, _82
testb %dl, %dl # _82
setne %cl #, _83
movl %eax, %ebx # _78, _84
andl $7, %ebx #, _84
addl $3, %ebx #, _86
cmpb %dl, %bl # _82, _86
setge %dl #, _87
andl %ecx, %edx # _83, _88
testb %dl, %dl # _88
je L10 #,
movl %eax, (%esp) # _78,
call ___asan_report_load4 #
L10:
movl -12(%ebp), %eax # item, tmp195
movl 4(%eax), %eax # item_1->next, tmp196
movl %eax, -12(%ebp) # tmp196, item
L9:
movl -12(%ebp), %eax # item, tmp197
addl $4, %eax #, _22
movl %eax, %edx # _89, _90
shrl $3, %edx #, _90
addl $536870912, %edx #, _91
movzbl (%edx), %edx # *_92, _93
testb %dl, %dl # _93
setne %cl #, _94
movl %eax, %ebx # _89, _95
andl $7, %ebx #, _95
addl $3, %ebx #, _97
cmpb %dl, %bl # _93, _97
setge %dl #, _98
andl %ecx, %edx # _94, _99
testb %dl, %dl # _99
je L11 #,
movl %eax, (%esp) # _89,
call ___asan_report_load4 #
L11:
movl -12(%ebp), %eax # item, tmp198
movl 4(%eax), %edx # item_1->next, _11
leal 4(%edx), %eax #, _23
movl %eax, %ecx # _100, _101
shrl $3, %ecx #, _101
addl $536870912, %ecx #, _102
movzbl (%ecx), %ecx # *_103, _104
testb %cl, %cl # _104
setne -25(%ebp) #, %sfp
movl %eax, %esi # _100, _106
andl $7, %esi #, _106
leal 3(%esi), %ebx #, _108
cmpb %cl, %bl # _104, _108
setge %cl #, _109
andb -25(%ebp), %cl # %sfp, _110
testb %cl, %cl # _110
je L12 #,
movl %eax, (%esp) # _100,
call ___asan_report_load4 #
L12:
movl 4(%edx), %eax # _11->next, _12
testl %eax, %eax # _12
jne L13 #,
movl -12(%ebp), %eax # item, tmp199
movl 4(%eax), %eax # item_1->next, _14
movl %eax, (%esp) # _14,
call _free #
movl -12(%ebp), %eax # item, tmp200
addl $4, %eax #, _24
movl %eax, %edx # _111, _112
shrl $3, %edx #, _112
addl $536870912, %edx #, _113
movzbl (%edx), %edx # *_114, _115
testb %dl, %dl # _115
setne %cl #, _116
movl %eax, %ebx # _111, _117
andl $7, %ebx #, _117
addl $3, %ebx #, _119
cmpb %dl, %bl # _115, _119
setge %dl #, _120
andl %ecx, %edx # _116, _121
testb %dl, %dl # _121
je L14 #,
movl %eax, (%esp) # _111,
call ___asan_report_store4 #
L14:
movl -12(%ebp), %eax # item, tmp201
movl $0, 4(%eax) #, item_1->next
L1:
addl $48, %esp #,
popl %ebx #
.cfi_restore 3
popl %esi #
.cfi_restore 6
popl %ebp #
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE17:
.globl _push
.def _push; .scl 2; .type 32; .endef
_push:
LASANPC18:
LFB18:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %ebx #
subl $36, %esp #,
.cfi_offset 3, -12
movl $8, (%esp) #,
call _malloc #
movl %eax, -12(%ebp) # tmp148, new_item
movl -12(%ebp), %eax # new_item, _15
movl %eax, %edx # _26, _27
shrl $3, %edx #, _27
addl $536870912, %edx #, _28
movzbl (%edx), %edx # *_29, _30
testb %dl, %dl # _30
setne %cl #, _31
movl %eax, %ebx # _26, _32
andl $7, %ebx #, _32
addl $3, %ebx #, _34
cmpb %dl, %bl # _30, _34
setge %dl #, _35
andl %ecx, %edx # _31, _36
testb %dl, %dl # _36
je L16 #,
movl %eax, (%esp) # _26,
call ___asan_report_store4 #
L16:
movl -12(%ebp), %eax # new_item, tmp149
movl 12(%ebp), %edx # value, tmp150
movl %edx, (%eax) # tmp150, new_item_5->value
movl -12(%ebp), %eax # new_item, tmp151
addl $4, %eax #, _16
movl %eax, %edx # _37, _38
shrl $3, %edx #, _38
addl $536870912, %edx #, _39
movzbl (%edx), %edx # *_40, _41
testb %dl, %dl # _41
setne %cl #, _42
movl %eax, %ebx # _37, _43
andl $7, %ebx #, _43
addl $3, %ebx #, _45
cmpb %dl, %bl # _41, _45
setge %dl #, _46
andl %ecx, %edx # _42, _47
testb %dl, %dl # _47
je L17 #,
movl %eax, (%esp) # _37,
call ___asan_report_store4 #
L17:
movl -12(%ebp), %eax # new_item, tmp152
movl $0, 4(%eax) #, new_item_5->next
movl 8(%ebp), %eax # list, _17
movl %eax, %edx # _48, _49
shrl $3, %edx #, _49
addl $536870912, %edx #, _50
movzbl (%edx), %edx # *_51, _52
testb %dl, %dl # _52
setne %cl #, _53
movl %eax, %ebx # _48, _54
andl $7, %ebx #, _54
addl $3, %ebx #, _56
cmpb %dl, %bl # _52, _56
setge %dl #, _57
andl %ecx, %edx # _53, _58
testb %dl, %dl # _58
je L18 #,
movl %eax, (%esp) # _48,
call ___asan_report_load4 #
L18:
movl 8(%ebp), %eax # list, tmp153
movl (%eax), %eax # list_9(D)->head, tmp154
movl %eax, -16(%ebp) # tmp154, item
cmpl $0, -16(%ebp) #, item
jne L21 #,
movl 8(%ebp), %eax # list, tmp155
movl -12(%ebp), %edx # new_item, tmp156
movl %edx, (%eax) # tmp156, list_9(D)->head
jmp L15 #
L24:
movl -16(%ebp), %eax # item, tmp157
addl $4, %eax #, _18
movl %eax, %edx # _59, _60
shrl $3, %edx #, _60
addl $536870912, %edx #, _61
movzbl (%edx), %edx # *_62, _63
testb %dl, %dl # _63
setne %cl #, _64
movl %eax, %ebx # _59, _65
andl $7, %ebx #, _65
addl $3, %ebx #, _67
cmpb %dl, %bl # _63, _67
setge %dl #, _68
andl %ecx, %edx # _64, _69
testb %dl, %dl # _69
je L22 #,
movl %eax, (%esp) # _59,
call ___asan_report_load4 #
L22:
movl -16(%ebp), %eax # item, tmp158
movl 4(%eax), %eax # item_1->next, tmp159
movl %eax, -16(%ebp) # tmp159, item
L21:
movl -16(%ebp), %eax # item, tmp160
addl $4, %eax #, _19
movl %eax, %edx # _70, _71
shrl $3, %edx #, _71
addl $536870912, %edx #, _72
movzbl (%edx), %edx # *_73, _74
testb %dl, %dl # _74
setne %cl #, _75
movl %eax, %ebx # _70, _76
andl $7, %ebx #, _76
addl $3, %ebx #, _78
cmpb %dl, %bl # _74, _78
setge %dl #, _79
andl %ecx, %edx # _75, _80
testb %dl, %dl # _80
je L23 #,
movl %eax, (%esp) # _70,
call ___asan_report_load4 #
L23:
movl -16(%ebp), %eax # item, tmp161
movl 4(%eax), %eax # item_1->next, _12
testl %eax, %eax # _12
jne L24 #,
movl -16(%ebp), %eax # item, tmp162
movl -12(%ebp), %edx # new_item, tmp163
movl %edx, 4(%eax) # tmp163, item_1->next
L15:
addl $36, %esp #,
popl %ebx #
.cfi_restore 3
popl %ebp #
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE18:
.def ___asan_stack_malloc_1; .scl 2; .type 32; .endef
.section .rdata,"dr"
LC1:
.ascii "1 32 4 4 list \0"
.text
.globl _create_with_pushes
.def _create_with_pushes; .scl 2; .type 32; .endef
_create_with_pushes:
LASANPC19:
LFB19:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %edi #
pushl %esi #
pushl %ebx #
subl $156, %esp #,
.cfi_offset 7, -12
.cfi_offset 6, -16
.cfi_offset 3, -20
leal -120(%ebp), %esi #, tmp106
movl %esi, -148(%ebp) # tmp106, %sfp
cmpl $0, ___asan_option_detect_stack_use_after_return #, __asan_option_detect_stack_use_after_return
je L25 #,
movl $96, (%esp) #,
call ___asan_stack_malloc_1 #
testl %eax, %eax #
je L25 #,
movl %eax, %esi #, tmp106
L25:
leal 96(%esi), %eax #, tmp108
movl %eax, %edi # tmp108, tmp105
movl $1102416563, (%esi) #,
movl $LC1, 4(%esi) #,
movl $LASANPC19, 8(%esi) #,
movl %esi, %ebx # tmp106, tmp109
shrl $3, %ebx #, tmp109
movl $-235802127, 536870912(%ebx) #,
movl $-185273340, 536870916(%ebx) #,
movl $-202116109, 536870920(%ebx) #,
movl 12(%ebp), %eax # size, size.0_4
shrl $2, %eax #, _5
movl %eax, -124(%ebp) # _5, n_elements
movl $0, -64(%edi) #, list.head
movl $0, -128(%ebp) #, i
jmp L29 #
L31:
movl -128(%ebp), %eax # i, i.1_10
leal 0(,%eax,4), %edx #, _11
movl 8(%ebp), %eax # values, tmp111
addl %edx, %eax # _11, _13
movl %eax, -140(%ebp) # _13, %sfp
movl %eax, %ecx # _13, _20
movl %ecx, %eax # _20, _21
shrl $3, %eax #, _21
addl $536870912, %eax #, _22
movzbl (%eax), %edx # *_23, _24
testb %dl, %dl # _24
setne -141(%ebp) #, %sfp
movl %ecx, %eax # _20, _26
andl $7, %eax #, _26
addl $3, %eax #, _28
cmpb %dl, %al # _24, _28
setge %al #, _29
andb -141(%ebp), %al # %sfp, _30
testb %al, %al # _30
je L30 #,
movl %ecx, (%esp) # _20,
call ___asan_report_load4 #
L30:
movl -140(%ebp), %eax # %sfp, _13
movl (%eax), %eax # *_13, _14
movl %eax, 4(%esp) # _14,
leal -64(%edi), %eax #, tmp112
movl %eax, (%esp) # tmp112,
call _push #
addl $1, -128(%ebp) #, i
L29:
movl -128(%ebp), %eax # i, tmp113
cmpl -124(%ebp), %eax # n_elements, tmp113
jl L31 #,
movl -64(%edi), %eax # list, D.3336
cmpl %esi, -148(%ebp) # tmp106, %sfp
je L26 #,
movl $1172321806, (%esi) #,
movl $-168430091, 536870912(%ebx) #,
movl $-168430091, 536870916(%ebx) #,
movl $-168430091, 536870920(%ebx) #,
jmp L27 #
L26:
movl $0, 536870912(%ebx) #,
movl $0, 536870916(%ebx) #,
movl $0, 536870920(%ebx) #,
L27:
addl $156, %esp #,
popl %ebx #
.cfi_restore 3
popl %esi #
.cfi_restore 6
popl %edi #
.cfi_restore 7
popl %ebp #
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE19:
.globl _add_items_forward
.def _add_items_forward; .scl 2; .type 32; .endef
_add_items_forward:
LASANPC20:
LFB20:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %edi #
pushl %esi #
pushl %ebx #
subl $60, %esp #,
.cfi_offset 7, -12
.cfi_offset 6, -16
.cfi_offset 3, -20
movl 16(%ebp), %eax # idx, tmp129
cmpl 12(%ebp), %eax # n_elements, tmp129
jne L34 #,
movl $0, %eax #, _1
jmp L35 #
L34:
movl $8, (%esp) #,
call _malloc #
movl %eax, -32(%ebp) # tmp130, item
movl 16(%ebp), %eax # idx, tmp131
addl $1, %eax #, _9
movl %eax, 8(%esp) # _9,
movl 12(%ebp), %eax # n_elements, tmp132
movl %eax, 4(%esp) # tmp132,
movl 8(%ebp), %eax # values, tmp133
movl %eax, (%esp) # tmp133,
call _add_items_forward #
movl %eax, -28(%ebp) # tmp134, new_item
movl 16(%ebp), %eax # idx, idx.2_13
leal 0(,%eax,4), %edx #, _14
movl 8(%ebp), %eax # values, tmp135
leal (%edx,%eax), %ecx #, _15
movl %ecx, %eax # _15, _25
movl %eax, %edx # _25, _26
shrl $3, %edx #, _26
addl $536870912, %edx #, _27
movzbl (%edx), %edx # *_28, _29
testb %dl, %dl # _29
setne -41(%ebp) #, %sfp
movl %eax, %esi # _25, _31
andl $7, %esi #, _31
leal 3(%esi), %ebx #, _33
cmpb %dl, %bl # _29, _33
setge %dl #, _34
andb -41(%ebp), %dl # %sfp, _35
testb %dl, %dl # _35
je L36 #,
movl %eax, (%esp) # _25,
call ___asan_report_load4 #
L36:
movl (%ecx), %edi # *_15, _16
movl -32(%ebp), %eax # item, _20
movl %eax, %edx # _36, _37
shrl $3, %edx #, _37
addl $536870912, %edx #, _38
movzbl (%edx), %edx # *_39, _40
testb %dl, %dl # _40
setne %bl #, _41
movl %eax, %esi # _36, _42
andl $7, %esi #, _42
leal 3(%esi), %ecx #, _44
cmpb %dl, %cl # _40, _44
setge %dl #, _45
andl %ebx, %edx # _41, _46
testb %dl, %dl # _46
je L37 #,
movl %eax, (%esp) # _36,
call ___asan_report_store4 #
L37:
movl -32(%ebp), %eax # item, tmp136
movl %edi, (%eax) # _16, item_8->value
movl -32(%ebp), %eax # item, tmp137
addl $4, %eax #, _21
movl %eax, %edx # _47, _48
shrl $3, %edx #, _48
addl $536870912, %edx #, _49
movzbl (%edx), %edx # *_50, _51
testb %dl, %dl # _51
setne %cl #, _52
movl %eax, %ebx # _47, _53
andl $7, %ebx #, _53
addl $3, %ebx #, _55
cmpb %dl, %bl # _51, _55
setge %dl #, _56
andl %ecx, %edx # _52, _57
testb %dl, %dl # _57
je L38 #,
movl %eax, (%esp) # _47,
call ___asan_report_store4 #
L38:
movl -32(%ebp), %eax # item, tmp138
movl -28(%ebp), %edx # new_item, tmp139
movl %edx, 4(%eax) # tmp139, item_8->next
movl -32(%ebp), %eax # item, _1
L35:
addl $60, %esp #,
popl %ebx #
.cfi_restore 3
popl %esi #
.cfi_restore 6
popl %edi #
.cfi_restore 7
popl %ebp #
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE20:
.section .rdata,"dr"
.align 32
LC2:
.ascii "VALUE: %d\12\0"
.space 53
.text
.globl _create_forward
.def _create_forward; .scl 2; .type 32; .endef
_create_forward:
LASANPC21:
LFB21:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %edi #
pushl %esi #
pushl %ebx #
subl $156, %esp #,
.cfi_offset 7, -12
.cfi_offset 6, -16
.cfi_offset 3, -20
leal -120(%ebp), %esi #, tmp104
movl %esi, -144(%ebp) # tmp104, %sfp
cmpl $0, ___asan_option_detect_stack_use_after_return #, __asan_option_detect_stack_use_after_return
je L39 #,
movl $96, (%esp) #,
call ___asan_stack_malloc_1 #
testl %eax, %eax #
je L39 #,
movl %eax, %esi #, tmp104
L39:
leal 96(%esi), %eax #, tmp106
movl %eax, %edi # tmp106, tmp103
movl $1102416563, (%esi) #,
movl $LC1, 4(%esi) #,
movl $LASANPC21, 8(%esi) #,
movl %esi, %ebx # tmp104, tmp107
shrl $3, %ebx #, tmp107
movl $-235802127, 536870912(%ebx) #,
movl $-185273340, 536870916(%ebx) #,
movl $-202116109, 536870920(%ebx) #,
movl 12(%ebp), %eax # size, size.3_2
shrl $2, %eax #, _3
movl %eax, -128(%ebp) # _3, n_elements
movl $0, 8(%esp) #,
movl -128(%ebp), %eax # n_elements, tmp109
movl %eax, 4(%esp) # tmp109,
movl 8(%ebp), %eax # values, tmp110
movl %eax, (%esp) # tmp110,
call _add_items_forward #
movl %eax, -124(%ebp) # tmp111, boop
movl -124(%ebp), %eax # boop, _14
movl %eax, %edx # _14, _16
movl %edx, %eax # _16, _17
shrl $3, %eax #, _17
addl $536870912, %eax #, _18
movzbl (%eax), %ecx # *_19, _20
testb %cl, %cl # _20
setne -137(%ebp) #, %sfp
movl %edx, %eax # _16, _22
andl $7, %eax #, _22
addl $3, %eax #, _24
cmpb %cl, %al # _20, _24
setge %al #, _25
andb -137(%ebp), %al # %sfp, _26
testb %al, %al # _26
je L43 #,
movl %edx, (%esp) # _16,
call ___asan_report_load4 #
L43:
movl -124(%ebp), %eax # boop, tmp112
movl (%eax), %eax # boop_8->value, _9
movl %eax, 4(%esp) # _9,
movl $LC2, (%esp) #,
call _printf #
movl -124(%ebp), %eax # boop, tmp113
movl %eax, -64(%edi) # tmp113, list.head
movl -64(%edi), %eax # list, D.3351
cmpl %esi, -144(%ebp) # tmp104, %sfp
je L40 #,
movl $1172321806, (%esi) #,
movl $-168430091, 536870912(%ebx) #,
movl $-168430091, 536870916(%ebx) #,
movl $-168430091, 536870920(%ebx) #,
jmp L41 #
L40:
movl $0, 536870912(%ebx) #,
movl $0, 536870916(%ebx) #,
movl $0, 536870920(%ebx) #,
L41:
addl $156, %esp #,
popl %ebx #
.cfi_restore 3
popl %esi #
.cfi_restore 6
popl %edi #
.cfi_restore 7
popl %ebp #
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE21:
.globl _create_contiguous
.def _create_contiguous; .scl 2; .type 32; .endef
_create_contiguous:
LASANPC22:
LFB22:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %edi #
pushl %esi #
pushl %ebx #
subl $172, %esp #,
.cfi_offset 7, -12
.cfi_offset 6, -16
.cfi_offset 3, -20
leal -120(%ebp), %esi #, tmp156
movl %esi, -168(%ebp) # tmp156, %sfp
cmpl $0, ___asan_option_detect_stack_use_after_return #, __asan_option_detect_stack_use_after_return
je L45 #,
movl $96, (%esp) #,
call ___asan_stack_malloc_1 #
testl %eax, %eax #
je L45 #,
movl %eax, %esi #, tmp156
L45:
leal 96(%esi), %eax #, tmp158
movl %eax, -164(%ebp) # tmp158, %sfp
movl $1102416563, (%esi) #,
movl $LC1, 4(%esi) #,
movl $LASANPC22, 8(%esi) #,
movl %esi, %ebx # tmp156, tmp159
shrl $3, %ebx #, tmp159
movl $-235802127, 536870912(%ebx) #,
movl $-185273340, 536870916(%ebx) #,
movl $-202116109, 536870920(%ebx) #,
movl $4, -136(%ebp) #, element_size
movl 12(%ebp), %eax # size, tmp164
cltd
idivl -136(%ebp) # element_size
movl %eax, -132(%ebp) # tmp162, n_elements
movl $8, -128(%ebp) #, item_size
movl -132(%ebp), %eax # n_elements, tmp165
imull -128(%ebp), %eax # item_size, _7
movl %eax, (%esp) # _8,
call _malloc #
movl %eax, -124(%ebp) # tmp166, items
movl $0, -140(%ebp) #, i
jmp L49 #
L53:
movl -140(%ebp), %eax # i, i.4_13
leal 0(,%eax,8), %edx #, _14
movl -124(%ebp), %eax # items, tmp167
leal (%edx,%eax), %edi #, _15
movl -140(%ebp), %eax # i, i.5_16
addl $1, %eax #, _17
leal 0(,%eax,8), %edx #, _18
movl -124(%ebp), %eax # items, tmp168
addl %edx, %eax # _18, _19
movl %eax, -156(%ebp) # _19, %sfp
leal 4(%edi), %eax #, _39
movl %eax, %ecx # _39, _46
movl %ecx, %eax # _46, _47
shrl $3, %eax #, _47
addl $536870912, %eax #, _48
movzbl (%eax), %edx # *_49, _50
testb %dl, %dl # _50
setne -157(%ebp) #, %sfp
movl %ecx, %eax # _46, _52
andl $7, %eax #, _52
addl $3, %eax #, _54
cmpb %dl, %al # _50, _54
setge %al #, _55
andb -157(%ebp), %al # %sfp, _56
testb %al, %al # _56
je L50 #,
movl %ecx, (%esp) # _46,
call ___asan_report_store4 #
L50:
movl -156(%ebp), %eax # %sfp, _19
movl %eax, 4(%edi) # _19, _15->next
movl -140(%ebp), %eax # i, i.6_21
leal 0(,%eax,8), %edx #, _22
movl -124(%ebp), %eax # items, tmp169
addl %edx, %eax # _22, _23
movl %eax, -156(%ebp) # _23, %sfp
movl -140(%ebp), %eax # i, i.7_24
leal 0(,%eax,4), %edx #, _25
movl 8(%ebp), %eax # values, tmp170
leal (%edx,%eax), %edi #, _27
movl %edi, %ecx # _27, _57
movl %ecx, %eax # _57, _58
shrl $3, %eax #, _58
addl $536870912, %eax #, _59
movzbl (%eax), %edx # *_60, _61
testb %dl, %dl # _61
setne -157(%ebp) #, %sfp
movl %ecx, %eax # _57, _63
andl $7, %eax #, _63
addl $3, %eax #, _65
cmpb %dl, %al # _61, _65
setge %al #, _66
andb -157(%ebp), %al # %sfp, _67
testb %al, %al # _67
je L51 #,
movl %ecx, (%esp) # _57,
call ___asan_report_load4 #
L51:
movl (%edi), %edi # *_27, _28
movl -156(%ebp), %eax # %sfp, _40
movl %eax, %ecx # _40, _68
movl %ecx, %eax # _68, _69
shrl $3, %eax #, _69
addl $536870912, %eax #, _70
movzbl (%eax), %edx # *_71, _72
testb %dl, %dl # _72
setne -157(%ebp) #, %sfp
movl %ecx, %eax # _68, _74
andl $7, %eax #, _74
addl $3, %eax #, _76
cmpb %dl, %al # _72, _76
setge %al #, _77
andb -157(%ebp), %al # %sfp, _78
testb %al, %al # _78
je L52 #,
movl %ecx, (%esp) # _68,
call ___asan_report_store4 #
L52:
movl -156(%ebp), %eax # %sfp, _23
movl %edi, (%eax) # _28, _23->value
addl $1, -140(%ebp) #, i
L49:
movl -140(%ebp), %eax # i, tmp171
cmpl -132(%ebp), %eax # n_elements, tmp171
jl L53 #,
movl -132(%ebp), %eax # n_elements, n_elements.8_31
addl $536870911, %eax #, _32
leal 0(,%eax,8), %edx #, _33
movl -124(%ebp), %eax # items, tmp172
leal (%edx,%eax), %edi #, _34
leal 4(%edi), %eax #, _41
movl %eax, %ecx # _41, _79
movl %ecx, %eax # _79, _80
shrl $3, %eax #, _80
addl $536870912, %eax #, _81
movzbl (%eax), %edx # *_82, _83
testb %dl, %dl # _83
setne -156(%ebp) #, %sfp
movl %ecx, %eax # _79, _85
andl $7, %eax #, _85
addl $3, %eax #, _87
cmpb %dl, %al # _83, _87
setge %al #, _88
andb -156(%ebp), %al # %sfp, _89
testb %al, %al # _89
je L54 #,
movl %ecx, (%esp) # _79,
call ___asan_report_store4 #
L54:
movl $0, 4(%edi) #, _34->next
movl -124(%ebp), %eax # items, tmp173
movl -164(%ebp), %edi # %sfp, tmp155
movl %eax, -64(%edi) # tmp173, list.head
movl -64(%edi), %eax # list, D.3374
cmpl %esi, -168(%ebp) # tmp156, %sfp
je L46 #,
movl $1172321806, (%esi) #,
movl $-168430091, 536870912(%ebx) #,
movl $-168430091, 536870916(%ebx) #,
movl $-168430091, 536870920(%ebx) #,
jmp L47 #
L46:
movl $0, 536870912(%ebx) #,
movl $0, 536870916(%ebx) #,
movl $0, 536870920(%ebx) #,
L47:
addl $172, %esp #,
popl %ebx #
.cfi_restore 3
popl %esi #
.cfi_restore 6
popl %edi #
.cfi_restore 7
popl %ebp #
.cfi_restore 5
.cfi_def_cfa 4, 4
ret
.cfi_endproc
LFE22:
.section .rdata,"dr"
.align 32
LC3:
.ascii "[]\0"
.space 61
.align 32
LC4:
.ascii "%d,\0"
.space 60
.align 32
LC5:
.ascii "%d]\12\0"
.space 59
.text
.globl _print_list
.def _print_list; .scl 2; .type 32; .endef
_print_list:
LASANPC23:
LFB23:
.cfi_startproc
pushl %ebp #
.cfi_def_cfa_offset 8
.cfi_offset 5, -8
movl %esp, %ebp #,
.cfi_def_cfa_register 5
pushl %ebx #
subl $36, %esp #,
.cfi_offset 3, -12
leal 8(%ebp), %eax #, _14
movl %eax, %edx # _24, _25
shrl $3, %edx #, _25
addl $536870912, %edx #, _26
movzbl (%edx), %edx # *_27, _28
testb %dl, %dl # _28
setne %cl #, _29
movl %eax, %ebx # _24, _30
andl $7, %ebx #, _30
addl $3, %ebx #, _32
cmpb %dl, %bl # _28, _32
setge %dl #, _33
andl %ecx, %edx # _29, _34
testb %dl, %dl # _34
je L57 #,
movl %eax, (%esp) # _24,
call ___asan_report_load4 #
L57:
movl 8(%ebp), %eax # list.head, tmp150
movl %eax, -12(%ebp) # tmp150, item
cmpl $0, -12(%ebp) #, item
jne L58 #,
movl $LC3, (%esp) #,
call _puts #
jmp L56 #
L58:
movl $91, (%esp) #,
call _putchar #
jmp L60 #
L64:
movl -12(%ebp), %eax # item, _15
movl %eax, %edx # _35, _36
shrl $3, %edx #, _36
addl $536870912, %edx #, _37
movzbl (%edx), %edx # *_38, _39
testb %dl, %dl # _39
setne %cl #, _40
movl %eax, %ebx # _35, _41
andl $7, %ebx #, _41
addl $3, %ebx #, _43
cmpb %dl, %bl # _39, _43
setge %dl #, _44
andl %ecx, %edx # _40, _45
testb %dl, %dl # _45
je L61 #,
movl %eax, (%esp) # _35,
call ___asan_report_load4 #
L61: