https://github.com/akkartik/mu/blob/master/081table.subx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 == code
21
22
23
24
25
26
27 get:
28
29
30
31
32
33
34
35
36
37
38 55/push-ebp
39 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
40
41 51/push-ecx
42 52/push-edx
43 56/push-esi
44
45 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
46
47 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
48
49 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
50 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
51 $get:search-loop:
52
53 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
54 73/jump-if-greater-or-equal-unsigned $get:abort/disp8
55
56
57
58 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
59 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
60
61 e8/call string-equal?/disp32
62
63 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
64
65 3d/compare-eax-and 0/imm32/false
66 74/jump-if-equal $get:mismatch/disp8
67 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
68 eb/jump $get:end/disp8
69 $get:mismatch:
70
71 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
72
73 eb/jump $get:search-loop/disp8
74 $get:end:
75
76 5e/pop-to-esi
77 5a/pop-to-edx
78 59/pop-to-ecx
79
80 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
81 5d/pop-to-ebp
82 c3/return
83
84 $get:abort:
85
86
87 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
88 68/push 2/imm32/stderr
89
90 e8/call _write/disp32
91
92 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
93
94
95 68/push ": get: key not found: "/imm32
96 68/push 2/imm32/stderr
97
98 e8/call _write/disp32
99
100 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
101
102
103 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
104 68/push 2/imm32/stderr
105
106 e8/call _write/disp32
107
108 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
109
110
111 68/push Newline/imm32
112 68/push 2/imm32/stderr
113
114 e8/call _write/disp32
115
116 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
117
118 bb/copy-to-ebx 1/imm32
119 b8/copy-to-eax 1/imm32/exit
120 cd/syscall 0x80/imm8
121
122
123 test-get:
124
125 55/push-ebp
126 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
127
128
129 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
130 68/push 0x10/imm32/length
131 68/push 0/imm32/read
132 68/push 0/imm32/write
133 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
134
135
136 68/push 8/imm32/row-size
137 68/push "code"/imm32
138 51/push-ecx
139
140 e8/call get-or-insert/disp32
141
142 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
143
144
145 68/push 8/imm32/row-size
146 68/push "data"/imm32
147 51/push-ecx
148
149 e8/call get-or-insert/disp32
150
151 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
152 $test-get:check1:
153
154
155 68/push 8/imm32/row-size
156 68/push "code"/imm32
157 51/push-ecx
158
159 e8/call get/disp32
160
161 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
162
163
164
165 68/push "F - test-get/0"/imm32
166 68/push 0x10/imm32
167 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
168 50/push-eax
169
170 e8/call check-ints-equal/disp32
171
172 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
173 $test-get:check2:
174
175
176 68/push 8/imm32/row-size
177 68/push "data"/imm32
178 51/push-ecx
179
180 e8/call get/disp32
181
182 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
183
184
185
186 68/push "F - test-get/1"/imm32
187 68/push 0x18/imm32
188 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
189 50/push-eax
190
191 e8/call check-ints-equal/disp32
192
193 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
194 $test-get:end:
195
196 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
197 5d/pop-to-ebp
198 c3/return
199
200
201 get-slice:
202
203
204
205
206
207
208
209
210
211
212 55/push-ebp
213 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
214
215 51/push-ecx
216 52/push-edx
217 56/push-esi
218
219 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
220
221 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
222
223 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
224 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
225 $get-slice:search-loop:
226
227 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
228 73/jump-if-greater-or-equal-unsigned $get-slice:abort/disp8
229
230
231
232 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
233 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
234
235 e8/call slice-equal?/disp32
236
237 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
238
239 3d/compare-eax-and 0/imm32/false
240 74/jump-if-equal $get-slice:mismatch/disp8
241 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
242 eb/jump $get-slice:end/disp8
243 $get-slice:mismatch:
244
245 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
246
247 eb/jump $get-slice:search-loop/disp8
248 $get-slice:end:
249
250 5e/pop-to-esi
251 5a/pop-to-edx
252 59/pop-to-ecx
253
254 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
255 5d/pop-to-ebp
256 c3/return
257
258 $get-slice:abort:
259
260
261 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
262 68/push 2/imm32/stderr
263
264 e8/call _write/disp32
265
266 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
267
268
269 68/push ": get-slice: key not found: "/imm32
270 68/push 2/imm32/stderr
271
272 e8/call _write/disp32
273
274 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
275
276
277 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
278 68/push Stderr/imm32
279
280 e8/call write-slice-buffered/disp32
281
282 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
283
284
285 68/push Stderr/imm32
286
287 e8/call flush/disp32
288
289 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
290
291
292 68/push Newline/imm32
293 68/push 2/imm32/stderr
294
295 e8/call _write/disp32
296
297 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
298
299 bb/copy-to-ebx 1/imm32
300 b8/copy-to-eax 1/imm32/exit
301 cd/syscall 0x80/imm8
302
303
304 test-get-slice:
305
306 55/push-ebp
307 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
308
309
310 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
311 68/push 0x10/imm32/length
312 68/push 0/imm32/read
313 68/push 0/imm32/write
314 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
315
316
317 68/push 8/imm32/row-size
318 68/push "code"/imm32
319 51/push-ecx
320
321 e8/call get-or-insert/disp32
322
323 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
324
325
326 68/push 8/imm32/row-size
327 68/push "data"/imm32
328 51/push-ecx
329
330 e8/call get-or-insert/disp32
331
332 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
333 $test-get-slice:check1:
334
335 b8/copy-to-eax "code"/imm32
336 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
337 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
338 05/add-to-eax 4/imm32
339
340 52/push-edx
341 50/push-eax
342 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
343
344
345 68/push 8/imm32/row-size
346 52/push-edx
347 51/push-ecx
348
349 e8/call get-slice/disp32
350
351 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
352
353
354
355 68/push "F - test-get-slice/0"/imm32
356 68/push 0x10/imm32
357 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
358 50/push-eax
359
360 e8/call check-ints-equal/disp32
361
362 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
363 $test-get-slice:check2:
364
365 b8/copy-to-eax "data"/imm32
366 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
367 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
368 05/add-to-eax 4/imm32
369
370 52/push-edx
371 50/push-eax
372 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
373
374
375 68/push 8/imm32/row-size
376 52/push-edx
377 51/push-ecx
378
379 e8/call get-slice/disp32
380
381 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
382
383
384
385 68/push "F - test-get-slice/1"/imm32
386 68/push 0x18/imm32
387 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
388 50/push-eax
389
390 e8/call check-ints-equal/disp32
391
392 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
393 $test-get-slice:end:
394
395 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
396 5d/pop-to-ebp
397 c3/return
398
399
400
401
402
403
404 get-or-insert:
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420 55/push-ebp
421 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
422
423 51/push-ecx
424 52/push-edx
425 56/push-esi
426
427 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
428
429 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
430
431 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
432 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
433 $get-or-insert:search-loop:
434
435 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
436 73/jump-if-greater-or-equal-unsigned $get-or-insert:not-found/disp8
437
438
439
440 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
441 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
442
443 e8/call string-equal?/disp32
444
445 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
446
447 3d/compare-eax-and 0/imm32/false
448 74/jump-if-equal $get-or-insert:mismatch/disp8
449 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
450 eb/jump $get-or-insert:end/disp8
451 $get-or-insert:mismatch:
452
453 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
454
455 eb/jump $get-or-insert:search-loop/disp8
456 $get-or-insert:not-found:
457
458 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
459
460 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
461 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
462 73/jump-if-greater-or-equal-unsigned $get-or-insert:abort/disp8
463
464
465 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
466 52/push-edx
467
468 e8/call zero-out/disp32
469
470 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
471
472
473 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0xc/disp8 .
474
475 89/copy 0/mod/indirect 2/rm32/edx . . . 0/r32/eax . .
476
477
478 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
479
480 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
481
482
483 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
484
485 05/add-to-eax 4/imm32
486 $get-or-insert:end:
487
488 5e/pop-to-esi
489 5a/pop-to-edx
490 59/pop-to-ecx
491
492 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
493 5d/pop-to-ebp
494 c3/return
495
496 $get-or-insert:abort:
497
498
499 68/push "get-or-insert: table is full\n"/imm32
500 68/push 2/imm32/stderr
501
502 e8/call _write/disp32
503
504 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
505
506 bb/copy-to-ebx 1/imm32
507 b8/copy-to-eax 1/imm32/exit
508 cd/syscall 0x80/imm8
509
510
511 test-get-or-insert:
512
513 55/push-ebp
514 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
515
516 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
517 68/push 0x10/imm32/length
518 68/push 0/imm32/read
519 68/push 0/imm32/write
520 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
521 $test-get-or-insert:first-call:
522
523
524
525 68/push 8/imm32/row-size
526 68/push "code"/imm32
527 51/push-ecx
528
529 e8/call get-or-insert/disp32
530
531 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
532
533
534
535 68/push "F - test-get-or-insert/0"/imm32
536 68/push 0x10/imm32
537 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
538 50/push-eax
539
540 e8/call check-ints-equal/disp32
541
542 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
543 $test-get-or-insert:check2:
544
545
546 68/push "F - test-get-or-insert/1"/imm32
547 68/push 8/imm32/row-size
548 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
549
550 e8/call check-ints-equal/disp32
551
552 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
553
554
555 68/push "F - test-get-or-insert/2"/imm32
556 68/push "code"/imm32
557 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
558
559 e8/call check-strings-equal/disp32
560
561 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
562 $test-get-or-insert:second-call:
563
564
565
566 68/push 8/imm32/row-size
567 68/push "code"/imm32
568 51/push-ecx
569
570 e8/call get-or-insert/disp32
571
572 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
573
574
575
576 68/push "F - test-get-or-insert/3"/imm32
577 68/push 0x10/imm32
578 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
579 50/push-eax
580
581 e8/call check-ints-equal/disp32
582
583 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
584
585
586
587 68/push "F - test-get-or-insert/4"/imm32
588 68/push 8/imm32/row-size
589 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
590
591 e8/call check-ints-equal/disp32
592
593 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
594
595
596 68/push "F - test-get-or-insert/5"/imm32
597 68/push "code"/imm32
598 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
599
600 e8/call check-strings-equal/disp32
601
602 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
603 $test-get-or-insert:third-call:
604
605
606
607 68/push 8/imm32/row-size
608 68/push "data"/imm32
609 51/push-ecx
610
611 e8/call get-or-insert/disp32
612
613 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
614
615
616
617
618 68/push "F - test-get-or-insert/6"/imm32
619 68/push 0x18/imm32
620 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
621 50/push-eax
622
623 e8/call check-ints-equal/disp32
624
625 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
626
627
628 68/push "F - test-get-or-insert/7"/imm32
629 68/push 0x10/imm32/two-rows
630 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
631
632 e8/call check-ints-equal/disp32
633
634 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
635
636
637
638 68/push "F - test-get-or-insert/8"/imm32
639 68/push "data"/imm32
640 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x14/disp8 .
641
642 e8/call check-strings-equal/disp32
643
644 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
645 $test-get-or-insert:end:
646
647 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
648 5d/pop-to-ebp
649 c3/return
650
651
652
653
654
655 leaky-get-or-insert-slice:
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671 55/push-ebp
672 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
673
674 51/push-ecx
675 52/push-edx
676 56/push-esi
677
678 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
679
680 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
681
682 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
683 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
684 $leaky-get-or-insert-slice:search-loop:
685
686 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
687 73/jump-if-greater-or-equal-unsigned $leaky-get-or-insert-slice:not-found/disp8
688
689
690
691 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
692 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
693
694 e8/call slice-equal?/disp32
695
696 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
697
698 3d/compare-eax-and 0/imm32/false
699 74/jump-if-equal $leaky-get-or-insert-slice:mismatch/disp8
700 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
701 eb/jump $leaky-get-or-insert-slice:end/disp8
702 $leaky-get-or-insert-slice:mismatch:
703
704 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
705
706 eb/jump $leaky-get-or-insert-slice:search-loop/disp8
707 $leaky-get-or-insert-slice:not-found:
708
709 31/xor 3/mod/direct 0/rm32/eax . . . 0/r32/eax . .
710
711 8b/copy 0/mod/indirect 6/rm32/esi . . . 1/r32/ecx . .
712 3b/compare 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 8/disp8 .
713 7d/jump-if-greater-or-equal $leaky-get-or-insert-slice:abort/disp8
714
715
716 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x10/disp8 .
717 52/push-edx
718
719 e8/call zero-out/disp32
720
721 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
722
723
724
725 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
726 68/push Heap/imm32
727
728 e8/call slice-to-string/disp32
729
730 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
731
732 89/copy 0/mod/indirect 2/rm32/edx . . . 0/r32/eax . .
733
734
735 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 0/r32/eax 0x10/disp8 .
736
737 01/add 0/mod/indirect 6/rm32/esi . . . 0/r32/eax . .
738
739
740 89/copy 3/mod/direct 0/rm32/eax . . . 2/r32/edx . .
741
742 05/add-to-eax 4/imm32
743 $leaky-get-or-insert-slice:end:
744
745 5e/pop-to-esi
746 5a/pop-to-edx
747 59/pop-to-ecx
748
749 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
750 5d/pop-to-ebp
751 c3/return
752
753 $leaky-get-or-insert-slice:abort:
754
755
756 68/push "leaky-get-or-insert-slice: table is full\n"/imm32
757 68/push 2/imm32/stderr
758
759 e8/call _write/disp32
760
761 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
762
763 bb/copy-to-ebx 1/imm32
764 b8/copy-to-eax 1/imm32/exit
765 cd/syscall 0x80/imm8
766
767
768 test-leaky-get-or-insert-slice:
769
770 55/push-ebp
771 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
772
773 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
774 68/push 0x10/imm32/length
775 68/push 0/imm32/read
776 68/push 0/imm32/write
777 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
778
779 b8/copy-to-eax "code"/imm32
780 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
781 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
782 05/add-to-eax 4/imm32
783
784 52/push-edx
785 50/push-eax
786 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
787 $test-leaky-get-or-insert-slice:first-call:
788
789
790
791 68/push 8/imm32/row-size
792 52/push-edx
793 51/push-ecx
794
795 e8/call leaky-get-or-insert-slice/disp32
796
797 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
798
799
800
801 68/push "F - test-leaky-get-or-insert-slice/0"/imm32
802 68/push 0x10/imm32
803 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
804 50/push-eax
805
806 e8/call check-ints-equal/disp32
807
808 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
809 $test-leaky-get-or-insert-slice:check2:
810
811
812 68/push "F - test-leaky-get-or-insert-slice/1"/imm32
813 68/push 8/imm32/row-size
814 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
815
816 e8/call check-ints-equal/disp32
817
818 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
819
820
821 68/push "F - test-leaky-get-or-insert-slice/2"/imm32
822 68/push "code"/imm32
823 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
824
825 e8/call check-strings-equal/disp32
826
827 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
828 $test-leaky-get-or-insert-slice:second-call:
829
830
831
832 68/push 8/imm32/row-size
833 52/push-edx
834 51/push-ecx
835
836 e8/call leaky-get-or-insert-slice/disp32
837
838 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
839
840
841
842 68/push "F - test-leaky-get-or-insert-slice/3"/imm32
843 68/push 0x10/imm32
844 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
845 50/push-eax
846
847 e8/call check-ints-equal/disp32
848
849 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
850
851
852
853 68/push "F - test-leaky-get-or-insert-slice/4"/imm32
854 68/push 8/imm32/row-size
855 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
856
857 e8/call check-ints-equal/disp32
858
859 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
860
861
862 68/push "F - test-leaky-get-or-insert-slice/5"/imm32
863 68/push "code"/imm32
864 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
865
866 e8/call check-strings-equal/disp32
867
868 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
869 $test-leaky-get-or-insert-slice:third-call:
870
871
872 b8/copy-to-eax "data"/imm32
873 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
874 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
875 05/add-to-eax 4/imm32
876
877 52/push-edx
878 50/push-eax
879 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
880
881
882 68/push 8/imm32/row-size
883 52/push-edx
884 51/push-ecx
885
886 e8/call leaky-get-or-insert-slice/disp32
887
888 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
889
890
891
892
893 68/push "F - test-leaky-get-or-insert-slice/6"/imm32
894 68/push 0x18/imm32
895 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
896 50/push-eax
897
898 e8/call check-ints-equal/disp32
899
900 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
901
902
903 68/push "F - test-leaky-get-or-insert-slice/7"/imm32
904 68/push 0x10/imm32/two-rows
905 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
906
907 e8/call check-ints-equal/disp32
908
909 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
910
911
912
913 68/push "F - test-leaky-get-or-insert-slice/8"/imm32
914 68/push "data"/imm32
915 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0x14/disp8 .
916
917 e8/call check-strings-equal/disp32
918
919 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
920 $test-leaky-get-or-insert-slice:end:
921
922 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
923 5d/pop-to-ebp
924 c3/return
925
926
927 get-or-stop:
928
929
930
931
932
933
934
935
936
937
938
939
940
941 55/push-ebp
942 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
943
944 51/push-ecx
945 52/push-edx
946 56/push-esi
947
948 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
949
950 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
951
952 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
953 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
954 $get-or-stop:search-loop:
955
956 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
957 73/jump-if-greater-or-equal-unsigned $get-or-stop:stop/disp8
958
959
960
961 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
962 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
963
964 e8/call string-equal?/disp32
965
966 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
967
968 3d/compare-eax-and 0/imm32/false
969 74/jump-if-equal $get-or-stop:mismatch/disp8
970 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
971 eb/jump $get-or-stop:end/disp8
972 $get-or-stop:mismatch:
973
974 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
975
976 eb/jump $get-or-stop:search-loop/disp8
977 $get-or-stop:end:
978
979 5e/pop-to-esi
980 5a/pop-to-edx
981 59/pop-to-ecx
982
983 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
984 5d/pop-to-ebp
985 c3/return
986
987 $get-or-stop:stop:
988
989
990 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
991 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
992
993 e8/call write-buffered/disp32
994
995 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
996
997
998 68/push ": get-or-stop: key not found: "/imm32
999 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1000
1001 e8/call write-buffered/disp32
1002
1003 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1004
1005
1006 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1007 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1008
1009 e8/call write-buffered/disp32
1010
1011 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1012
1013
1014 68/push Newline/imm32
1015 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1016
1017 e8/call write-buffered/disp32
1018
1019 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1020
1021
1022 68/push 1/imm32
1023 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x1c/disp8 .
1024
1025 e8/call stop/disp32
1026
1027 $get-or-stop:terminus:
1028
1029 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1030
1031 b8/copy-to-eax 1/imm32/exit
1032 cd/syscall 0x80/imm8
1033
1034 test-get-or-stop:
1035
1036
1037 55/push-ebp
1038 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1039
1040
1041
1042 68/push _test-error-stream/imm32
1043
1044 e8/call clear-stream/disp32
1045
1046 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1047
1048
1049 68/push $_test-error-buffered-file->buffer/imm32
1050
1051 e8/call clear-stream/disp32
1052
1053 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1054
1055 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1056 68/push 0x10/imm32/length
1057 68/push 0/imm32/read
1058 68/push 0/imm32/write
1059 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1060
1061 68/push 0/imm32
1062 68/push 0/imm32
1063 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1064
1065
1066
1067 68/push 0x18/imm32/nbytes-of-args-for-get-or-stop
1068 52/push-edx
1069
1070 e8/call tailor-exit-descriptor/disp32
1071
1072 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1073
1074
1075 68/push 8/imm32/row-size
1076 68/push "code"/imm32
1077 51/push-ecx
1078
1079 e8/call get-or-insert/disp32
1080
1081 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1082 $test-get-or-stop:success:
1083
1084
1085 52/push-edx/ed
1086 68/push _test-error-buffered-file/imm32
1087 68/push "foo"/imm32/abort-prefix
1088 68/push 8/imm32/row-size
1089 68/push "code"/imm32
1090 51/push-ecx
1091
1092 e8/call get-or-stop/disp32
1093
1094 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
1095 $test-get-or-stop:success-assertion:
1096
1097
1098
1099 68/push "F - test-get-or-stop/0"/imm32
1100 68/push 0x10/imm32
1101 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1102 50/push-eax
1103
1104 e8/call check-ints-equal/disp32
1105
1106 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1107 $test-get-or-stop:failure:
1108
1109
1110 52/push-edx/ed
1111 68/push _test-error-buffered-file/imm32
1112 68/push "foo"/imm32/abort-prefix
1113 68/push 8/imm32/row-size
1114 68/push "data"/imm32
1115 51/push-ecx
1116
1117 e8/call get-or-stop/disp32
1118
1119
1120 59/pop-to-ecx
1121 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1122 5a/pop-to-edx
1123 $test-get-or-stop:failure-assertion:
1124
1125
1126
1127 68/push "F - test-get-or-stop/1"/imm32
1128 68/push 2/imm32
1129
1130 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1131
1132 e8/call check-ints-equal/disp32
1133
1134 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1135 $test-get-or-stop:end:
1136
1137
1138 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x24/imm32
1139 5d/pop-to-ebp
1140 c3/return
1141
1142
1143 get-slice-or-stop:
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157 55/push-ebp
1158 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1159
1160 51/push-ecx
1161 52/push-edx
1162 56/push-esi
1163
1164 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1165
1166 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1167
1168 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1169 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1170 $get-slice-or-stop:search-loop:
1171
1172 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1173 73/jump-if-greater-or-equal-unsigned $get-slice-or-stop:stop/disp8
1174
1175
1176
1177 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1178 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1179
1180 e8/call slice-equal?/disp32
1181
1182 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1183
1184 3d/compare-eax-and 0/imm32/false
1185 74/jump-if-equal $get-slice-or-stop:mismatch/disp8
1186 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1187 eb/jump $get-slice-or-stop:end/disp8
1188 $get-slice-or-stop:mismatch:
1189
1190 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1191
1192 eb/jump $get-slice-or-stop:search-loop/disp8
1193 $get-slice-or-stop:end:
1194
1195 5e/pop-to-esi
1196 5a/pop-to-edx
1197 59/pop-to-ecx
1198
1199 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1200 5d/pop-to-ebp
1201 c3/return
1202
1203 $get-slice-or-stop:stop:
1204
1205
1206 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
1207 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1208
1209 e8/call write-buffered/disp32
1210
1211 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1212
1213
1214 68/push ": get-slice-or-stop: key not found: "/imm32
1215 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1216
1217 e8/call write-buffered/disp32
1218
1219 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1220
1221
1222 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1223 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1224
1225 e8/call write-slice-buffered/disp32
1226
1227 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1228
1229
1230 68/push Newline/imm32
1231 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1232
1233 e8/call write-buffered/disp32
1234
1235 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1236
1237
1238 68/push 1/imm32
1239 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x1c/disp8 .
1240
1241 e8/call stop/disp32
1242
1243 $get-slice-or-stop:terminus:
1244
1245 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1246
1247 b8/copy-to-eax 1/imm32/exit
1248 cd/syscall 0x80/imm8
1249
1250 test-get-slice-or-stop:
1251
1252
1253 55/push-ebp
1254 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1255
1256
1257
1258 68/push _test-error-stream/imm32
1259
1260 e8/call clear-stream/disp32
1261
1262 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1263
1264
1265 68/push $_test-error-buffered-file->buffer/imm32
1266
1267 e8/call clear-stream/disp32
1268
1269 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1270
1271 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1272 68/push 0x10/imm32/length
1273 68/push 0/imm32/read
1274 68/push 0/imm32/write
1275 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1276
1277 68/push 0/imm32
1278 68/push 0/imm32
1279 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1280
1281
1282 b8/copy-to-eax "code"/imm32
1283 8b/copy 0/mod/indirect 0/rm32/eax . . . 3/r32/ebx . .
1284 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 3/index/ebx . 3/r32/ebx 4/disp8 .
1285 05/add-to-eax 4/imm32
1286
1287 53/push-ebx
1288 50/push-eax
1289 89/copy 3/mod/direct 3/rm32/ebx . . . 4/r32/esp . .
1290
1291
1292
1293 68/push 0x18/imm32/nbytes-of-args-for-get-or-stop
1294 52/push-edx
1295
1296 e8/call tailor-exit-descriptor/disp32
1297
1298 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1299
1300
1301 68/push 8/imm32/row-size
1302 68/push "code"/imm32
1303 51/push-ecx
1304
1305 e8/call get-or-insert/disp32
1306
1307 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1308 $test-get-slice-or-stop:success:
1309
1310
1311 52/push-edx/ed
1312 68/push _test-error-buffered-file/imm32
1313 68/push "foo"/imm32/abort-prefix
1314 68/push 8/imm32/row-size
1315 53/push-ebx/slice
1316 51/push-ecx
1317
1318 e8/call get-slice-or-stop/disp32
1319
1320
1321 59/pop-to-ecx
1322 5b/pop-to-ebx
1323 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1324 5a/pop-to-edx
1325 $test-get-slice-or-stop:success-assertion:
1326
1327
1328
1329 68/push "F - test-get-slice-or-stop/0"/imm32
1330 68/push 0x10/imm32
1331 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1332 50/push-eax
1333
1334 e8/call check-ints-equal/disp32
1335
1336 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1337 $test-get-slice-or-stop:failure:
1338
1339
1340 b8/copy-to-eax "segment2"/imm32
1341 05/add-to-eax 4/imm32
1342 89/copy 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . .
1343
1344 05/add-to-eax 8/imm32/strlen
1345 89/copy 1/mod/*+disp8 3/rm32/ebx . . . 0/r32/eax 4/disp8 .
1346
1347
1348 52/push-edx/ed
1349 68/push _test-error-buffered-file/imm32
1350 68/push "foo"/imm32/abort-prefix
1351 68/push 8/imm32/row-size
1352 53/push-ebx/slice
1353 51/push-ecx
1354
1355 e8/call get-slice-or-stop/disp32
1356
1357
1358 59/pop-to-ecx
1359 5b/pop-to-ebx
1360 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1361 5a/pop-to-edx
1362 $test-get-slice-or-stop:failure-assertion:
1363
1364
1365
1366 68/push "F - test-get-or-stop/1"/imm32
1367 68/push 2/imm32
1368
1369 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1370
1371 e8/call check-ints-equal/disp32
1372
1373 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1374 $test-get-slice-or-stop:end:
1375
1376
1377 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x2c/imm32
1378 5d/pop-to-ebp
1379 c3/return
1380
1381
1382 maybe-get:
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393 55/push-ebp
1394 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1395
1396 51/push-ecx
1397 52/push-edx
1398 56/push-esi
1399
1400 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1401
1402 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1403
1404 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1405 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1406 $maybe-get:search-loop:
1407
1408 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1409 73/jump-if-greater-or-equal-unsigned $maybe-get:null/disp8
1410
1411
1412
1413 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1414 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1415
1416 e8/call string-equal?/disp32
1417
1418 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1419
1420 3d/compare-eax-and 0/imm32/false
1421 74/jump-if-equal $maybe-get:mismatch/disp8
1422 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1423 eb/jump $maybe-get:end/disp8
1424 $maybe-get:mismatch:
1425
1426 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1427
1428 eb/jump $maybe-get:search-loop/disp8
1429 $maybe-get:null:
1430 b8/copy-to-eax 0/imm32
1431 $maybe-get:end:
1432
1433 5e/pop-to-esi
1434 5a/pop-to-edx
1435 59/pop-to-ecx
1436
1437 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1438 5d/pop-to-ebp
1439 c3/return
1440
1441 test-maybe-get:
1442
1443 55/push-ebp
1444 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1445
1446
1447 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1448 68/push 0x10/imm32/length
1449 68/push 0/imm32/read
1450 68/push 0/imm32/write
1451 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1452
1453
1454 68/push 8/imm32/row-size
1455 68/push "code"/imm32
1456 51/push-ecx
1457
1458 e8/call get-or-insert/disp32
1459
1460 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1461 $test-maybe-get:success:
1462
1463
1464
1465 68/push 8/imm32/row-size
1466 68/push "code"/imm32
1467 51/push-ecx
1468
1469 e8/call maybe-get/disp32
1470
1471 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1472
1473
1474
1475 68/push "F - test-maybe-get/0"/imm32
1476 68/push 0x10/imm32
1477 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1478 50/push-eax
1479
1480 e8/call check-ints-equal/disp32
1481
1482 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1483
1484
1485
1486 68/push "F - test-maybe-get/1"/imm32
1487 68/push 8/imm32/row-size
1488 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1489
1490 e8/call check-ints-equal/disp32
1491
1492 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1493
1494
1495 68/push "F - test-maybe-get/2"/imm32
1496 68/push "code"/imm32
1497 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1498
1499 e8/call check-strings-equal/disp32
1500
1501 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1502 $test-maybe-get:failure:
1503
1504
1505
1506 68/push 8/imm32/row-size
1507 68/push "data"/imm32
1508 51/push-ecx
1509
1510 e8/call maybe-get/disp32
1511
1512 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1513
1514
1515 68/push "F - test-maybe-get/3"/imm32
1516 68/push 0/imm32
1517 50/push-eax
1518
1519 e8/call check-ints-equal/disp32
1520
1521 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1522 $test-maybe-get:end:
1523
1524 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1525 5d/pop-to-ebp
1526 c3/return
1527
1528
1529 maybe-get-slice:
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540 55/push-ebp
1541 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1542
1543 51/push-ecx
1544 52/push-edx
1545 56/push-esi
1546
1547 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1548
1549 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1550
1551 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1552 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1553 $maybe-get-slice:search-loop:
1554
1555 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1556 73/jump-if-greater-or-equal-unsigned $maybe-get-slice:null/disp8
1557
1558
1559
1560 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1561 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1562
1563 e8/call slice-equal?/disp32
1564
1565 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1566
1567 3d/compare-eax-and 0/imm32/false
1568 74/jump-if-equal $maybe-get-slice:mismatch/disp8
1569 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1570 eb/jump $maybe-get-slice:end/disp8
1571 $maybe-get-slice:mismatch:
1572
1573 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1574
1575 eb/jump $maybe-get-slice:search-loop/disp8
1576 $maybe-get-slice:null:
1577 b8/copy-to-eax 0/imm32
1578 $maybe-get-slice:end:
1579
1580 5e/pop-to-esi
1581 5a/pop-to-edx
1582 59/pop-to-ecx
1583
1584 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1585 5d/pop-to-ebp
1586 c3/return
1587
1588 test-maybe-get-slice:
1589
1590 55/push-ebp
1591 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1592
1593
1594 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1595 68/push 0x10/imm32/length
1596 68/push 0/imm32/read
1597 68/push 0/imm32/write
1598 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1599
1600
1601 68/push 8/imm32/row-size
1602 68/push "code"/imm32
1603 51/push-ecx
1604
1605 e8/call get-or-insert/disp32
1606
1607 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1608 $test-maybe-get-slice:success:
1609
1610
1611 b8/copy-to-eax "code"/imm32
1612 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
1613 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
1614 05/add-to-eax 4/imm32
1615
1616 52/push-edx
1617 50/push-eax
1618 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1619
1620
1621 68/push 8/imm32/row-size
1622 52/push-edx
1623 51/push-ecx
1624
1625 e8/call maybe-get-slice/disp32
1626
1627 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1628
1629
1630
1631 68/push "F - test-maybe-get-slice/0"/imm32
1632 68/push 0x10/imm32
1633 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1634 50/push-eax
1635
1636 e8/call check-ints-equal/disp32
1637
1638 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1639
1640
1641
1642 68/push "F - test-maybe-get-slice/1"/imm32
1643 68/push 8/imm32/row-size
1644 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1645
1646 e8/call check-ints-equal/disp32
1647
1648 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1649
1650
1651 68/push "F - test-maybe-get-slice/2"/imm32
1652 68/push "code"/imm32
1653 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1654
1655 e8/call check-strings-equal/disp32
1656
1657 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1658 $test-maybe-get-slice:failure:
1659
1660
1661 b8/copy-to-eax "data"/imm32
1662 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
1663 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
1664 05/add-to-eax 4/imm32
1665
1666 52/push-edx
1667 50/push-eax
1668 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1669
1670
1671 68/push 8/imm32/row-size
1672 52/push-edx
1673 51/push-ecx
1674
1675 e8/call maybe-get-slice/disp32
1676
1677 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1678
1679
1680 68/push "F - test-maybe-get-slice/3"/imm32
1681 68/push 0/imm32
1682 50/push-eax
1683
1684 e8/call check-ints-equal/disp32
1685
1686 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1687 $test-maybe-get-slice:end:
1688
1689 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1690 5d/pop-to-ebp
1691 c3/return
1692
1693