/* sscc : C CODE OF SORTED EQUATIONS RRC - SIMULATION MODE */

/* AUXILIARY DECLARATIONS */

#ifndef STRLEN
#define STRLEN 81
#endif
#define _COND(A,B,C) ((A)?(B):(C))
#ifdef TRACE_ACTION
#include <stdio.h>
#endif
#ifndef NULL
#define NULL ((char*)0)
#endif

#ifndef __EXEC_STATUS_H_LOADED
#define __EXEC_STATUS_H_LOADED

typedef struct {
unsigned int start:1;
unsigned int kill:1;
unsigned int active:1;
unsigned int suspended:1;
unsigned int prev_active:1;
unsigned int prev_suspended:1;
unsigned int exec_index;
unsigned int task_exec_index;
void (*pStart)();
int (*pRet)();
} __ExecStatus;

#endif
#define __ResetExecStatus(status) {\
   status.prev_active = status.active; \
   status.prev_suspended = status.suspended; \
   status.start = status.kill = status.active = status.suspended = 0; }
#define __DSZ(V) (--(V)<=0)
#define BASIC_TYPES_DEFINED
typedef int boolean;
typedef int integer;
typedef char* string;
#define CSIMUL_H_LOADED
typedef struct {char text[STRLEN];} symbolic;
extern void _boolean();
extern boolean _eq_boolean();
extern boolean _ne_boolean();
extern boolean _cond_boolean();
extern char* _boolean_to_text();
extern int _check_boolean();
extern void _text_to_boolean();
extern void _integer();
extern boolean _eq_integer();
extern boolean _ne_integer();
extern integer _cond_integer();
extern char* _integer_to_text();
extern int _check_integer();
extern void _text_to_integer();
extern void _string();
extern boolean _eq_string();
extern boolean _ne_string();
extern string _cond_string();
extern char* _string_to_text();
extern int _check_string();
extern void _text_to_string();
extern void _float();
extern boolean _eq_float();
extern boolean _ne_float();
extern float _cond_float();
extern char* _float_to_text();
extern int _check_float();
extern void _text_to_float();
extern void _double();
extern boolean _eq_double();
extern boolean _ne_double();
extern double _cond_double();
extern char* _double_to_text();
extern int _check_double();
extern void _text_to_double();
extern void _symbolic();
extern boolean _eq_symbolic();
extern boolean _ne_symbolic();
extern symbolic _cond_symbolic();
extern char* _symbolic_to_text();
extern int _check_symbolic();
extern void _text_to_symbolic();
extern char* __PredefinedTypeToText();
#define _true 1
#define _false 0
#define __RRC_GENERIC_TEST(TEST) return TEST;
typedef void (*__RRC_APF)();
extern __RRC_APF *__RRC_PActionArray;
extern int **__RRC_PCheckArray;
struct __SourcePoint {
int linkback;
int line;
int column;
int instance_index;
};
struct __InstanceEntry {
char *module_name;
int father_index;
char *dir_name;
char *file_name;
struct __SourcePoint source_point;
struct __SourcePoint end_point;
struct __SourcePoint instance_point;
};
struct __TaskEntry {
char *name;
int   nb_args_ref;
int   nb_args_val;
int  *type_codes_array;
struct __SourcePoint source_point;
};
struct __SignalEntry {
char *name;
int code;
int variable_index;
int present;
struct __SourcePoint source_point;
int number_of_emit_source_points;
struct __SourcePoint* emit_source_point_array;
int number_of_present_source_points;
struct __SourcePoint* present_source_point_array;
int number_of_access_source_points;
struct __SourcePoint* access_source_point_array;
};
struct __InputEntry {
char *name;
int hash;
char *type_name;
int is_a_sensor;
int type_code;
int multiple;
int signal_index;
int (*p_check_input)();
void (*p_input_function)();
int present;
struct __SourcePoint source_point;
};
struct __ReturnEntry {
char *name;
int hash;
char *type_name;
int type_code;
int signal_index;
int exec_index;
int (*p_check_input)();
void (*p_input_function)();
int present;
struct __SourcePoint source_point;
};
struct __ImplicationEntry {
int master;
int slave;
struct __SourcePoint source_point;
};
struct __ExclusionEntry {
int *exclusion_list;
struct __SourcePoint source_point;
};
struct __VariableEntry {
char *full_name;
char *short_name;
char *type_name;
int type_code;
int comment_kind;
int is_initialized;
char *p_variable;
char *source_name;
int written;
unsigned char written_in_transition;
unsigned char read_in_transition;
struct __SourcePoint source_point;
};
struct __ExecEntry {
int task_index;
int *var_indexes_array;
char **p_values_array;
struct __SourcePoint source_point;
};
struct __HaltEntry {
struct __SourcePoint source_point;
};
struct __NetEntry {
int known;
int value;
int number_of_source_points;
struct __SourcePoint* source_point_array;
};
struct __ModuleEntry {
char *version_id;
char *name;
int number_of_instances;
int number_of_tasks;
int number_of_signals;
int number_of_inputs;
int number_of_returns;
int number_of_sensors;
int number_of_outputs;
int number_of_locals;
int number_of_exceptions;
int number_of_implications;
int number_of_exclusions;
int number_of_variables;
int number_of_execs;
int number_of_halts;
int number_of_nets;
int number_of_states;
int state;
unsigned short *halt_list;
unsigned short *awaited_list;
unsigned short *emitted_list;
unsigned short *started_list;
unsigned short *killed_list;
unsigned short *suspended_list;
unsigned short *active_list;
int run_time_error_code;
int error_info;
int (*init)();
int (*run)();
int (*reset)();
char *(*show_variable)();
int (*set_variable)();
int (*check_value)();
int (*execute_action)();
struct __InstanceEntry* instance_table;
struct __TaskEntry* task_table;
struct __SignalEntry* signal_table;
struct __InputEntry* input_table;
struct __ReturnEntry* return_table;
struct __ImplicationEntry* implication_table;
struct __ExclusionEntry* exclusion_table;
struct __VariableEntry* variable_table;
struct __ExecEntry* exec_table;
struct __HaltEntry* halt_table;
struct __NetEntry* net_table;
};

#include "rrc.h"

/* EXTERN DECLARATIONS */

extern int __CheckVariables();
extern __ResetInput();
extern __ResetExecs();
extern __ResetVariables();
extern __ResetVariableStatus();
extern __AppendToList();
extern __ListCopy();
#ifndef _NO_EXTERN_DEFINITIONS
#ifndef _NO_PROCEDURE_DEFINITIONS
#ifndef _COMPARE_DEFINED
#ifndef COMPARE
extern void COMPARE();
#endif
#endif
#ifndef _UPDATE_DISPLAY_DEFINED
#ifndef UPDATE_DISPLAY
extern void UPDATE_DISPLAY();
#endif
#endif
#ifndef _CONTROL_REACTION_DEFINED
#ifndef CONTROL_REACTION
extern void CONTROL_REACTION();
#endif
#endif
#endif
#endif

/* INITIALIZED CONSTANTS */

/* MEMORY ALLOCATION */

static boolean __RRC_V0;
static double __RRC_V1;
static double __RRC_V2;
static double __RRC_V3;
static double __RRC_V4;
static double __RRC_V5;
static double __RRC_V6;
static double __RRC_V7;
static double __RRC_V8;
static double __RRC_V9;
static double __RRC_V10;
static boolean __RRC_V11;
static boolean __RRC_V12;
static boolean __RRC_V13;
static boolean __RRC_V14;
static boolean __RRC_V15;
static double __RRC_V16;
static boolean __RRC_V17;
static double __RRC_V18;
static double __RRC_V19;
static double __RRC_V20;
static double __RRC_V21;
static double __RRC_V22;
static double __RRC_V23;
static double __RRC_V24;
static double __RRC_V25;
static integer __RRC_V26;
static integer __RRC_V27;
static integer __RRC_V28;
static double __RRC_V29;
static double __RRC_V30;
static double __RRC_V31;
static double __RRC_V32;
static double __RRC_V33;
static double __RRC_V34;
static double __RRC_V35;
static double __RRC_V36;

