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