From 6142fa676731e158622ca7956c150c58bc57f1f2 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Wed, 11 Nov 2026 10:38:37 -0300 Subject: design: the graph of a function's blocks; two runs as a pair From the user. The disassembly's alternate form at a larger scale is the graph of its basic blocks: a block a box of rows with its offset, lines and visit count; execution flows down and a back edge is the one thing that climbs, in its loop's lane with the turn count; what the run never reached folds away. On the map it takes the disassembly's place; in the working frame a blocks lens draws its shape and the rows are its view. Verbs leave and turn carry the mark along an edge. Two runs of one program share a frame as a pair: the seam is the gutter, the source shared above, rows only one run has and values that differ marked at the seam. The scene it is made for sets a plain build against an ASan one in a stack overflow: the frame beside its shadow bytes, the store beside its check, and the step where they part. Co-Authored-By: Claude Fable 5.2 Claude-Session: https://claude.ai/code/session_016Y9MNCKgYCGiANnEwcEQxa --- design/mock/24-graph-strip.svg | 596 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 596 insertions(+) create mode 100644 design/mock/24-graph-strip.svg (limited to 'design/mock/24-graph-strip.svg') diff --git a/design/mock/24-graph-strip.svg b/design/mock/24-graph-strip.svg new file mode 100644 index 0000000..e9db6d9 --- /dev/null +++ b/design/mock/24-graph-strip.svg @@ -0,0 +1,596 @@ + + + + +1 +the condition +cur at jne, the compare's chips framed; the second turn + + + +disassembly · reverse + + + + + +1 + + + + +×1 + + + +401188 +lines 17 to 20 +×1 ++0 +17 +push +rbp ++1 +mov +rbp, rsp ++4 +18 +mov +[rbp - 0x18] + + + + + + + + +, 0 ++c +19 +mov +rax, [rip + 0x2e7d] ++13 +mov +[rbp - 0x10], rax ++17 +20 +jmp +4011c9 + + + +4011a1 +lines 21 to 24 +×1 ++19 +21 +mov +rax, [rbp - 0x10] ++1d +mov +rax, [rax + 8] ++21 +mov +[rbp - 8], rax ++25 +22 +mov +rax, [rbp - 0x10] ++29 +mov +rdx, [rbp - 0x18] ++2d +mov +[rax + 8], rdx ++31 +23 +mov +rax, [rbp - 0x10] ++35 +mov +[rbp - 0x18], rax ++39 +24 +mov +rax, [rbp - 8] ++3d +mov +[rbp - 0x10], rax + + + +4011c9 +line 20 +×2 ++41 +20 +cmp +[rbp - 0x10] + + + + + + + + +, 0 +1004070 + : +0 + +zf + + + ++46 +jne +4011a1 +taken + · reads zf + + + +4011d0 +lines 26 to 27 ++48 +26 +mov +rax, [rbp - 0x18] ++4c +mov +[rip + 0x2e3d], rax ++53 +27 +nop + ++54 +pop +rbp ++55 +ret + + + + + +2 +the edge taken +the edge lit gold, the mark on it, halfway + + + +disassembly · reverse + + + + + +2 + + + + +×1 + + + +401188 +lines 17 to 20 +×1 ++0 +17 +push +rbp ++1 +mov +rbp, rsp ++4 +18 +mov +[rbp - 0x18] + + + + + + + + +, 0 ++c +19 +mov +rax, [rip + 0x2e7d] ++13 +mov +[rbp - 0x10], rax ++17 +20 +jmp +4011c9 + + + +4011a1 +lines 21 to 24 +×2 ++19 +21 +mov +rax, [rbp - 0x10] ++1d +mov +rax, [rax + 8] ++21 +mov +[rbp - 8], rax ++25 +22 +mov +rax, [rbp - 0x10] ++29 +mov +rdx, [rbp - 0x18] ++2d +mov +[rax + 8], rdx ++31 +23 +mov +rax, [rbp - 0x10] ++35 +mov +[rbp - 0x18], rax ++39 +24 +mov +rax, [rbp - 8] ++3d +mov +[rbp - 0x10], rax + + + +4011c9 +line 20 +×2 ++41 +20 +cmp +[rbp - 0x10] + + + + + + + + +, 0 ++46 +jne +4011a1 + + + +4011d0 +lines 26 to 27 ++48 +26 +mov +rax, [rbp - 0x18] ++4c +mov +[rip + 0x2e3d], rax ++53 +27 +nop + ++54 +pop +rbp ++55 +ret + + + + + + + +3 +the loop's turn +the back edge climbs, the mark on it; its count struck: the second turn + + + +disassembly · reverse + + + + + +2 + + + + + +×2 + + + +401188 +lines 17 to 20 +×1 ++0 +17 +push +rbp ++1 +mov +rbp, rsp ++4 +18 +mov +[rbp - 0x18] + + + + + + + + +, 0 ++c +19 +mov +rax, [rip + 0x2e7d] ++13 +mov +[rbp - 0x10], rax ++17 +20 +jmp +4011c9 + + + +4011a1 +lines 21 to 24 +×2 ++19 +21 +mov +rax, [rbp - 0x10] ++1d +mov +rax, [rax + 8] ++21 +mov +[rbp - 8], rax ++25 +22 +mov +rax, [rbp - 0x10] ++29 +mov +rdx, [rbp - 0x18] ++2d +mov +[rax + 8], rdx ++31 +23 +mov +rax, [rbp - 0x10] ++35 +mov +[rbp - 0x18], rax ++39 +24 +mov +rax, [rbp - 8] ++3d +mov +[rbp - 0x10], rax + + + +4011c9 +line 20 +×3 ++41 +20 +cmp +[rbp - 0x10] + + + + + + + + +, 0 ++46 +jne +4011a1 + + + +4011d0 +lines 26 to 27 ++48 +26 +mov +rax, [rbp - 0x18] ++4c +mov +[rip + 0x2e3d], rax ++53 +27 +nop + ++54 +pop +rbp ++55 +ret + + + + + + + +4 +the way out +not taken: down to the exit, landed + + + +disassembly · reverse + + + + + +3 + + +1 + + +×3 + + + +401188 +lines 17 to 20 +×1 ++0 +17 +push +rbp ++1 +mov +rbp, rsp ++4 +18 +mov +[rbp - 0x18] + + + + + + + + +, 0 ++c +19 +mov +rax, [rip + 0x2e7d] ++13 +mov +[rbp - 0x10], rax ++17 +20 +jmp +4011c9 + + + +4011a1 +lines 21 to 24 +×3 ++19 +21 +mov +rax, [rbp - 0x10] ++1d +mov +rax, [rax + 8] ++21 +mov +[rbp - 8], rax ++25 +22 +mov +rax, [rbp - 0x10] ++29 +mov +rdx, [rbp - 0x18] ++2d +mov +[rax + 8], rdx ++31 +23 +mov +rax, [rbp - 0x10] ++35 +mov +[rbp - 0x18], rax ++39 +24 +mov +rax, [rbp - 8] ++3d +mov +[rbp - 0x10], rax + + + +4011c9 +line 20 +×4 ++41 +20 +cmp +[rbp - 0x10] + + + + + + + + +, 0 ++46 +jne +4011a1 + + + +4011d0 +lines 26 to 27 +×1 + + + ++48 +26 +mov +rax, [rbp - 0x18] ++4c +mov +[rip + 0x2e3d], rax ++53 +27 +nop + ++54 +pop +rbp ++55 +ret + + + + + -- cgit v1.3