static double __RRC_CHANGE_SET_POINT_0_0;
static double __RRC_CHANGE_SET_POINT_0_1;
static double __RRC_MONITER_PRESSURE_1_0;
static double __RRC_MONITER_TEMPERATURE_2_0;
static unsigned short __RRC_HaltList[10];
static unsigned short __RRC_AwaitedList[20];
static unsigned short __RRC_EmittedList[20];
static unsigned short __RRC_StartedList[4];
static unsigned short __RRC_KilledList[4];
static unsigned short __RRC_SuspendedList[4];
static unsigned short __RRC_ActiveList[4];
static unsigned short __RRC_AllAwaitedList[20]={7,0,13,14,15,16,17,18};


/* INPUT FUNCTIONS */

void RRC_I_SETCHANGE () {
__RRC_V0 = _true;
}
void RRC_IS_SETCHANGE () {
__RRC_V0 = _true;
}
void RRC_I_SETCHANGE_1 () {
__RRC_V11 = _true;
}
void RRC_IS_SETCHANGE_1 () {
__RRC_V11 = _true;
}
void RRC_I_P_VAL () {
__RRC_V12 = _true;
}
void RRC_IS_P_VAL () {
__RRC_V12 = _true;
}
void RRC_I_T_VAL () {
__RRC_V13 = _true;
}
void RRC_IS_T_VAL () {
__RRC_V13 = _true;
}
void RRC_I_DISPLAY_UPDATED () {
__RRC_V14 = _true;
}
void RRC_IS_DISPLAY_UPDATED () {
__RRC_V14 = _true;
}
void RRC_I_SETPOINT_CHANGED () {
__RRC_V15 = _true;
}
void RRC_IS_SETPOINT_CHANGED () {
__RRC_V15 = _true;
}
void RRC_I_REACTION_CONTROLLED (__V) double __V; {
__WriteVariable(16);
__RRC_V16 = __V;
__RRC_V17 = _true;
}
void RRC_IS_REACTION_CONTROLLED (__V) string __V; {
__WriteVariable(16);
_text_to_double(&__RRC_V16,__V);
__RRC_V17 = _true;
}

/* FUNCTIONS RETURNING NUMBER OF EXEC */

int RRC_number_of_execs () {
return (3);
}
int RRC_number_of_execs_of_MONITER_PRESSURE () {
return (1);
}
int RRC_number_of_execs_of_MONITER_TEMPERATURE () {
return (1);
}
int RRC_number_of_execs_of_CHANGE_SET_POINT () {
return (1);
}

/* EXEC STATUS */

void RRC_call_start_SETPOINT_CHANGED();
__ExecStatus RRC_exec_status_SETPOINT_CHANGED = {0,0,0,0,0,0,0,0,RRC_call_start_SETPOINT_CHANGED,RRC_IS_SETPOINT_CHANGED};
void RRC_call_start_P_VAL();
__ExecStatus RRC_exec_status_P_VAL = {0,0,0,0,0,0,1,0,RRC_call_start_P_VAL,RRC_IS_P_VAL};
void RRC_call_start_T_VAL();
__ExecStatus RRC_exec_status_T_VAL = {0,0,0,0,0,0,2,0,RRC_call_start_T_VAL,RRC_IS_T_VAL};
__ExecStatus *RRC_exec_status_array[] = {&RRC_exec_status_SETPOINT_CHANGED,
&RRC_exec_status_P_VAL,
&RRC_exec_status_T_VAL,
(__ExecStatus*)NULL};
__ExecStatus *RRC_exec_status_array_of_MONITER_PRESSURE[] = {&RRC_exec_status_P_VAL,
(__ExecStatus*)NULL};
__ExecStatus *RRC_exec_status_array_of_MONITER_TEMPERATURE[] = {&RRC_exec_status_T_VAL,
(__ExecStatus*)NULL};
__ExecStatus *RRC_exec_status_array_of_CHANGE_SET_POINT[] = {&RRC_exec_status_SETPOINT_CHANGED,
(__ExecStatus*)NULL};

/* FUNCTIONS CALLING USER START FUNCTION */

void RRC_call_start_SETPOINT_CHANGED(pStart) void (*pStart)(); {
 (*pStart)(&__RRC_CHANGE_SET_POINT_0_0,&__RRC_CHANGE_SET_POINT_0_1,&RRC_exec_status_SETPOINT_CHANGED);
}

void RRC_call_start_P_VAL(pStart) void (*pStart)(); {
 (*pStart)(&__RRC_MONITER_PRESSURE_1_0,&RRC_exec_status_P_VAL);
}

void RRC_call_start_T_VAL(pStart) void (*pStart)(); {
 (*pStart)(&__RRC_MONITER_TEMPERATURE_2_0,&RRC_exec_status_T_VAL);
}



/* AUTOMATON (STATE ACTION-TREES) */

/* ACTIONS */

/* PREDEFINED ACTIONS */

/* PRESENT SIGNAL TESTS */

static int __RRC_A1 () {
__RRC_GENERIC_TEST(__RRC_V0);
}
static int __RRC_Check1 [] = {1,0,0};
static int __RRC_A2 () {
__RRC_GENERIC_TEST(__RRC_V11);
}
static int __RRC_Check2 [] = {1,0,0};
static int __RRC_A3 () {
__RRC_GENERIC_TEST(__RRC_V12);
}
static int __RRC_Check3 [] = {1,0,0};
static int __RRC_A4 () {
__RRC_GENERIC_TEST(__RRC_V13);
}
static int __RRC_Check4 [] = {1,0,0};
static int __RRC_A5 () {
__RRC_GENERIC_TEST(__RRC_V14);
}
static int __RRC_Check5 [] = {1,0,0};
static int __RRC_A6 () {
__RRC_GENERIC_TEST(__RRC_V15);
}
static int __RRC_Check6 [] = {1,0,0};
static int __RRC_A7 () {
__RRC_GENERIC_TEST(__RRC_V17);
}
static int __RRC_Check7 [] = {1,0,0};

/* OUTPUT ACTIONS */

