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 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 Newline/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 Newline/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-strings-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-strings-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-strings-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-strings-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-strings-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-strings-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 Newline/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 68/push _test-error-buffered-file->buffer/imm32
1049
1050 e8/call clear-stream/disp32
1051
1052 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1053
1054 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1055 68/push 0x10/imm32/length
1056 68/push 0/imm32/read
1057 68/push 0/imm32/write
1058 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1059
1060 68/push 0/imm32
1061 68/push 0/imm32
1062 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1063
1064
1065
1066 68/push 0x18/imm32/nbytes-of-args-for-get-or-stop
1067 52/push-edx
1068
1069 e8/call tailor-exit-descriptor/disp32
1070
1071 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1072
1073
1074 68/push 8/imm32/row-size
1075 68/push "code"/imm32
1076 51/push-ecx
1077
1078 e8/call get-or-insert/disp32
1079
1080 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1081 $test-get-or-stop:success:
1082
1083
1084 52/push-edx/ed
1085 68/push _test-error-buffered-file/imm32
1086 68/push "foo"/imm32/abort-prefix
1087 68/push 8/imm32/row-size
1088 68/push "code"/imm32
1089 51/push-ecx
1090
1091 e8/call get-or-stop/disp32
1092
1093 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x18/imm32
1094 $test-get-or-stop:success-assertion:
1095
1096
1097
1098 68/push "F - test-get-or-stop/0"/imm32
1099 68/push 0x10/imm32
1100 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1101 50/push-eax
1102
1103 e8/call check-ints-equal/disp32
1104
1105 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1106 $test-get-or-stop:failure:
1107
1108
1109 52/push-edx/ed
1110 68/push _test-error-buffered-file/imm32
1111 68/push "foo"/imm32/abort-prefix
1112 68/push 8/imm32/row-size
1113 68/push "data"/imm32
1114 51/push-ecx
1115
1116 e8/call get-or-stop/disp32
1117
1118
1119 59/pop-to-ecx
1120 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1121 5a/pop-to-edx
1122 $test-get-or-stop:failure-assertion:
1123
1124
1125
1126 68/push "F - test-get-or-stop/1"/imm32
1127 68/push 2/imm32
1128
1129 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1130
1131 e8/call check-ints-equal/disp32
1132
1133 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1134 $test-get-or-stop:end:
1135
1136
1137 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x24/imm32
1138 5d/pop-to-ebp
1139 c3/return
1140
1141
1142 get-slice-or-stop:
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156 55/push-ebp
1157 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1158
1159 51/push-ecx
1160 52/push-edx
1161 56/push-esi
1162
1163 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1164
1165 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1166
1167 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1168 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1169 $get-slice-or-stop:search-loop:
1170
1171 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1172 73/jump-if-greater-or-equal-unsigned $get-slice-or-stop:stop/disp8
1173
1174
1175
1176 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1177 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1178
1179 e8/call slice-equal?/disp32
1180
1181 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1182
1183 3d/compare-eax-and 0/imm32
1184 74/jump-if-equal $get-slice-or-stop:mismatch/disp8
1185 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1186 eb/jump $get-slice-or-stop:end/disp8
1187 $get-slice-or-stop:mismatch:
1188
1189 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1190
1191 eb/jump $get-slice-or-stop:search-loop/disp8
1192 $get-slice-or-stop:end:
1193
1194 5e/pop-to-esi
1195 5a/pop-to-edx
1196 59/pop-to-ecx
1197
1198 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1199 5d/pop-to-ebp
1200 c3/return
1201
1202 $get-slice-or-stop:stop:
1203
1204
1205 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x14/disp8 .
1206 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1207
1208 e8/call write-buffered/disp32
1209
1210 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1211
1212
1213 68/push ": get-slice-or-stop: key not found: "/imm32
1214 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1215
1216 e8/call write-buffered/disp32
1217
1218 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1219
1220
1221 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1222 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1223
1224 e8/call write-slice-buffered/disp32
1225
1226 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1227
1228
1229 68/push Newline/imm32
1230 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x18/disp8 .
1231
1232 e8/call write-buffered/disp32
1233
1234 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1235
1236
1237 68/push 1/imm32
1238 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0x1c/disp8 .
1239
1240 e8/call stop/disp32
1241
1242 $get-slice-or-stop:terminus:
1243
1244 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1245
1246 b8/copy-to-eax 1/imm32/exit
1247 cd/syscall 0x80/imm8
1248
1249 test-get-slice-or-stop:
1250
1251
1252 55/push-ebp
1253 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1254
1255
1256
1257 68/push _test-error-stream/imm32
1258
1259 e8/call clear-stream/disp32
1260
1261 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1262
1263
1264 68/push _test-error-buffered-file->buffer/imm32
1265
1266 e8/call clear-stream/disp32
1267
1268 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 4/imm32
1269
1270 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1271 68/push 0x10/imm32/length
1272 68/push 0/imm32/read
1273 68/push 0/imm32/write
1274 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1275
1276 68/push 0/imm32
1277 68/push 0/imm32
1278 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1279
1280
1281 b8/copy-to-eax "code"/imm32
1282 8b/copy 0/mod/indirect 0/rm32/eax . . . 3/r32/ebx . .
1283 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 3/index/ebx . 3/r32/ebx 4/disp8 .
1284 05/add-to-eax 4/imm32
1285
1286 53/push-ebx
1287 50/push-eax
1288 89/copy 3/mod/direct 3/rm32/ebx . . . 4/r32/esp . .
1289
1290
1291
1292 68/push 0x18/imm32/nbytes-of-args-for-get-or-stop
1293 52/push-edx
1294
1295 e8/call tailor-exit-descriptor/disp32
1296
1297 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1298
1299
1300 68/push 8/imm32/row-size
1301 68/push "code"/imm32
1302 51/push-ecx
1303
1304 e8/call get-or-insert/disp32
1305
1306 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1307 $test-get-slice-or-stop:success:
1308
1309
1310 52/push-edx/ed
1311 68/push _test-error-buffered-file/imm32
1312 68/push "foo"/imm32/abort-prefix
1313 68/push 8/imm32/row-size
1314 53/push-ebx/slice
1315 51/push-ecx
1316
1317 e8/call get-slice-or-stop/disp32
1318
1319
1320 59/pop-to-ecx
1321 5b/pop-to-ebx
1322 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1323 5a/pop-to-edx
1324 $test-get-slice-or-stop:success-assertion:
1325
1326
1327
1328 68/push "F - test-get-slice-or-stop/0"/imm32
1329 68/push 0x10/imm32
1330 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1331 50/push-eax
1332
1333 e8/call check-ints-equal/disp32
1334
1335 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1336 $test-get-slice-or-stop:failure:
1337
1338
1339 b8/copy-to-eax "segment2"/imm32
1340 05/add-to-eax 4/imm32
1341 89/copy 0/mod/indirect 3/rm32/ebx . . . 0/r32/eax . .
1342
1343 05/add-to-eax 8/imm32/strlen
1344 89/copy 1/mod/*+disp8 3/rm32/ebx . . . 0/r32/eax 4/disp8 .
1345
1346
1347 52/push-edx/ed
1348 68/push _test-error-buffered-file/imm32
1349 68/push "foo"/imm32/abort-prefix
1350 68/push 8/imm32/row-size
1351 53/push-ebx/slice
1352 51/push-ecx
1353
1354 e8/call get-slice-or-stop/disp32
1355
1356
1357 59/pop-to-ecx
1358 5b/pop-to-ebx
1359 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1360 5a/pop-to-edx
1361 $test-get-slice-or-stop:failure-assertion:
1362
1363
1364
1365 68/push "F - test-get-or-stop/1"/imm32
1366 68/push 2/imm32
1367
1368 ff 6/subop/push 1/mod/*+disp8 2/rm32/edx . . . . 4/disp8 .
1369
1370 e8/call check-ints-equal/disp32
1371
1372 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1373 $test-get-slice-or-stop:end:
1374
1375
1376 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0x2c/imm32
1377 5d/pop-to-ebp
1378 c3/return
1379
1380
1381 maybe-get:
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392 55/push-ebp
1393 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1394
1395 51/push-ecx
1396 52/push-edx
1397 56/push-esi
1398
1399 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1400
1401 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1402
1403 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1404 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1405 $maybe-get:search-loop:
1406
1407 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1408 73/jump-if-greater-or-equal-unsigned $maybe-get:null/disp8
1409
1410
1411
1412 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1413 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1414
1415 e8/call string-equal?/disp32
1416
1417 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1418
1419 3d/compare-eax-and 0/imm32
1420 74/jump-if-equal $maybe-get:mismatch/disp8
1421 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1422 eb/jump $maybe-get:end/disp8
1423 $maybe-get:mismatch:
1424
1425 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1426
1427 eb/jump $maybe-get:search-loop/disp8
1428 $maybe-get:null:
1429 b8/copy-to-eax 0/imm32
1430 $maybe-get:end:
1431
1432 5e/pop-to-esi
1433 5a/pop-to-edx
1434 59/pop-to-ecx
1435
1436 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1437 5d/pop-to-ebp
1438 c3/return
1439
1440 test-maybe-get:
1441
1442 55/push-ebp
1443 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1444
1445
1446 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1447 68/push 0x10/imm32/length
1448 68/push 0/imm32/read
1449 68/push 0/imm32/write
1450 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1451
1452
1453 68/push 8/imm32/row-size
1454 68/push "code"/imm32
1455 51/push-ecx
1456
1457 e8/call get-or-insert/disp32
1458
1459 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1460 $test-maybe-get:success:
1461
1462
1463
1464 68/push 8/imm32/row-size
1465 68/push "code"/imm32
1466 51/push-ecx
1467
1468 e8/call maybe-get/disp32
1469
1470 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1471
1472
1473
1474 68/push "F - test-maybe-get/0"/imm32
1475 68/push 0x10/imm32
1476 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1477 50/push-eax
1478
1479 e8/call check-ints-equal/disp32
1480
1481 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1482
1483
1484
1485 68/push "F - test-maybe-get/1"/imm32
1486 68/push 8/imm32/row-size
1487 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1488
1489 e8/call check-ints-equal/disp32
1490
1491 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1492
1493
1494 68/push "F - test-maybe-get/2"/imm32
1495 68/push "code"/imm32
1496 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1497
1498 e8/call check-strings-equal/disp32
1499
1500 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1501 $test-maybe-get:failure:
1502
1503
1504
1505 68/push 8/imm32/row-size
1506 68/push "data"/imm32
1507 51/push-ecx
1508
1509 e8/call maybe-get/disp32
1510
1511 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1512
1513
1514 68/push "F - test-maybe-get/3"/imm32
1515 68/push 0/imm32
1516 50/push-eax
1517
1518 e8/call check-ints-equal/disp32
1519
1520 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1521 $test-maybe-get:end:
1522
1523 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1524 5d/pop-to-ebp
1525 c3/return
1526
1527
1528 maybe-get-slice:
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539 55/push-ebp
1540 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1541
1542 51/push-ecx
1543 52/push-edx
1544 56/push-esi
1545
1546 8b/copy 1/mod/*+disp8 5/rm32/ebp . . . 6/r32/esi 8/disp8 .
1547
1548 8d/copy-address 1/mod/*+disp8 6/rm32/esi . . . 1/r32/ecx 0xc/disp8 .
1549
1550 8b/copy 0/mod/indirect 6/rm32/esi . . . 2/r32/edx . .
1551 8d/copy-address 0/mod/indirect 4/rm32/sib 1/base/ecx 2/index/edx . 2/r32/edx . .
1552 $maybe-get-slice:search-loop:
1553
1554 39/compare 3/mod/direct 1/rm32/ecx . . . 2/r32/edx . .
1555 73/jump-if-greater-or-equal-unsigned $maybe-get-slice:null/disp8
1556
1557
1558
1559 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1560 ff 6/subop/push 1/mod/*+disp8 5/rm32/ebp . . . . 0xc/disp8 .
1561
1562 e8/call slice-equal?/disp32
1563
1564 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 8/imm32
1565
1566 3d/compare-eax-and 0/imm32
1567 74/jump-if-equal $maybe-get-slice:mismatch/disp8
1568 8d/copy-address 1/mod/*+disp8 1/rm32/ecx . . . 0/r32/eax 4/disp8 .
1569 eb/jump $maybe-get-slice:end/disp8
1570 $maybe-get-slice:mismatch:
1571
1572 03/add 1/mod/*+disp8 5/rm32/ebp . . . 1/r32/ecx 0x10/disp8 .
1573
1574 eb/jump $maybe-get-slice:search-loop/disp8
1575 $maybe-get-slice:null:
1576 b8/copy-to-eax 0/imm32
1577 $maybe-get-slice:end:
1578
1579 5e/pop-to-esi
1580 5a/pop-to-edx
1581 59/pop-to-ecx
1582
1583 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1584 5d/pop-to-ebp
1585 c3/return
1586
1587 test-maybe-get-slice:
1588
1589 55/push-ebp
1590 89/copy 3/mod/direct 5/rm32/ebp . . . 4/r32/esp . .
1591
1592
1593 81 5/subop/subtract 3/mod/direct 4/rm32/esp . . . . . 0x10/imm32
1594 68/push 0x10/imm32/length
1595 68/push 0/imm32/read
1596 68/push 0/imm32/write
1597 89/copy 3/mod/direct 1/rm32/ecx . . . 4/r32/esp . .
1598
1599
1600 68/push 8/imm32/row-size
1601 68/push "code"/imm32
1602 51/push-ecx
1603
1604 e8/call get-or-insert/disp32
1605
1606 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1607 $test-maybe-get-slice:success:
1608
1609
1610 b8/copy-to-eax "code"/imm32
1611 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
1612 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
1613 05/add-to-eax 4/imm32
1614
1615 52/push-edx
1616 50/push-eax
1617 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1618
1619
1620 68/push 8/imm32/row-size
1621 52/push-edx
1622 51/push-ecx
1623
1624 e8/call maybe-get-slice/disp32
1625
1626 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1627
1628
1629
1630 68/push "F - test-maybe-get-slice/0"/imm32
1631 68/push 0x10/imm32
1632 29/subtract 3/mod/direct 0/rm32/eax . . . 1/r32/ecx . .
1633 50/push-eax
1634
1635 e8/call check-ints-equal/disp32
1636
1637 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1638
1639
1640
1641 68/push "F - test-maybe-get-slice/1"/imm32
1642 68/push 8/imm32/row-size
1643 ff 6/subop/push 0/mod/indirect 1/rm32/ecx . . . . . .
1644
1645 e8/call check-ints-equal/disp32
1646
1647 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1648
1649
1650 68/push "F - test-maybe-get-slice/2"/imm32
1651 68/push "code"/imm32
1652 ff 6/subop/push 1/mod/*+disp8 1/rm32/ecx . . . . 0xc/disp8 .
1653
1654 e8/call check-strings-equal/disp32
1655
1656 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1657 $test-maybe-get-slice:failure:
1658
1659
1660 b8/copy-to-eax "data"/imm32
1661 8b/copy 0/mod/indirect 0/rm32/eax . . . 2/r32/edx . .
1662 8d/copy-address 1/mod/*+disp8 4/rm32/sib 0/base/eax 2/index/edx . 2/r32/edx 4/disp8 .
1663 05/add-to-eax 4/imm32
1664
1665 52/push-edx
1666 50/push-eax
1667 89/copy 3/mod/direct 2/rm32/edx . . . 4/r32/esp . .
1668
1669
1670 68/push 8/imm32/row-size
1671 52/push-edx
1672 51/push-ecx
1673
1674 e8/call maybe-get-slice/disp32
1675
1676 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1677
1678
1679 68/push "F - test-maybe-get-slice/3"/imm32
1680 68/push 0/imm32
1681 50/push-eax
1682
1683 e8/call check-ints-equal/disp32
1684
1685 81 0/subop/add 3/mod/direct 4/rm32/esp . . . . . 0xc/imm32
1686 $test-maybe-get-slice:end:
1687
1688 89/copy 3/mod/direct 4/rm32/esp . . . 5/r32/ebp . .
1689 5d/pop-to-ebp
1690 c3/return
1691
1692