/* sscc : C CODE OF SORTED EQUATIONS complex - 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 __complex_GENERIC_TEST(TEST) return TEST;
typedef (*__complex_APF)();
extern __complex_APF *__complex_PActionArray;
extern int **__complex_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;
};
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)();
int (*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)();
int (*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 "cruise.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 _increase_speed_DEFINED
#ifndef increase_speed
extern void increase_speed();
#endif
#endif
#ifndef _compute_throttle_DEFINED
#ifndef compute_throttle
extern void compute_throttle();
#endif
#endif
#endif
#endif

/* INITIALIZED CONSTANTS */

/* MEMORY ALLOCATION */

static boolean __complex_V0;
static boolean __complex_V1;
static boolean __complex_V2;
static boolean __complex_V3;
static boolean __complex_V4;
static boolean __complex_V5;
static boolean __complex_V6;
static boolean __complex_V7;
static double __complex_V8;
static integer __complex_V9;
static boolean __complex_V10;
static double __complex_V11;
static integer __complex_V12;
static integer __complex_V13;
static double __complex_V14;

static unsigned short __complex_HaltList[7];
static unsigned short __complex_AwaitedList[15];
static unsigned short __complex_EmittedList[15];
static unsigned short __complex_StartedList[1];
static unsigned short __complex_KilledList[1];
static unsigned short __complex_SuspendedList[1];
static unsigned short __complex_ActiveList[1];
static unsigned short __complex_AllAwaitedList[15]={9,0,1,2,3,4,5,6,7,12};


/* INPUT FUNCTIONS */

complex_I_cruise () {
__complex_V0 = _true;
}
complex_IS_cruise () {
__complex_V0 = _true;
}
complex_I_accel () {
__complex_V1 = _true;
}
complex_IS_accel () {
__complex_V1 = _true;
}
complex_I_brake_pressed () {
__complex_V2 = _true;
}
complex_IS_brake_pressed () {
__complex_V2 = _true;
}
complex_I_engine_off () {
__complex_V3 = _true;
}
complex_IS_engine_off () {
__complex_V3 = _true;
}
complex_I_accel_released () {
__complex_V4 = _true;
}
complex_IS_accel_released () {
__complex_V4 = _true;
}
complex_I_ignition_on () {
__complex_V5 = _true;
}
complex_IS_ignition_on () {
__complex_V5 = _true;
}
complex_I_belt_fastened () {
__complex_V6 = _true;
}
complex_IS_belt_fastened () {
__complex_V6 = _true;
}
complex_I_belt_unfastened () {
__complex_V7 = _true;
}
complex_IS_belt_unfastened () {
__complex_V7 = _true;
}
complex_I_current_speed (__V) integer __V; {
__WriteVariable(9);
__complex_V9 = __V;
__complex_V10 = _true;
}
complex_IS_current_speed (__V) string __V; {
__WriteVariable(9);
_text_to_integer(&__complex_V9,__V);
__complex_V10 = _true;
}

/* FUNCTIONS RETURNING NUMBER OF EXEC */

int complex_number_of_execs () {
return (0);
}


/* AUTOMATON (STATE ACTION-TREES) */

/* ACTIONS */

/* PREDEFINED ACTIONS */

/* PRESENT SIGNAL TESTS */

static int __complex_A1 () {
__complex_GENERIC_TEST(__complex_V0);
}
static int __complex_Check1 [] = {1,0,0};
static int __complex_A2 () {
__complex_GENERIC_TEST(__complex_V1);
}
static int __complex_Check2 [] = {1,0,0};
static int __complex_A3 () {
__complex_GENERIC_TEST(__complex_V2);
}
static int __complex_Check3 [] = {1,0,0};
static int __complex_A4 () {
__complex_GENERIC_TEST(__complex_V3);
}
static int __complex_Check4 [] = {1,0,0};
static int __complex_A5 () {
__complex_GENERIC_TEST(__complex_V4);
}
static int __complex_Check5 [] = {1,0,0};
static int __complex_A6 () {
__complex_GENERIC_TEST(__complex_V5);
}
static int __complex_Check6 [] = {1,0,0};
static int __complex_A7 () {
__complex_GENERIC_TEST(__complex_V6);
}
static int __complex_Check7 [] = {1,0,0};
static int __complex_A8 () {
__complex_GENERIC_TEST(__complex_V7);
}
static int __complex_Check8 [] = {1,0,0};
static int __complex_A9 () {
__complex_GENERIC_TEST(__complex_V10);
}
static int __complex_Check9 [] = {1,0,0};