static void __RRC_A8 () {
#ifdef __OUTPUT
RRC_O_SETCHANGE();
#endif
__AppendToList(__RRC_EmittedList,0);
}
static int __RRC_Check8 [] = {1,0,0};
static void __RRC_A9 () {
#ifdef __OUTPUT
RRC_O_CONTROL_P(__RRC_V1);
#endif
__AppendToList(__RRC_EmittedList,1);
}
static int __RRC_Check9 [] = {1,0,0};
static void __RRC_A10 () {
#ifdef __OUTPUT
RRC_O_CONTROL_T(__RRC_V2);
#endif
__AppendToList(__RRC_EmittedList,2);
}
static int __RRC_Check10 [] = {1,0,0};
static void __RRC_A11 () {
#ifdef __OUTPUT
RRC_O_ABNORMAL_P(__RRC_V3);
#endif
__AppendToList(__RRC_EmittedList,3);
}
static int __RRC_Check11 [] = {1,0,0};
static void __RRC_A12 () {
#ifdef __OUTPUT
RRC_O_ABNORMAL_T(__RRC_V4);
#endif
__AppendToList(__RRC_EmittedList,4);
}
static int __RRC_Check12 [] = {1,0,0};
static void __RRC_A13 () {
#ifdef __OUTPUT
RRC_O_CONTROL();
#endif
__AppendToList(__RRC_EmittedList,5);
}
static int __RRC_Check13 [] = {1,0,0};
static void __RRC_A14 () {
#ifdef __OUTPUT
RRC_O_UPDATE_COMPLETE();
#endif
__AppendToList(__RRC_EmittedList,6);
}
static int __RRC_Check14 [] = {1,0,0};
static void __RRC_A15 () {
#ifdef __OUTPUT
RRC_O_SET_P(__RRC_V5);
#endif
__AppendToList(__RRC_EmittedList,7);
}
static int __RRC_Check15 [] = {1,0,0};
static void __RRC_A16 () {
#ifdef __OUTPUT
RRC_O_SET_T(__RRC_V6);
#endif
__AppendToList(__RRC_EmittedList,8);
}
static int __RRC_Check16 [] = {1,0,0};
static void __RRC_A17 () {
#ifdef __OUTPUT
RRC_O_PRESSURE_VAL(__RRC_V7);
#endif
__AppendToList(__RRC_EmittedList,9);
}
static int __RRC_Check17 [] = {1,0,0};
static void __RRC_A18 () {
#ifdef __OUTPUT
RRC_O_TEMPERATURE_VAL(__RRC_V8);
#endif
__AppendToList(__RRC_EmittedList,10);
}
static int __RRC_Check18 [] = {1,0,0};
static void __RRC_A19 () {
#ifdef __OUTPUT
RRC_O_PRESSURE_DIFFERENCE(__RRC_V9);
#endif
__AppendToList(__RRC_EmittedList,11);
}
static int __RRC_Check19 [] = {1,0,0};
static void __RRC_A20 () {
#ifdef __OUTPUT
RRC_O_TEMPERATURE_DIFFERENCE(__RRC_V10);
#endif
__AppendToList(__RRC_EmittedList,12);
}
static int __RRC_Check20 [] = {1,0,0};
static void __RRC_A21 () {
#ifdef __OUTPUT
RRC_O_SETCHANGE_1();
#endif
__AppendToList(__RRC_EmittedList,13);
}
static int __RRC_Check21 [] = {1,0,0};

/* ASSIGNMENTS */

static void __RRC_A22 () {
__RRC_V26 = 1;
}
static int __RRC_Check22 [] = {1,0,1,26};
static void __RRC_A23 () {
__RRC_V24 = 4.0;
}
static int __RRC_Check23 [] = {1,0,1,24};
static void __RRC_A24 () {
__RRC_V25 = 400.0;
}
static int __RRC_Check24 [] = {1,0,1,25};
static void __RRC_A25 () {
__RRC_V5 = __RRC_V24;
}
static int __RRC_Check25 [] = {1,1,24,1,5};
static void __RRC_A26 () {
__RRC_V6 = __RRC_V25;
}
static int __RRC_Check26 [] = {1,1,25,1,6};
static void __RRC_A27 () {
__RRC_V26 = (__RRC_V26+1);
}
static int __RRC_Check27 [] = {1,1,26,1,26};
static void __RRC_A28 () {
__RRC_V5 = __RRC_V24;
}
static int __RRC_Check28 [] = {1,1,24,1,5};
static void __RRC_A29 () {
__RRC_V6 = __RRC_V25;
}
static int __RRC_Check29 [] = {1,1,25,1,6};
static void __RRC_A30 () {
__RRC_V27 = 5;
}
static int __RRC_Check30 [] = {1,0,1,27};
static void __RRC_A31 () {
__RRC_V28 = 2;
}
static int __RRC_Check31 [] = {1,0,1,28};
static void __RRC_A32 () {
__RRC_V3 = __RRC_V29;
}
static int __RRC_Check32 [] = {1,1,29,1,3};
static void __RRC_A33 () {
__RRC_V1 = __RRC_V30;
}
static int __RRC_Check33 [] = {1,1,30,1,1};
static void __RRC_A34 () {
__RRC_V7 = __RRC_V29;
}
static int __RRC_Check34 [] = {1,1,29,1,7};
static void __RRC_A35 () {
__RRC_V9 = __RRC_V30;
}
static int __RRC_Check35 [] = {1,1,30,1,9};
static void __RRC_A36 () {
__RRC_V4 = __RRC_V33;
}
static int __RRC_Check36 [] = {1,1,33,1,4};
static void __RRC_A37 () {
__RRC_V2 = __RRC_V34;
}
static int __RRC_Check37 [] = {1,1,34,1,2};
static void __RRC_A38 () {
__RRC_V8 = __RRC_V33;
}
static int __RRC_Check38 [] = {1,1,33,1,8};
static void __RRC_A39 () {
__RRC_V10 = __RRC_V34;
}
static int __RRC_Check39 [] = {1,1,34,1,10};

/* PROCEDURE CALLS */

static void __RRC_A40 () {
UPDATE_DISPLAY(__RRC_V7,__RRC_V8,__RRC_V5,__RRC_V6);
}
static int __RRC_Check40 [] = {1,4,7,8,5,6,0};
static void __RRC_A41 () {
CONTROL_REACTION(__RRC_V10,__RRC_V9);
}
static int __RRC_Check41 [] = {1,2,10,9,0};
static void __RRC_A42 () {
COMPARE(&__RRC_V30,&__RRC_V32,__RRC_V29,__RRC_V5,1);
}
static int __RRC_Check42 [] = {1,2,29,5,2,30,32};
static void __RRC_A43 () {
COMPARE(&__RRC_V34,&__RRC_V36,__RRC_V33,__RRC_V6,2);
}
static int __RRC_Check43 [] = {1,2,33,6,2,34,36};

/* CONDITIONS */

static int __RRC_A44 () {
__RRC_GENERIC_TEST((__RRC_V26==1));
}
static int __RRC_Check44 [] = {1,1,26,0};
static int __RRC_A45 () {
__RRC_GENERIC_TEST((__RRC_V30>__RRC_V32));
}
static int __RRC_Check45 [] = {1,2,30,32,0};
static int __RRC_A46 () {
__RRC_GENERIC_TEST((__RRC_V34>__RRC_V36));
}
static int __RRC_Check46 [] = {1,2,34,36,0};

/* DECREMENTS */

static int __RRC_A47 () {
__RRC_GENERIC_TEST(__DSZ(__RRC_V27));
}
static int __RRC_Check47 [] = {1,1,27,1,27};
static int __RRC_A48 () {
__RRC_GENERIC_TEST(__DSZ(__RRC_V28));
}
static int __RRC_Check48 [] = {1,1,28,1,28};

/* START ACTIONS */

static int __RRC_exec_var_indexes_0 [] = {
24,25
};
static char * __RRC_exec_values_0 [2] = {
(char*)&__RRC_CHANGE_SET_POINT_0_0,
(char*)&__RRC_CHANGE_SET_POINT_0_1
};
static void __RRC_A49 () {
__AppendToList(__RRC_StartedList,0);
__AppendToList(__RRC_ActiveList,0);
__RRC_CHANGE_SET_POINT_0_0 = __RRC_V24;
__RRC_CHANGE_SET_POINT_0_1 = __RRC_V25;
RRC_exec_status_SETPOINT_CHANGED.start = 1;
RRC_exec_status_SETPOINT_CHANGED.active = 1;
__NotifyStart(0);
}
static int __RRC_Check49 [] = {1,0,0};
static int __RRC_exec_var_indexes_1 [] = {
29
};
static char * __RRC_exec_values_1 [1] = {
(char*)&__RRC_MONITER_PRESSURE_1_0
};
static void __RRC_A50 () {
__AppendToList(__RRC_StartedList,1);
__AppendToList(__RRC_ActiveList,1);
__RRC_MONITER_PRESSURE_1_0 = __RRC_V29;
RRC_exec_status_P_VAL.start = 1;
RRC_exec_status_P_VAL.active = 1;
__NotifyStart(1);
}
static int __RRC_Check50 [] = {1,0,0};
static int __RRC_exec_var_indexes_2 [] = {
33
};
static char * __RRC_exec_values_2 [1] = {
(char*)&__RRC_MONITER_TEMPERATURE_2_0
};
static void __RRC_A51 () {
__AppendToList(__RRC_StartedList,2);
__AppendToList(__RRC_ActiveList,2);
__RRC_MONITER_TEMPERATURE_2_0 = __RRC_V33;
RRC_exec_status_T_VAL.start = 1;
RRC_exec_status_T_VAL.active = 1;
__NotifyStart(2);
}
static int __RRC_Check51 [] = {1,0,0};

