 (defn list-code
   ([] (with-loaded list-code))
   ([loaded]
-    (let [program (:program loaded)]
+    (let [{program :program cfr :cfr} loaded]
       (-> program
           get-cfg
           cfg-to-stmt-map
-          (show-stmt-map program)))))
+          (show-stmt-map program cfr)))))
 
 (defn show-state
   ([state-num] (with-loaded show-state state-num))

  [jumps]
  (if (empty? jumps)
    ""
    (str ": [" (string/join "," jumps) "]")))

(defn show-stmt-map
  [stmt-map program]
  (->>
   stmt-map
   (into (sorted-map))
   (reduce remove-right-after [])
   reverse
   (map
    (fn [[lbl jumps]]
      (if (zero? (.getIndex lbl))
        (let [address (.getAddress lbl)
              instruction (.getInstruction program address)]
          (-> program
              (.getInstructionString address instruction)
              println)))
      (println
       (str
        lbl
        " "
        (.getStatement program lbl))
       (show-jumps jumps))))
   dorun)
  nil)



(defn- edge-flatten
  [edge]
  (let [[from to] edge]
    {from [to] to []}))

(defn cfg-to-stmt-map
  [cfg]
