digraph BitStateLayout {
  rankdir=LR;
  node [shape=record, fontname="Helvetica"];

  State64 [
    label="{\
      {<b63_32> Epoch (32 bits)\n[EPOCH_BITS]\nShift: 32\nMask: EPOCH_MASK\nInc: EPOCH_INC} |\
      {<b31_16> Pre-waiter Count (16 bits)\n[PREWAITER_BITS]\nShift: 16\nMask: PREWAITER_MASK\nInc: PREWAITER_INC} |\
      {<b15_0> Pre-waiter Stack (16 bits)\n[STACK_BITS]\nMask: STACK_MASK}\
    }"
  ];

  // Optional annotations for bit ranges
  EpochRange [
    shape=note,
    label="Bits [63:32]\nModification counter",style=filled, fillcolor=black, fontcolor=white
  ];

  PrewaiterRange [
    shape=note,
    label="Bits [31:16]\nPre-waiter ticket count",style=filled, fillcolor=black, fontcolor=white
  ];

  StackRange [
    shape=note,
    label="Bits [15:0]\nCommitted waiter stack index",style=filled, fillcolor=black, fontcolor=white
  ];

  EpochRange -> State64:b63_32    [style="dashed"];
  PrewaiterRange -> State64:b31_16[style="dashed"];
  StackRange -> State64:b15_0     [style="dashed"];
}