/* KILL ACTIONS */

static void __RRC_A52 () {
__AppendToList(__RRC_KilledList,0);
RRC_exec_status_SETPOINT_CHANGED.kill = 1;
__NotifyKill(0);
}
static int __RRC_Check52 [] = {1,0,0};
static void __RRC_A53 () {
__AppendToList(__RRC_KilledList,1);
RRC_exec_status_P_VAL.kill = 1;
__NotifyKill(1);
}
static int __RRC_Check53 [] = {1,0,0};
static void __RRC_A54 () {
__AppendToList(__RRC_KilledList,2);
RRC_exec_status_T_VAL.kill = 1;
__NotifyKill(2);
}
static int __RRC_Check54 [] = {1,0,0};

/* SUSPEND ACTIONS */

static void __RRC_A55 () {
__AppendToList(__RRC_SuspendedList,0);
__AppendToList(__RRC_ActiveList,0);
RRC_exec_status_SETPOINT_CHANGED.suspended = 1;
RRC_exec_status_SETPOINT_CHANGED.active = 1;
__NotifySuspend(0);
}
static int __RRC_Check55 [] = {1,0,0};
static void __RRC_A56 () {
__AppendToList(__RRC_SuspendedList,1);
__AppendToList(__RRC_ActiveList,1);
RRC_exec_status_P_VAL.suspended = 1;
RRC_exec_status_P_VAL.active = 1;
__NotifySuspend(1);
}
static int __RRC_Check56 [] = {1,0,0};
static void __RRC_A57 () {
__AppendToList(__RRC_SuspendedList,2);
__AppendToList(__RRC_ActiveList,2);
RRC_exec_status_T_VAL.suspended = 1;
RRC_exec_status_T_VAL.active = 1;
__NotifySuspend(2);
}
static int __RRC_Check57 [] = {1,0,0};

/* ACTIVATE ACTIONS */

static void __RRC_A58 () {
__AppendToList(__RRC_ActiveList,0);
RRC_exec_status_SETPOINT_CHANGED.active = 1;
__NotifyResume(0);
}
static int __RRC_Check58 [] = {1,0,0};
static void __RRC_A59 () {
__AppendToList(__RRC_ActiveList,1);
RRC_exec_status_P_VAL.active = 1;
__NotifyResume(1);
}
static int __RRC_Check59 [] = {1,0,0};
static void __RRC_A60 () {
__AppendToList(__RRC_ActiveList,2);
RRC_exec_status_T_VAL.active = 1;
__NotifyResume(2);
}
static int __RRC_Check60 [] = {1,0,0};

/* WRITE ARGS ACTIONS */

static void __RRC_A61 () {
__RRC_V24 = __RRC_CHANGE_SET_POINT_0_0;
__RRC_V25 = __RRC_CHANGE_SET_POINT_0_1;
__NotifyReturn(0);
}
static int __RRC_Check61 [] = {1,0,2,24,25};
static void __RRC_A62 () {
__RRC_V29 = __RRC_MONITER_PRESSURE_1_0;
__NotifyReturn(1);
}
static int __RRC_Check62 [] = {1,0,1,29};
static void __RRC_A63 () {
__RRC_V33 = __RRC_MONITER_TEMPERATURE_2_0;
__NotifyReturn(2);
}
static int __RRC_Check63 [] = {1,0,1,33};

/* RESET ACTIONS */

static void __RRC_A64 () {
;
__ResetVariable(18);
}
static int __RRC_Check64 [] = {1,0,0};
static void __RRC_A65 () {
;
__ResetVariable(19);
}
static int __RRC_Check65 [] = {1,0,0};
static void __RRC_A66 () {
;
__ResetVariable(20);
}
static int __RRC_Check66 [] = {1,0,0};
static void __RRC_A67 () {
;
__ResetVariable(21);
}
static int __RRC_Check67 [] = {1,0,0};
static void __RRC_A68 () {
;
__ResetVariable(22);
}
static int __RRC_Check68 [] = {1,0,0};
static void __RRC_A69 () {
;
__ResetVariable(23);
}
static int __RRC_Check69 [] = {1,0,0};
static void __RRC_A70 () {
;
__ResetVariable(24);
}
static int __RRC_Check70 [] = {1,0,0};
static void __RRC_A71 () {
;
__ResetVariable(25);
}
static int __RRC_Check71 [] = {1,0,0};
static void __RRC_A72 () {
;
__ResetVariable(29);
}
static int __RRC_Check72 [] = {1,0,0};
static void __RRC_A73 () {
;
__ResetVariable(30);
}
static int __RRC_Check73 [] = {1,0,0};
static void __RRC_A74 () {
;
__ResetVariable(31);
}
static int __RRC_Check74 [] = {1,0,0};
static void __RRC_A75 () {
;
__ResetVariable(32);
}
static int __RRC_Check75 [] = {1,0,0};
static void __RRC_A76 () {
;
__ResetVariable(33);
}
static int __RRC_Check76 [] = {1,0,0};
static void __RRC_A77 () {
;
__ResetVariable(34);
}
static int __RRC_Check77 [] = {1,0,0};
static void __RRC_A78 () {
;
__ResetVariable(35);
}
static int __RRC_Check78 [] = {1,0,0};
static void __RRC_A79 () {
;
__ResetVariable(36);
}
static int __RRC_Check79 [] = {1,0,0};

/* ACTION SEQUENCES */


static int *__RRC_CheckArray[] = {
0,__RRC_Check1,__RRC_Check2,__RRC_Check3,__RRC_Check4,__RRC_Check5,__RRC_Check6,__RRC_Check7,__RRC_Check8,__RRC_Check9,__RRC_Check10,__RRC_Check11,__RRC_Check12,__RRC_Check13,__RRC_Check14,__RRC_Check15,__RRC_Check16,__RRC_Check17,__RRC_Check18,__RRC_Check19,__RRC_Check20,__RRC_Check21,__RRC_Check22,__RRC_Check23,__RRC_Check24,__RRC_Check25,__RRC_Check26,__RRC_Check27,__RRC_Check28,__RRC_Check29,__RRC_Check30,__RRC_Check31,__RRC_Check32,__RRC_Check33,__RRC_Check34,__RRC_Check35,__RRC_Check36,__RRC_Check37,__RRC_Check38,__RRC_Check39,__RRC_Check40,__RRC_Check41,__RRC_Check42,__RRC_Check43,__RRC_Check44,__RRC_Check45,__RRC_Check46,__RRC_Check47,__RRC_Check48,__RRC_Check49,__RRC_Check50,__RRC_Check51,__RRC_Check52,__RRC_Check53,__RRC_Check54,__RRC_Check55,__RRC_Check56,__RRC_Check57,__RRC_Check58,__RRC_Check59,__RRC_Check60,__RRC_Check61,__RRC_Check62,__RRC_Check63,__RRC_Check64,__RRC_Check65,__RRC_Check66,__RRC_Check67,__RRC_Check68,__RRC_Check69,__RRC_Check70,__RRC_Check71,__RRC_Check72,__RRC_Check73,__RRC_Check74,__RRC_Check75,__RRC_Check76,__RRC_Check77,__RRC_Check78,__RRC_Check79
};
static int **__RRC_PCheckArray =  __RRC_CheckArray;