/* OUTPUT ACTIONS */

static int __complex_A10 () {
#ifdef __OUTPUT
complex_O_chk_belts();
#endif
__AppendToList(__complex_EmittedList,8);
return 0;
}
static int __complex_Check10 [] = {1,0,0};
static int __complex_A11 () {
#ifdef __OUTPUT
complex_O_start_engine();
#endif
__AppendToList(__complex_EmittedList,9);
return 0;
}
static int __complex_Check11 [] = {1,0,0};
static int __complex_A12 () {
#ifdef __OUTPUT
complex_O_control_throttle(__complex_V8);
#endif
__AppendToList(__complex_EmittedList,10);
return 0;
}
static int __complex_Check12 [] = {1,0,0};
static int __complex_A13 () {
#ifdef __OUTPUT
complex_O_alarm();
#endif
__AppendToList(__complex_EmittedList,11);
return 0;
}
static int __complex_Check13 [] = {1,0,0};
static int __complex_A14 () {
#ifdef __OUTPUT
complex_O_cruising();
#endif
__AppendToList(__complex_EmittedList,13);
return 0;
}
static int __complex_Check14 [] = {1,0,0};

/* ASSIGNMENTS */

static int __complex_A15 () {
__complex_V11 = 5.0;
return 0;
}
static int __complex_Check15 [] = {1,0,1,11};
static int __complex_A16 () {
__complex_V12 = 0;
return 0;
}
static int __complex_Check16 [] = {1,0,1,12};
static int __complex_A17 () {
__complex_V8 = (__complex_V11+2.0);
return 0;
}
static int __complex_Check17 [] = {1,1,11,1,8};
static int __complex_A18 () {
__complex_V13 = __complex_V9;
return 0;
}
static int __complex_Check18 [] = {1,1,9,1,13};
static int __complex_A19 () {
__complex_V13 = __complex_V9;
return 0;
}
static int __complex_Check19 [] = {1,1,9,1,13};
static int __complex_A20 () {
__complex_V8 = __complex_V14;
return 0;
}
static int __complex_Check20 [] = {1,1,14,1,8};

/* PROCEDURE CALLS */

static int __complex_A21 () {
compute_throttle(&__complex_V14,__complex_V9,__complex_V13);
return 0;
}
static int __complex_Check21 [] = {1,2,9,13,1,14};

/* CONDITIONS */

/* DECREMENTS */

/* START ACTIONS */

/* KILL ACTIONS */

/* SUSPEND ACTIONS */

/* ACTIVATE ACTIONS */

/* WRITE ARGS ACTIONS */

/* RESET ACTIONS */

static int __complex_A22 () {
;
__ResetVariable(14);
return 0;
}
static int __complex_Check22 [] = {1,0,0};

/* ACTION SEQUENCES */


static int *__complex_CheckArray[] = {
0,__complex_Check1,__complex_Check2,__complex_Check3,__complex_Check4,__complex_Check5,__complex_Check6,__complex_Check7,__complex_Check8,__complex_Check9,__complex_Check10,__complex_Check11,__complex_Check12,__complex_Check13,__complex_Check14,__complex_Check15,__complex_Check16,__complex_Check17,__complex_Check18,__complex_Check19,__complex_Check20,__complex_Check21,__complex_Check22
};
static int **__complex_PCheckArray =  __complex_CheckArray;

/* INIT FUNCTION */

#ifndef NO_INIT
complex_initialize () {
}
#endif

/* SHOW VARIABLE FUNCTION */

