+void AddLabelRef (CodeLabel* L, struct CodeEntry* E)
+/* Let the CodeEntry E reference the label L */
+{
+ /* The insn at E jumps to this label */
+ E->JumpTo = L;
+
+ /* Remember that in the label */
+ CollAppend (&L->JumpFrom, E);
+}
+
+
+
+void MoveLabelRefs (CodeLabel* OldLabel, CodeLabel* NewLabel)
+/* Move all references to OldLabel to point to NewLabel. OldLabel will have no
+ * more references on return.
+ */
+{
+ /* Walk through all instructions referencing the old label */
+ unsigned Count = CollCount (&OldLabel->JumpFrom);
+ while (Count--) {
+
+ /* Get the instruction that references the old label */
+ CodeEntry* E = CollAt (&OldLabel->JumpFrom, Count);
+
+ /* Change the reference to the new label */
+ CHECK (E->JumpTo == OldLabel);
+ AddLabelRef (NewLabel, E);
+
+ }
+
+ /* There are no more references to the old label */
+ CollDeleteAll (&OldLabel->JumpFrom);
+}
+
+
+
+void OutputCodeLabel (const CodeLabel* L, FILE* F)