/* INIT FUNCTION */

#ifndef NO_INIT
RRC_initialize () {
}
#endif

/* SHOW VARIABLE FUNCTION */

char* __RRC_show_variable (__V) int __V; {
extern struct __VariableEntry __RRC_VariableTable[];
struct __VariableEntry* p_var = &__RRC_VariableTable[__V];
if (p_var->type_code < 0) {return __PredefinedTypeToText(p_var->type_code, p_var->p_variable);
} else {
switch (p_var->type_code) {
default: return 0;
}
}
}

/* SET VARIABLE FUNCTION */

static __RRC_set_variable(__Type, __pVar, __Text)
int __Type; char* __pVar; char* __Text; {
switch (__Type) {
default: __SetVariable(__Type, __pVar, __Text); break;
}
}

/* CHECK VALUE FUNCTION */

static int __RRC_check_value (__Type,__Text) 
int __Type; char* __Text; {
switch (__Type) {
default: return __CheckValue(__Type, __Text);
}
}

/* SIMULATION TABLES */

struct __InstanceEntry __RRC_InstanceTable [] = {
{"RRC",0,"","rrc.strl",{1,3,1,0},{1,102,1,0},{0,0,0,0}},
{"PRESS",0,"","rrc.strl",{1,106,1,1},{1,143,1,1},{1,73,4,0}},
{"TEMP",0,"","rrc.strl",{1,149,1,2},{1,186,1,2},{1,77,4,0}},
};

static int __RRC___task_type_codes_MONITER_PRESSURE[] = {
-6,
};

static int __RRC___task_type_codes_MONITER_TEMPERATURE[] = {
-6,
};

static int __RRC___task_type_codes_CHANGE_SET_POINT[] = {
-6,-6,
};

struct __TaskEntry __RRC_TaskTable [] = {
{"MONITER_PRESSURE",1,0,__RRC___task_type_codes_MONITER_PRESSURE,{1,5,7,0}},
{"MONITER_TEMPERATURE",1,0,__RRC___task_type_codes_MONITER_TEMPERATURE,{1,6,7,0}},
{"CHANGE_SET_POINT",2,0,__RRC___task_type_codes_CHANGE_SET_POINT,{1,7,7,0}},
};

