anchor.diff:                  hibernate = Hibernate},
                 Q)
       end;
  -loop_actions_timeout(
  +loop_actions_list(
     P, Debug, S, Q, NextState_NewData,
     NextEventsR, Hibernate, TimeoutsR, Postpone,
     CallEnter, StateCall, Actions,
  
positive.code:                       Q)
              end;
  	%%
          Timeout ->
              loop_actions_timeout(
                P, Debug, S, Q, NextState_NewData,
                NextEventsR, Hibernate, TimeoutsR, Postpone,
                CallEnter, StateCall, Actions, Timeout)
      end.
  
  %% Process a reply action
  %%
  loop_actions_reply(
    P, Debug, S, Q, NextState_NewData,
    NextEventsR, Hibernate, TimeoutsR, Postpone,
    CallEnter, StateCall, Actions,
    From, Reply) ->
      %%
      case from(From) of
          true ->
              %% No need for a separate ?not_sys_debug clause here
              %% since the external call to erlang:'!'/2 in reply/2
              %% will cause swap out of all live registers anyway
              reply(From, Reply),
              Debug_1 = ?sys_debug(Debug, P#params.name, {out,Reply,From}),
              loop_actions_list(
                P, Debug_1, S, Q, NextState_NewData,
                NextEventsR, Hibernate, TimeoutsR, Postpone,
                CallEnter, StateCall, Actions);
          false ->
              terminate(
                error,
                {bad_action_from_state_function,{reply,From,Reply}},
                ?STACKTRACE(), P, Debug,
                S#state{
                  state_data = NextState_NewData,
                  hibernate = Hibernate},
                Q)
      end.
  
  %% Process a next_event action
  %%
  loop_actions_next_event(
    P, Debug, S, Q, NextState_NewData,
    NextEventsR, Hibernate, TimeoutsR, Postpone,
    CallEnter, StateCall, Actions, Type, Content) ->
      case event_type(Type) of
          true when StateCall ->
              NextEvent = {Type,Content},
              case Debug of
                  ?not_sys_debug ->
                      loop_actions_list(
                        P, Debug, S, Q, NextState_NewData,
                        [NextEvent|NextEventsR],
                        Hibernate, TimeoutsR, Postpone,
                        CallEnter, StateCall, Actions);
                  _ ->
                      Name = P#params.name,
                      {State,_Data} = S#state.state_data,
                      Debug_1 =
                          sys_debug(Debug, Name, {in,{Type,Content},State}),
                      loop_actions_list(
                        P, Debug_1, S, Q, NextState_NewData,
                        [NextEvent|NextEventsR],
                        Hibernate, TimeoutsR, Postpone,
                        CallEnter, StateCall, Actions)
                end;
          _ ->
              terminate(
                error,
                {if
                     StateCall ->
                         bad_action_from_state_function;
                     true ->
                         bad_state_enter_action_from_state_function
                 end,
                 {next_event,Type,Content}},
                ?STACKTRACE(), P, Debug,
                S#state{
                  state_data = NextState_NewData,
                  hibernate = Hibernate},
                Q)
      end.
  
  %% Process a timeout action, or also any unrecognized action
  %%
  loop_actions_timeout(
    P, Debug, S, Q, NextState_NewData,
    NextEventsR, Hibernate, TimeoutsR, Postpone,
    CallEnter, StateCall, Actions,
  
negative.code:             terminate(
                error,
                {bad_action_from_state_function,Time},
                ?STACKTRACE(), P, Debug,
                S#state{
                  state_data = NextState_NewData,
                  hibernate = Hibernate},
                Q)
      end.
  
  %% Process a reply action
  %%
  loop_actions_reply(
    P, Debug, S, Q, NextState_NewData,
    NextEventsR, Hibernate, TimeoutsR, Postpone,
    CallEnter, StateCall, Actions,
    From, Reply) ->
      %%
      case from(From) of
          true ->
              %% No need for a separate ?not_sys_debug clause here
              %% since the external call to erlang:'!'/2 in reply/2
              %% will cause swap out of all live registers anyway
              reply(From, Reply),
              Debug_1 = ?sys_debug(Debug, P#params.name, {out,Reply,From}),
              loop_actions_list(
                P, Debug_1, S, Q, NextState_NewData,
                NextEventsR, Hibernate, TimeoutsR, Postpone,
                CallEnter, StateCall, Actions);
          false ->
              terminate(
                error,
                {bad_action_from_state_function,{reply,From,Reply}},
                ?STACKTRACE(), P, Debug,
                S#state{
                  state_data = NextState_NewData,
                  hibernate = Hibernate},
                Q)
      end.
  
  %% Process a next_event action
  %%
  loop_actions_next_event(
    P, Debug, S, Q, NextState_NewData,
    NextEventsR, Hibernate, TimeoutsR, Postpone,
    CallEnter, StateCall, Actions, Type, Content) ->
      case event_type(Type) of
          true when StateCall ->
              NextEvent = {Type,Content},
              case Debug of
                  ?not_sys_debug ->
                      loop_actions_list(
                        P, Debug, S, Q, NextState_NewData,
                        [NextEvent|NextEventsR],
                        Hibernate, TimeoutsR, Postpone,
                        CallEnter, StateCall, Actions);
                  _ ->
                      Name = P#params.name,
                      {State,_Data} = S#state.state_data,
                      Debug_1 =
                          sys_debug(Debug, Name, {in,{Type,Content},State}),
                      loop_actions_list(
                        P, Debug_1, S, Q, NextState_NewData,
                        [NextEvent|NextEventsR],
                        Hibernate, TimeoutsR, Postpone,
                        CallEnter, StateCall, Actions)
                end;
          _ ->
              terminate(
                error,
                {if
                     StateCall ->
                         bad_action_from_state_function;
                     true ->
                         bad_state_enter_action_from_state_function
                 end,
                 {next_event,Type,Content}},
                ?STACKTRACE(), P, Debug,
                S#state{
                  state_data = NextState_NewData,
  