           g (klay/make)
           g (reduce klay/add-node g bbs)
           g (reduce klay/add-edge g edges)]
-      (cmn/d g)
       (klay/layout g
                    (fn [r]
-                     (s {:nodes (cmn/index-by :id (klay/get-nodes r))
+                     (s {:nodes (klay/get-nodes r)
                          :edges (klay/get-edges r)}))
                    (fn [err]
                      (e {:msg "klay: error"

            (:basic-blocks args))))


;; TODO: what is this...
;; why don't i have an `id` prop on these nodes??
(defn get-node-position
  [node]
  {:addr (:addr node)
   :id (:id node)
   :x (:x node)
   :y (:y node)
   :height (:height node)
   :width (:width node)})


(defmethod action-handler :set-function-layout
  [key model args]
  (let [fva (:function args)
        nodes (:nodes args)
        ;;node-positions (map get-node-position nodes)
        ;;node-positions-by-addr (cmn/index-by :addr node-positions)
        edges (:edges args)]
    (update-in model [:functions fva] assoc :layout {:nodes nodes
                                                     :edges edges})))



    (prn (str (:type edge) " " (hex-format (:src edge)) " -> " (hex-format (:dst edge))))))


(defn layout-cfg-dagre
  [basic-blocks s e]
  (when (< 0 (count (remove nil? basic-blocks)))