struct __SignalEntry __RRC_SignalTable [] = {
{"SETCHANGE",35,0,0,{1,13,13,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"CONTROL_P",2,1,0,{1,15,9,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"CONTROL_T",2,2,0,{1,16,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"ABNORMAL_P",2,3,0,{1,17,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"ABNORMAL_T",2,4,0,{1,18,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"CONTROL",34,0,0,{1,19,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"UPDATE_COMPLETE",34,0,0,{1,20,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"SET_P",2,5,0,{1,21,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"SET_T",2,6,0,{1,22,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"PRESSURE_VAL",2,7,0,{1,23,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"TEMPERATURE_VAL",2,8,0,{1,24,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"PRESSURE_DIFFERENCE",2,9,0,{1,25,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"TEMPERATURE_DIFFERENCE",2,10,0,{1,26,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"SETCHANGE_1",35,0,0,{1,28,13,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"P_VAL",160,0,0,{1,30,9,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"T_VAL",160,0,0,{1,31,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"DISPLAY_UPDATED",160,0,0,{1,32,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"SETPOINT_CHANGED",160,0,0,{1,33,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL},
{"REACTION_CONTROLLED",128,16,0,{1,34,2,0},0,(void*) NULL,0,(void*) NULL,0,(void*) NULL}};

struct __InputEntry __RRC_InputTable [] = {
{"SETCHANGE",52,0,0,-1,0,0,0,RRC_IS_SETCHANGE,0,{1,13,13,0}},
{"SETCHANGE_1",95,0,0,-1,0,13,0,RRC_IS_SETCHANGE_1,0,{1,28,13,0}}};

struct __ReturnEntry __RRC_ReturnTable [] = {
{"P_VAL",99,0,-1,14,1,0,RRC_IS_P_VAL,0,{1,30,9,0}},
{"T_VAL",2,0,-1,15,2,0,RRC_IS_T_VAL,0,{1,31,2,0}},
{"DISPLAY_UPDATED",37,0,-1,16,-1,0,RRC_IS_DISPLAY_UPDATED,0,{1,32,2,0}},
{"SETPOINT_CHANGED",3,0,-1,17,0,0,RRC_IS_SETPOINT_CHANGED,0,{1,33,2,0}},
{"REACTION_CONTROLLED",36,"double",-6,18,-1,_check_double,RRC_IS_REACTION_CONTROLLED,0,{1,34,2,0}}};

struct __VariableEntry __RRC_VariableTable [] = {
{"__RRC_V0","V0","boolean",-2,2,0,(char*)&__RRC_V0,"SETCHANGE",0,0,0,{1,13,13,0}},
{"__RRC_V1","V1","double",-6,1,0,(char*)&__RRC_V1,"CONTROL_P",0,0,0,{1,15,9,0}},
{"__RRC_V2","V2","double",-6,1,0,(char*)&__RRC_V2,"CONTROL_T",0,0,0,{1,16,2,0}},
{"__RRC_V3","V3","double",-6,1,0,(char*)&__RRC_V3,"ABNORMAL_P",0,0,0,{1,17,2,0}},
{"__RRC_V4","V4","double",-6,1,0,(char*)&__RRC_V4,"ABNORMAL_T",0,0,0,{1,18,2,0}},
{"__RRC_V5","V5","double",-6,1,0,(char*)&__RRC_V5,"SET_P",0,0,0,{1,21,2,0}},
{"__RRC_V6","V6","double",-6,1,0,(char*)&__RRC_V6,"SET_T",0,0,0,{1,22,2,0}},
{"__RRC_V7","V7","double",-6,1,0,(char*)&__RRC_V7,"PRESSURE_VAL",0,0,0,{1,23,2,0}},
{"__RRC_V8","V8","double",-6,1,0,(char*)&__RRC_V8,"TEMPERATURE_VAL",0,0,0,{1,24,2,0}},
{"__RRC_V9","V9","double",-6,1,0,(char*)&__RRC_V9,"PRESSURE_DIFFERENCE",0,0,0,{1,25,2,0}},
{"__RRC_V10","V10","double",-6,1,0,(char*)&__RRC_V10,"TEMPERATURE_DIFFERENCE",0,0,0,{1,26,2,0}},
{"__RRC_V11","V11","boolean",-2,2,0,(char*)&__RRC_V11,"SETCHANGE_1",0,0,0,{1,28,13,0}},
{"__RRC_V12","V12","boolean",-2,6,0,(char*)&__RRC_V12,"P_VAL",0,0,0,{1,30,9,0}},
{"__RRC_V13","V13","boolean",-2,6,0,(char*)&__RRC_V13,"T_VAL",0,0,0,{1,31,2,0}},
{"__RRC_V14","V14","boolean",-2,6,0,(char*)&__RRC_V14,"DISPLAY_UPDATED",0,0,0,{1,32,2,0}},
{"__RRC_V15","V15","boolean",-2,6,0,(char*)&__RRC_V15,"SETPOINT_CHANGED",0,0,0,{1,33,2,0}},
{"__RRC_V16","V16","double",-6,7,0,(char*)&__RRC_V16,"REACTION_CONTROLLED",0,0,0,{1,34,2,0}},
{"__RRC_V17","V17","boolean",-2,6,0,(char*)&__RRC_V17,"REACTION_CONTROLLED",0,0,0,{1,34,2,0}},
{"__RRC_V18","V18","double",-6,0,0,(char*)&__RRC_V18,"pressure",0,0,0,{1,36,5,0}},
{"__RRC_V19","V19","double",-6,0,0,(char*)&__RRC_V19,"temperature",0,0,0,{1,37,2,0}},
{"__RRC_V20","V20","double",-6,0,0,(char*)&__RRC_V20,"set_pressure",0,0,0,{1,38,2,0}},
{"__RRC_V21","V21","double",-6,0,0,(char*)&__RRC_V21,"set_temperature",0,0,0,{1,39,2,0}},
{"__RRC_V22","V22","double",-6,0,0,(char*)&__RRC_V22,"difference_t",0,0,0,{1,40,2,0}},
{"__RRC_V23","V23","double",-6,0,0,(char*)&__RRC_V23,"difference_p",0,0,0,{1,41,2,0}},
{"__RRC_V24","V24","double",-6,0,0,(char*)&__RRC_V24,"new_pressure",0,0,0,{1,42,2,0}},
{"__RRC_V25","V25","double",-6,0,0,(char*)&__RRC_V25,"new_temperature",0,0,0,{1,43,2,0}},
{"__RRC_V26","V26","integer",-3,0,0,(char*)&__RRC_V26,"count",0,0,0,{1,44,2,0}},
{"__RRC_V27","V27","integer",-3,3,0,(char*)&__RRC_V27,"0",0,0,0,{1,83,9,0}},
{"__RRC_V28","V28","integer",-3,3,0,(char*)&__RRC_V28,"0",0,0,0,{1,91,9,0}},
{"__RRC_V29","V29","double",-6,0,0,(char*)&__RRC_V29,"pressure_P",0,0,0,{1,128,6,1}},
{"__RRC_V30","V30","double",-6,0,0,(char*)&__RRC_V30,"difference_p",0,0,0,{1,129,2,1}},
{"__RRC_V31","V31","double",-6,0,0,(char*)&__RRC_V31,"set_pressure",0,0,0,{1,130,2,1}},
{"__RRC_V32","V32","double",-6,0,0,(char*)&__RRC_V32,"range_P",0,0,0,{1,131,2,1}},
{"__RRC_V33","V33","double",-6,0,0,(char*)&__RRC_V33,"temperature_T",0,0,0,{1,172,6,2}},
{"__RRC_V34","V34","double",-6,0,0,(char*)&__RRC_V34,"difference_T",0,0,0,{1,173,2,2}},
{"__RRC_V35","V35","double",-6,0,0,(char*)&__RRC_V35,"set_temperature",0,0,0,{1,174,2,2}},
{"__RRC_V36","V36","double",-6,0,0,(char*)&__RRC_V36,"range_T",0,0,0,{1,175,2,2}}
};

struct __ExecEntry __RRC_ExecTable [] = {
{2,__RRC_exec_var_indexes_0,__RRC_exec_values_0,{1,63,3,0}},
{0,__RRC_exec_var_indexes_1,__RRC_exec_values_1,{1,134,2,1}},
{1,__RRC_exec_var_indexes_2,__RRC_exec_values_2,{1,177,2,2}}
};

struct __HaltEntry __RRC_HaltTable [] = {
{{1,102,1,0}},
{{1,60,3,0}},
{{1,63,3,0}},
{{1,58,2,0}},
{{1,83,3,0}},
{{1,91,3,0}},
{{1,99,1,0}},
{{1,134,2,1}},
{{1,177,2,2}}
};


static __RRC__reset_input () {
__RRC_V0 = _false;
__RRC_V11 = _false;
__RRC_V12 = _false;
__RRC_V13 = _false;
__RRC_V14 = _false;
__RRC_V15 = _false;
__RRC_V17 = _false;
}

static __RRC__reset_exec () {
__ResetExecStatus(RRC_exec_status_SETPOINT_CHANGED);
__ResetExecStatus(RRC_exec_status_P_VAL);
__ResetExecStatus(RRC_exec_status_T_VAL);
}


/* MODULE DATA FOR SIMULATION */

int RRC();
int RRC_reset();

static struct __ModuleEntry __RRC_ModuleData = {
"Simulation interface release 5","RRC",
3,3,19,2,5,0,14,0,0,0,0,37,3,9,0,0,0,
__RRC_HaltList,
__RRC_AwaitedList,
__RRC_EmittedList,
__RRC_StartedList,
__RRC_KilledList,
__RRC_SuspendedList,
__RRC_ActiveList,
0,0,
RRC_initialize,RRC,RRC_reset,
__RRC_show_variable,__RRC_set_variable,__RRC_check_value,0,
__RRC_InstanceTable,
__RRC_TaskTable,
__RRC_SignalTable,__RRC_InputTable,__RRC_ReturnTable,
0,0,
__RRC_VariableTable,
__RRC_ExecTable,
__RRC_HaltTable,
0};

/* REDEFINABLE BIT TYPE */

#ifndef __SSC_BIT_TYPE_DEFINED
typedef char __SSC_BIT_TYPE;
#endif

/* REGISTER VARIABLES */

static __SSC_BIT_TYPE __RRC_R[9] = {_true,_false,_false,_false,_false,_false,_false,_false,_false};

/* AUTOMATON ENGINE */

int RRC () {
/* AUXILIARY VARIABLES */

static __SSC_BIT_TYPE E[33];

__RRC__reset_exec();
__RRC_ModuleData.awaited_list = __RRC_AwaitedList;
__ResetModuleEntryBeforeReaction();
if ((__CheckVariables(__RRC_CheckArray[1]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
__RRC_A1())) {
__CheckVariables(__RRC_CheckArray[8]);__RRC_A8();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A8\n");
#endif
}
E[0] = (((__RRC_R[7]||__RRC_R[8])||__RRC_R[4])||__RRC_R[5]);
E[1] = (__RRC_R[1]||__RRC_R[2]);
E[2] = (__RRC_R[3]||E[1]);
E[3] = (E[2]&&(__CheckVariables(__RRC_CheckArray[1]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
__RRC_A1()));
E[4] = (E[3]&&!((__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6())));
E[5] = (E[2]&&!((__CheckVariables(__RRC_CheckArray[1]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
__RRC_A1())));
E[6] = (__RRC_R[1]&&E[5]);
E[7] = (E[6]&&!((__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6())));
E[7] = (E[4]||((__RRC_R[1]&&E[7])));
E[4] = ((__CheckVariables(__RRC_CheckArray[2]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 2\n"),
#endif
__RRC_A2())||E[7]);
if (E[4]) {
__AppendToList(__RRC_EmittedList,13);
}
E[8] = (E[0]&&!(E[4]));
E[9] = (__RRC_R[7]&&E[8]);
E[10] = (E[9]&&(__CheckVariables(__RRC_CheckArray[3]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 3\n"),
#endif
__RRC_A3()));
if (E[10]) {
__CheckVariables(__RRC_CheckArray[62]);__RRC_A62();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A62\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[64]);__RRC_A64();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A64\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[65]);__RRC_A65();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A65\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[66]);__RRC_A66();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A66\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[67]);__RRC_A67();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A67\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[68]);__RRC_A68();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A68\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[69]);__RRC_A69();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A69\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[70]);__RRC_A70();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A70\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[71]);__RRC_A71();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A71\n");
#endif
}
if (__RRC_R[0]) {
__CheckVariables(__RRC_CheckArray[22]);__RRC_A22();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A22\n");
#endif
}
E[11] = (__RRC_R[0]&&(__CheckVariables(__RRC_CheckArray[44]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 44\n"),
#endif
__RRC_A44()));
if (E[11]) {
__CheckVariables(__RRC_CheckArray[23]);__RRC_A23();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A23\n");
#endif
}
if (E[11]) {
__CheckVariables(__RRC_CheckArray[24]);__RRC_A24();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A24\n");
#endif
}
if (E[11]) {
__CheckVariables(__RRC_CheckArray[25]);__RRC_A25();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A25\n");
#endif
}
E[12] = (__RRC_R[2]&&E[5]);
E[13] = (E[12]&&(__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6()));
if (E[13]) {
__CheckVariables(__RRC_CheckArray[61]);__RRC_A61();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A61\n");
#endif
}
if (E[13]) {
__CheckVariables(__RRC_CheckArray[28]);__RRC_A28();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A28\n");
#endif
}
if (E[10]) {
__CheckVariables(__RRC_CheckArray[42]);__RRC_A42();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A42\n");
#endif
}
E[14] = (E[10]&&(__CheckVariables(__RRC_CheckArray[45]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 45\n"),
#endif
__RRC_A45()));
if (E[14]) {
__AppendToList(__RRC_EmittedList,3);
}
if (E[14]) {
__CheckVariables(__RRC_CheckArray[32]);__RRC_A32();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A32\n");
#endif
}
E[15] = (E[14]||((E[10]&&!(E[14]))));
if (E[15]) {
__AppendToList(__RRC_EmittedList,1);
__AppendToList(__RRC_EmittedList,9);
__AppendToList(__RRC_EmittedList,11);
}
if (E[15]) {
__CheckVariables(__RRC_CheckArray[33]);__RRC_A33();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A33\n");
#endif
}
if (E[15]) {
__CheckVariables(__RRC_CheckArray[9]);__RRC_A9();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A9\n");
#endif
}
E[16] = (__RRC_R[8]&&E[8]);
E[17] = (E[16]&&(__CheckVariables(__RRC_CheckArray[4]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 4\n"),
#endif
__RRC_A4()));
if (E[17]) {
__CheckVariables(__RRC_CheckArray[63]);__RRC_A63();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A63\n");
#endif
}
if (E[11]) {
__CheckVariables(__RRC_CheckArray[26]);__RRC_A26();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A26\n");
#endif
}
if (E[13]) {
__CheckVariables(__RRC_CheckArray[29]);__RRC_A29();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A29\n");
#endif
}
if (E[17]) {
__CheckVariables(__RRC_CheckArray[43]);__RRC_A43();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A43\n");
#endif
}
E[18] = (E[17]&&(__CheckVariables(__RRC_CheckArray[46]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 46\n"),
#endif
__RRC_A46()));
if (E[18]) {
__AppendToList(__RRC_EmittedList,4);
}
if (E[18]) {
__CheckVariables(__RRC_CheckArray[36]);__RRC_A36();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A36\n");
#endif
}
E[19] = (E[18]||((E[17]&&!(E[18]))));
if (E[19]) {
__AppendToList(__RRC_EmittedList,2);
__AppendToList(__RRC_EmittedList,10);
__AppendToList(__RRC_EmittedList,12);
}
if (E[19]) {
__CheckVariables(__RRC_CheckArray[37]);__RRC_A37();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A37\n");
#endif
}
if (E[19]) {
__CheckVariables(__RRC_CheckArray[10]);__RRC_A10();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A10\n");
#endif
}
if (E[14]) {
__CheckVariables(__RRC_CheckArray[11]);__RRC_A11();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A11\n");
#endif
}
if (E[18]) {
__CheckVariables(__RRC_CheckArray[12]);__RRC_A12();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A12\n");
#endif
}
E[20] = (__RRC_R[5]&&E[8]);
E[21] = (E[20]&&(__CheckVariables(__RRC_CheckArray[48]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 48\n"),
#endif
__RRC_A48()));
if (E[21]) {
__CheckVariables(__RRC_CheckArray[31]);__RRC_A31();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A31\n");
#endif
}
E[22] = (E[14]||E[18]);
E[23] = (E[21]&&E[22]);
if (E[23]) {
__AppendToList(__RRC_EmittedList,5);
}
if (E[23]) {
__CheckVariables(__RRC_CheckArray[13]);__RRC_A13();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A13\n");
#endif
}
E[8] = (__RRC_R[4]&&E[8]);
E[24] = (E[8]&&(__CheckVariables(__RRC_CheckArray[47]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 47\n"),
#endif
__RRC_A47()));
if (E[24]) {
__CheckVariables(__RRC_CheckArray[30]);__RRC_A30();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A30\n");
#endif
}
E[25] = (E[14]&&!(E[18]));
E[26] = (E[24]&&E[25]);
if (E[26]) {
__AppendToList(__RRC_EmittedList,6);
}
if (E[15]) {
__CheckVariables(__RRC_CheckArray[34]);__RRC_A34();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A34\n");
#endif
}
if (E[19]) {
__CheckVariables(__RRC_CheckArray[38]);__RRC_A38();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A38\n");
#endif
}
if (E[26]) {
__CheckVariables(__RRC_CheckArray[40]);__RRC_A40();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A40\n");
#endif
}
if (E[26]) {
__CheckVariables(__RRC_CheckArray[14]);__RRC_A14();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A14\n");
#endif
}
if ((E[11]||E[13])) {
__AppendToList(__RRC_EmittedList,7);
}
if (((E[11]||E[13]))) {
__CheckVariables(__RRC_CheckArray[15]);__RRC_A15();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A15\n");
#endif
}
if ((E[11]||E[13])) {
__AppendToList(__RRC_EmittedList,8);
}
if (((E[11]||E[13]))) {
__CheckVariables(__RRC_CheckArray[16]);__RRC_A16();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A16\n");
#endif
}
if (E[15]) {
__CheckVariables(__RRC_CheckArray[17]);__RRC_A17();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A17\n");
#endif
}
if (E[19]) {
__CheckVariables(__RRC_CheckArray[18]);__RRC_A18();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A18\n");
#endif
}
if (E[15]) {
__CheckVariables(__RRC_CheckArray[35]);__RRC_A35();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A35\n");
#endif
}
if (E[15]) {
__CheckVariables(__RRC_CheckArray[19]);__RRC_A19();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A19\n");
#endif
}
if (E[19]) {
__CheckVariables(__RRC_CheckArray[39]);__RRC_A39();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A39\n");
#endif
}
if (E[19]) {
__CheckVariables(__RRC_CheckArray[20]);__RRC_A20();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A20\n");
#endif
}
if (E[4]) {
__CheckVariables(__RRC_CheckArray[21]);__RRC_A21();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A21\n");
#endif
}
E[27] = !(_true);
if (E[11]) {
__CheckVariables(__RRC_CheckArray[27]);__RRC_A27();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A27\n");
#endif
}
E[28] = (E[3]&&(__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6()));
E[6] = (E[6]&&(__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6()));
E[29] = ((((E[1]&&!(__RRC_R[1])))||E[28])||E[6]);
E[1] = (((E[1]&&!(__RRC_R[2])))||E[13]);
__RRC_R[3] = (((E[11]||((E[5]&&__RRC_R[3])))||((((((E[28]||E[6])||E[13]))&&E[29])&&E[1])))||((__RRC_R[0]&&!(E[11]))));
E[12] = (E[12]&&!((__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6())));
E[12] = (E[12]&&__RRC_R[2]);
E[3] = (E[3]||E[12]);
E[1] = ((((E[7]||E[3]))&&((E[29]||E[7])))&&((E[1]||E[3])));
E[29] = (((__RRC_R[0]&&E[4]))||((((__RRC_R[6]&&E[4]))&&__RRC_R[6])));
E[6] = (((__RRC_R[6]&&!(E[4])))||((__RRC_R[0]&&!(E[4]))));
E[28] = (E[6]||E[15]);
if (E[28]) {
__CheckVariables(__RRC_CheckArray[72]);__RRC_A72();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A72\n");
#endif
}
if (E[28]) {
__CheckVariables(__RRC_CheckArray[73]);__RRC_A73();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A73\n");
#endif
}
if (E[28]) {
__CheckVariables(__RRC_CheckArray[74]);__RRC_A74();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A74\n");
#endif
}
if (E[28]) {
__CheckVariables(__RRC_CheckArray[75]);__RRC_A75();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A75\n");
#endif
}
E[5] = (E[0]&&E[4]);
E[9] = (E[9]&&!((__CheckVariables(__RRC_CheckArray[3]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 3\n"),
#endif
__RRC_A3())));
E[9] = (((E[5]||E[9]))&&__RRC_R[7]);
E[30] = (E[28]||E[9]);
E[31] = (E[6]||E[19]);
if (E[31]) {
__CheckVariables(__RRC_CheckArray[76]);__RRC_A76();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A76\n");
#endif
}
if (E[31]) {
__CheckVariables(__RRC_CheckArray[77]);__RRC_A77();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A77\n");
#endif
}
if (E[31]) {
__CheckVariables(__RRC_CheckArray[78]);__RRC_A78();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A78\n");
#endif
}
if (E[31]) {
__CheckVariables(__RRC_CheckArray[79]);__RRC_A79();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A79\n");
#endif
}
E[16] = (E[16]&&!((__CheckVariables(__RRC_CheckArray[4]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 4\n"),
#endif
__RRC_A4())));
E[16] = (((E[5]||E[16]))&&__RRC_R[8]);
E[32] = (E[31]||E[16]);
if (E[6]) {
__CheckVariables(__RRC_CheckArray[30]);__RRC_A30();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A30\n");
#endif
}
E[25] = (((E[6]||((((E[5]||((E[8]&&!(E[24])))))&&__RRC_R[4])))||E[26])||((E[24]&&!(E[25]))));
if (E[6]) {
__CheckVariables(__RRC_CheckArray[31]);__RRC_A31();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A31\n");
#endif
}
if (E[23]) {
__CheckVariables(__RRC_CheckArray[41]);__RRC_A41();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A41\n");
#endif
}
E[22] = (((E[6]||((((E[5]||((E[20]&&!(E[21])))))&&__RRC_R[5])))||E[23])||((E[21]&&!(E[22]))));
E[20] = ((((((((E[30]||E[32])||E[25])||E[22]))&&((((E[0]&&!(__RRC_R[7])))||E[30])))&&((((E[0]&&!(__RRC_R[8])))||E[32])))&&((((E[0]&&!(__RRC_R[4])))||E[25])))&&((((E[0]&&!(__RRC_R[5])))||E[22])));
E[0] = (__RRC_R[6]||E[0]);
E[8] = (E[2]||E[0]);
E[20] = (((((((__RRC_R[3]||E[1])||E[29])||E[20]))&&(((((E[8]&&!(E[2])))||__RRC_R[3])||E[1])))&&(((((E[8]&&!(E[0])))||E[29])||E[20]))));
if (((E[3]&&!(E[12])))) {
__CheckVariables(__RRC_CheckArray[49]);__RRC_A49();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A49\n");
#endif
}
E[0] = (((__RRC_R[2]&&!(E[12])))&&!((__CheckVariables(__RRC_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__RRC_A6())));
if (E[0]) {
__CheckVariables(__RRC_CheckArray[52]);__RRC_A52();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A52\n");
#endif
}
if (!(_true)) {
__CheckVariables(__RRC_CheckArray[55]);__RRC_A55();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A55\n");
#endif
}
if (E[12]) {
__CheckVariables(__RRC_CheckArray[58]);__RRC_A58();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A58\n");
#endif
}
if (((E[30]&&!(E[9])))) {
__CheckVariables(__RRC_CheckArray[50]);__RRC_A50();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A50\n");
#endif
}
E[8] = (((__RRC_R[7]&&!(E[9])))&&!((__CheckVariables(__RRC_CheckArray[3]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 3\n"),
#endif
__RRC_A3())));
if (E[8]) {
__CheckVariables(__RRC_CheckArray[53]);__RRC_A53();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A53\n");
#endif
}
if (((E[9]&&E[5]))) {
__CheckVariables(__RRC_CheckArray[56]);__RRC_A56();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A56\n");
#endif
}
if (((E[9]&&!(E[5])))) {
__CheckVariables(__RRC_CheckArray[59]);__RRC_A59();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A59\n");
#endif
}
if (((E[32]&&!(E[16])))) {
__CheckVariables(__RRC_CheckArray[51]);__RRC_A51();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A51\n");
#endif
}
E[1] = (((__RRC_R[8]&&!(E[16])))&&!((__CheckVariables(__RRC_CheckArray[4]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 4\n"),
#endif
__RRC_A4())));
if (E[1]) {
__CheckVariables(__RRC_CheckArray[54]);__RRC_A54();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A54\n");
#endif
}
if (((E[16]&&E[5]))) {
__CheckVariables(__RRC_CheckArray[57]);__RRC_A57();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A57\n");
#endif
}
if (((E[16]&&!(E[5])))) {
__CheckVariables(__RRC_CheckArray[60]);__RRC_A60();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A60\n");
#endif
}
__RRC_R[0] = !(_true);
__RRC_R[1] = E[7];
if (__RRC_R[1]) { __AppendToList(__RRC_HaltList,1); }
__RRC_R[2] = E[3];
if (__RRC_R[2]) { __AppendToList(__RRC_HaltList,2); }
if (__RRC_R[3]) { __AppendToList(__RRC_HaltList,3); }
__RRC_R[4] = E[25];
if (__RRC_R[4]) { __AppendToList(__RRC_HaltList,4); }
__RRC_R[5] = E[22];
if (__RRC_R[5]) { __AppendToList(__RRC_HaltList,5); }
__RRC_R[6] = E[29];
if (__RRC_R[6]) { __AppendToList(__RRC_HaltList,6); }
__RRC_R[7] = E[30];
if (__RRC_R[7]) { __AppendToList(__RRC_HaltList,7); }
__RRC_R[8] = E[32];
if (__RRC_R[8]) { __AppendToList(__RRC_HaltList,8); }
if (!E[20]) { __AppendToList(__RRC_HaltList,0); }
__ResetModuleEntryAfterReaction();
__RRC_ModuleData.awaited_list = __RRC_AllAwaitedList;
__RRC__reset_input();
return E[20];
}

/* AUTOMATON RESET */

int RRC_reset () {
__RRC_ModuleData.awaited_list = __RRC_AwaitedList;
__ResetModuleEntry();
__RRC_ModuleData.awaited_list = __RRC_AllAwaitedList;
__RRC_ModuleData.state = 0;
__RRC_R[0] = _true;
__RRC_R[1] = _false;
__RRC_R[2] = _false;
__RRC_R[3] = _false;
__RRC_R[4] = _false;
__RRC_R[5] = _false;
__RRC_R[6] = _false;
__RRC_R[7] = _false;
__RRC_R[8] = _false;
__RRC__reset_input();
return 0;
}
char* CompilationType = "Compiled Sorted Equations";

int __NumberOfModules = 1;
struct __ModuleEntry* __ModuleTable[] = {
&__RRC_ModuleData
};