char* __complex_show_variable (__V) int __V; {
extern struct __VariableEntry __complex_VariableTable[];
struct __VariableEntry* p_var = &__complex_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 __complex_set_variable(__Type, __pVar, __Text)
int __Type; char* __pVar; char* __Text; {
}

/* CHECK VALUE FUNCTION */

static int __complex_check_value (__Type,__Text) 
int __Type; char* __Text; {
}

/* SIMULATION TABLES */

struct __InstanceEntry __complex_InstanceTable [] = {
{"complex",0,"","cruise.strl",{1,11,1,0},{1,52,1,0},{0,0,0,0}},
{"manual_mode",0,"","cruise.strl",{1,54,1,1},{1,69,1,1},{1,38,15,0}},
{"cruise_mode",0,"","cruise.strl",{1,73,1,2},{1,91,1,2},{1,41,15,0}},
};

struct __SignalEntry __complex_SignalTable [] = {
{"cruise",33,0,0,{1,13,7,0}},
{"accel",33,0,0,{1,14,7,0}},
{"brake_pressed",33,0,0,{1,14,13,0}},
{"engine_off",33,0,0,{1,15,7,0}},
{"accel_released",33,0,0,{1,16,7,0}},
{"ignition_on",33,0,0,{1,17,7,0}},
{"belt_fastened",33,0,0,{1,17,19,0}},
{"belt_unfastened",33,0,0,{1,17,33,0}},
{"chk_belts",34,0,0,{1,19,8,0}},
{"start_engine",34,0,0,{1,19,18,0}},
{"control_throttle",2,8,0,{1,20,8,0}},
{"alarm",34,0,0,{1,21,8,0}},
{"current_speed",1,9,0,{1,23,7,0}},
{"cruising",34,0,0,{1,24,8,0}}};

struct __InputEntry __complex_InputTable [] = {
{"cruise",45,0,0,-1,0,0,0,complex_IS_cruise,0,{1,13,7,0}},
{"accel",100,0,0,-1,0,1,0,complex_IS_accel,0,{1,14,7,0}},
{"brake_pressed",57,0,0,-1,0,2,0,complex_IS_brake_pressed,0,{1,14,13,0}},
{"engine_off",30,0,0,-1,0,3,0,complex_IS_engine_off,0,{1,15,7,0}},
{"accel_released",22,0,0,-1,0,4,0,complex_IS_accel_released,0,{1,16,7,0}},
{"ignition_on",70,0,0,-1,0,5,0,complex_IS_ignition_on,0,{1,17,7,0}},
{"belt_fastened",47,0,0,-1,0,6,0,complex_IS_belt_fastened,0,{1,17,19,0}},
{"belt_unfastened",72,0,0,-1,0,7,0,complex_IS_belt_unfastened,0,{1,17,33,0}},
{"current_speed",82,"integer",0,-3,0,12,_check_integer,complex_IS_current_speed,0,{1,23,7,0}}};

struct __VariableEntry __complex_VariableTable [] = {
{"__complex_V0","V0","boolean",-2,2,0,(char*)&__complex_V0,"cruise",0,0,0,{1,13,7,0}},
{"__complex_V1","V1","boolean",-2,2,0,(char*)&__complex_V1,"accel",0,0,0,{1,14,7,0}},
{"__complex_V2","V2","boolean",-2,2,0,(char*)&__complex_V2,"brake_pressed",0,0,0,{1,14,13,0}},
{"__complex_V3","V3","boolean",-2,2,0,(char*)&__complex_V3,"engine_off",0,0,0,{1,15,7,0}},
{"__complex_V4","V4","boolean",-2,2,0,(char*)&__complex_V4,"accel_released",0,0,0,{1,16,7,0}},
{"__complex_V5","V5","boolean",-2,2,0,(char*)&__complex_V5,"ignition_on",0,0,0,{1,17,7,0}},
{"__complex_V6","V6","boolean",-2,2,0,(char*)&__complex_V6,"belt_fastened",0,0,0,{1,17,19,0}},
{"__complex_V7","V7","boolean",-2,2,0,(char*)&__complex_V7,"belt_unfastened",0,0,0,{1,17,33,0}},
{"__complex_V8","V8","double",-6,1,0,(char*)&__complex_V8,"control_throttle",0,0,0,{1,20,8,0}},
{"__complex_V9","V9","integer",-3,1,0,(char*)&__complex_V9,"current_speed",0,0,0,{1,23,7,0}},
{"__complex_V10","V10","boolean",-2,2,0,(char*)&__complex_V10,"current_speed",0,0,0,{1,23,7,0}},
{"__complex_V11","V11","double",-6,0,0,(char*)&__complex_V11,"th_value",0,0,0,{1,59,13,1}},
{"__complex_V12","V12","integer",-3,0,0,(char*)&__complex_V12,"val",0,0,0,{1,59,34,1}},
{"__complex_V13","V13","integer",-3,0,0,(char*)&__complex_V13,"cruise_speed",0,0,0,{1,79,5,2}},
{"__complex_V14","V14","double",-6,0,0,(char*)&__complex_V14,"th_value",0,0,0,{1,79,43,2}}
};

struct __HaltEntry __complex_HaltTable [] = {
{{1,52,1,0}},
{{1,31,3,0}},
{{1,33,3,0}},
{{1,45,9,0}},
{{1,62,17,1}},
{{1,83,3,2}}
};


static __complex__reset_input () {
__complex_V0 = _false;
__complex_V1 = _false;
__complex_V2 = _false;
__complex_V3 = _false;
__complex_V4 = _false;
__complex_V5 = _false;
__complex_V6 = _false;
__complex_V7 = _false;
__complex_V10 = _false;
}


/* MODULE DATA FOR SIMULATION */

int complex();
int complex_reset();

static struct __ModuleEntry __complex_ModuleData = {
"Simulation interface release 4","complex",
3,0,14,9,0,0,5,0,0,0,0,15,0,6,0,0,0,
__complex_HaltList,
__complex_AwaitedList,
__complex_EmittedList,
__complex_StartedList,
__complex_KilledList,
__complex_SuspendedList,
__complex_ActiveList,
0,0,
complex_initialize,complex,complex_reset,
__complex_show_variable,__complex_set_variable,__complex_check_value,0,
__complex_InstanceTable,
0,
__complex_SignalTable,__complex_InputTable,0,
0,0,
__complex_VariableTable,
0,
__complex_HaltTable,
0};

/* REDEFINABLE BIT TYPE */

#ifndef __SSC_BIT_TYPE_DEFINED
typedef char __SSC_BIT_TYPE;
#endif

/* REGISTER VARIABLES */

static __SSC_BIT_TYPE __complex_R[6] = {_true,_false,_false,_false,_false,_false};

/* AUTOMATON ENGINE */

int complex () {
/* AUXILIARY VARIABLES */

static __SSC_BIT_TYPE E[15];

__complex_ModuleData.awaited_list = __complex_AwaitedList;
__ResetModuleEntryBeforeReaction();
E[0] = (__complex_R[1]&&(__CheckVariables(__complex_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__complex_A6()));
if (E[0]) {
__AppendToList(__complex_EmittedList,8);
}
if (E[0]) {
__CheckVariables(__complex_CheckArray[10]);__complex_A10();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A10\n");
#endif
}
E[1] = (__complex_R[2]&&(__CheckVariables(__complex_CheckArray[7]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 7\n"),
#endif
__complex_A7()));
if (E[1]) {
__AppendToList(__complex_EmittedList,9);
}
if (E[1]) {
__CheckVariables(__complex_CheckArray[11]);__complex_A11();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A11\n");
#endif
}
E[2] = (__complex_R[4]||__complex_R[5]);
E[3] = (E[2]||__complex_R[3]);
E[4] = (E[3]&&!((__CheckVariables(__complex_CheckArray[4]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 4\n"),
#endif
__complex_A4())));
E[5] = (__complex_R[5]&&E[4]);
E[6] = (__complex_R[5]&&((E[5]&&!((__CheckVariables(__complex_CheckArray[3]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 3\n"),
#endif
__complex_A3())))));
if (E[6]) {
__AppendToList(__complex_EmittedList,13);
}
if (E[6]) {
__CheckVariables(__complex_CheckArray[21]);__complex_A21();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A21\n");
#endif
}
if (E[6]) {
__CheckVariables(__complex_CheckArray[20]);__complex_A20();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A20\n");
#endif
}
E[7] = (__complex_R[4]&&E[4]);
E[8] = (__complex_R[4]&&((E[7]&&!((__CheckVariables(__complex_CheckArray[1]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
__complex_A1())))));
E[9] = (__complex_R[4]&&((E[8]&&!((__CheckVariables(__complex_CheckArray[5]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 5\n"),
#endif
__complex_A5())))));
E[10] = (E[9]&&(__CheckVariables(__complex_CheckArray[2]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 2\n"),
#endif
__complex_A2()));
if (E[10]) {
__CheckVariables(__complex_CheckArray[17]);__complex_A17();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A17\n");
#endif
}
if ((E[6]||E[10])) {
__AppendToList(__complex_EmittedList,10);
}
if (((E[6]||E[10]))) {
__CheckVariables(__complex_CheckArray[12]);__complex_A12();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A12\n");
#endif
}
E[4] = (__complex_R[3]&&E[4]);
E[11] = (E[4]&&(__CheckVariables(__complex_CheckArray[8]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 8\n"),
#endif
__complex_A8()));
if (E[11]) {
__AppendToList(__complex_EmittedList,11);
}
if (E[11]) {
__CheckVariables(__complex_CheckArray[13]);__complex_A13();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A13\n");
#endif
}
if (E[6]) {
__CheckVariables(__complex_CheckArray[14]);__complex_A14();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A14\n");
#endif
}
E[12] = !(_true);
E[13] = ((__complex_R[0]||((((__complex_R[1]&&!((__CheckVariables(__complex_CheckArray[6]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 6\n"),
#endif
__complex_A6()))))&&__complex_R[1])))||((E[3]&&(__CheckVariables(__complex_CheckArray[4]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 4\n"),
#endif
__complex_A4()))));
E[14] = (E[0]||((((__complex_R[2]&&!((__CheckVariables(__complex_CheckArray[7]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 7\n"),
#endif
__complex_A7()))))&&__complex_R[2])));
E[5] = (E[1]||((E[5]&&(__CheckVariables(__complex_CheckArray[3]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 3\n"),
#endif
__complex_A3()))));
if (E[5]) {
__CheckVariables(__complex_CheckArray[15]);__complex_A15();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A15\n");
#endif
}
if (E[5]) {
__CheckVariables(__complex_CheckArray[16]);__complex_A16();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A16\n");
#endif
}
__complex_R[4] = (((E[5]||((((E[9]&&!((__CheckVariables(__complex_CheckArray[2]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 2\n"),
#endif
__complex_A2()))))&&__complex_R[4])))||((E[8]&&(__CheckVariables(__complex_CheckArray[5]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 5\n"),
#endif
__complex_A5()))))||E[10]);
E[7] = (E[7]&&(__CheckVariables(__complex_CheckArray[1]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 1\n"),
#endif
__complex_A1()));
if (E[7]) {
__CheckVariables(__complex_CheckArray[18]);__complex_A18();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A18\n");
#endif
}
if (E[7]) {
__CheckVariables(__complex_CheckArray[22]);__complex_A22();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A22\n");
#endif
}
if (E[7]) {
__CheckVariables(__complex_CheckArray[19]);__complex_A19();
#ifdef TRACE_ACTION
fprintf(stderr, "__abc_A19\n");
#endif
}
__complex_R[5] = (E[7]||E[6]);
E[4] = ((E[1]||((((E[4]&&!((__CheckVariables(__complex_CheckArray[8]),
#ifdef TRACE_ACTION
fprintf(stderr, "test 8\n"),
#endif
__complex_A8()))))&&__complex_R[3])))||E[11]);
E[2] = ((E[13]||E[14])||((((((__complex_R[4]||__complex_R[5])||E[4]))&&(((((E[3]&&!(E[2])))||__complex_R[4])||__complex_R[5])))&&((((E[3]&&!(__complex_R[3])))||E[4])))));
E[3] = ((__complex_R[1]||__complex_R[2])||E[3]);
__complex_R[0] = !(_true);
__complex_R[1] = E[13];
if (__complex_R[1]) { __AppendToList(__complex_HaltList,1); }
__complex_R[2] = E[14];
if (__complex_R[2]) { __AppendToList(__complex_HaltList,2); }
__complex_R[3] = E[4];
if (__complex_R[3]) { __AppendToList(__complex_HaltList,3); }
if (__complex_R[4]) { __AppendToList(__complex_HaltList,4); }
if (__complex_R[5]) { __AppendToList(__complex_HaltList,5); }
if (!E[2]) { __AppendToList(__complex_HaltList,0); }
__ResetModuleEntryAfterReaction();
__complex_ModuleData.awaited_list = __complex_AllAwaitedList;
__complex__reset_input();
return E[2];
}

/* AUTOMATON RESET */

int complex_reset () {
__complex_ModuleData.awaited_list = __complex_AwaitedList;
__ResetModuleEntry();
__complex_ModuleData.awaited_list = __complex_AllAwaitedList;
__complex_ModuleData.state = 0;
__complex_R[0] = _true;
__complex_R[1] = _false;
__complex_R[2] = _false;
__complex_R[3] = _false;
__complex_R[4] = _false;
__complex_R[5] = _false;
__complex__reset_input();
return 0;
}
char* CompilationType = "Compiled Sorted Equations";

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