#ifdef OMC_BASE_FILE
#define OMC_FILE OMC_BASE_FILE
#else
#define OMC_FILE "InstSection.c"
#endif
#include "omc_simulation_settings.h"
#include "InstSection.h"
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT0,1,5) {&ErrorTypes_MessageType_TRANSLATION__desc,}};
#define _OMC_LIT0 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT0)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT1,1,4) {&ErrorTypes_Severity_ERROR__desc,}};
#define _OMC_LIT1 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT1)
#define _OMC_LIT2_data "Expression %s is not a valid statement - only function calls are allowed."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,73,_OMC_LIT2_data);
#define _OMC_LIT2 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT3,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT2}};
#define _OMC_LIT3 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT3)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT4,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(544)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT3}};
#define _OMC_LIT4 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT5,1,3) {&SCode_Parallelism_PARGLOBAL__desc,}};
#define _OMC_LIT5 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT5)
#define _OMC_LIT6_data "\n- Component '"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT6,14,_OMC_LIT6_data);
#define _OMC_LIT6 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT6)
#define _OMC_LIT7_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT7,1,_OMC_LIT7_data);
#define _OMC_LIT7 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT7)
#define _OMC_LIT8_data "' is used in a parallel for loop."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT8,33,_OMC_LIT8_data);
#define _OMC_LIT8 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT8)
#define _OMC_LIT9_data "\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT9,1,_OMC_LIT9_data);
#define _OMC_LIT9 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "- Parallel for loops can only contain references to parglobal variables."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,72,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
#define _OMC_LIT11_data "ParModelica: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT11,16,_OMC_LIT11_data);
#define _OMC_LIT11 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT11)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT12,2,4) {&Gettext_TranslatableContent_notrans__desc,_OMC_LIT11}};
#define _OMC_LIT12 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT12)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT13,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(7005)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT12}};
#define _OMC_LIT13 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT13)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT14,1,3) {&SCode_Variability_VAR__desc,}};
#define _OMC_LIT14 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT14)
#define _OMC_LIT15_data "Iterator %s, has type %s, but expected a 1D array expression."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT15,61,_OMC_LIT15_data);
#define _OMC_LIT15 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT15)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT16,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT15}};
#define _OMC_LIT16 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT16)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT17,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(524)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT16}};
#define _OMC_LIT17 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT17)
#define _OMC_LIT18_data "No constant value for variable %s in scope %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT18,46,_OMC_LIT18_data);
#define _OMC_LIT18 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT18)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT19,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT18}};
#define _OMC_LIT19 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT19)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT20,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(26)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT19}};
#define _OMC_LIT20 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT20)
#define _OMC_LIT21_data "The same variable is being defined twice: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT21,45,_OMC_LIT21_data);
#define _OMC_LIT21 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT21)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT21}};
#define _OMC_LIT22 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT23,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5037)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT22}};
#define _OMC_LIT23 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT23)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT24,1,11) {&DAE_Type_T__UNKNOWN__desc,}};
#define _OMC_LIT24 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,1,6) {&DAE_ConnectorType_NON__CONNECTOR__desc,}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT26,1,5) {&SCode_Parallelism_NON__PARALLEL__desc,}};
#define _OMC_LIT26 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT26)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT27,1,5) {&Absyn_Direction_BIDIR__desc,}};
#define _OMC_LIT27 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT27)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT28,1,6) {&Absyn_InnerOuter_NOT__INNER__OUTER__desc,}};
#define _OMC_LIT28 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT28)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT29,1,3) {&SCode_Visibility_PUBLIC__desc,}};
#define _OMC_LIT29 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT29)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT30,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT25,_OMC_LIT26,_OMC_LIT14,_OMC_LIT27,_OMC_LIT28,_OMC_LIT29}};
#define _OMC_LIT30 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT30)
#define _OMC_LIT31_data "Tuple assignment only allowed for tuple of component references in lhs (in %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT31,79,_OMC_LIT31_data);
#define _OMC_LIT31 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT31)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT32,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT31}};
#define _OMC_LIT32 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT32)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT33,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(147)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT32}};
#define _OMC_LIT33 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT33)
#define _OMC_LIT34_data "Type mismatch in assignment in %s := %s of %s := %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT34,51,_OMC_LIT34_data);
#define _OMC_LIT34 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT34)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT35,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT34}};
#define _OMC_LIT35 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT35)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT36,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(9)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT35}};
#define _OMC_LIT36 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT36)
#define _OMC_LIT37_data "Tuple assignment only allowed when rhs is function call (in %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT37,64,_OMC_LIT37_data);
#define _OMC_LIT37 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT37)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT38,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT37}};
#define _OMC_LIT38 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT38)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT39,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(47)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT38}};
#define _OMC_LIT39 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT39)
#define _OMC_LIT40_data "Failed to elaborate assignment for some unknown reason: %1 := %2. File a bug report and we will make sure this error gets a better message in the future."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT40,153,_OMC_LIT40_data);
#define _OMC_LIT40 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT40)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT41,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT40}};
#define _OMC_LIT41 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT41)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT42,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(244)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT41}};
#define _OMC_LIT42 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT42)
#define _OMC_LIT43_data "der"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT43,3,_OMC_LIT43_data);
#define _OMC_LIT43 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT43)
#define _OMC_LIT44_data "Failed to elaborate rhs of %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT44,30,_OMC_LIT44_data);
#define _OMC_LIT44 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT44)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT45,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT44}};
#define _OMC_LIT45 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT45)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT46,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(521)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT45}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "Nested when statements are not allowed."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,39,_OMC_LIT47_data);
#define _OMC_LIT47 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT47)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT48,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT47}};
#define _OMC_LIT48 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT48)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT49,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(126)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT48}};
#define _OMC_LIT49 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data "connect may not be used inside when-equations (found connect(%s, %s))."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,70,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT51,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT50}};
#define _OMC_LIT51 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(117)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT51}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
#define _OMC_LIT53_data "failtrace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT53,9,_OMC_LIT53_data);
#define _OMC_LIT53 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "Sets whether to print a failtrace or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,41,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT55,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT54}};
#define _OMC_LIT55 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT55)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT56,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT53,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT55}};
#define _OMC_LIT56 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT56)
#define _OMC_LIT57_data "- InstSection.checkForNestedWhenInEq failed.\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT57,45,_OMC_LIT57_data);
#define _OMC_LIT57 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT57)
#define _OMC_LIT58_data "Using reinit in when with condition initial() is not allowed. Use assignment or equality equation instead."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT58,106,_OMC_LIT58_data);
#define _OMC_LIT58 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT58)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT59,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT58}};
#define _OMC_LIT59 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT59)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT60,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(531)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT59}};
#define _OMC_LIT60 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT60)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT61,2,6) {&DAE_Exp_BCONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT61 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT61)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT62,2,1) {_OMC_LIT61,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT62 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,2,6) {&DAE_Exp_BCONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT64,2,1) {_OMC_LIT63,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT64 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT64)
#define _OMC_LIT65_data "checkModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT65,10,_OMC_LIT65_data);
#define _OMC_LIT65 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT65)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT66,1,3) {&Flags_FlagVisibility_INTERNAL__desc,}};
#define _OMC_LIT66 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
#define _OMC_LIT68_data "Set when checkModel is used to turn on specific features for checking."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT68,70,_OMC_LIT68_data);
#define _OMC_LIT68 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT68}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT70,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(31)),_OMC_LIT65,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT66,_OMC_LIT67,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT69}};
#define _OMC_LIT70 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT70)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT71,2,3) {&DAE_DAElist_DAE__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT71 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT71)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT72,2,6) {&DAE_Type_T__BOOL__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT72 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT72)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT73,2,32) {&DAE_Operator_EQUAL__desc,_OMC_LIT72}};
#define _OMC_LIT73 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "automatically generated from connect"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,36,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT75,2,5) {&DAE_Exp_SCONST__desc,_OMC_LIT74}};
#define _OMC_LIT75 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT75)
#define _OMC_LIT76_data "AssertionLevel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT76,14,_OMC_LIT76_data);
#define _OMC_LIT76 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT76)
#define _OMC_LIT77_data "error"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT77,5,_OMC_LIT77_data);
#define _OMC_LIT77 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT77)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT78,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT77}};
#define _OMC_LIT78 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT78)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT79,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT76,_OMC_LIT78}};
#define _OMC_LIT79 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT79)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT80,3,8) {&DAE_Exp_ENUM__LITERAL__desc,_OMC_LIT79,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT80 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT80)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT81,7,3) {&ConnectionGraph_ConnectionGraph_GRAPH__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT81 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT81)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT82,2,4) {&DAE_Type_T__REAL__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT82 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT82)
#define _OMC_LIT83_data " equation generated by overconstrained connection graph breaking"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT83,64,_OMC_LIT83_data);
#define _OMC_LIT83 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT83)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT84,1,3) {&DAE_TailCall_NO__TAIL__desc,}};
#define _OMC_LIT84 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT84)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT85,1,5) {&DAE_Mod_NOMOD__desc,}};
#define _OMC_LIT85 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT85)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT86,1,3) {&DAE_Prefix_NOPRE__desc,}};
#define _OMC_LIT86 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data " type:\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,7,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "The type of variables %s and %s\nare inconsistent in connect equations."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,70,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT88}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT90,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(52)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT89}};
#define _OMC_LIT90 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT90)
#define _OMC_LIT91_data "- InstSection.connectComponents failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT91,39,_OMC_LIT91_data);
#define _OMC_LIT91 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data "Illegal connecting two outer connectors in statement connect(%s, %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,69,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT93,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT92}};
#define _OMC_LIT93 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT93)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT94,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(119)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT93}};
#define _OMC_LIT94 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT94)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT95,1,5) {&ErrorTypes_Severity_WARNING__desc,}};
#define _OMC_LIT95 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "Connecting two signal sources while connecting %s to %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,56,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT97,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT96}};
#define _OMC_LIT97 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT97)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT98,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(226)),_OMC_LIT0,_OMC_LIT95,_OMC_LIT97}};
#define _OMC_LIT98 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT98)
#define _OMC_LIT99_data "Cannot connect %1 component %2 to non-%1 component %3."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT99,54,_OMC_LIT99_data);
#define _OMC_LIT99 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT99)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT100,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT99}};
#define _OMC_LIT100 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT100)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT101,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(51)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT100}};
#define _OMC_LIT101 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "Incompatible components in connect statement: connect(%s, %s)\n- %s has components %s\n- %s has components %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,107,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT103,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT102}};
#define _OMC_LIT103 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT103)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT104,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(118)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT103}};
#define _OMC_LIT104 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT104)
#define _OMC_LIT105_data "["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT105,1,_OMC_LIT105_data);
#define _OMC_LIT105 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT105)
#define _OMC_LIT106_data "]"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT106,1,_OMC_LIT106_data);
#define _OMC_LIT106 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT106)
#define _OMC_LIT107_data "Unmatched dimension in equation connect(%s, %s), %s != %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT107,58,_OMC_LIT107_data);
#define _OMC_LIT107 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT107)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT108,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT107}};
#define _OMC_LIT108 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT108)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT109,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(121)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT108}};
#define _OMC_LIT109 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT109)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT110,2,8) {&SCode_Restriction_R__CONNECTOR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT110 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT110)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT111,2,8) {&SCode_Restriction_R__CONNECTOR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT111 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT111)
#define _OMC_LIT112_data "%s is not a valid connector."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT112,28,_OMC_LIT112_data);
#define _OMC_LIT112 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT112}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT114,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(48)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT113}};
#define _OMC_LIT114 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT114)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT115,1,4) {&Absyn_Direction_OUTPUT__desc,}};
#define _OMC_LIT115 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT115)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT116,1,3) {&Absyn_Direction_INPUT__desc,}};
#define _OMC_LIT116 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,1,4) {&FCore_Status_VAR__TYPED__desc,}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
#define _OMC_LIT118_data "virtual variable in expandable connector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT118,40,_OMC_LIT118_data);
#define _OMC_LIT118 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT119,1,1) {_OMC_LIT118}};
#define _OMC_LIT119 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT119)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT120,3,3) {&SCode_Comment_COMMENT__desc,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT119}};
#define _OMC_LIT120 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT120)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT121,1,1) {_OMC_LIT120}};
#define _OMC_LIT121 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT121)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT122,1,4) {&SCode_Final_NOT__FINAL__desc,}};
#define _OMC_LIT122 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT122)
#define _OMC_LIT123_data "Error: The marked virtual expandable component reference in connect(["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT123,69,_OMC_LIT123_data);
#define _OMC_LIT123 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT123)
#define _OMC_LIT124_data "], "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT124,3,_OMC_LIT124_data);
#define _OMC_LIT124 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT124)
#define _OMC_LIT125_data "); should be qualified, i.e. expandableConnectorName.virtualName!\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT125,66,_OMC_LIT125_data);
#define _OMC_LIT125 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT125)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT126,1,3) {&DAE_Binding_UNBOUND__desc,}};
#define _OMC_LIT126 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT126)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT127,1,4) {&SCode_Redeclare_NOT__REDECLARE__desc,}};
#define _OMC_LIT127 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT127)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT128,1,4) {&SCode_Replaceable_NOT__REPLACEABLE__desc,}};
#define _OMC_LIT128 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT128)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT129,6,3) {&SCode_Prefixes_PREFIXES__desc,_OMC_LIT29,_OMC_LIT127,_OMC_LIT122,_OMC_LIT28,_OMC_LIT128}};
#define _OMC_LIT129 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT129)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT130,1,3) {&SCode_ConnectorType_POTENTIAL__desc,}};
#define _OMC_LIT130 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT130)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT131,1,3) {&Absyn_IsField_NONFIELD__desc,}};
#define _OMC_LIT131 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT131)
#define _OMC_LIT132_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT132,0,_OMC_LIT132_data);
#define _OMC_LIT132 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT132)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT133,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT132}};
#define _OMC_LIT133 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT133)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT134,3,3) {&Absyn_TypeSpec_TPATH__desc,_OMC_LIT133,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT134 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT134)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT135,1,5) {&SCode_Mod_NOMOD__desc,}};
#define _OMC_LIT135 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT135)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT136,3,3) {&SCode_Comment_COMMENT__desc,MMC_REFSTRUCTLIT(mmc_none),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT136 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT136)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT137,0.0);
#define _OMC_LIT137 MMC_REFREALLIT(_OMC_LIT_STRUCT137)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT138,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT132,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT137}};
#define _OMC_LIT138 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT138)
#define _OMC_LIT139_data "expandable connector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT139,20,_OMC_LIT139_data);
#define _OMC_LIT139 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT139)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT140,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT139}};
#define _OMC_LIT140 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT140)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT141,3,8) {&ClassInf_State_CONNECTOR__desc,_OMC_LIT140,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT141 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT141)
#define _OMC_LIT142_data "in statement %s, subscript %s is not a parameter or constant."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT142,61,_OMC_LIT142_data);
#define _OMC_LIT142 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT142)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT143,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT142}};
#define _OMC_LIT143 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT143)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT144,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(120)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT143}};
#define _OMC_LIT144 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT144)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT145,1,5) {&DAE_Connect_Face_NO__FACE__desc,}};
#define _OMC_LIT145 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT145)
#define _OMC_LIT146_data "connect(%s, %s) connects the same connector instance! The connect equation will be ignored."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT146,91,_OMC_LIT146_data);
#define _OMC_LIT146 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT146)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT147,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT146}};
#define _OMC_LIT147 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT147)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT148,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(204)),_OMC_LIT0,_OMC_LIT95,_OMC_LIT147}};
#define _OMC_LIT148 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT148)
#define _OMC_LIT149_data "expandableConnectors"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT149,20,_OMC_LIT149_data);
#define _OMC_LIT149 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT149)
#define _OMC_LIT150_data "connect("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT150,8,_OMC_LIT150_data);
#define _OMC_LIT150 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT150)
#define _OMC_LIT151_data ", "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT151,2,_OMC_LIT151_data);
#define _OMC_LIT151 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT151)
#define _OMC_LIT152_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT152,1,_OMC_LIT152_data);
#define _OMC_LIT152 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT152)
#define _OMC_LIT153_data "- InstSection.instConnect failed for: connect("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT153,46,_OMC_LIT153_data);
#define _OMC_LIT153 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT153)
#define _OMC_LIT154_data "Type error in conditional '%s'. Expected Boolean, got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT154,57,_OMC_LIT154_data);
#define _OMC_LIT154 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT154)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT155,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT154}};
#define _OMC_LIT155 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT155)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT156,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(10)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT155}};
#define _OMC_LIT156 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT156)
#define _OMC_LIT157_data "initial() may only be used as a when condition (when initial() or when {..., initial(), ...}), but got condition ‘%s‘."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT157,122,_OMC_LIT157_data);
#define _OMC_LIT157 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT157)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT158,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT157}};
#define _OMC_LIT158 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT158)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT159,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(294)),_OMC_LIT0,_OMC_LIT95,_OMC_LIT158}};
#define _OMC_LIT159 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT159)
#define _OMC_LIT160_data "initial"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT160,7,_OMC_LIT160_data);
#define _OMC_LIT160 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT160)
#define _OMC_LIT161_data "- InstSection.instElseIfs failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT161,33,_OMC_LIT161_data);
#define _OMC_LIT161 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT161)
#define _OMC_LIT162_data "connect may not be used inside if-equations with non-parametric conditions (found connect(%s, %s))."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT162,99,_OMC_LIT162_data);
#define _OMC_LIT162 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT162)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT163,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT162}};
#define _OMC_LIT163 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT163)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT164,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(116)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT163}};
#define _OMC_LIT164 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT164)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT165,1,6) {&DAE_ComponentRef_WILD__desc,}};
#define _OMC_LIT165 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT165)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT166,5,3) {&DAE_Connect_SetTrieNode_SET__TRIE__NODE__desc,_OMC_LIT132,_OMC_LIT165,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT166 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT166)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT167,5,3) {&DAE_Connect_Sets_SETS__desc,_OMC_LIT166,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT167 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT167)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT168,7,3) {&ConnectionGraph_ConnectionGraph_GRAPH__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT168 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT168)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT169,2,3) {&Absyn_Exp_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT169 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT169)
#define _OMC_LIT170_data "size"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT170,4,_OMC_LIT170_data);
#define _OMC_LIT170 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT170)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT171,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT170,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT171 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT171)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT172,1,4) {&SCode_Encapsulated_NOT__ENCAPSULATED__desc,}};
#define _OMC_LIT172 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT172)
#define _OMC_LIT173_data "$for loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT173,16,_OMC_LIT173_data);
#define _OMC_LIT173 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT173)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT174,2,3) {&DAE_Type_T__INTEGER__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT174 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT174)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT175,1,3) {&DAE_BindingSource_BINDING__FROM__DEFAULT__VALUE__desc,}};
#define _OMC_LIT175 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT175)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT176,1,6) {&SCode_Variability_CONST__desc,}};
#define _OMC_LIT176 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT176)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT177,1,3) {&DAE_Const_C__CONST__desc,}};
#define _OMC_LIT177 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT177)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT178,1,1) {_OMC_LIT177}};
#define _OMC_LIT178 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT178)
#define _OMC_LIT179_data "- InstSection.loopOverRange failed to loop over range: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT179,55,_OMC_LIT179_data);
#define _OMC_LIT179 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT179)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT180,2,19) {&DAE_Type_T__ANYTYPE__desc,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT180 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT180)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT181,1,5) {&DAE_Const_C__VAR__desc,}};
#define _OMC_LIT181 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT181)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT182,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT180,_OMC_LIT181}};
#define _OMC_LIT182 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT182)
#define _OMC_LIT183_data "Element is not allowed in function context: %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT183,46,_OMC_LIT183_data);
#define _OMC_LIT183 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT183)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT184,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT183}};
#define _OMC_LIT184 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT184)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT185,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(155)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT184}};
#define _OMC_LIT185 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT185)
#define _OMC_LIT186_data "when"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT186,4,_OMC_LIT186_data);
#define _OMC_LIT186 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT186)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT187,2,1) {_OMC_LIT186,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT187 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT187)
#define _OMC_LIT188_data "'return' may not be used outside function."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT188,42,_OMC_LIT188_data);
#define _OMC_LIT188 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT188)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT189,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT188}};
#define _OMC_LIT189 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT189)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT190,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(281)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT189}};
#define _OMC_LIT190 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT190)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT191,2,22) {&DAE_Exp_TUPLE__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT191 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT191)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT192,1,1) {_OMC_LIT191}};
#define _OMC_LIT192 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT192)
#define _OMC_LIT193_data "__OpenModelica_stackOverflowCheckpoint"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT193,38,_OMC_LIT193_data);
#define _OMC_LIT193 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT193)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT194,1,4) {&DAE_MatchType_TRY__STACKOVERFLOW__desc,}};
#define _OMC_LIT194 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT194)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT195,1,3) {&DAE_MatchType_MATCHCONTINUE__desc,}};
#define _OMC_LIT195 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT195)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT196,1,10) {&DAE_Type_T__NORETCALL__desc,}};
#define _OMC_LIT196 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT196)
#define _OMC_LIT197_data "Failed to instantiate statement:\n%s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT197,35,_OMC_LIT197_data);
#define _OMC_LIT197 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT197)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT198,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT197}};
#define _OMC_LIT198 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT198)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT199,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(190)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT198}};
#define _OMC_LIT199 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT199)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT200,10,3) {&SCodeDump_SCodeDumpOptions_OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT200 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT200)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT201,1,4) {&ClassInf_Event_FOUND__ALGORITHM__desc,}};
#define _OMC_LIT201 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT201)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT202,4,4) {&DAE_ComponentRef_CREF__IDENT__desc,_OMC_LIT132,_OMC_LIT24,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT202 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT202)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT203,2,0) {_OMC_LIT202,_OMC_LIT202}};
#define _OMC_LIT203 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT203)
#define _OMC_LIT204_data "- InstSection.instConstraints failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT204,37,_OMC_LIT204_data);
#define _OMC_LIT204 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT204)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT205,1,3) {&SCode_Initial_INITIAL__desc,}};
#define _OMC_LIT205 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT205)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT206,1,3) {&ExpressionSimplifyTypes_Evaluate_NO__EVAL__desc,}};
#define _OMC_LIT206 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT206)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT207,2,0) {MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT206}};
#define _OMC_LIT207 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT207)
#define _OMC_LIT208_data "- InstSection.instInitialAlgorithm failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT208,42,_OMC_LIT208_data);
#define _OMC_LIT208 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT208)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT209,1,4) {&SCode_Initial_NON__INITIAL__desc,}};
#define _OMC_LIT209 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT209)
#define _OMC_LIT210_data "Algorithm sections are not allowed in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT210,41,_OMC_LIT210_data);
#define _OMC_LIT210 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT210)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT211,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT210}};
#define _OMC_LIT211 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT211)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT212,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(187)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT211}};
#define _OMC_LIT212 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT212)
#define _OMC_LIT213_data "- InstSection.instAlgorithm failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT213,34,_OMC_LIT213_data);
#define _OMC_LIT213 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT213)
#define _OMC_LIT214_data " = "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT214,3,_OMC_LIT214_data);
#define _OMC_LIT214 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT214)
#define _OMC_LIT215_data "Illegal type in equation %s, only builtin types (Real, String, Integer, Boolean or enumeration) or record type allowed in equation."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT215,131,_OMC_LIT215_data);
#define _OMC_LIT215 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT215)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT216,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT215}};
#define _OMC_LIT216 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT216)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT217,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(105)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT216}};
#define _OMC_LIT217 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT217)
#define _OMC_LIT218_data "Unable to unroll for loop containing when statements or equations: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT218,70,_OMC_LIT218_data);
#define _OMC_LIT218 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT218)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT219,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT218}};
#define _OMC_LIT219 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT219)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT220,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(124)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT219}};
#define _OMC_LIT220 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT220)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT221,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT221 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT221)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT222,2,1) {_OMC_LIT221,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT222 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT222)
#define _OMC_LIT223_data "="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT223,1,_OMC_LIT223_data);
#define _OMC_LIT223 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT223)
#define _OMC_LIT224_data "Array equation has unknown size in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT224,38,_OMC_LIT224_data);
#define _OMC_LIT224 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT224)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT225,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT224}};
#define _OMC_LIT225 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT225)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT226,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(46)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT225}};
#define _OMC_LIT226 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT226)
#define _OMC_LIT227_data "- InstSection.instArrayEquation failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT227,39,_OMC_LIT227_data);
#define _OMC_LIT227 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT227)
#define _OMC_LIT228_data "- InstSection.instEqEquation2 failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT228,37,_OMC_LIT228_data);
#define _OMC_LIT228 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT228)
#define _OMC_LIT229_data "Type mismatch in equation %s of type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT229,40,_OMC_LIT229_data);
#define _OMC_LIT229 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT229)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT230,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT229}};
#define _OMC_LIT230 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT230)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT231,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(45)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT230}};
#define _OMC_LIT231 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT231)
#define _OMC_LIT232_data "$pafor loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT232,18,_OMC_LIT232_data);
#define _OMC_LIT232 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT232)
#define _OMC_LIT233_data "- InstSection.unroll failed: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT233,29,_OMC_LIT233_data);
#define _OMC_LIT233 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT233)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT234,1,3) {&ClassInf_Event_FOUND__EQUATION__desc,}};
#define _OMC_LIT234 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT234)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT235,1,6) {&Absyn_ComponentRef_WILD__desc,}};
#define _OMC_LIT235 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT235)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT236,2,5) {&Absyn_Exp_CREF__desc,_OMC_LIT235}};
#define _OMC_LIT236 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT236)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT237,2,3) {&DAE_TupleConst_SINGLE__CONST__desc,_OMC_LIT181}};
#define _OMC_LIT237 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT237)
#define _OMC_LIT238_data "- expandTupleEquationWithWild failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT238,36,_OMC_LIT238_data);
#define _OMC_LIT238 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT238)
#define _OMC_LIT239_data "condenseArrays"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT239,14,_OMC_LIT239_data);
#define _OMC_LIT239 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT239)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT240,1,4) {&Flags_FlagVisibility_EXTERNAL__desc,}};
#define _OMC_LIT240 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT240)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT241,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT241 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT241)
#define _OMC_LIT242_data "Sets whether array expressions containing function calls are condensed or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT242,78,_OMC_LIT242_data);
#define _OMC_LIT242 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT242)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT243,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT242}};
#define _OMC_LIT243 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT243)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT244,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(105)),_OMC_LIT239,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT240,_OMC_LIT241,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT243}};
#define _OMC_LIT244 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT244)
#define _OMC_LIT245_data "Failure in: makeDAEArrayEqToReinitForm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT245,38,_OMC_LIT245_data);
#define _OMC_LIT245 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT245)
#define _OMC_LIT246_data ";"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT246,1,_OMC_LIT246_data);
#define _OMC_LIT246 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT246)
#define _OMC_LIT247_data "The first argument to reinit must be a subtype of Real, but %s has type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT247,75,_OMC_LIT247_data);
#define _OMC_LIT247 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT247)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT248,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT247}};
#define _OMC_LIT248 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT248)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT249,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(224)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT248}};
#define _OMC_LIT249 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT249)
#define _OMC_LIT250_data "The first argument to reinit must be a continuous time variable, but %s is %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT250,78,_OMC_LIT250_data);
#define _OMC_LIT250 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT250)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT251,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT250}};
#define _OMC_LIT251 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT251)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT252,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(225)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT251}};
#define _OMC_LIT252 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT252)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT253,2,6) {&Absyn_Exp_STRING__desc,_OMC_LIT132}};
#define _OMC_LIT253 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT253)
#define _OMC_LIT254_data "Wrong type or wrong number of arguments to %s (in component %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT254,64,_OMC_LIT254_data);
#define _OMC_LIT254 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT254)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT255,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT254}};
#define _OMC_LIT255 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT255)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT256,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(68)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT255}};
#define _OMC_LIT256 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT256)
#define _OMC_LIT257_data "message"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT257,7,_OMC_LIT257_data);
#define _OMC_LIT257 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT257)
#define _OMC_LIT258_data "priority"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT258,8,_OMC_LIT258_data);
#define _OMC_LIT258 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT258)
#define _OMC_LIT259_data "Ignoring overconstrained operator applied to array components having size zero: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT259,83,_OMC_LIT259_data);
#define _OMC_LIT259 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT259)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT260,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT259}};
#define _OMC_LIT260 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT260)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT261,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(551)),_OMC_LIT0,_OMC_LIT95,_OMC_LIT260}};
#define _OMC_LIT261 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT261)
#define _OMC_LIT262_data "Usage of non-standard operator (not specified in the Modelica specification): %s. Functionality might be partially supported but is not guaranteed."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT262,147,_OMC_LIT262_data);
#define _OMC_LIT262 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT262)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT263,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT262}};
#define _OMC_LIT263 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT263)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT264,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(547)),_OMC_LIT0,_OMC_LIT95,_OMC_LIT263}};
#define _OMC_LIT264 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT264)
#define _OMC_LIT265_data "Connections.uniqueRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT265,22,_OMC_LIT265_data);
#define _OMC_LIT265 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT265)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT266,2,1) {_OMC_LIT265,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT266 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT266)
#define _OMC_LIT267_data "- handleConnectionsOperators failed for eqn: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT267,45,_OMC_LIT267_data);
#define _OMC_LIT267 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT267)
#define _OMC_LIT268_data " in scope:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT268,10,_OMC_LIT268_data);
#define _OMC_LIT268 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT268)
#define _OMC_LIT269_data "Connections"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT269,11,_OMC_LIT269_data);
#define _OMC_LIT269 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT269)
#define _OMC_LIT270_data "root"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT270,4,_OMC_LIT270_data);
#define _OMC_LIT270 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT270)
#define _OMC_LIT271_data "potentialRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT271,13,_OMC_LIT271_data);
#define _OMC_LIT271 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT271)
#define _OMC_LIT272_data "uniqueRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT272,10,_OMC_LIT272_data);
#define _OMC_LIT272 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT272)
#define _OMC_LIT273_data "branch"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT273,6,_OMC_LIT273_data);
#define _OMC_LIT273 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT273)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT274,2,1) {_OMC_LIT272,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT274 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT274)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT275,2,1) {_OMC_LIT273,_OMC_LIT274}};
#define _OMC_LIT275 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT275)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT276,2,1) {_OMC_LIT271,_OMC_LIT275}};
#define _OMC_LIT276 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT276)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT277,2,1) {_OMC_LIT270,_OMC_LIT276}};
#define _OMC_LIT277 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT277)
#define _OMC_LIT278_data "Type mismatch for positional argument %s in %s(%s=%s). The argument has type:\n  %s\nexpected type:\n  %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT278,102,_OMC_LIT278_data);
#define _OMC_LIT278 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT278)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT279,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT278}};
#define _OMC_LIT279 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT279)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT280,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(269)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT279}};
#define _OMC_LIT280 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT280)
#define _OMC_LIT281_data "InstSection.checkIfConditionTypes failed to find non-Boolean condition."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT281,71,_OMC_LIT281_data);
#define _OMC_LIT281 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT281)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT282,1,4) {&Absyn_Msg_NO__MSG__desc,}};
#define _OMC_LIT282 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT282)
#define _OMC_LIT283_data "when-clause is not allowed in initial section."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT283,46,_OMC_LIT283_data);
#define _OMC_LIT283 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT283)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT284,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT283}};
#define _OMC_LIT284 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT284)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT285,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(139)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT284}};
#define _OMC_LIT285 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT285)
#define _OMC_LIT286_data "Internal error: generated implicit range could not be evaluated."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT286,64,_OMC_LIT286_data);
#define _OMC_LIT286 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT286)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT287,2,6) {&Absyn_Exp_STRING__desc,_OMC_LIT286}};
#define _OMC_LIT287 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT287)
#define _OMC_LIT288_data "The iteration range %s is not a constant or parameter expression."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT288,65,_OMC_LIT288_data);
#define _OMC_LIT288 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT288)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT289,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT288}};
#define _OMC_LIT289 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT289)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT290,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(109)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT289}};
#define _OMC_LIT290 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT290)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT291,2,3) {&Values_Value_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT291 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT291)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT292,2,1) {_OMC_LIT291,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT292 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT292)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT293,2,1) {MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT293 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT293)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT294,3,8) {&Values_Value_ARRAY__desc,_OMC_LIT292,_OMC_LIT293}};
#define _OMC_LIT294 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT294)
#define _OMC_LIT295_data "assert"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT295,6,_OMC_LIT295_data);
#define _OMC_LIT295 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT295)
#define _OMC_LIT296_data "condition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT296,9,_OMC_LIT296_data);
#define _OMC_LIT296 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT296)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT297,2,5) {&DAE_Type_T__STRING__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT297 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT297)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT298,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT76}};
#define _OMC_LIT298 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT298)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT299,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT298}};
#define _OMC_LIT299 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT299)
#define _OMC_LIT300_data "warning"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT300,7,_OMC_LIT300_data);
#define _OMC_LIT300 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT300)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT301,2,1) {_OMC_LIT77,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT301 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT301)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT302,2,1) {_OMC_LIT300,_OMC_LIT301}};
#define _OMC_LIT302 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT302)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT303,6,8) {&DAE_Type_T__ENUMERATION__desc,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT299,_OMC_LIT302,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT303 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT303)
#define _OMC_LIT304_data "level"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT304,5,_OMC_LIT304_data);
#define _OMC_LIT304 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT304)
#define _OMC_LIT305_data "terminate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT305,9,_OMC_LIT305_data);
#define _OMC_LIT305 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT305)
#define _OMC_LIT306_data "- InstSection.instEquationCommonWork failed for eqn: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT306,53,_OMC_LIT306_data);
#define _OMC_LIT306 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT306)
#define _OMC_LIT307_data " in scope: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT307,11,_OMC_LIT307_data);
#define _OMC_LIT307 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT307)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT308,1,5) {&DAE_AvlTreePathFunction_Tree_EMPTY__desc,}};
#define _OMC_LIT308 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT308)
#define _OMC_LIT309_data "Equations are not allowed in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT309,32,_OMC_LIT309_data);
#define _OMC_LIT309 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT309)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT310,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT309}};
#define _OMC_LIT310 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT310)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT311,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(167)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT310}};
#define _OMC_LIT311 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT311)
#define _OMC_LIT312_data "Failed to instantiate equation %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT312,34,_OMC_LIT312_data);
#define _OMC_LIT312 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT312)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT313,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT312}};
#define _OMC_LIT313 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT313)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT314,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(133)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT313}};
#define _OMC_LIT314 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT314)
#include "util/modelica.h"
#include "InstSection_includes.h"
#if !defined(PROTECTED_FUNCTION_STATIC)
#define PROTECTED_FUNCTION_STATIC
#endif
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkValidNoRetcall(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkValidNoRetcall,2,0) {(void*) boxptr_InstSection_checkValidNoRetcall,0}};
#define boxvar_InstSection_checkValidNoRetcall MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkValidNoRetcall)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_collectParallelVariablesInSubscriptList(threadData_t *threadData, modelica_metatype _inCrefInfos, modelica_metatype _inSubscriptLst, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_collectParallelVariablesInSubscriptList,2,0) {(void*) boxptr_InstSection_collectParallelVariablesInSubscriptList,0}};
#define boxvar_InstSection_collectParallelVariablesInSubscriptList MMC_REFSTRUCTLIT(boxvar_lit_InstSection_collectParallelVariablesInSubscriptList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_collectParallelVariablesinExps(threadData_t *threadData, modelica_metatype _inCrefInfos, modelica_metatype _inExps, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_collectParallelVariablesinExps,2,0) {(void*) boxptr_InstSection_collectParallelVariablesinExps,0}};
#define boxvar_InstSection_collectParallelVariablesinExps MMC_REFSTRUCTLIT(boxvar_lit_InstSection_collectParallelVariablesinExps)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_collectParallelVariables(threadData_t *threadData, modelica_metatype _inCrefInfos, modelica_metatype _inStatments);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_collectParallelVariables,2,0) {(void*) boxptr_InstSection_collectParallelVariables,0}};
#define boxvar_InstSection_collectParallelVariables MMC_REFSTRUCTLIT(boxvar_lit_InstSection_collectParallelVariables)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_crefInfoListCrefsEqual(threadData_t *threadData, modelica_metatype _inFoundCref, modelica_metatype _inCrefInfos);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_crefInfoListCrefsEqual(threadData_t *threadData, modelica_metatype _inFoundCref, modelica_metatype _inCrefInfos);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_crefInfoListCrefsEqual,2,0) {(void*) boxptr_InstSection_crefInfoListCrefsEqual,0}};
#define boxvar_InstSection_crefInfoListCrefsEqual MMC_REFSTRUCTLIT(boxvar_lit_InstSection_crefInfoListCrefsEqual)
PROTECTED_FUNCTION_STATIC void omc_InstSection_isCrefParGlobalOrForIterator(threadData_t *threadData, modelica_metatype _inCrefInfo, modelica_metatype _inCache, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_isCrefParGlobalOrForIterator,2,0) {(void*) boxptr_InstSection_isCrefParGlobalOrForIterator,0}};
#define boxvar_InstSection_isCrefParGlobalOrForIterator MMC_REFSTRUCTLIT(boxvar_lit_InstSection_isCrefParGlobalOrForIterator)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instParForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_string _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instParForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instParForStatement__dispatch,2,0) {(void*) boxptr_InstSection_instParForStatement__dispatch,0}};
#define boxvar_InstSection_instParForStatement__dispatch MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instParForStatement__dispatch)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instParForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instParForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instParForStatement,2,0) {(void*) boxptr_InstSection_instParForStatement,0}};
#define boxvar_InstSection_instParForStatement MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instParForStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_getIteratorType(threadData_t *threadData, modelica_metatype _ty, modelica_string _id, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_getIteratorType,2,0) {(void*) boxptr_InstSection_getIteratorType,0}};
#define boxvar_InstSection_getIteratorType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_getIteratorType)
PROTECTED_FUNCTION_STATIC void omc_InstSection_generateNoConstantBindingError(threadData_t *threadData, modelica_metatype _emptyValueOpt, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_generateNoConstantBindingError,2,0) {(void*) boxptr_InstSection_generateNoConstantBindingError,0}};
#define boxvar_InstSection_generateNoConstantBindingError MMC_REFSTRUCTLIT(boxvar_lit_InstSection_generateNoConstantBindingError)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkNoDuplicateAssignments(threadData_t *threadData, modelica_metatype _inExps, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkNoDuplicateAssignments,2,0) {(void*) boxptr_InstSection_checkNoDuplicateAssignments,0}};
#define boxvar_InstSection_checkNoDuplicateAssignments MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkNoDuplicateAssignments)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instAssignment2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _var, modelica_metatype _inRhs, modelica_metatype _value, modelica_metatype _props, modelica_metatype _info, modelica_metatype _inSource, modelica_metatype _initial_, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_integer _numError, modelica_metatype *out_stmts);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instAssignment2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _var, modelica_metatype _inRhs, modelica_metatype _value, modelica_metatype _props, modelica_metatype _info, modelica_metatype _inSource, modelica_metatype _initial_, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _numError, modelica_metatype *out_stmts);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instAssignment2,2,0) {(void*) boxptr_InstSection_instAssignment2,0}};
#define boxvar_InstSection_instAssignment2 MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instAssignment2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instAssignment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ih, modelica_metatype _inPre, modelica_metatype _alg, modelica_metatype _source, modelica_metatype _initial_, modelica_boolean _impl, modelica_boolean _unrollForLoops, modelica_integer _numError, modelica_metatype *out_stmts);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instAssignment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ih, modelica_metatype _inPre, modelica_metatype _alg, modelica_metatype _source, modelica_metatype _initial_, modelica_metatype _impl, modelica_metatype _unrollForLoops, modelica_metatype _numError, modelica_metatype *out_stmts);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instAssignment,2,0) {(void*) boxptr_InstSection_instAssignment,0}};
#define boxvar_InstSection_instAssignment MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instAssignment)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEq(threadData_t *threadData, modelica_metatype _inEq);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInEq,2,0) {(void*) boxptr_InstSection_checkForNestedWhenInEq,0}};
#define boxvar_InstSection_checkForNestedWhenInEq MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInEq)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEqList(threadData_t *threadData, modelica_metatype _inEqs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInEqList,2,0) {(void*) boxptr_InstSection_checkForNestedWhenInEqList,0}};
#define boxvar_InstSection_checkForNestedWhenInEqList MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInEqList)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEquation(threadData_t *threadData, modelica_metatype _inWhenEq);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInEquation,2,0) {(void*) boxptr_InstSection_checkForNestedWhenInEquation,0}};
#define boxvar_InstSection_checkForNestedWhenInEquation MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInEquation)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkForReinitInWhenInitialEq(threadData_t *threadData, modelica_metatype _inWhenEq);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkForReinitInWhenInitialEq(threadData_t *threadData, modelica_metatype _inWhenEq);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForReinitInWhenInitialEq,2,0) {(void*) boxptr_InstSection_checkForReinitInWhenInitialEq,0}};
#define boxvar_InstSection_checkForReinitInWhenInitialEq MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForReinitInWhenInitialEq)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkWhenEquation(threadData_t *threadData, modelica_metatype _inWhenEq);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkWhenEquation,2,0) {(void*) boxptr_InstSection_checkWhenEquation,0}};
#define boxvar_InstSection_checkWhenEquation MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkWhenEquation)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInStatements(threadData_t *threadData, modelica_metatype _inWhenAlgorithm);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInStatements,2,0) {(void*) boxptr_InstSection_checkForNestedWhenInStatements,0}};
#define boxvar_InstSection_checkForNestedWhenInStatements MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForNestedWhenInStatements)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkForReinitInWhenInitialAlg(threadData_t *threadData, modelica_metatype _inWhenAlgorithm);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkForReinitInWhenInitialAlg(threadData_t *threadData, modelica_metatype _inWhenAlgorithm);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForReinitInWhenInitialAlg,2,0) {(void*) boxptr_InstSection_checkForReinitInWhenInitialAlg,0}};
#define boxvar_InstSection_checkForReinitInWhenInitialAlg MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForReinitInWhenInitialAlg)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkWhenAlgorithm(threadData_t *threadData, modelica_metatype _inWhenAlgorithm);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkWhenAlgorithm,2,0) {(void*) boxptr_InstSection_checkWhenAlgorithm,0}};
#define boxvar_InstSection_checkWhenAlgorithm MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkWhenAlgorithm)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_getVectorizedCref(threadData_t *threadData, modelica_metatype _crefOrArray);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_getVectorizedCref,2,0) {(void*) boxptr_InstSection_getVectorizedCref,0}};
#define boxvar_InstSection_getVectorizedCref MMC_REFSTRUCTLIT(boxvar_lit_InstSection_getVectorizedCref)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeEnumLiteralIndices(threadData_t *threadData, modelica_metatype _enumTypeName, modelica_metatype _enumLiterals, modelica_integer _enumIndex, modelica_metatype _expr);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_makeEnumLiteralIndices(threadData_t *threadData, modelica_metatype _enumTypeName, modelica_metatype _enumLiterals, modelica_metatype _enumIndex, modelica_metatype _expr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeEnumLiteralIndices,2,0) {(void*) boxptr_InstSection_makeEnumLiteralIndices,0}};
#define boxvar_InstSection_makeEnumLiteralIndices MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeEnumLiteralIndices)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeAsubIndex(threadData_t *threadData, modelica_integer _index, modelica_metatype _expr);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_makeAsubIndex(threadData_t *threadData, modelica_metatype _index, modelica_metatype _expr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeAsubIndex,2,0) {(void*) boxptr_InstSection_makeAsubIndex,0}};
#define boxvar_InstSection_makeAsubIndex MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeAsubIndex)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_expandArrayDimension(threadData_t *threadData, modelica_metatype _inDim, modelica_metatype _inArray);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_expandArrayDimension,2,0) {(void*) boxptr_InstSection_expandArrayDimension,0}};
#define boxvar_InstSection_expandArrayDimension MMC_REFSTRUCTLIT(boxvar_lit_InstSection_expandArrayDimension)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_propagateConnectorType(threadData_t *threadData, modelica_metatype _inConnectorType, modelica_metatype _inSubConnectorType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_propagateConnectorType,2,0) {(void*) boxptr_InstSection_propagateConnectorType,0}};
#define boxvar_InstSection_propagateConnectorType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_propagateConnectorType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectVars(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRef3, modelica_metatype _inFace4, modelica_metatype _inTypesVarLst5, modelica_metatype _vt1, modelica_metatype _inComponentRef6, modelica_metatype _inFace7, modelica_metatype _inTypesVarLst8, modelica_metatype _vt2, modelica_metatype _inConnectorType, modelica_metatype _io1, modelica_metatype _io2, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_connectVars,2,0) {(void*) boxptr_InstSection_connectVars,0}};
#define boxvar_InstSection_connectVars MMC_REFSTRUCTLIT(boxvar_lit_InstSection_connectVars)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectArrayComponents(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inLhsCrefs, modelica_metatype _inLhsFace, modelica_metatype _inLhsType, modelica_metatype _inLhsVar, modelica_metatype _inLhsIO, modelica_metatype _inRhsCrefs, modelica_metatype _inRhsFace, modelica_metatype _inRhsType, modelica_metatype _inRhsVar, modelica_metatype _inRhsIO, modelica_metatype _inConnectorType, modelica_metatype _inGraph, modelica_metatype _inInfo, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_connectArrayComponents,2,0) {(void*) boxptr_InstSection_connectArrayComponents,0}};
#define boxvar_InstSection_connectArrayComponents MMC_REFSTRUCTLIT(boxvar_lit_InstSection_connectArrayComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_generateConnectAssert(threadData_t *threadData, modelica_metatype _inLhsExp, modelica_metatype _inRhsExp, modelica_metatype _inSource);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_generateConnectAssert,2,0) {(void*) boxptr_InstSection_generateConnectAssert,0}};
#define boxvar_InstSection_generateConnectAssert MMC_REFSTRUCTLIT(boxvar_lit_InstSection_generateConnectAssert)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesInnerOuter(threadData_t *threadData, modelica_metatype _inLhsIO, modelica_metatype _inRhsIO, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesInnerOuter,2,0) {(void*) boxptr_InstSection_checkConnectTypesInnerOuter,0}};
#define boxvar_InstSection_checkConnectTypesInnerOuter MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesInnerOuter)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_isSignalSource(threadData_t *threadData, modelica_metatype _inDirection, modelica_metatype _inFace, modelica_metatype _inVisibility);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_isSignalSource(threadData_t *threadData, modelica_metatype _inDirection, modelica_metatype _inFace, modelica_metatype _inVisibility);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_isSignalSource,2,0) {(void*) boxptr_InstSection_isSignalSource,0}};
#define boxvar_InstSection_isSignalSource MMC_REFSTRUCTLIT(boxvar_lit_InstSection_isSignalSource)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesDirection(threadData_t *threadData, modelica_metatype _inLhsDirection, modelica_metatype _inLhsFace, modelica_metatype _inLhsVisibility, modelica_metatype _inRhsDirection, modelica_metatype _inRhsFace, modelica_metatype _inRhsVisibility, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesDirection,2,0) {(void*) boxptr_InstSection_checkConnectTypesDirection,0}};
#define boxvar_InstSection_checkConnectTypesDirection MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesDirection)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesFlowStream(threadData_t *threadData, modelica_metatype _inLhsConnectorType, modelica_metatype _inRhsConnectorType, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesFlowStream,2,0) {(void*) boxptr_InstSection_checkConnectTypesFlowStream,0}};
#define boxvar_InstSection_checkConnectTypesFlowStream MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesFlowStream)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesType(threadData_t *threadData, modelica_metatype _inLhsType, modelica_metatype _inRhsType, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesType,2,0) {(void*) boxptr_InstSection_checkConnectTypesType,0}};
#define boxvar_InstSection_checkConnectTypesType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypesType)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypes(threadData_t *threadData, modelica_metatype _inLhsCref, modelica_metatype _inLhsType, modelica_metatype _inLhsFace, modelica_metatype _inLhsAttributes, modelica_metatype _inRhsCref, modelica_metatype _inRhsType, modelica_metatype _inRhsFace, modelica_metatype _inRhsAttributes, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypes,2,0) {(void*) boxptr_InstSection_checkConnectTypes,0}};
#define boxvar_InstSection_checkConnectTypes MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkConnectTypes)
PROTECTED_FUNCTION_STATIC void omc_InstSection_validConnector(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inCref, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_validConnector,2,0) {(void*) boxptr_InstSection_validConnector,0}};
#define boxvar_InstSection_validConnector MMC_REFSTRUCTLIT(boxvar_lit_InstSection_validConnector)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_flipDirection(threadData_t *threadData, modelica_metatype _inDir);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_flipDirection,2,0) {(void*) boxptr_InstSection_flipDirection,0}};
#define boxvar_InstSection_flipDirection MMC_REFSTRUCTLIT(boxvar_lit_InstSection_flipDirection)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_isConnectorType(threadData_t *threadData, modelica_metatype _ty);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_isConnectorType(threadData_t *threadData, modelica_metatype _ty);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_isConnectorType,2,0) {(void*) boxptr_InstSection_isConnectorType,0}};
#define boxvar_InstSection_isConnectorType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_isConnectorType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_getStateFromType(threadData_t *threadData, modelica_metatype _ty);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_getStateFromType,2,0) {(void*) boxptr_InstSection_getStateFromType,0}};
#define boxvar_InstSection_getStateFromType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_getStateFromType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectExpandableVariables(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inVariablesUnion, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_connectExpandableVariables(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inVariablesUnion, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_connectExpandableVariables,2,0) {(void*) boxptr_InstSection_connectExpandableVariables,0}};
#define boxvar_InstSection_connectExpandableVariables MMC_REFSTRUCTLIT(boxvar_lit_InstSection_connectExpandableVariables)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_updateEnvComponentsOnQualPath(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _virtualExpandableCref, modelica_metatype _virtualExpandableAttr, modelica_metatype _virtualExpandableTy, modelica_metatype _virtualExpandableBinding, modelica_metatype _virtualExpandableCnstForRange, modelica_metatype _virtualExpandableEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_updateEnvComponentsOnQualPath,2,0) {(void*) boxptr_InstSection_updateEnvComponentsOnQualPath,0}};
#define boxvar_InstSection_updateEnvComponentsOnQualPath MMC_REFSTRUCTLIT(boxvar_lit_InstSection_updateEnvComponentsOnQualPath)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_daeDeclareList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inParentEnv, modelica_metatype _inClassEnv, modelica_metatype _crefs, modelica_metatype _state, modelica_metatype _ty, modelica_metatype _attrs, modelica_metatype _vis, modelica_metatype _io, modelica_metatype _source, modelica_metatype _acc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_daeDeclareList,2,0) {(void*) boxptr_InstSection_daeDeclareList,0}};
#define boxvar_InstSection_daeDeclareList MMC_REFSTRUCTLIT(boxvar_lit_InstSection_daeDeclareList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_generateExpandableDAE(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inParentEnv, modelica_metatype _inClassEnv, modelica_metatype _cref, modelica_metatype _state, modelica_metatype _ty, modelica_metatype _attrs, modelica_metatype _vis, modelica_metatype _io, modelica_metatype _source);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_generateExpandableDAE,2,0) {(void*) boxptr_InstSection_generateExpandableDAE,0}};
#define boxvar_InstSection_generateExpandableDAE MMC_REFSTRUCTLIT(boxvar_lit_InstSection_generateExpandableDAE)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectExpandableConnectors(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_connectExpandableConnectors(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_connectExpandableConnectors,2,0) {(void*) boxptr_InstSection_connectExpandableConnectors,0}};
#define boxvar_InstSection_connectExpandableConnectors MMC_REFSTRUCTLIT(boxvar_lit_InstSection_connectExpandableConnectors)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConstantVariability(threadData_t *threadData, modelica_metatype _inrefs, modelica_metatype _cache, modelica_metatype _env, modelica_string _affectedConnector, modelica_metatype _inPrefix, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkConstantVariability,2,0) {(void*) boxptr_InstSection_checkConstantVariability,0}};
#define boxvar_InstSection_checkConstantVariability MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkConstantVariability)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_connectorCompGt(threadData_t *threadData, modelica_metatype _inVar1, modelica_metatype _inVar2);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_connectorCompGt(threadData_t *threadData, modelica_metatype _inVar1, modelica_metatype _inVar2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_connectorCompGt,2,0) {(void*) boxptr_InstSection_connectorCompGt,0}};
#define boxvar_InstSection_connectorCompGt MMC_REFSTRUCTLIT(boxvar_lit_InstSection_connectorCompGt)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_sortConnectorType(threadData_t *threadData, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_sortConnectorType,2,0) {(void*) boxptr_InstSection_sortConnectorType,0}};
#define boxvar_InstSection_sortConnectorType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_sortConnectorType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instConnector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _ih, modelica_metatype _connectorCref, modelica_boolean _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outCref, modelica_metatype *out_outAttr, modelica_metatype *out_connectorType, modelica_metatype *out_variability, modelica_metatype *out_innerOuter, modelica_metatype *out_face, modelica_metatype *out_ty, modelica_boolean *out_deleted);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instConnector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _ih, modelica_metatype _connectorCref, modelica_metatype _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outCref, modelica_metatype *out_outAttr, modelica_metatype *out_connectorType, modelica_metatype *out_variability, modelica_metatype *out_innerOuter, modelica_metatype *out_face, modelica_metatype *out_ty, modelica_metatype *out_deleted);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instConnector,2,0) {(void*) boxptr_InstSection_instConnector,0}};
#define boxvar_InstSection_instConnector MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instConnector)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instConnect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_boolean _inImplicit, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instConnect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inImplicit, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instConnect,2,0) {(void*) boxptr_InstSection_instConnect,0}};
#define boxvar_InstSection_instConnect MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instConnect)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_checkWhenCondition(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fexp, modelica_metatype _ty, modelica_metatype _aexp, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkWhenCondition,2,0) {(void*) boxptr_InstSection_checkWhenCondition,0}};
#define boxvar_InstSection_checkWhenCondition MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkWhenCondition)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instWhenEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inBranch, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outCondition, modelica_metatype *out_outEquations, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instWhenEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inBranch, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outCondition, modelica_metatype *out_outEquations, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instWhenEqBranch,2,0) {(void*) boxptr_InstSection_instWhenEqBranch,0}};
#define boxvar_InstSection_instWhenEqBranch MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instWhenEqBranch)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instElseIfs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _ci_state, modelica_metatype _inElseIfBranches, modelica_metatype _source, modelica_metatype _initial_, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype _info, modelica_metatype *out_outElseIfBranches);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instElseIfs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _ci_state, modelica_metatype _inElseIfBranches, modelica_metatype _source, modelica_metatype _initial_, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _info, modelica_metatype *out_outElseIfBranches);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instElseIfs,2,0) {(void*) boxptr_InstSection_instElseIfs,0}};
#define boxvar_InstSection_instElseIfs MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instElseIfs)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForConnectInIfBranch2(threadData_t *threadData, modelica_metatype _inEquation);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForConnectInIfBranch2,2,0) {(void*) boxptr_InstSection_checkForConnectInIfBranch2,0}};
#define boxvar_InstSection_checkForConnectInIfBranch2 MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForConnectInIfBranch2)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForConnectInIfBranch(threadData_t *threadData, modelica_metatype _inEquations);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkForConnectInIfBranch,2,0) {(void*) boxptr_InstSection_checkForConnectInIfBranch,0}};
#define boxvar_InstSection_checkForConnectInIfBranch MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkForConnectInIfBranch)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instInitialIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_boolean _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instInitialIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_metatype _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instInitialIfEqBranches,2,0) {(void*) boxptr_InstSection_instInitialIfEqBranches,0}};
#define boxvar_InstSection_instInitialIfEqBranches MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instInitialIfEqBranches)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instInitialIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_boolean _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instInitialIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_metatype _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instInitialIfEqBranch,2,0) {(void*) boxptr_InstSection_instInitialIfEqBranch,0}};
#define boxvar_InstSection_instInitialIfEqBranch MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instInitialIfEqBranch)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_boolean _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_metatype _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instIfEqBranches,2,0) {(void*) boxptr_InstSection_instIfEqBranches,0}};
#define boxvar_InstSection_instIfEqBranches MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instIfEqBranches)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_boolean _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_metatype _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instIfEqBranch,2,0) {(void*) boxptr_InstSection_instIfEqBranch,0}};
#define boxvar_InstSection_instIfEqBranch MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instIfEqBranch)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_rangeExpression(threadData_t *threadData, modelica_metatype _inTuple);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_rangeExpression,2,0) {(void*) boxptr_InstSection_rangeExpression,0}};
#define boxvar_InstSection_rangeExpression MMC_REFSTRUCTLIT(boxvar_lit_InstSection_rangeExpression)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_loopOverRange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _ci_state, modelica_string _inIdent, modelica_metatype _inValue, modelica_metatype _inAlgItmLst, modelica_metatype _source, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_loopOverRange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _ci_state, modelica_metatype _inIdent, modelica_metatype _inValue, modelica_metatype _inAlgItmLst, modelica_metatype _source, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_loopOverRange,2,0) {(void*) boxptr_InstSection_loopOverRange,0}};
#define boxvar_InstSection_loopOverRange MMC_REFSTRUCTLIT(boxvar_lit_InstSection_loopOverRange)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_containsWhenStatements(threadData_t *threadData, modelica_metatype _statementList);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_containsWhenStatements(threadData_t *threadData, modelica_metatype _statementList);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_containsWhenStatements,2,0) {(void*) boxptr_InstSection_containsWhenStatements,0}};
#define boxvar_InstSection_containsWhenStatements MMC_REFSTRUCTLIT(boxvar_lit_InstSection_containsWhenStatements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeAssignment(threadData_t *threadData, modelica_metatype _inLhs, modelica_metatype _inLhsProps, modelica_metatype _inRhs, modelica_metatype _inRhsProps, modelica_metatype _inAttributes, modelica_metatype _inInitial, modelica_metatype _inSource);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeAssignment,2,0) {(void*) boxptr_InstSection_makeAssignment,0}};
#define boxvar_InstSection_makeAssignment MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeAssignment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instStatement,2,0) {(void*) boxptr_InstSection_instStatement,0}};
#define boxvar_InstSection_instStatement MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inExp, modelica_boolean _inImpl, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inExp, modelica_metatype _inImpl, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instExp,2,0) {(void*) boxptr_InstSection_instExp,0}};
#define boxvar_InstSection_instExp MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeComplexDaeEquation(threadData_t *threadData, modelica_metatype _lhs, modelica_metatype _rhs, modelica_metatype _source, modelica_metatype _initial_);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeComplexDaeEquation,2,0) {(void*) boxptr_InstSection_makeComplexDaeEquation,0}};
#define boxvar_InstSection_makeComplexDaeEquation MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeComplexDaeEquation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instComplexEquation(threadData_t *threadData, modelica_metatype _lhs, modelica_metatype _rhs, modelica_metatype _tp, modelica_metatype _source, modelica_metatype _initial_);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instComplexEquation,2,0) {(void*) boxptr_InstSection_instComplexEquation,0}};
#define boxvar_InstSection_instComplexEquation MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instComplexEquation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_string _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instForStatement__dispatch,2,0) {(void*) boxptr_InstSection_instForStatement__dispatch,0}};
#define boxvar_InstSection_instForStatement__dispatch MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instForStatement__dispatch)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instForStatement,2,0) {(void*) boxptr_InstSection_instForStatement,0}};
#define boxvar_InstSection_instForStatement MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instForStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_unrollForLoop(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_string _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inStatement, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_unrollForLoop(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inStatement, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_unrollForLoop,2,0) {(void*) boxptr_InstSection_unrollForLoop,0}};
#define boxvar_InstSection_unrollForLoop MMC_REFSTRUCTLIT(boxvar_lit_InstSection_unrollForLoop)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instArrayElEq(threadData_t *threadData, modelica_metatype _inLhsExp, modelica_metatype _inRhsExp, modelica_metatype _inType, modelica_metatype _inConst, modelica_metatype _inLhsIndices, modelica_metatype _inRhsIndices, modelica_metatype _inSource, modelica_metatype _inInitial);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instArrayElEq,2,0) {(void*) boxptr_InstSection_instArrayElEq,0}};
#define boxvar_InstSection_instArrayElEq MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instArrayElEq)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instArrayEquation(threadData_t *threadData, modelica_metatype _lhs, modelica_metatype _rhs, modelica_metatype _tp, modelica_metatype _inConst, modelica_metatype _inSource, modelica_metatype _initial_);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instArrayEquation,2,0) {(void*) boxptr_InstSection_instArrayEquation,0}};
#define boxvar_InstSection_instArrayEquation MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instArrayEquation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeDaeDefine(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inExp, modelica_metatype _source, modelica_metatype _inInitial);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeDaeDefine,2,0) {(void*) boxptr_InstSection_makeDaeDefine,0}};
#define boxvar_InstSection_makeDaeDefine MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeDaeDefine)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEqEquation2List(threadData_t *threadData, modelica_metatype _inExps1, modelica_metatype _inExps2, modelica_metatype _inTypes3, modelica_metatype _const, modelica_metatype _source, modelica_metatype _initial_, modelica_metatype _acc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instEqEquation2List,2,0) {(void*) boxptr_InstSection_instEqEquation2List,0}};
#define boxvar_InstSection_instEqEquation2List MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instEqEquation2List)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEqEquation2(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2, modelica_metatype _inType3, modelica_metatype _inConst, modelica_metatype _source, modelica_metatype _inInitial4);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instEqEquation2,2,0) {(void*) boxptr_InstSection_instEqEquation2,0}};
#define boxvar_InstSection_instEqEquation2 MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instEqEquation2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_addParForLoopScope(threadData_t *threadData, modelica_metatype _env, modelica_string _iterName, modelica_metatype _iterType, modelica_metatype _iterVariability, modelica_metatype _constOfForIteratorRange);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_addParForLoopScope,2,0) {(void*) boxptr_InstSection_addParForLoopScope,0}};
#define boxvar_InstSection_addParForLoopScope MMC_REFSTRUCTLIT(boxvar_lit_InstSection_addParForLoopScope)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_addForLoopScope(threadData_t *threadData, modelica_metatype _env, modelica_string _iterName, modelica_metatype _iterType, modelica_metatype _iterVariability, modelica_metatype _constOfForIteratorRange);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_addForLoopScope,2,0) {(void*) boxptr_InstSection_addForLoopScope,0}};
#define boxvar_InstSection_addForLoopScope MMC_REFSTRUCTLIT(boxvar_lit_InstSection_addForLoopScope)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_unroll(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_string _inIdent, modelica_metatype _inIteratorType, modelica_metatype _inValue, modelica_metatype _inEquations, modelica_metatype _inInitial, modelica_boolean _inImplicit, modelica_metatype _inGraph, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_unroll(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inIdent, modelica_metatype _inIteratorType, modelica_metatype _inValue, modelica_metatype _inEquations, modelica_metatype _inInitial, modelica_metatype _inImplicit, modelica_metatype _inGraph, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_unroll,2,0) {(void*) boxptr_InstSection_unroll,0}};
#define boxvar_InstSection_unroll MMC_REFSTRUCTLIT(boxvar_lit_InstSection_unroll)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationCommonCiTrans(threadData_t *threadData, modelica_metatype _inState, modelica_metatype _inInitial);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instEquationCommonCiTrans,2,0) {(void*) boxptr_InstSection_instEquationCommonCiTrans,0}};
#define boxvar_InstSection_instEquationCommonCiTrans MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instEquationCommonCiTrans)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_expandTupleEquationWithWild(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _propCall, modelica_metatype _propTuple, modelica_metatype *out_oprop);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_expandTupleEquationWithWild,2,0) {(void*) boxptr_InstSection_expandTupleEquationWithWild,0}};
#define boxvar_InstSection_expandTupleEquationWithWild MMC_REFSTRUCTLIT(boxvar_lit_InstSection_expandTupleEquationWithWild)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_condenseArrayEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ie1, modelica_metatype _ie2, modelica_metatype _elabedE1, modelica_metatype _elabedE2, modelica_metatype _iprop, modelica_metatype _iprop2, modelica_boolean _impl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outE1, modelica_metatype *out_outE2, modelica_metatype *out_oprop);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_condenseArrayEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ie1, modelica_metatype _ie2, modelica_metatype _elabedE1, modelica_metatype _elabedE2, modelica_metatype _iprop, modelica_metatype _iprop2, modelica_metatype _impl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outE1, modelica_metatype *out_outE2, modelica_metatype *out_oprop);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_condenseArrayEquation,2,0) {(void*) boxptr_InstSection_condenseArrayEquation,0}};
#define boxvar_InstSection_condenseArrayEquation MMC_REFSTRUCTLIT(boxvar_lit_InstSection_condenseArrayEquation)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeDAEArrayEqToReinitForm(threadData_t *threadData, modelica_metatype _inEq);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeDAEArrayEqToReinitForm,2,0) {(void*) boxptr_InstSection_makeDAEArrayEqToReinitForm,0}};
#define boxvar_InstSection_makeDAEArrayEqToReinitForm MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeDAEArrayEqToReinitForm)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationNoRetCallVectorization(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _initial_, modelica_metatype _source);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instEquationNoRetCallVectorization,2,0) {(void*) boxptr_InstSection_instEquationNoRetCallVectorization,0}};
#define boxvar_InstSection_instEquationNoRetCallVectorization MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instEquationNoRetCallVectorization)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkTupleCallEquationMessage(threadData_t *threadData, modelica_metatype _left, modelica_metatype _right, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkTupleCallEquationMessage,2,0) {(void*) boxptr_InstSection_checkTupleCallEquationMessage,0}};
#define boxvar_InstSection_checkTupleCallEquationMessage MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkTupleCallEquationMessage)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkReinitType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inProperties, modelica_metatype _inCref, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkReinitType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inProperties, modelica_metatype _inCref, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkReinitType,2,0) {(void*) boxptr_InstSection_checkReinitType,0}};
#define boxvar_InstSection_checkReinitType MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkReinitType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_uniqueRootArguments(threadData_t *threadData, modelica_metatype _inFunctionArgs, modelica_metatype _info, modelica_metatype _inPrefix, modelica_metatype _inEquation, modelica_metatype *out_outMessage);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_uniqueRootArguments,2,0) {(void*) boxptr_InstSection_uniqueRootArguments,0}};
#define boxvar_InstSection_uniqueRootArguments MMC_REFSTRUCTLIT(boxvar_lit_InstSection_uniqueRootArguments)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_potentialRootArguments(threadData_t *threadData, modelica_metatype _inFunctionArgs, modelica_metatype _info, modelica_metatype _inPrefix, modelica_metatype _inEquation, modelica_integer *out_outPriority);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_potentialRootArguments(threadData_t *threadData, modelica_metatype _inFunctionArgs, modelica_metatype _info, modelica_metatype _inPrefix, modelica_metatype _inEquation, modelica_metatype *out_outPriority);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_potentialRootArguments,2,0) {(void*) boxptr_InstSection_potentialRootArguments,0}};
#define boxvar_InstSection_potentialRootArguments MMC_REFSTRUCTLIT(boxvar_lit_InstSection_potentialRootArguments)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_handleConnectionsOperators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _flattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_handleConnectionsOperators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _flattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_handleConnectionsOperators,2,0) {(void*) boxptr_InstSection_handleConnectionsOperators,0}};
#define boxvar_InstSection_handleConnectionsOperators MMC_REFSTRUCTLIT(boxvar_lit_InstSection_handleConnectionsOperators)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_isConnectionsOperator(threadData_t *threadData, modelica_metatype _inExp);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_isConnectionsOperator(threadData_t *threadData, modelica_metatype _inExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_isConnectionsOperator,2,0) {(void*) boxptr_InstSection_isConnectionsOperator,0}};
#define boxvar_InstSection_isConnectionsOperator MMC_REFSTRUCTLIT(boxvar_lit_InstSection_isConnectionsOperator)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instOperatorArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inArg, modelica_boolean _inImpl, modelica_metatype _inExpectedType, modelica_string _inOperatorName, modelica_string _inArgName, modelica_integer _inArgIndex, modelica_metatype _inInfo, modelica_metatype *out_outArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instOperatorArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inArg, modelica_metatype _inImpl, modelica_metatype _inExpectedType, modelica_metatype _inOperatorName, modelica_metatype _inArgName, modelica_metatype _inArgIndex, modelica_metatype _inInfo, modelica_metatype *out_outArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instOperatorArg,2,0) {(void*) boxptr_InstSection_instOperatorArg,0}};
#define boxvar_InstSection_instOperatorArg MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instOperatorArg)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkIfConditionBinding(threadData_t *threadData, modelica_metatype _inValues, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkIfConditionBinding(threadData_t *threadData, modelica_metatype _inValues, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkIfConditionBinding,2,0) {(void*) boxptr_InstSection_checkIfConditionBinding,0}};
#define boxvar_InstSection_checkIfConditionBinding MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkIfConditionBinding)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkIfConditionTypes(threadData_t *threadData, modelica_metatype _inAccumProp, modelica_metatype _inConditions, modelica_metatype _inProperties, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_checkIfConditionTypes,2,0) {(void*) boxptr_InstSection_checkIfConditionTypes,0}};
#define boxvar_InstSection_checkIfConditionTypes MMC_REFSTRUCTLIT(boxvar_lit_InstSection_checkIfConditionTypes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeEqSource(threadData_t *threadData, modelica_metatype _inInfo, modelica_metatype _inEnv, modelica_metatype _inPrefix, modelica_metatype _inFlattenOp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_makeEqSource,2,0) {(void*) boxptr_InstSection_makeEqSource,0}};
#define boxvar_InstSection_makeEqSource MMC_REFSTRUCTLIT(boxvar_lit_InstSection_makeEqSource)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationCommonWork(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _inFlattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instEquationCommonWork(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _inFlattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instEquationCommonWork,2,0) {(void*) boxptr_InstSection_instEquationCommonWork,0}};
#define boxvar_InstSection_instEquationCommonWork MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instEquationCommonWork)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationCommon(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instEquationCommon(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph);
static const MMC_DEFSTRUCTLIT(boxvar_lit_InstSection_instEquationCommon,2,0) {(void*) boxptr_InstSection_instEquationCommon,0}};
#define boxvar_InstSection_instEquationCommon MMC_REFSTRUCTLIT(boxvar_lit_InstSection_instEquationCommon)
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkValidNoRetcall(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _exp;
{
modelica_string _str = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 4; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,13,3) == 0) goto tmp2_end;
goto tmp2_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,27,3) == 0) goto tmp2_end;
goto tmp2_done;
}
case 2: {
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,19,1) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (!listEmpty(tmpMeta5)) goto tmp2_end;
goto tmp2_done;
}
case 3: {
modelica_metatype tmpMeta6;
_str = omc_ExpressionDump_printExpStr(threadData, _exp);
tmpMeta6 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT4, tmpMeta6, _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_collectParallelVariablesInSubscriptList(threadData_t *threadData, modelica_metatype _inCrefInfos, modelica_metatype _inSubscriptLst, modelica_metatype _inInfo)
{
modelica_metatype _outCrefInfos = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inCrefInfos;
tmp4_2 = _inSubscriptLst;
{
modelica_metatype _restSubs = NULL;
modelica_metatype _crefInfoList = NULL;
modelica_metatype _exp1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmp4 += 2;
tmpMeta1 = _inCrefInfos;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_exp1 = tmpMeta8;
_restSubs = tmpMeta7;
_crefInfoList = tmp4_1;
tmpMeta9 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta9, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesInSubscriptList(threadData, _crefInfoList, _restSubs, _inInfo);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_2);
tmpMeta11 = MMC_CDR(tmp4_2);
_restSubs = tmpMeta11;
_crefInfoList = tmp4_1;
tmpMeta1 = omc_InstSection_collectParallelVariablesInSubscriptList(threadData, _crefInfoList, _restSubs, _inInfo);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCrefInfos = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCrefInfos;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_collectParallelVariablesinExps(threadData_t *threadData, modelica_metatype _inCrefInfos, modelica_metatype _inExps, modelica_metatype _inInfo)
{
modelica_metatype _outCrefInfos = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inCrefInfos;
tmp4_2 = _inExps;
{
modelica_metatype _restExps = NULL;
modelica_metatype _crefInfoList = NULL;
modelica_metatype _foundCref = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _exp3 = NULL;
modelica_metatype _expLst1 = NULL;
modelica_metatype _subscriptLst = NULL;
modelica_boolean _alreadyInList;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 11; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmp4 += 10;
tmpMeta1 = _inCrefInfos;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_foundCref = tmpMeta8;
_restExps = tmpMeta7;
_crefInfoList = tmp4_1;
tmp4 += 8;
_alreadyInList = omc_List_isMemberOnTrue(threadData, _foundCref, _crefInfoList, boxvar_InstSection_crefInfoListCrefsEqual);
tmp11 = (modelica_boolean)_alreadyInList;
if(tmp11)
{
tmpMeta12 = _crefInfoList;
}
else
{
tmpMeta10 = mmc_mk_box2(0, _foundCref, _inInfo);
tmpMeta9 = mmc_mk_cons(tmpMeta10, _crefInfoList);
tmpMeta12 = tmpMeta9;
}
_crefInfoList = tmpMeta12;
tmpMeta13 = _foundCref;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,1,3) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
_subscriptLst = tmpMeta14;
_crefInfoList = omc_InstSection_collectParallelVariablesInSubscriptList(threadData, _crefInfoList, _subscriptLst, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_2);
tmpMeta16 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,21,2) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
_exp1 = tmpMeta17;
_expLst1 = tmpMeta18;
_restExps = tmpMeta16;
_crefInfoList = tmp4_1;
tmp4 += 7;
tmpMeta19 = mmc_mk_cons(_exp1, _expLst1);
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta19, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_2);
tmpMeta21 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,7,3) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 4));
_exp1 = tmpMeta22;
_exp2 = tmpMeta23;
_restExps = tmpMeta21;
_crefInfoList = tmp4_1;
tmp4 += 6;
tmpMeta24 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, MMC_REFSTRUCTLIT(mmc_nil)));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta24, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta25 = MMC_CAR(tmp4_2);
tmpMeta26 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,8,2) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 3));
_exp1 = tmpMeta27;
_restExps = tmpMeta26;
_crefInfoList = tmp4_1;
tmp4 += 5;
tmpMeta28 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta28, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta29 = MMC_CAR(tmp4_2);
tmpMeta30 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,9,3) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 2));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 4));
_exp1 = tmpMeta31;
_exp2 = tmpMeta32;
_restExps = tmpMeta30;
_crefInfoList = tmp4_1;
tmp4 += 4;
tmpMeta33 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, MMC_REFSTRUCTLIT(mmc_nil)));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta33, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta34 = MMC_CAR(tmp4_2);
tmpMeta35 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,10,2) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 3));
_exp1 = tmpMeta36;
_restExps = tmpMeta35;
_crefInfoList = tmp4_1;
tmp4 += 3;
tmpMeta37 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta37, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta38 = MMC_CAR(tmp4_2);
tmpMeta39 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,18,4) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 3));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 4));
if (optionNone(tmpMeta41)) goto tmp3_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta41), 1));
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 5));
_exp1 = tmpMeta40;
_exp2 = tmpMeta42;
_exp3 = tmpMeta43;
_restExps = tmpMeta39;
_crefInfoList = tmp4_1;
tmp4 += 2;
tmpMeta44 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil))));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta44, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta45 = MMC_CAR(tmp4_2);
tmpMeta46 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta45,18,4) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 3));
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 4));
if (!optionNone(tmpMeta48)) goto tmp3_end;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 5));
_exp1 = tmpMeta47;
_exp3 = tmpMeta49;
_restExps = tmpMeta46;
_crefInfoList = tmp4_1;
tmp4 += 1;
tmpMeta50 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil)));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta50, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta51 = MMC_CAR(tmp4_2);
tmpMeta52 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta51,20,2) == 0) goto tmp3_end;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 3));
_exp1 = tmpMeta53;
_restExps = tmpMeta52;
_crefInfoList = tmp4_1;
tmpMeta54 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta54, _inInfo);
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta55 = MMC_CAR(tmp4_2);
tmpMeta56 = MMC_CDR(tmp4_2);
_restExps = tmpMeta56;
_crefInfoList = tmp4_1;
tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 11) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCrefInfos = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCrefInfos;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_collectParallelVariables(threadData_t *threadData, modelica_metatype _inCrefInfos, modelica_metatype _inStatments)
{
modelica_metatype _outCrefInfos = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inCrefInfos;
tmp4_2 = _inStatments;
{
modelica_metatype _restStmts = NULL;
modelica_metatype _stmtList = NULL;
modelica_metatype _crefInfoList = NULL;
modelica_metatype _foundCref = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _info = NULL;
modelica_string _iter = NULL;
modelica_metatype _iterType = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmp4 += 5;
tmpMeta1 = _inCrefInfos;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_exp1 = tmpMeta8;
_exp2 = tmpMeta9;
_info = tmpMeta11;
_restStmts = tmpMeta7;
_crefInfoList = tmp4_1;
tmp4 += 3;
tmpMeta12 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, MMC_REFSTRUCTLIT(mmc_nil)));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta12, _info);
tmpMeta1 = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _restStmts);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_2);
tmpMeta14 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,4,6) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 5));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 6));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 7));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_iterType = tmpMeta15;
_iter = tmpMeta16;
_exp1 = tmpMeta17;
_stmtList = tmpMeta18;
_info = tmpMeta20;
_restStmts = tmpMeta14;
_crefInfoList = tmp4_1;
tmp4 += 2;
tmpMeta21 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta21, _info);
_crefInfoList = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _stmtList);
tmpMeta22 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta23 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _iter, _iterType, tmpMeta22);
_foundCref = tmpMeta23;
_crefInfoList = omc_List_deleteMemberOnTrue(threadData, _foundCref, _crefInfoList, boxvar_InstSection_crefInfoListCrefsEqual, NULL);
tmpMeta1 = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _restStmts);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmp4_2);
tmpMeta25 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,3,4) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 5));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 2));
_exp1 = tmpMeta26;
_stmtList = tmpMeta27;
_info = tmpMeta29;
_restStmts = tmpMeta25;
_crefInfoList = tmp4_1;
tmp4 += 1;
tmpMeta30 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta30, _info);
_crefInfoList = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _stmtList);
tmpMeta1 = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _restStmts);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta31 = MMC_CAR(tmp4_2);
tmpMeta32 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta31,6,3) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 3));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 4));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
_exp1 = tmpMeta33;
_stmtList = tmpMeta34;
_info = tmpMeta36;
_restStmts = tmpMeta32;
_crefInfoList = tmp4_1;
tmpMeta37 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta37, _info);
_crefInfoList = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _stmtList);
tmpMeta1 = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _restStmts);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta38 = MMC_CAR(tmp4_2);
tmpMeta39 = MMC_CDR(tmp4_2);
_restStmts = tmpMeta39;
_crefInfoList = tmp4_1;
tmpMeta1 = omc_InstSection_collectParallelVariables(threadData, _crefInfoList, _restStmts);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCrefInfos = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCrefInfos;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_crefInfoListCrefsEqual(threadData_t *threadData, modelica_metatype _inFoundCref, modelica_metatype _inCrefInfos)
{
modelica_boolean _outBoolean;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inCrefInfos;
{
modelica_metatype _cref1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
_cref1 = tmpMeta6;
tmp1 = omc_ComponentReference_crefEqualWithoutSubs(threadData, _cref1, _inFoundCref);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outBoolean = tmp1;
_return: OMC_LABEL_UNUSED
return _outBoolean;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_crefInfoListCrefsEqual(threadData_t *threadData, modelica_metatype _inFoundCref, modelica_metatype _inCrefInfos)
{
modelica_boolean _outBoolean;
modelica_metatype out_outBoolean;
_outBoolean = omc_InstSection_crefInfoListCrefsEqual(threadData, _inFoundCref, _inCrefInfos);
out_outBoolean = mmc_mk_icon(_outBoolean);
return out_outBoolean;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_isCrefParGlobalOrForIterator(threadData_t *threadData, modelica_metatype _inCrefInfo, modelica_metatype _inCache, modelica_metatype _inEnv)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inCrefInfo;
{
modelica_string _errorString = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _info = NULL;
modelica_metatype _prl = NULL;
modelica_boolean _isParglobal;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
_cref = tmpMeta5;
omc_Lookup_lookupVar(threadData, _inCache, _inEnv, _cref, &tmpMeta6, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_prl = tmpMeta7;
_isParglobal = omc_SCodeUtil_parallelismEqual(threadData, _prl, _OMC_LIT5);
tmp8 = _isParglobal;
if (1 != tmp8) goto goto_1;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_cref = tmpMeta9;
_info = tmpMeta10;
tmpMeta11 = stringAppend(_OMC_LIT6,omc_AbsynUtil_pathString(threadData, omc_ComponentReference_crefToPath(threadData, _cref), _OMC_LIT7, 1, 0));
tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT8);
tmpMeta13 = stringAppend(tmpMeta12,_OMC_LIT9);
tmpMeta14 = stringAppend(tmpMeta13,_OMC_LIT10);
_errorString = tmpMeta14;
tmpMeta15 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT13, tmpMeta15, _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instParForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_string _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _env = NULL;
modelica_metatype _source = NULL;
modelica_metatype _loop_prl_vars = NULL;
modelica_metatype _parfor_iter = NULL;
modelica_metatype _range = NULL;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_c = omc_Types_getPropConst(threadData, _inRangeProps);
if(omc_Types_isParameterOrConstant(threadData, _c))
{
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta7 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta8 = omc_Ceval_ceval(threadData, _outCache, _inEnv, _inRange, _inImpl, tmpMeta7, ((modelica_integer) 0), &tmpMeta5);
_outCache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,5,2) == 0) goto goto_1;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
if (!listEmpty(tmpMeta6)) goto goto_1;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
_outStatements = tmpMeta9;
goto _return;
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
}
_ty = omc_Types_getPropType(threadData, _inRangeProps);
_ty = omc_InstSection_getIteratorType(threadData, _ty, _inIterator, _inInfo);
_outCache = omc_Ceval_cevalRangeIfConstant(threadData, _outCache, _inEnv, _inRange, _inRangeProps, _inImpl, _inInfo ,&_range);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _range, _inPrefix ,&_range);
_env = omc_InstSection_addParForLoopScope(threadData, _inEnv, _inIterator, _ty, _OMC_LIT14, mmc_mk_some(_c));
_outCache = omc_InstSection_instStatements(threadData, _outCache, _env, _inIH, _inPrefix, _inState, _inBody, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
_loop_prl_vars = omc_InstSection_collectParallelVariables(threadData, tmpMeta10, _outStatements);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _inIterator, _ty, tmpMeta11);
_parfor_iter = tmpMeta12;
_loop_prl_vars = omc_List_deleteMemberOnTrue(threadData, _parfor_iter, _loop_prl_vars, boxvar_InstSection_crefInfoListCrefsEqual, NULL);
omc_List_map2__0(threadData, _loop_prl_vars, boxvar_InstSection_isCrefParGlobalOrForIterator, _outCache, _env);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _inInfo);
tmpMeta13 = mmc_mk_cons(omc_Algorithm_makeParFor(threadData, _inIterator, _range, _inRangeProps, _outStatements, _loop_prl_vars, _source), MMC_REFSTRUCTLIT(mmc_nil));
_outStatements = tmpMeta13;
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
threadData->mmc_jumper = old_mmc_jumper;
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instParForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_instParForStatement__dispatch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inIterator, _inRange, _inRangeProps, _inBody, _inInfo, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instParForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_string _iterator = NULL;
modelica_metatype _oarange = NULL;
modelica_metatype _arange = NULL;
modelica_metatype _range = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _body = NULL;
modelica_metatype _info = NULL;
modelica_metatype _iter_crefs = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inForStatement;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,5) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 6));
_iterator = tmpMeta2;
_oarange = tmpMeta3;
_body = tmpMeta4;
_info = tmpMeta5;
if(isSome(_oarange))
{
tmpMeta6 = _oarange;
if (optionNone(tmpMeta6)) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_arange = tmpMeta7;
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _arange, _inImpl, 1, _inPrefix, _info ,&_range ,&_prop);
}
else
{
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
_iter_crefs = omc_SCodeUtil_findIteratorIndexedCrefsInStatements(threadData, _body, _iterator, tmpMeta8);
_range = omc_Static_deduceIterationRange(threadData, _iterator, _iter_crefs, _inEnv, _inCache, _info ,&_prop ,&_outCache);
}
if(omc_InstSection_containsWhenStatements(threadData, _body))
{
_outCache = omc_InstSection_unrollForLoop(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _iterator, _range, _prop, _body, _inForStatement, _info, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
}
else
{
_outCache = omc_InstSection_instParForStatement__dispatch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _iterator, _range, _prop, _body, _info, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
}
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instParForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_instParForStatement(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inForStatement, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_getIteratorType(threadData_t *threadData, modelica_metatype _ty, modelica_string _id, modelica_metatype _info)
{
modelica_metatype _oty = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _ty;
{
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
_str = omc_Types_unparseType(threadData, _ty);
tmpMeta7 = mmc_mk_cons(_id, mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT17, tmpMeta7, _info);
goto goto_2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_oty = tmpMeta8;
tmpMeta1 = _oty;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_oty = tmpMeta9;
tmpMeta1 = omc_Types_boxIfUnboxedType(threadData, _oty);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,22,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_oty = tmpMeta10;
tmpMeta1 = omc_Types_boxIfUnboxedType(threadData, _oty);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,25,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_oty = tmpMeta11;
_ty = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2)));
goto _tailrecursive;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta12;
_str = omc_Types_unparseType(threadData, _ty);
tmpMeta12 = mmc_mk_cons(_id, mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT17, tmpMeta12, _info);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_oty = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _oty;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_generateNoConstantBindingError(threadData_t *threadData, modelica_metatype _emptyValueOpt, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _emptyValueOpt;
{
modelica_string _scope = NULL;
modelica_string _name = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (!optionNone(tmp3_1)) goto tmp2_end;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (optionNone(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,16,4) == 0) goto tmp2_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
_scope = tmpMeta6;
_name = tmpMeta7;
tmpMeta8 = mmc_mk_cons(_name, mmc_mk_cons(_scope, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT20, tmpMeta8, _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkNoDuplicateAssignments(threadData_t *threadData, modelica_metatype _inExps, modelica_metatype _info)
{
modelica_metatype _exp = NULL;
modelica_metatype _exps = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_exps = _inExps;
while(1)
{
if(!(!listEmpty(_exps))) break;
tmpMeta1 = _exps;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
_exp = tmpMeta2;
_exps = tmpMeta3;
if(omc_Expression_isWild(threadData, _exp))
{
continue;
}
else
{
if(listMember(_exp, _exps))
{
tmpMeta4 = mmc_mk_cons(omc_ExpressionDump_printExpStr(threadData, _exp), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT23, tmpMeta4, _info);
MMC_THROW_INTERNAL();
}
}
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instAssignment2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _var, modelica_metatype _inRhs, modelica_metatype _value, modelica_metatype _props, modelica_metatype _info, modelica_metatype _inSource, modelica_metatype _initial_, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_integer _numError, modelica_metatype *out_stmts)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _outCache = NULL;
modelica_metatype _stmts = NULL;
modelica_metatype _varNoComment = NULL;
modelica_metatype _inRhsNoComment = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_varNoComment = omc_AbsynUtil_stripCommentExpressions(threadData, _var);
_inRhsNoComment = omc_AbsynUtil_stripCommentExpressions(threadData, _inRhs);
{
modelica_metatype tmp3_1;
tmp3_1 = _varNoComment;
{
modelica_metatype _lhs = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,16,1) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (listEmpty(tmpMeta5)) goto tmp2_end;
tmpMeta6 = MMC_CAR(tmpMeta5);
tmpMeta7 = MMC_CDR(tmpMeta5);
if (!listEmpty(tmpMeta7)) goto tmp2_end;
_lhs = tmpMeta6;
_outCache = omc_InstSection_instAssignment2(threadData, _inCache, _inEnv, _inIH, _inPre, _lhs, _inRhsNoComment, _value, _props, _info, _inSource, _initial_, _inImpl, _unrollForLoops, _numError ,&_stmts);
goto _return;
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
{
volatile modelica_metatype tmp11_1;volatile modelica_metatype tmp11_2;volatile modelica_metatype tmp11_3;volatile modelica_metatype tmp11_4;
tmp11_1 = _inCache;
tmp11_2 = _varNoComment;
tmp11_3 = _value;
tmp11_4 = _props;
{
modelica_metatype _ce = NULL;
modelica_metatype _ce_1 = NULL;
modelica_metatype _cprop = NULL;
modelica_metatype _eprop = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _e_1 = NULL;
modelica_metatype _e_2 = NULL;
modelica_metatype _cre = NULL;
modelica_metatype _cre2 = NULL;
modelica_metatype _e2_2 = NULL;
modelica_metatype _e2_2_2 = NULL;
modelica_metatype _lhs = NULL;
modelica_metatype _rhs = NULL;
modelica_metatype _stmt = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _e = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _left = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _expl_1 = NULL;
modelica_metatype _expl_2 = NULL;
modelica_metatype _cprops = NULL;
modelica_metatype _eprops = NULL;
modelica_metatype _attrs = NULL;
modelica_metatype _lt = NULL;
modelica_metatype _rt = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _t = NULL;
modelica_string _s = NULL;
modelica_string _lhs_str = NULL;
modelica_string _rhs_str = NULL;
modelica_string _lt_str = NULL;
modelica_string _rt_str = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pattern = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _source = NULL;
modelica_metatype _lhs_dim = NULL;
modelica_metatype _rhs_dim = NULL;
volatile mmc_switch_type tmp11;
int tmp12;
tmp11 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp10_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp11 < 12; tmp11++) {
switch (MMC_SWITCH_CAST(tmp11)) {
case 0: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,2,1) == 0) goto tmp10_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_cr = tmpMeta13;
_cache = tmp11_1;
_e_1 = tmp11_3;
tmpMeta17 = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0, _inPre, _info, &tmpMeta14, NULL, &tmpMeta16);
_cache = tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,6,2) == 0) goto goto_9;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
_lhs = tmpMeta14;
_t = tmpMeta15;
_attr = tmpMeta16;
tmpMeta18 = _t;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,6,2) == 0) goto goto_9;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 3));
if (listEmpty(tmpMeta19)) goto goto_9;
tmpMeta20 = MMC_CAR(tmpMeta19);
tmpMeta21 = MMC_CDR(tmpMeta19);
if (!listEmpty(tmpMeta21)) goto goto_9;
_rhs = _e_1;
omc_Static_checkAssignmentToInput(threadData, _varNoComment, _attr, _inEnv, 0, _info);
tmpMeta22 = omc_Expression_typeof(threadData, _lhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,6,2) == 0) goto goto_9;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
if (listEmpty(tmpMeta23)) goto goto_9;
tmpMeta24 = MMC_CAR(tmpMeta23);
tmpMeta25 = MMC_CDR(tmpMeta23);
_lhs_dim = tmpMeta24;
tmpMeta26 = omc_Expression_typeof(threadData, _rhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,6,2) == 0) goto goto_9;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
if (listEmpty(tmpMeta27)) goto goto_9;
tmpMeta28 = MMC_CAR(tmpMeta27);
tmpMeta29 = MMC_CDR(tmpMeta27);
_rhs_dim = tmpMeta28;
tmpMeta30 = omc_InstSection_expandArrayDimension(threadData, _lhs_dim, _lhs);
if (!listEmpty(tmpMeta30)) goto goto_9;
tmpMeta31 = omc_InstSection_expandArrayDimension(threadData, _rhs_dim, _rhs);
if (!listEmpty(tmpMeta31)) goto goto_9;
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta32;
goto tmp10_done;
}
case 1: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,2,1) == 0) goto tmp10_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_cr = tmpMeta33;
_cache = tmp11_1;
_e_1 = tmp11_3;
_eprop = tmp11_4;
tmp11 += 1;
tmpMeta39 = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0, _inPre, _info, &tmpMeta34, &tmpMeta37, &tmpMeta38);
_cache = tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,6,2) == 0) goto goto_9;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 2));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta34), 3));
_ce = tmpMeta35;
_t = tmpMeta36;
_cprop = tmpMeta37;
_attr = tmpMeta38;
omc_Static_checkAssignmentToInput(threadData, _varNoComment, _attr, _inEnv, 0, _info);
_cache = omc_Static_canonCref(threadData, _cache, _inEnv, _ce, _inImpl ,&_ce_1);
_cache = omc_PrefixUtil_prefixCrefInnerOuter(threadData, _cache, _inEnv, _inIH, _ce_1, _inPre ,&_ce_1);
_cache = omc_PrefixUtil_prefixExpressionsInType(threadData, _cache, _inEnv, _inIH, _inPre, _t ,&_t);
_lt = omc_Types_getPropType(threadData, _cprop);
_cache = omc_PrefixUtil_prefixExpressionsInType(threadData, _cache, _inEnv, _inIH, _inPre, _lt ,&_lt);
_cprop = omc_Types_setPropType(threadData, _cprop, _lt);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _e_1, _eprop, _inImpl, _info ,&_e_1 ,&_eprop);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _e_1, _inPre ,&_e_2);
_rt = omc_Types_getPropType(threadData, _eprop);
_cache = omc_PrefixUtil_prefixExpressionsInType(threadData, _cache, _inEnv, _inIH, _inPre, _rt ,&_rt);
_eprop = omc_Types_setPropType(threadData, _eprop, _rt);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_stmt = omc_InstSection_makeAssignment(threadData, omc_Expression_makeCrefExp(threadData, _ce_1, _t), _cprop, _e_2, _eprop, _attr, _initial_, _source);
tmpMeta40 = mmc_mk_cons(_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta40;
goto tmp10_done;
}
case 2: {
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,11,3) == 0) goto tmp10_end;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta41,2,2) == 0) goto tmp10_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta41), 2));
if (3 != MMC_STRLEN(tmpMeta42) || strcmp(MMC_STRINGDATA(_OMC_LIT43), MMC_STRINGDATA(tmpMeta42)) != 0) goto tmp10_end;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,0,2) == 0) goto tmp10_end;
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 2));
if (listEmpty(tmpMeta44)) goto tmp10_end;
tmpMeta45 = MMC_CAR(tmpMeta44);
tmpMeta46 = MMC_CDR(tmpMeta44);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta45,2,1) == 0) goto tmp10_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 2));
if (!listEmpty(tmpMeta46)) goto tmp10_end;
_e2 = tmp11_2;
_cr = tmpMeta47;
_cache = tmp11_1;
_e_1 = tmp11_3;
_eprop = tmp11_4;
tmp11 += 3;
_cache = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0, _inPre, _info ,NULL ,&_cprop ,&_attr);
tmpMeta49 = omc_Static_elabExp(threadData, _cache, _inEnv, _e2, _inImpl, 1, _inPre, _info, &tmpMeta48, NULL);
_cache = tmpMeta49;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta48,13,3) == 0) goto goto_9;
_e2_2 = tmpMeta48;
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _e2_2, _inPre ,&_e2_2_2);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _e_1, _eprop, _inImpl, _info ,&_e_1 ,&_eprop);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _e_1, _inPre ,&_e_2);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_stmt = omc_InstSection_makeAssignment(threadData, _e2_2_2, _cprop, _e_2, _eprop, _attr, _initial_, _source);
tmpMeta50 = mmc_mk_cons(_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta50;
goto tmp10_done;
}
case 3: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,2,1) == 0) goto tmp10_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_cr = tmpMeta51;
_cache = tmp11_1;
_e_1 = tmp11_3;
_eprop = tmp11_4;
tmp11 += 2;
_cache = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0, _inPre, _info ,&_cre ,&_cprop ,&_attr);
omc_Static_checkAssignmentToInput(threadData, _varNoComment, _attr, _inEnv, 0, _info);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _cre, _inPre ,&_cre2);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _e_1, _eprop, _inImpl, _info ,&_e_1 ,&_eprop);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _e_1, _inPre ,&_e_2);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_stmt = omc_InstSection_makeAssignment(threadData, _cre2, _cprop, _e_2, _eprop, _attr, _initial_, _source);
tmpMeta52 = mmc_mk_cons(_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta52;
goto tmp10_done;
}
case 4: {
modelica_metatype tmpMeta53;
modelica_boolean tmp54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,16,1) == 0) goto tmp10_end;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_expl = tmpMeta53;
_cache = tmp11_1;
_e_1 = tmp11_3;
_eprop = tmp11_4;
tmp54 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
if (1 != tmp54) goto goto_9;
tmpMeta57 = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _e_1, _eprop, _inImpl, _info, &tmpMeta55, &tmpMeta56);
_cache = tmpMeta57;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta55,13,3) == 0) goto goto_9;
_e_1 = tmpMeta55;
_eprop = tmpMeta56;
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _e_1, _inPre ,&_e_2);
_cache = omc_Static_elabExpCrefNoEvalList(threadData, _cache, _inEnv, _expl, _inImpl, 0, _inPre, _info ,&_expl_1 ,&_cprops ,&_attrs);
omc_Static_checkAssignmentToInputs(threadData, _expl, _attrs, _inEnv, _info);
omc_InstSection_checkNoDuplicateAssignments(threadData, _expl_1, _info);
_cache = omc_PrefixUtil_prefixExpList(threadData, _cache, _inEnv, _inIH, _expl_1, _inPre ,&_expl_2);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_stmt = omc_Algorithm_makeTupleAssignment(threadData, _expl_2, _cprops, _e_2, _eprop, _initial_, _source);
tmpMeta58 = mmc_mk_cons(_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta58;
goto tmp10_done;
}
case 5: {
modelica_metatype tmpMeta59;
modelica_boolean tmp60;
modelica_boolean tmp61;
modelica_boolean tmp62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,16,1) == 0) goto tmp10_end;
tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_expl = tmpMeta59;
_cache = tmp11_1;
_e_1 = tmp11_3;
_eprop = tmp11_4;
tmp60 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp60) goto goto_9;
tmp61 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
if (1 != tmp61) goto goto_9;
tmp62 = omc_Types_isTuple(threadData, omc_Types_getPropType(threadData, _eprop));
if (1 != tmp62) goto goto_9;
tmpMeta65 = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _e_1, _eprop, _inImpl, _info, &tmpMeta63, &tmpMeta64);
_cache = tmpMeta65;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta63,33,6) == 0) goto goto_9;
_e_1 = tmpMeta63;
_eprop = tmpMeta64;
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _inEnv, _inIH, _e_1, _inPre ,&_e_2);
_cache = omc_Static_elabExpCrefNoEvalList(threadData, _cache, _inEnv, _expl, _inImpl, 0, _inPre, _info ,&_expl_1 ,&_cprops ,&_attrs);
omc_Static_checkAssignmentToInputs(threadData, _expl, _attrs, _inEnv, _info);
omc_InstSection_checkNoDuplicateAssignments(threadData, _expl_1, _info);
_cache = omc_PrefixUtil_prefixExpList(threadData, _cache, _inEnv, _inIH, _expl_1, _inPre ,&_expl_2);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_stmt = omc_Algorithm_makeTupleAssignment(threadData, _expl_2, _cprops, _e_2, _eprop, _initial_, _source);
tmpMeta66 = mmc_mk_cons(_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta66;
goto tmp10_done;
}
case 6: {
modelica_boolean tmp67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_boolean tmp71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
_cache = tmp11_1;
_left = tmp11_2;
_e_1 = tmp11_3;
_prop = tmp11_4;
tmp67 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp67) goto goto_9;
_ty = omc_Types_getPropType(threadData, _prop);
_e_1 = omc_Types_convertTupleToMetaTuple(threadData, _e_1, _ty ,&_ty);
_cache = omc_Patternm_elabPatternCheckDuplicateBindings(threadData, _cache, _inEnv, _left, _ty, _info ,&_pattern);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmp71 = (modelica_boolean)omc_Types_isEmptyOrNoRetcall(threadData, _ty);
if(tmp71)
{
tmpMeta68 = mmc_mk_box3(14, &DAE_Statement_STMT__NORETCALL__desc, _e_1, _source);
tmpMeta72 = tmpMeta68;
}
else
{
tmpMeta69 = mmc_mk_box2(40, &DAE_Exp_PATTERN__desc, _pattern);
tmpMeta70 = mmc_mk_box5(3, &DAE_Statement_STMT__ASSIGN__desc, _OMC_LIT24, tmpMeta69, _e_1, _source);
tmpMeta72 = tmpMeta70;
}
_stmt = tmpMeta72;
tmpMeta73 = mmc_mk_cons(_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta73;
goto tmp10_done;
}
case 7: {
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,16,1) == 0) goto tmp10_end;
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_expl = tmpMeta74;
_cache = tmp11_1;
_e_1 = tmp11_3;
_eprop = tmp11_4;
tmpMeta78 = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _e_1, _eprop, _inImpl, _info, &tmpMeta75, &tmpMeta77);
_cache = tmpMeta78;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta75,19,1) == 0) goto goto_9;
tmpMeta76 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta75), 2));
_e_1 = tmpMeta75;
_expl_1 = tmpMeta76;
_eprop = tmpMeta77;
_cache = omc_Static_elabExpCrefNoEvalList(threadData, _cache, _inEnv, _expl, _inImpl, 0, _inPre, _info ,&_expl_2 ,&_cprops ,&_attrs);
omc_Static_checkAssignmentToInputs(threadData, _expl, _attrs, _inEnv, _info);
omc_InstSection_checkNoDuplicateAssignments(threadData, _expl_2, _info);
_cache = omc_PrefixUtil_prefixExpList(threadData, _cache, _inEnv, _inIH, _expl_2, _inPre ,&_expl_2);
_eprops = omc_Types_propTuplePropList(threadData, _eprop);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_stmts = omc_Algorithm_makeAssignmentsList(threadData, _expl_2, _cprops, _expl_1, _eprops, _OMC_LIT30, _initial_, _source);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _stmts;
goto tmp10_done;
}
case 8: {
modelica_metatype tmpMeta79;
modelica_boolean tmp80;
modelica_metatype tmpMeta81;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,16,1) == 0) goto tmp10_end;
tmpMeta79 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_e = tmp11_2;
_expl = tmpMeta79;
tmp80 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
if (0 != tmp80) goto goto_9;
_s = omc_Dump_printExpStr(threadData, _e);
tmpMeta81 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT33, tmpMeta81, _info);
goto goto_9;
goto tmp10_done;
}
case 9: {
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_boolean tmp84;
modelica_boolean tmp85;
modelica_metatype tmpMeta86;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,16,1) == 0) goto tmp10_end;
tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_e1 = tmp11_2;
_expl = tmpMeta82;
_cache = tmp11_1;
_prop2 = tmp11_4;
tmpMeta83 = _inRhsNoComment;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta83,11,3) == 0) goto goto_9;
tmp84 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
if (1 != tmp84) goto goto_9;
_cache = omc_Static_elabExpLHS(threadData, _cache, _inEnv, _e1, _inImpl, 0, _inPre, _info ,&_e_1 ,&_prop1);
_lt = omc_Types_getPropType(threadData, _prop1);
_rt = omc_Types_getPropType(threadData, _prop2);
tmp85 = omc_Types_subtype(threadData, _lt, _rt, 1);
if (0 != tmp85) goto goto_9;
_lhs_str = omc_ExpressionDump_printExpStr(threadData, _e_1);
_rhs_str = omc_Dump_printExpStr(threadData, _inRhs);
_lt_str = omc_Types_unparseTypeNoAttr(threadData, _lt);
_rt_str = omc_Types_unparseTypeNoAttr(threadData, _rt);
omc_Types_typeErrorSanityCheck(threadData, _lt_str, _rt_str, _info);
tmpMeta86 = mmc_mk_cons(_lhs_str, mmc_mk_cons(_rhs_str, mmc_mk_cons(_lt_str, mmc_mk_cons(_rt_str, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessage(threadData, _OMC_LIT36, tmpMeta86, _info);
goto goto_9;
goto tmp10_done;
}
case 10: {
modelica_metatype tmpMeta87;
modelica_boolean tmp88;
modelica_boolean tmp89;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
if (mmc__uniontype__metarecord__typedef__equal(tmp11_2,16,1) == 0) goto tmp10_end;
tmpMeta87 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_2), 2));
_expl = tmpMeta87;
_e_1 = tmp11_3;
tmp88 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
if (1 != tmp88) goto goto_9;
tmp89 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta91 = _inRhsNoComment;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta91,11,3) == 0) goto goto_90;
tmp89 = 1;
goto goto_90;
goto_90:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp89) {goto goto_9;}
_s = omc_ExpressionDump_printExpStr(threadData, _e_1);
tmpMeta92 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT39, tmpMeta92, _info);
goto goto_9;
goto tmp10_done;
}
case 11: {
modelica_boolean tmp93;
modelica_metatype tmpMeta94;
tmp93 = (_numError == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp93) goto goto_9;
_s1 = omc_Dump_printExpStr(threadData, _var);
_s2 = omc_ExpressionDump_printExpStr(threadData, _value);
tmpMeta94 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT42, tmpMeta94, _info);
goto goto_9;
goto tmp10_done;
}
}
goto tmp10_end;
tmp10_end: ;
}
goto goto_9;
tmp10_done:
(void)tmp11;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp10_done2;
goto_9:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp11 < 12) {
goto tmp10_top;
}
MMC_THROW_INTERNAL();
tmp10_done2:;
}
}
_outCache = tmpMeta[0+0];
_stmts = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_stmts) { *out_stmts = _stmts; }
threadData->mmc_jumper = old_mmc_jumper;
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instAssignment2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _var, modelica_metatype _inRhs, modelica_metatype _value, modelica_metatype _props, modelica_metatype _info, modelica_metatype _inSource, modelica_metatype _initial_, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _numError, modelica_metatype *out_stmts)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
tmp3 = mmc_unbox_integer(_numError);
_outCache = omc_InstSection_instAssignment2(threadData, _inCache, _inEnv, _inIH, _inPre, _var, _inRhs, _value, _props, _info, _inSource, _initial_, tmp1, tmp2, tmp3, out_stmts);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instAssignment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ih, modelica_metatype _inPre, modelica_metatype _alg, modelica_metatype _source, modelica_metatype _initial_, modelica_boolean _impl, modelica_boolean _unrollForLoops, modelica_integer _numError, modelica_metatype *out_stmts)
{
modelica_metatype _outCache = NULL;
modelica_metatype _stmts = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inPre;
tmp4_4 = _alg;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _e_1 = NULL;
modelica_metatype _eprop = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _var = NULL;
modelica_metatype _value = NULL;
modelica_metatype _info = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 5));
_var = tmpMeta6;
_value = tmpMeta7;
_info = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_3;
_cache = omc_Static_elabExp(threadData, _cache, _env, _value, _impl, 1, _pre, _info ,&_e_1 ,&_eprop);
tmpMeta[0+0] = omc_InstSection_instAssignment2(threadData, _cache, _env, _ih, _pre, _var, _value, _e_1, _eprop, _info, omc_ElementSource_addAnnotation(threadData, _source, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_alg), 4)))), _initial_, _impl, _unrollForLoops, _numError, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
modelica_boolean tmp12;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,4) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 5));
_value = tmpMeta9;
_info = tmpMeta10;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_3;
tmp11 = (_numError == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp11) goto goto_2;
tmp12 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_Static_elabExp(threadData, _cache, _env, _value, _impl, 1, _pre, _info, NULL, NULL);
tmp12 = 1;
goto goto_13;
goto_13:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp12) {goto goto_2;}
_str = omc_Dump_unparseAlgorithmStr(threadData, omc_SCodeUtil_statementToAlgorithmItem(threadData, _alg));
tmpMeta14 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT46, tmpMeta14, _info);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_stmts = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_stmts) { *out_stmts = _stmts; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instAssignment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ih, modelica_metatype _inPre, modelica_metatype _alg, modelica_metatype _source, modelica_metatype _initial_, modelica_metatype _impl, modelica_metatype _unrollForLoops, modelica_metatype _numError, modelica_metatype *out_stmts)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_impl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
tmp3 = mmc_unbox_integer(_numError);
_outCache = omc_InstSection_instAssignment(threadData, _inCache, _inEnv, _ih, _inPre, _alg, _source, _initial_, tmp1, tmp2, tmp3, out_stmts);
return _outCache;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEq(threadData_t *threadData, modelica_metatype _inEq)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inEq;
{
modelica_metatype _eqs = NULL;
modelica_metatype _eqs_lst = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _info = NULL;
modelica_string _cr1_str = NULL;
modelica_string _cr2_str = NULL;
int tmp3;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp3_1))) {
case 8: {
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,5) == 0) goto tmp2_end;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 6));
_info = tmpMeta4;
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT49, tmpMeta5, _info);
goto goto_1;
goto tmp2_done;
}
case 3: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,5) == 0) goto tmp2_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
_eqs_lst = tmpMeta6;
_eqs = tmpMeta7;
omc_List_map__0(threadData, _eqs_lst, boxvar_InstSection_checkForNestedWhenInEqList);
omc_InstSection_checkForNestedWhenInEqList(threadData, _eqs);
goto tmp2_done;
}
case 7: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,4,5) == 0) goto tmp2_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
_eqs = tmpMeta8;
omc_InstSection_checkForNestedWhenInEqList(threadData, _eqs);
goto tmp2_done;
}
case 4: {
goto tmp2_done;
}
case 5: {
goto tmp2_done;
}
case 6: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,4) == 0) goto tmp2_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 5));
_cr1 = tmpMeta9;
_cr2 = tmpMeta10;
_info = tmpMeta11;
_cr1_str = omc_Dump_printComponentRefStr(threadData, _cr1);
_cr2_str = omc_Dump_printComponentRefStr(threadData, _cr2);
tmpMeta12 = mmc_mk_cons(_cr1_str, mmc_mk_cons(_cr2_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT52, tmpMeta12, _info);
goto goto_1;
goto tmp2_done;
}
case 9: {
goto tmp2_done;
}
case 10: {
goto tmp2_done;
}
case 11: {
goto tmp2_done;
}
case 12: {
goto tmp2_done;
}
default:
tmp2_default: OMC_LABEL_UNUSED; {
modelica_boolean tmp13;
tmp13 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp13) goto goto_1;
omc_Debug_trace(threadData, _OMC_LIT57);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEqList(threadData_t *threadData, modelica_metatype _inEqs)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_List_map__0(threadData, _inEqs, boxvar_InstSection_checkForNestedWhenInEq);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEquation(threadData_t *threadData, modelica_metatype _inWhenEq)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inWhenEq;
{
modelica_metatype _eqs = NULL;
modelica_metatype _eqs_lst = NULL;
modelica_metatype _tpl_el = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 1; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,5) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
_eqs = tmpMeta5;
_tpl_el = tmpMeta6;
omc_InstSection_checkForNestedWhenInEqList(threadData, _eqs);
_eqs_lst = omc_List_map(threadData, _tpl_el, boxvar_Util_tuple22);
omc_List_map__0(threadData, _eqs_lst, boxvar_InstSection_checkForNestedWhenInEqList);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkForReinitInWhenInitialEq(threadData_t *threadData, modelica_metatype _inWhenEq)
{
modelica_boolean _outOK;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inWhenEq;
{
modelica_metatype _exp = NULL;
modelica_metatype _info = NULL;
modelica_metatype _el = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,5) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_exp = tmpMeta6;
_el = tmpMeta7;
_info = tmpMeta8;
tmp9 = omc_AbsynUtil_expContainsInitial(threadData, _exp);
if (1 != tmp9) goto goto_2;
tmp10 = omc_SCodeUtil_equationsContainReinit(threadData, _el);
if (1 != tmp10) goto goto_2;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT60, tmpMeta11, _info);
tmp1 = 0;
goto tmp3_done;
}
case 1: {
tmp1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outOK = tmp1;
_return: OMC_LABEL_UNUSED
return _outOK;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkForReinitInWhenInitialEq(threadData_t *threadData, modelica_metatype _inWhenEq)
{
modelica_boolean _outOK;
modelica_metatype out_outOK;
_outOK = omc_InstSection_checkForReinitInWhenInitialEq(threadData, _inWhenEq);
out_outOK = mmc_mk_icon(_outOK);
return out_outOK;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkWhenEquation(threadData_t *threadData, modelica_metatype _inWhenEq)
{
modelica_boolean tmp1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmp1 = omc_InstSection_checkForReinitInWhenInitialEq(threadData, _inWhenEq);
if (1 != tmp1) MMC_THROW_INTERNAL();
omc_InstSection_checkForNestedWhenInEquation(threadData, _inWhenEq);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInStatements(threadData_t *threadData, modelica_metatype _inWhenAlgorithm)
{
modelica_metatype _branches = NULL;
modelica_metatype _info = NULL;
modelica_metatype _body = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inWhenAlgorithm;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,5,3) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
_branches = tmpMeta2;
_info = tmpMeta3;
{
modelica_metatype _branch;
for (tmpMeta4 = _branches; !listEmpty(tmpMeta4); tmpMeta4=MMC_CDR(tmpMeta4))
{
_branch = MMC_CAR(tmpMeta4);
tmpMeta5 = _branch;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
_body = tmpMeta6;
if(omc_InstSection_containsWhenStatements(threadData, _body))
{
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT49, tmpMeta7, _info);
}
}
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkForReinitInWhenInitialAlg(threadData_t *threadData, modelica_metatype _inWhenAlgorithm)
{
modelica_boolean _outOK;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inWhenAlgorithm;
{
modelica_metatype _exp = NULL;
modelica_metatype _info = NULL;
modelica_metatype _algs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_boolean tmp12;
modelica_boolean tmp13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp = tmpMeta9;
_algs = tmpMeta10;
_info = tmpMeta11;
tmp12 = omc_AbsynUtil_expContainsInitial(threadData, _exp);
if (1 != tmp12) goto goto_2;
tmp13 = omc_SCodeUtil_algorithmsContainReinit(threadData, _algs);
if (1 != tmp13) goto goto_2;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT60, tmpMeta14, _info);
tmp1 = 0;
goto tmp3_done;
}
case 1: {
tmp1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outOK = tmp1;
_return: OMC_LABEL_UNUSED
return _outOK;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkForReinitInWhenInitialAlg(threadData_t *threadData, modelica_metatype _inWhenAlgorithm)
{
modelica_boolean _outOK;
modelica_metatype out_outOK;
_outOK = omc_InstSection_checkForReinitInWhenInitialAlg(threadData, _inWhenAlgorithm);
out_outOK = mmc_mk_icon(_outOK);
return out_outOK;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkWhenAlgorithm(threadData_t *threadData, modelica_metatype _inWhenAlgorithm)
{
modelica_boolean tmp1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmp1 = omc_InstSection_checkForReinitInWhenInitialAlg(threadData, _inWhenAlgorithm);
if (1 != tmp1) MMC_THROW_INTERNAL();
omc_InstSection_checkForNestedWhenInStatements(threadData, _inWhenAlgorithm);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_getVectorizedCref(threadData_t *threadData, modelica_metatype _crefOrArray)
{
modelica_metatype _cref = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _crefOrArray;
{
modelica_metatype _cr = NULL;
modelica_metatype _t = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
_cref = tmp4_1;
tmpMeta1 = _cref;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,6,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
_cr = tmpMeta9;
_t = tmpMeta10;
_cr = omc_ComponentReference_crefStripLastSubs(threadData, _cr);
tmpMeta1 = omc_Expression_makeCrefExp(threadData, _cr, _t);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_cref = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _cref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeEnumLiteralIndices(threadData_t *threadData, modelica_metatype _enumTypeName, modelica_metatype _enumLiterals, modelica_integer _enumIndex, modelica_metatype _expr)
{
modelica_metatype _enumIndices = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _enumLiterals;
{
modelica_string _l = NULL;
modelica_metatype _ls = NULL;
modelica_metatype _e = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _enum_type_name = NULL;
modelica_integer _index;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
_l = tmpMeta7;
_ls = tmpMeta8;
tmpMeta9 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _l);
_enum_type_name = omc_AbsynUtil_joinPaths(threadData, _enumTypeName, tmpMeta9);
tmpMeta10 = mmc_mk_box3(8, &DAE_Exp_ENUM__LITERAL__desc, _enum_type_name, mmc_mk_integer(_enumIndex));
_e = tmpMeta10;
tmpMeta11 = mmc_mk_cons(_e, MMC_REFSTRUCTLIT(mmc_nil));
_e = omc_ExpressionSimplify_simplify1(threadData, omc_Expression_makeASUB(threadData, _expr, tmpMeta11), NULL);
_e = (omc_Expression_isCref(threadData, _e)?omc_Expression_unliftExp(threadData, _e):_e);
_index = ((modelica_integer) 1) + _enumIndex;
_expl = omc_InstSection_makeEnumLiteralIndices(threadData, _enumTypeName, _ls, _index, _expr);
tmpMeta12 = mmc_mk_cons(_e, _expl);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_enumIndices = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _enumIndices;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_makeEnumLiteralIndices(threadData_t *threadData, modelica_metatype _enumTypeName, modelica_metatype _enumLiterals, modelica_metatype _enumIndex, modelica_metatype _expr)
{
modelica_integer tmp1;
modelica_metatype _enumIndices = NULL;
tmp1 = mmc_unbox_integer(_enumIndex);
_enumIndices = omc_InstSection_makeEnumLiteralIndices(threadData, _enumTypeName, _enumLiterals, tmp1, _expr);
return _enumIndices;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeAsubIndex(threadData_t *threadData, modelica_integer _index, modelica_metatype _expr)
{
modelica_metatype _asub = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta2 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_index));
tmpMeta1 = mmc_mk_cons(tmpMeta2, MMC_REFSTRUCTLIT(mmc_nil));
_asub = omc_ExpressionSimplify_simplify1(threadData, omc_Expression_makeASUB(threadData, _expr, tmpMeta1), NULL);
_return: OMC_LABEL_UNUSED
return _asub;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_makeAsubIndex(threadData_t *threadData, modelica_metatype _index, modelica_metatype _expr)
{
modelica_integer tmp1;
modelica_metatype _asub = NULL;
tmp1 = mmc_unbox_integer(_index);
_asub = omc_InstSection_makeAsubIndex(threadData, tmp1, _expr);
return _asub;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_expandArrayDimension(threadData_t *threadData, modelica_metatype _inDim, modelica_metatype _inArray)
{
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inDim;
tmp4_2 = _inArray;
{
modelica_integer _sz;
modelica_metatype _ints = NULL;
modelica_metatype _name = NULL;
modelica_metatype _ls = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_outExpl = tmpMeta6;
tmpMeta1 = _outExpl;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
if (0 != tmp8) goto tmp3_end;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
_sz = tmp11;
tmp4 += 3;
_ints = omc_List_intRange(threadData, _sz);
tmpMeta1 = omc_List_map1(threadData, _ints, boxvar_InstSection_makeAsubIndex, _inArray);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,0) == 0) goto tmp3_end;
tmp4 += 2;
tmpMeta12 = mmc_mk_cons(omc_ExpressionSimplify_simplify1(threadData, omc_Expression_makeASUB(threadData, _inArray, _OMC_LIT62), NULL), mmc_mk_cons(omc_ExpressionSimplify_simplify1(threadData, omc_Expression_makeASUB(threadData, _inArray, _OMC_LIT64), NULL), MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_name = tmpMeta13;
_ls = tmpMeta14;
tmp4 += 1;
tmpMeta1 = omc_InstSection_makeEnumLiteralIndices(threadData, _name, _ls, ((modelica_integer) 1), _inArray);
goto tmp3_done;
}
case 5: {
modelica_boolean tmp15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,0) == 0) goto tmp3_end;
tmp15 = omc_Flags_getConfigBool(threadData, _OMC_LIT70);
if (1 != tmp15) goto goto_2;
_ints = omc_List_intRange(threadData, ((modelica_integer) 1));
tmpMeta1 = omc_List_map1(threadData, _ints, boxvar_InstSection_makeAsubIndex, _inArray);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExpl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_propagateConnectorType(threadData_t *threadData, modelica_metatype _inConnectorType, modelica_metatype _inSubConnectorType)
{
modelica_metatype _outSubConnectorType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inConnectorType;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
tmpMeta1 = _inSubConnectorType;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inConnectorType;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outSubConnectorType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outSubConnectorType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectVars(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRef3, modelica_metatype _inFace4, modelica_metatype _inTypesVarLst5, modelica_metatype _vt1, modelica_metatype _inComponentRef6, modelica_metatype _inFace7, modelica_metatype _inTypesVarLst8, modelica_metatype _vt2, modelica_metatype _inConnectorType, modelica_metatype _io1, modelica_metatype _io2, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;modelica_metatype tmp4_7;modelica_metatype tmp4_8;modelica_metatype tmp4_9;modelica_metatype tmp4_10;modelica_metatype tmp4_11;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inSets;
tmp4_5 = _inComponentRef3;
tmp4_6 = _inFace4;
tmp4_7 = _inTypesVarLst5;
tmp4_8 = _inComponentRef6;
tmp4_9 = _inFace7;
tmp4_10 = _inTypesVarLst8;
tmp4_11 = _inGraph;
{
modelica_metatype _sets = NULL;
modelica_metatype _sets_1 = NULL;
modelica_metatype _sets_2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _c1_1 = NULL;
modelica_metatype _c2_1 = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _dae = NULL;
modelica_metatype _dae2 = NULL;
modelica_metatype _dae_1 = NULL;
modelica_metatype _f1 = NULL;
modelica_metatype _f2 = NULL;
modelica_string _n = NULL;
modelica_metatype _attr1 = NULL;
modelica_metatype _attr2 = NULL;
modelica_metatype _ct = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _xs1 = NULL;
modelica_metatype _xs2 = NULL;
modelica_metatype _vta = NULL;
modelica_metatype _vtb = NULL;
modelica_metatype _ty_2 = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_7)) goto tmp3_end;
if (!listEmpty(tmp4_10)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_graph = tmp4_11;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_7)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_7);
tmpMeta7 = MMC_CDR(tmp4_7);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 4));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (listEmpty(tmp4_10)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_10);
tmpMeta14 = MMC_CDR(tmp4_10);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
_n = tmpMeta8;
_attr1 = tmpMeta9;
_ct = tmpMeta10;
_vta = tmpMeta11;
_ty1 = tmpMeta12;
_xs1 = tmpMeta7;
_attr2 = tmpMeta15;
_vtb = tmpMeta16;
_ty2 = tmpMeta17;
_xs2 = tmpMeta14;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_c1 = tmp4_5;
_f1 = tmp4_6;
_c2 = tmp4_8;
_f2 = tmp4_9;
_graph = tmp4_11;
_ty_2 = omc_Types_simplifyType(threadData, _ty1);
_ct = omc_InstSection_propagateConnectorType(threadData, _inConnectorType, _ct);
tmpMeta18 = MMC_REFSTRUCTLIT(mmc_nil);
_c1_1 = omc_ComponentReference_crefPrependIdent(threadData, _c1, _n, tmpMeta18, _ty_2);
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
_c2_1 = omc_ComponentReference_crefPrependIdent(threadData, _c2, _n, tmpMeta19, _ty_2);
omc_InstSection_checkConnectTypes(threadData, _c1_1, _ty1, _f1, _attr1, _c2_1, _ty2, _f2, _attr2, _info);
_cache = omc_InstSection_connectComponents(threadData, _cache, _env, _ih, _sets, _inPrefix, _c1_1, _f1, _ty1, _vta, _c2_1, _f2, _ty2, _vtb, _ct, _io1, _io2, _graph, _info ,NULL ,&_ih ,&_sets_1 ,&_dae ,&_graph);
_cache = omc_InstSection_connectVars(threadData, _cache, _env, _ih, _sets_1, _inPrefix, _c1, _f1, _xs1, _vt1, _c2, _f2, _xs2, _vt2, _inConnectorType, _io1, _io2, _graph, _info ,NULL ,&_ih ,&_sets_2 ,&_dae2 ,&_graph);
_dae_1 = omc_DAEUtil_joinDaes(threadData, _dae, _dae2);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_2;
tmpMeta[0+4] = _dae_1;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outSets = tmpMeta[0+3];
_outDae = tmpMeta[0+4];
_outGraph = tmpMeta[0+5];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectArrayComponents(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inLhsCrefs, modelica_metatype _inLhsFace, modelica_metatype _inLhsType, modelica_metatype _inLhsVar, modelica_metatype _inLhsIO, modelica_metatype _inRhsCrefs, modelica_metatype _inRhsFace, modelica_metatype _inRhsType, modelica_metatype _inRhsVar, modelica_metatype _inRhsIO, modelica_metatype _inConnectorType, modelica_metatype _inGraph, modelica_metatype _inInfo, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inLhsCrefs;
tmp4_2 = _inRhsCrefs;
{
modelica_metatype _lhs = NULL;
modelica_metatype _rhs = NULL;
modelica_metatype _rest_lhs = NULL;
modelica_metatype _rest_rhs = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _sets = NULL;
modelica_metatype _dae1 = NULL;
modelica_metatype _dae2 = NULL;
modelica_metatype _graph = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmp4_2);
tmpMeta9 = MMC_CDR(tmp4_2);
_lhs = tmpMeta6;
_rest_lhs = tmpMeta7;
_rhs = tmpMeta8;
_rest_rhs = tmpMeta9;
_cache = omc_InstSection_connectComponents(threadData, _inCache, _inEnv, _inIH, _inSets, _inPrefix, _lhs, _inLhsFace, _inLhsType, _inLhsVar, _rhs, _inRhsFace, _inRhsType, _inRhsVar, _inConnectorType, _inLhsIO, _inRhsIO, _inGraph, _inInfo ,&_env ,&_ih ,&_sets ,&_dae1 ,&_graph);
_cache = omc_InstSection_connectArrayComponents(threadData, _cache, _env, _ih, _sets, _inPrefix, _rest_lhs, _inLhsFace, _inLhsType, _inLhsVar, _inLhsIO, _rest_rhs, _inRhsFace, _inRhsType, _inRhsVar, _inRhsIO, _inConnectorType, _graph, _inInfo ,&_env ,&_ih ,&_sets ,&_dae2 ,&_graph);
_dae1 = omc_DAEUtil_joinDaes(threadData, _dae1, _dae2);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _dae1;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inIH;
tmpMeta[0+3] = _inSets;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _inGraph;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outSets = tmpMeta[0+3];
_outDae = tmpMeta[0+4];
_outGraph = tmpMeta[0+5];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_generateConnectAssert(threadData_t *threadData, modelica_metatype _inLhsExp, modelica_metatype _inRhsExp, modelica_metatype _inSource)
{
modelica_metatype _outAssert = NULL;
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_box6(14, &DAE_Exp_RELATION__desc, _inLhsExp, _OMC_LIT73, _inRhsExp, mmc_mk_integer(((modelica_integer) -1)), mmc_mk_none());
_exp = tmpMeta1;
_exp = omc_ExpressionSimplify_simplify(threadData, _exp, NULL);
tmpMeta2 = mmc_mk_box5(23, &DAE_Element_ASSERT__desc, _exp, _OMC_LIT75, _OMC_LIT80, _inSource);
_outAssert = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _outAssert;
}
DLLExport
modelica_metatype omc_InstSection_connectComponents(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix3, modelica_metatype _cr1, modelica_metatype _inFace5, modelica_metatype _inType6, modelica_metatype _vt1, modelica_metatype _cr2, modelica_metatype _inFace8, modelica_metatype _inType9, modelica_metatype _vt2, modelica_metatype _inConnectorType, modelica_metatype _io1, modelica_metatype _io2, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_metatype tmp4_8;volatile modelica_metatype tmp4_9;volatile modelica_metatype tmp4_10;volatile modelica_metatype tmp4_11;volatile modelica_metatype tmp4_12;volatile modelica_metatype tmp4_13;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inSets;
tmp4_5 = _inPrefix3;
tmp4_6 = _cr1;
tmp4_7 = _inFace5;
tmp4_8 = _inType6;
tmp4_9 = _cr2;
tmp4_10 = _inFace8;
tmp4_11 = _inType9;
tmp4_12 = _inConnectorType;
tmp4_13 = _inGraph;
{
modelica_metatype _c1_1 = NULL;
modelica_metatype _c2_1 = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _c1p = NULL;
modelica_metatype _c2p = NULL;
modelica_metatype _sets_1 = NULL;
modelica_metatype _sets = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _f1 = NULL;
modelica_metatype _f2 = NULL;
modelica_metatype _t1 = NULL;
modelica_metatype _t2 = NULL;
modelica_metatype _bc_tp1 = NULL;
modelica_metatype _bc_tp2 = NULL;
modelica_metatype _equalityConstraintFunctionReturnType = NULL;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
modelica_metatype _dae = NULL;
modelica_metatype _l1 = NULL;
modelica_metatype _l2 = NULL;
modelica_metatype _ct = NULL;
modelica_string _c1_str = NULL;
modelica_string _t1_str = NULL;
modelica_string _t2_str = NULL;
modelica_string _c2_str = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _source = NULL;
modelica_metatype _inlineType1 = NULL;
modelica_metatype _fpath1 = NULL;
modelica_integer _idim1;
modelica_metatype _zeroVector = NULL;
modelica_metatype _crefExp1 = NULL;
modelica_metatype _crefExp2 = NULL;
modelica_metatype _breakDAEElements = NULL;
modelica_metatype _elts = NULL;
modelica_metatype _equalityConstraintFunction = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _dims2 = NULL;
modelica_metatype _crefs1 = NULL;
modelica_metatype _crefs2 = NULL;
modelica_metatype _const1 = NULL;
modelica_metatype _const2 = NULL;
modelica_metatype _lhsl = NULL;
modelica_metatype _rhsl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 14; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_boolean tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_ct = tmp4_12;
_graph = tmp4_13;
tmp6 = omc_DAEUtil_streamBool(threadData, _ct);
if (0 != tmp6) goto goto_2;
tmp7 = omc_InnerOuter_outerConnection(threadData, _io1, _io2);
if (1 != tmp7) goto goto_2;
tmpMeta10 = omc_PrefixUtil_prefixExp(threadData, _cache, _env, _ih, omc_Expression_crefExp(threadData, _c1), _pre, &tmpMeta8);
_cache = tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,6,2) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_c1_1 = tmpMeta9;
tmpMeta13 = omc_PrefixUtil_prefixExp(threadData, _cache, _env, _ih, omc_Expression_crefExp(threadData, _c2), _pre, &tmpMeta11);
_cache = tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,6,2) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_c2_1 = tmpMeta12;
tmpMeta14 = mmc_mk_box2(0, _c1_1, _c2_1);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta14);
_sets = omc_ConnectUtil_addOuterConnection(threadData, _pre, _sets, _c1_1, _c2_1, _io1, _io2, _f1, _f2, _source);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp15;
modelica_boolean tmp16;
modelica_boolean tmp17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_12,0,0) == 0) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_t1 = tmp4_8;
_c2 = tmp4_9;
_t2 = tmp4_11;
_graph = tmp4_13;
tmp15 = (omc_SCodeUtil_isParameterOrConst(threadData, _vt1) && omc_SCodeUtil_isParameterOrConst(threadData, _vt2));
if (1 != tmp15) goto goto_2;
tmp16 = omc_Types_basicType(threadData, omc_Types_arrayElementType(threadData, _t1));
if (1 != tmp16) goto goto_2;
tmp17 = omc_Types_basicType(threadData, omc_Types_arrayElementType(threadData, _t2));
if (1 != tmp17) goto goto_2;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1 ,&_c1_1);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2 ,&_c2_1);
tmpMeta18 = mmc_mk_box2(0, _c1_1, _c2_1);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta18);
_crefExp1 = omc_Expression_crefExp(threadData, _c1_1);
_crefExp2 = omc_Expression_crefExp(threadData, _c2_1);
_const1 = omc_Types_variabilityToConst(threadData, _vt1);
_const2 = omc_Types_variabilityToConst(threadData, _vt2);
tmpMeta19 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t1, _const1);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _crefExp1, tmpMeta19, 1, _info ,&_crefExp1, NULL);
tmpMeta20 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t2, _const2);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _crefExp2, tmpMeta20, 1, _info ,&_crefExp2, NULL);
_lhsl = omc_Expression_arrayElements(threadData, _crefExp1);
_rhsl = omc_Expression_arrayElements(threadData, _crefExp2);
_elts = omc_List_threadMap1(threadData, _lhsl, _rhsl, boxvar_InstSection_generateConnectAssert, _source);
tmpMeta21 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, _elts);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = tmpMeta21;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp22;
modelica_boolean tmp23;
modelica_metatype tmpMeta24;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_t1 = tmp4_8;
_c2 = tmp4_9;
_f2 = tmp4_10;
_t2 = tmp4_11;
_graph = tmp4_13;
tmp22 = omc_Types_basicType(threadData, _t1);
if (1 != tmp22) goto goto_2;
tmp23 = omc_Types_basicType(threadData, _t2);
if (1 != tmp23) goto goto_2;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1 ,&_c1_1);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2 ,&_c2_1);
tmpMeta24 = mmc_mk_box2(0, _c1_1, _c2_1);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta24);
_sets_1 = omc_ConnectUtil_addConnection(threadData, _sets, _c1, _f1, _c2, _f2, _inConnectorType, _source);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_boolean tmp35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_12,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,6,2) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 3));
if (listEmpty(tmpMeta26)) goto tmp3_end;
tmpMeta27 = MMC_CAR(tmpMeta26);
tmpMeta28 = MMC_CDR(tmpMeta26);
if (!listEmpty(tmpMeta28)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,6,2) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 2));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 3));
if (listEmpty(tmpMeta30)) goto tmp3_end;
tmpMeta31 = MMC_CAR(tmpMeta30);
tmpMeta32 = MMC_CDR(tmpMeta30);
if (!listEmpty(tmpMeta32)) goto tmp3_end;
_ct = tmp4_12;
_t1 = tmpMeta25;
_dim1 = tmpMeta27;
_t2 = tmpMeta29;
_dim2 = tmpMeta31;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_graph = tmp4_13;
tmpMeta33 = omc_Types_arrayElementType(threadData, _t1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,9,3) == 0) goto goto_2;
tmpMeta34 = omc_Types_arrayElementType(threadData, _t2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,9,3) == 0) goto goto_2;
tmp35 = omc_Expression_dimensionsKnownAndEqual(threadData, _dim1, _dim2);
if (1 != tmp35) goto goto_2;
omc_Expression_dimensionSize(threadData, _dim1);
_crefs1 = omc_ComponentReference_expandCref(threadData, _c1, 0);
_crefs2 = omc_ComponentReference_expandCref(threadData, _c2, 0);
_cache = omc_InstSection_connectArrayComponents(threadData, _cache, _env, _ih, _sets, _pre, _crefs1, _f1, _t1, _vt1, _io1, _crefs2, _f2, _t2, _vt2, _io2, _ct, _graph, _info ,NULL ,&_ih ,&_sets_1 ,&_dae ,&_graph);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_boolean tmp50;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_12,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,6,2) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 3));
if (listEmpty(tmpMeta37)) goto tmp3_end;
tmpMeta38 = MMC_CAR(tmpMeta37);
tmpMeta39 = MMC_CDR(tmpMeta37);
if (!listEmpty(tmpMeta39)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,6,2) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 2));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 3));
if (listEmpty(tmpMeta41)) goto tmp3_end;
tmpMeta42 = MMC_CAR(tmpMeta41);
tmpMeta43 = MMC_CDR(tmpMeta41);
if (!listEmpty(tmpMeta43)) goto tmp3_end;
_ct = tmp4_12;
_t1 = tmpMeta36;
_dim1 = tmpMeta38;
_t2 = tmpMeta40;
_dim2 = tmpMeta42;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_graph = tmp4_13;
tmpMeta44 = omc_Types_arrayElementType(threadData, _t1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta44,10,4) == 0) goto goto_2;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta44), 5));
if (optionNone(tmpMeta45)) goto goto_2;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 1));
tmpMeta47 = omc_Types_arrayElementType(threadData, _t2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta47,10,4) == 0) goto goto_2;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 5));
if (optionNone(tmpMeta48)) goto goto_2;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 1));
tmp50 = omc_Expression_dimensionsKnownAndEqual(threadData, _dim1, _dim2);
if (1 != tmp50) goto goto_2;
omc_Expression_dimensionSize(threadData, _dim1);
_crefs1 = omc_ComponentReference_expandCref(threadData, _c1, 0);
_crefs2 = omc_ComponentReference_expandCref(threadData, _c2, 0);
_cache = omc_InstSection_connectArrayComponents(threadData, _cache, _env, _ih, _sets, _pre, _crefs1, _f1, _t1, _vt1, _io1, _crefs2, _f2, _t2, _vt2, _io2, _ct, _graph, _info ,NULL ,&_ih ,&_sets_1 ,&_dae ,&_graph);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 5: {
modelica_boolean tmp51;
modelica_metatype tmpMeta52;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,6,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,6,2) == 0) goto tmp3_end;
_t1 = tmp4_8;
_t2 = tmp4_11;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_ct = tmp4_12;
_graph = tmp4_13;
tmp4 += 6;
_dims = omc_Types_getDimensions(threadData, _t1);
_dims2 = omc_Types_getDimensions(threadData, _t2);
tmp51 = omc_List_isEqualOnTrue(threadData, _dims, _dims2, boxvar_Expression_dimensionsKnownAndEqual);
if (1 != tmp51) goto goto_2;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1 ,&_c1p);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2 ,&_c2p);
tmpMeta52 = mmc_mk_box2(0, _c1p, _c2p);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta52);
_sets_1 = omc_ConnectUtil_addArrayConnection(threadData, _sets, _c1, _f1, _c2, _f2, _source, _ct);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta53;
modelica_integer tmp54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_integer tmp59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_13), 2));
tmp54 = mmc_unbox_integer(tmpMeta53);
if (1 != tmp54) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_12,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,9,3) == 0) goto tmp3_end;
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 4));
if (optionNone(tmpMeta55)) goto tmp3_end;
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 1));
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 1));
tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 2));
tmp59 = mmc_unbox_integer(tmpMeta58);
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,9,3) == 0) goto tmp3_end;
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 4));
if (optionNone(tmpMeta61)) goto tmp3_end;
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 1));
_graph = tmp4_13;
_ct = tmp4_12;
_t1 = tmp4_8;
_fpath1 = tmpMeta57;
_idim1 = tmp59;
_inlineType1 = tmpMeta60;
_t2 = tmp4_11;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
tmp4 += 3;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1 ,&_c1_1);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2 ,&_c2_1);
_cache = omc_InstSection_connectComponents(threadData, _cache, _env, _ih, _sets, _pre, _c1, _f1, _t1, _vt1, _c2, _f2, _t2, _vt2, _ct, _io1, _io2, _OMC_LIT81, _info ,&_env ,&_ih ,&_sets_1 ,&_dae ,NULL);
tmpMeta63 = mmc_mk_box2(0, _c1_1, _c2_1);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta63);
_zeroVector = omc_Expression_makeRealArrayOfZeros(threadData, _idim1);
_crefExp1 = omc_Expression_crefExp(threadData, _c1_1);
_crefExp2 = omc_Expression_crefExp(threadData, _c2_1);
tmpMeta65 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_idim1));
tmpMeta64 = mmc_mk_cons(tmpMeta65, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta66 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT82, tmpMeta64);
_equalityConstraintFunctionReturnType = tmpMeta66;
_source = omc_ElementSource_addAdditionalComment(threadData, _source, _OMC_LIT83);
tmpMeta69 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_idim1));
tmpMeta68 = mmc_mk_cons(tmpMeta69, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta70 = mmc_mk_cons(_crefExp1, mmc_mk_cons(_crefExp2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta71 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _equalityConstraintFunctionReturnType, mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), _inlineType1, _OMC_LIT84);
tmpMeta72 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fpath1, tmpMeta70, tmpMeta71);
tmpMeta73 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, tmpMeta68, _zeroVector, tmpMeta72, _source);
tmpMeta67 = mmc_mk_cons(tmpMeta73, MMC_REFSTRUCTLIT(mmc_nil));
_breakDAEElements = tmpMeta67;
_graph = omc_ConnectionGraph_addConnection(threadData, _graph, _c1_1, _c2_1, _breakDAEElements);
_cache = omc_Lookup_lookupClass(threadData, _cache, _env, _fpath1, mmc_mk_none() ,&_equalityConstraintFunction ,&_env);
_cache = omc_Inst_makeFullyQualified(threadData, _cache, _env, _fpath1 ,&_fpath1);
_cache = omc_FCore_addCachedInstFuncGuard(threadData, _cache, _fpath1);
tmpMeta74 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_InstFunction_implicitFunctionInstantiation(threadData, _cache, _env, _ih, _OMC_LIT85, _OMC_LIT86, _equalityConstraintFunction, tmpMeta74 ,&_env ,&_ih);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta75;
modelica_integer tmp76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_integer tmp82;
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
modelica_metatype tmpMeta85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
modelica_metatype tmpMeta95;
modelica_metatype tmpMeta96;
modelica_metatype tmpMeta97;
modelica_metatype tmpMeta98;
tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_13), 2));
tmp76 = mmc_unbox_integer(tmpMeta75);
if (1 != tmp76) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_12,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,10,4) == 0) goto tmp3_end;
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 4));
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 5));
if (optionNone(tmpMeta78)) goto tmp3_end;
tmpMeta79 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta78), 1));
tmpMeta80 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta79), 1));
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta79), 2));
tmp82 = mmc_unbox_integer(tmpMeta81);
tmpMeta83 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta79), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,10,4) == 0) goto tmp3_end;
tmpMeta84 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 4));
tmpMeta85 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 5));
if (optionNone(tmpMeta85)) goto tmp3_end;
tmpMeta86 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta85), 1));
_graph = tmp4_13;
_ct = tmp4_12;
_t1 = tmpMeta77;
_fpath1 = tmpMeta80;
_idim1 = tmp82;
_inlineType1 = tmpMeta83;
_t2 = tmpMeta84;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1 ,&_c1_1);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2 ,&_c2_1);
_cache = omc_InstSection_connectComponents(threadData, _cache, _env, _ih, _sets, _pre, _c1, _f1, _t1, _vt1, _c2, _f2, _t2, _vt2, _ct, _io1, _io2, _OMC_LIT81, _info ,&_env ,&_ih ,&_sets_1 ,&_dae ,NULL);
tmpMeta87 = mmc_mk_box2(0, _c1_1, _c2_1);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta87);
_zeroVector = omc_Expression_makeRealArrayOfZeros(threadData, _idim1);
_crefExp1 = omc_Expression_crefExp(threadData, _c1_1);
_crefExp2 = omc_Expression_crefExp(threadData, _c2_1);
tmpMeta89 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_idim1));
tmpMeta88 = mmc_mk_cons(tmpMeta89, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta90 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT82, tmpMeta88);
_equalityConstraintFunctionReturnType = tmpMeta90;
_source = omc_ElementSource_addAdditionalComment(threadData, _source, _OMC_LIT83);
tmpMeta93 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_idim1));
tmpMeta92 = mmc_mk_cons(tmpMeta93, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta94 = mmc_mk_cons(_crefExp1, mmc_mk_cons(_crefExp2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta95 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _equalityConstraintFunctionReturnType, mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), _inlineType1, _OMC_LIT84);
tmpMeta96 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fpath1, tmpMeta94, tmpMeta95);
tmpMeta97 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, tmpMeta92, _zeroVector, tmpMeta96, _source);
tmpMeta91 = mmc_mk_cons(tmpMeta97, MMC_REFSTRUCTLIT(mmc_nil));
_breakDAEElements = tmpMeta91;
_graph = omc_ConnectionGraph_addConnection(threadData, _graph, omc_ComponentReference_crefStripLastSubs(threadData, _c1_1), omc_ComponentReference_crefStripLastSubs(threadData, _c2_1), _breakDAEElements);
_cache = omc_Lookup_lookupClass(threadData, _cache, _env, _fpath1, mmc_mk_none() ,&_equalityConstraintFunction ,&_env);
_cache = omc_Inst_makeFullyQualified(threadData, _cache, _env, _fpath1 ,&_fpath1);
_cache = omc_FCore_addCachedInstFuncGuard(threadData, _cache, _fpath1);
tmpMeta98 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_InstFunction_implicitFunctionInstantiation(threadData, _cache, _env, _ih, _OMC_LIT85, _OMC_LIT86, _equalityConstraintFunction, tmpMeta98 ,&_env ,&_ih);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta99;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,10,4) == 0) goto tmp3_end;
tmpMeta99 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 4));
_bc_tp1 = tmpMeta99;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_t2 = tmp4_11;
_ct = tmp4_12;
_graph = tmp4_13;
_cache = omc_InstSection_connectComponents(threadData, _cache, _env, _ih, _sets, _pre, _c1, _f1, _bc_tp1, _vt1, _c2, _f2, _t2, _vt2, _ct, _io1, _io2, _graph, _info ,NULL ,&_ih ,&_sets_1 ,&_dae ,&_graph);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta100;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,10,4) == 0) goto tmp3_end;
tmpMeta100 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 4));
_bc_tp2 = tmpMeta100;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_t1 = tmp4_8;
_c2 = tmp4_9;
_f2 = tmp4_10;
_ct = tmp4_12;
_graph = tmp4_13;
tmp4 += 2;
_cache = omc_InstSection_connectComponents(threadData, _cache, _env, _ih, _sets, _pre, _c1, _f1, _t1, _vt1, _c2, _f2, _bc_tp2, _vt2, _ct, _io1, _io2, _graph, _info ,NULL ,&_ih ,&_sets_1 ,&_dae ,&_graph);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta101;
modelica_metatype tmpMeta102;
modelica_metatype tmpMeta103;
modelica_metatype tmpMeta104;
modelica_metatype tmpMeta105;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,9,3) == 0) goto tmp3_end;
tmpMeta101 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta101,17,1) == 0) goto tmp3_end;
tmpMeta102 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 3));
if (!listEmpty(tmpMeta102)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,9,3) == 0) goto tmp3_end;
tmpMeta103 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta103,17,1) == 0) goto tmp3_end;
tmpMeta104 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 3));
if (!listEmpty(tmpMeta104)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_graph = tmp4_13;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1 ,&_c1_1);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2 ,&_c2_1);
tmpMeta105 = mmc_mk_box2(0, _c1_1, _c2_1);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta105);
_sets_1 = omc_ConnectUtil_addConnection(threadData, _sets, _c1, _f1, _c2, _f2, _inConnectorType, _source);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta106;
modelica_metatype tmpMeta107;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,9,3) == 0) goto tmp3_end;
tmpMeta106 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,9,3) == 0) goto tmp3_end;
tmpMeta107 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_11), 3));
_l1 = tmpMeta106;
_l2 = tmpMeta107;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_f1 = tmp4_7;
_c2 = tmp4_9;
_f2 = tmp4_10;
_ct = tmp4_12;
_graph = tmp4_13;
_cache = omc_InstSection_connectVars(threadData, _cache, _env, _ih, _sets, _pre, _c1, _f1, _l1, _vt1, _c2, _f2, _l2, _vt2, _ct, _io1, _io2, _graph, _info ,NULL ,&_ih ,&_sets_1 ,&_dae ,&_graph);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets_1;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta108;
modelica_metatype tmpMeta109;
modelica_metatype tmpMeta110;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_5;
_c1 = tmp4_6;
_t1 = tmp4_8;
_c2 = tmp4_9;
_t2 = tmp4_11;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1, NULL);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2, NULL);
_c1_str = omc_ComponentReference_printComponentRefStr(threadData, _c1);
_t1_str = omc_Types_unparseType(threadData, _t1);
_c2_str = omc_ComponentReference_printComponentRefStr(threadData, _c2);
_t2_str = omc_Types_unparseType(threadData, _t2);
tmpMeta108 = mmc_mk_cons(_OMC_LIT9, mmc_mk_cons(_c1_str, mmc_mk_cons(_OMC_LIT87, mmc_mk_cons(_t1_str, MMC_REFSTRUCTLIT(mmc_nil)))));
_c1_str = stringAppendList(tmpMeta108);
tmpMeta109 = mmc_mk_cons(_OMC_LIT9, mmc_mk_cons(_c2_str, mmc_mk_cons(_OMC_LIT87, mmc_mk_cons(_t2_str, MMC_REFSTRUCTLIT(mmc_nil)))));
_c2_str = stringAppendList(tmpMeta109);
tmpMeta110 = mmc_mk_cons(_c1_str, mmc_mk_cons(_c2_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT90, tmpMeta110, _info);
goto goto_2;
goto tmp3_done;
}
case 13: {
modelica_boolean tmp111;
tmp111 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp111) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT91);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 14) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outSets = tmpMeta[0+3];
_outDae = tmpMeta[0+4];
_outGraph = tmpMeta[0+5];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesInnerOuter(threadData_t *threadData, modelica_metatype _inLhsIO, modelica_metatype _inRhsIO, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _inLhsIO;
tmp3_2 = _inRhsIO;
{
modelica_string _cref_str1 = NULL;
modelica_string _cref_str2 = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,1,0) == 0) goto tmp2_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_2,1,0) == 0) goto tmp2_end;
_cref_str1 = omc_ComponentReference_printComponentRefStr(threadData, _inLhsCref);
_cref_str2 = omc_ComponentReference_printComponentRefStr(threadData, _inRhsCref);
tmpMeta5 = mmc_mk_cons(_cref_str1, mmc_mk_cons(_cref_str2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT94, tmpMeta5, _inInfo);
goto goto_1;
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_isSignalSource(threadData_t *threadData, modelica_metatype _inDirection, modelica_metatype _inFace, modelica_metatype _inVisibility)
{
modelica_boolean _outIsSignal;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inDirection;
tmp4_2 = _inFace;
tmp4_3 = _inVisibility;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outIsSignal = tmp1;
_return: OMC_LABEL_UNUSED
return _outIsSignal;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_isSignalSource(threadData_t *threadData, modelica_metatype _inDirection, modelica_metatype _inFace, modelica_metatype _inVisibility)
{
modelica_boolean _outIsSignal;
modelica_metatype out_outIsSignal;
_outIsSignal = omc_InstSection_isSignalSource(threadData, _inDirection, _inFace, _inVisibility);
out_outIsSignal = mmc_mk_icon(_outIsSignal);
return out_outIsSignal;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesDirection(threadData_t *threadData, modelica_metatype _inLhsDirection, modelica_metatype _inLhsFace, modelica_metatype _inLhsVisibility, modelica_metatype _inRhsDirection, modelica_metatype _inRhsFace, modelica_metatype _inRhsVisibility, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_string _cref_str1 = NULL;
modelica_string _cref_str2 = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_boolean tmp5;
tmp5 = (omc_InstSection_isSignalSource(threadData, _inLhsDirection, _inLhsFace, _inLhsVisibility) && omc_InstSection_isSignalSource(threadData, _inRhsDirection, _inRhsFace, _inRhsVisibility));
if (0 != tmp5) goto goto_1;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta6;
_cref_str1 = omc_ComponentReference_printComponentRefStr(threadData, _inLhsCref);
_cref_str2 = omc_ComponentReference_printComponentRefStr(threadData, _inRhsCref);
tmpMeta6 = mmc_mk_cons(_cref_str1, mmc_mk_cons(_cref_str2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT98, tmpMeta6, _inInfo);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesFlowStream(threadData_t *threadData, modelica_metatype _inLhsConnectorType, modelica_metatype _inRhsConnectorType, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_string _cref_str1 = NULL;
modelica_string _cref_str2 = NULL;
modelica_string _pre_str1 = NULL;
modelica_string _pre_str2 = NULL;
modelica_metatype _err_strl = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_boolean tmp5;
tmp5 = omc_DAEUtil_connectorTypeEqual(threadData, _inLhsConnectorType, _inRhsConnectorType);
if (1 != tmp5) goto goto_1;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_metatype tmpMeta9;
_cref_str1 = omc_ComponentReference_printComponentRefStr(threadData, _inLhsCref);
_cref_str2 = omc_ComponentReference_printComponentRefStr(threadData, _inRhsCref);
_pre_str1 = omc_DAEUtil_connectorTypeStr(threadData, _inLhsConnectorType);
_pre_str2 = omc_DAEUtil_connectorTypeStr(threadData, _inRhsConnectorType);
tmp8 = (modelica_boolean)omc_DAEUtil_potentialBool(threadData, _inLhsConnectorType);
if(tmp8)
{
tmpMeta6 = mmc_mk_cons(_pre_str2, mmc_mk_cons(_cref_str2, mmc_mk_cons(_cref_str1, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta9 = tmpMeta6;
}
else
{
tmpMeta7 = mmc_mk_cons(_pre_str1, mmc_mk_cons(_cref_str1, mmc_mk_cons(_cref_str2, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta9 = tmpMeta7;
}
_err_strl = tmpMeta9;
omc_Error_addSourceMessage(threadData, _OMC_LIT101, _err_strl, _inInfo);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypesType(threadData_t *threadData, modelica_metatype _inLhsType, modelica_metatype _inRhsType, modelica_metatype _inLhsCref, modelica_metatype _inRhsCref, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _t1 = NULL;
modelica_metatype _t2 = NULL;
modelica_string _cs1 = NULL;
modelica_string _cs2 = NULL;
modelica_string _cref_str1 = NULL;
modelica_string _cref_str2 = NULL;
modelica_string _str1 = NULL;
modelica_string _str2 = NULL;
modelica_metatype _dims1 = NULL;
modelica_metatype _dims2 = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_boolean tmp5;
tmp5 = omc_Types_equivtypesOrRecordSubtypeOf(threadData, _inLhsType, _inRhsType);
if (1 != tmp5) goto goto_1;
goto tmp2_done;
}
case 1: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
_t1 = omc_Types_arrayElementType(threadData, _inLhsType);
_t2 = omc_Types_arrayElementType(threadData, _inRhsType);
tmp6 = omc_Types_equivtypesOrRecordSubtypeOf(threadData, _t1, _t2);
if (0 != tmp6) goto goto_1;
omc_Types_printConnectorTypeStr(threadData, _t1 ,&_cs1);
omc_Types_printConnectorTypeStr(threadData, _t2 ,&_cs2);
_cref_str1 = omc_ComponentReference_printComponentRefStr(threadData, _inLhsCref);
_cref_str2 = omc_ComponentReference_printComponentRefStr(threadData, _inRhsCref);
tmpMeta7 = mmc_mk_cons(_cref_str1, mmc_mk_cons(_cref_str2, mmc_mk_cons(_cref_str1, mmc_mk_cons(_cs1, mmc_mk_cons(_cref_str2, mmc_mk_cons(_cs2, MMC_REFSTRUCTLIT(mmc_nil)))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT104, tmpMeta7, _inInfo);
goto goto_1;
goto tmp2_done;
}
case 2: {
modelica_boolean tmp8;
modelica_boolean tmp9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
_dims1 = omc_Types_getDimensions(threadData, _inLhsType);
_dims2 = omc_Types_getDimensions(threadData, _inRhsType);
tmp8 = omc_List_isEqualOnTrue(threadData, _dims1, _dims2, boxvar_Expression_dimensionsEqual);
if (0 != tmp8) goto goto_1;
tmp9 = (listEmpty(_dims1) && listEmpty(_dims2));
if (0 != tmp9) goto goto_1;
_cref_str1 = omc_ComponentReference_printComponentRefStr(threadData, _inLhsCref);
_cref_str2 = omc_ComponentReference_printComponentRefStr(threadData, _inRhsCref);
tmpMeta10 = stringAppend(_OMC_LIT105,omc_ExpressionDump_dimensionsString(threadData, _dims1));
tmpMeta11 = stringAppend(tmpMeta10,_OMC_LIT106);
_str1 = tmpMeta11;
tmpMeta12 = stringAppend(_OMC_LIT105,omc_ExpressionDump_dimensionsString(threadData, _dims2));
tmpMeta13 = stringAppend(tmpMeta12,_OMC_LIT106);
_str2 = tmpMeta13;
tmpMeta14 = mmc_mk_cons(_cref_str1, mmc_mk_cons(_cref_str2, mmc_mk_cons(_str1, mmc_mk_cons(_str2, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessage(threadData, _OMC_LIT109, tmpMeta14, _inInfo);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 3) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConnectTypes(threadData_t *threadData, modelica_metatype _inLhsCref, modelica_metatype _inLhsType, modelica_metatype _inLhsFace, modelica_metatype _inLhsAttributes, modelica_metatype _inRhsCref, modelica_metatype _inRhsType, modelica_metatype _inRhsFace, modelica_metatype _inRhsAttributes, modelica_metatype _inInfo)
{
modelica_metatype _lhs_ct = NULL;
modelica_metatype _rhs_ct = NULL;
modelica_metatype _lhs_dir = NULL;
modelica_metatype _rhs_dir = NULL;
modelica_metatype _lhs_io = NULL;
modelica_metatype _rhs_io = NULL;
modelica_metatype _lhs_vis = NULL;
modelica_metatype _rhs_vis = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_ComponentReference_checkCrefSubscriptsBounds(threadData, _inLhsCref, _inInfo);
omc_ComponentReference_checkCrefSubscriptsBounds(threadData, _inRhsCref, _inInfo);
tmpMeta1 = _inLhsAttributes;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 5));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 6));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 7));
_lhs_ct = tmpMeta2;
_lhs_dir = tmpMeta3;
_lhs_io = tmpMeta4;
_lhs_vis = tmpMeta5;
tmpMeta6 = _inRhsAttributes;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
_rhs_ct = tmpMeta7;
_rhs_dir = tmpMeta8;
_rhs_io = tmpMeta9;
_rhs_vis = tmpMeta10;
omc_InstSection_checkConnectTypesType(threadData, _inLhsType, _inRhsType, _inLhsCref, _inRhsCref, _inInfo);
omc_InstSection_checkConnectTypesFlowStream(threadData, _lhs_ct, _rhs_ct, _inLhsCref, _inRhsCref, _inInfo);
omc_InstSection_checkConnectTypesDirection(threadData, _lhs_dir, _inLhsFace, _lhs_vis, _rhs_dir, _inRhsFace, _rhs_vis, _inLhsCref, _inRhsCref, _inInfo);
omc_InstSection_checkConnectTypesInnerOuter(threadData, _lhs_io, _rhs_io, _inLhsCref, _inRhsCref, _inInfo);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_validConnector(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inCref, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inType;
{
modelica_metatype _state = NULL;
modelica_metatype _tp = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 13; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,1,1) == 0) goto tmp2_end;
tmp3 += 10;
goto tmp2_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,1) == 0) goto tmp2_end;
tmp3 += 9;
goto tmp2_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,2,1) == 0) goto tmp2_end;
tmp3 += 8;
goto tmp2_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmp3 += 7;
goto tmp2_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,5) == 0) goto tmp2_end;
tmp3 += 6;
goto tmp2_done;
}
case 5: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,4,1) == 0) goto tmp2_end;
tmp3 += 5;
goto tmp2_done;
}
case 6: {
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,3) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_state = tmpMeta5;
omc_ClassInf_valid(threadData, _state, _OMC_LIT110);
goto tmp2_done;
}
case 7: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,3) == 0) goto tmp2_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_state = tmpMeta6;
tmp3 += 3;
omc_ClassInf_valid(threadData, _state, _OMC_LIT111);
goto tmp2_done;
}
case 8: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,10,4) == 0) goto tmp2_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_state = tmpMeta7;
omc_ClassInf_valid(threadData, _state, _OMC_LIT110);
goto tmp2_done;
}
case 9: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,10,4) == 0) goto tmp2_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_state = tmpMeta8;
tmp3 += 1;
omc_ClassInf_valid(threadData, _state, _OMC_LIT111);
goto tmp2_done;
}
case 10: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,6,2) == 0) goto tmp2_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_tp = tmpMeta9;
omc_InstSection_validConnector(threadData, _tp, _inCref, _inInfo);
goto tmp2_done;
}
case 11: {
modelica_boolean tmp10;
tmp10 = omc_ConnectUtil_isExpandable(threadData, _inCref);
if (1 != tmp10) goto goto_1;
goto tmp2_done;
}
case 12: {
modelica_metatype tmpMeta11;
_str = omc_ComponentReference_printComponentRefStr(threadData, _inCref);
tmpMeta11 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT114, tmpMeta11, _inInfo);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 13) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_flipDirection(threadData_t *threadData, modelica_metatype _inDir)
{
modelica_metatype _outDir = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inDir;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
tmpMeta1 = _OMC_LIT115;
goto tmp3_done;
}
case 4: {
tmpMeta1 = _OMC_LIT116;
goto tmp3_done;
}
case 5: {
tmpMeta1 = _OMC_LIT27;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDir = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDir;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_isConnectorType(threadData_t *threadData, modelica_metatype _ty)
{
modelica_boolean _isConnector;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _ty;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,5,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmp8 = mmc_unbox_integer(tmpMeta7);
if (0 != tmp8) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,10,4) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,5,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmp11 = mmc_unbox_integer(tmpMeta10);
if (0 != tmp11) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_isConnector = tmp1;
_return: OMC_LABEL_UNUSED
return _isConnector;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_isConnectorType(threadData_t *threadData, modelica_metatype _ty)
{
modelica_boolean _isConnector;
modelica_metatype out_isConnector;
_isConnector = omc_InstSection_isConnectorType(threadData, _ty);
out_isConnector = mmc_mk_icon(_isConnector);
return out_isConnector;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_getStateFromType(threadData_t *threadData, modelica_metatype _ty)
{
modelica_metatype _outState = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _ty;
{
modelica_metatype _state = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_state = tmpMeta6;
tmpMeta1 = _state;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,10,4) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_state = tmpMeta7;
tmpMeta1 = _state;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outState = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outState;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectExpandableVariables(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inVariablesUnion, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;modelica_metatype tmp4_7;modelica_metatype tmp4_8;modelica_boolean tmp4_9;modelica_metatype tmp4_10;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inSets;
tmp4_5 = _inPrefix;
tmp4_6 = _inComponentRefLeft;
tmp4_7 = _inComponentRefRight;
tmp4_8 = _inVariablesUnion;
tmp4_9 = _inImpl;
tmp4_10 = _inGraph;
{
modelica_boolean _impl;
modelica_metatype _sets = NULL;
modelica_metatype _dae = NULL;
modelica_metatype _dae1 = NULL;
modelica_metatype _dae2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _c1_full = NULL;
modelica_metatype _c2_full = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _names = NULL;
modelica_string _name = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_8)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_graph = tmp4_10;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_8)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_8);
tmpMeta7 = MMC_CDR(tmp4_8);
_name = tmpMeta6;
_names = tmpMeta7;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
_impl = tmp4_9;
_graph = tmp4_10;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta9 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _name, tmpMeta8);
_c1_full = omc_AbsynUtil_joinCrefs(threadData, _c1, tmpMeta9);
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta11 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _name, tmpMeta10);
_c2_full = omc_AbsynUtil_joinCrefs(threadData, _c2, tmpMeta11);
_cache = omc_InstSection_instConnect(threadData, _cache, _env, _ih, _sets, _pre, _c1_full, _c2_full, _impl, _graph, _info ,&_env ,&_ih ,&_sets ,&_dae1 ,&_graph);
_cache = omc_InstSection_connectExpandableVariables(threadData, _cache, _env, _ih, _sets, _pre, _c1, _c2, _names, _impl, _graph, _info ,&_env ,&_ih ,&_sets ,&_dae2 ,&_graph);
_dae = omc_DAEUtil_joinDaes(threadData, _dae1, _dae2);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outSets = tmpMeta[0+3];
_outDae = tmpMeta[0+4];
_outGraph = tmpMeta[0+5];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_connectExpandableVariables(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inVariablesUnion, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_connectExpandableVariables(threadData, _inCache, _inEnv, _inIH, _inSets, _inPrefix, _inComponentRefLeft, _inComponentRefRight, _inVariablesUnion, tmp1, _inGraph, _info, out_outEnv, out_outIH, out_outSets, out_outDae, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_updateEnvComponentsOnQualPath(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _virtualExpandableCref, modelica_metatype _virtualExpandableAttr, modelica_metatype _virtualExpandableTy, modelica_metatype _virtualExpandableBinding, modelica_metatype _virtualExpandableCnstForRange, modelica_metatype _virtualExpandableEnv)
{
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;modelica_metatype tmp4_7;modelica_metatype tmp4_8;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _virtualExpandableCref;
tmp4_4 = _virtualExpandableAttr;
tmp4_5 = _virtualExpandableTy;
tmp4_6 = _virtualExpandableBinding;
tmp4_7 = _virtualExpandableCnstForRange;
tmp4_8 = _virtualExpandableEnv;
{
modelica_metatype _cache = NULL;
modelica_metatype _topEnv = NULL;
modelica_metatype _veCref = NULL;
modelica_metatype _qualCref = NULL;
modelica_metatype _veAttr = NULL;
modelica_metatype _currentAttr = NULL;
modelica_metatype _veTy = NULL;
modelica_metatype _currentTy = NULL;
modelica_metatype _veBinding = NULL;
modelica_metatype _currentBinding = NULL;
modelica_metatype _veCnstForRange = NULL;
modelica_metatype _currentCnstForRange = NULL;
modelica_metatype _veEnv = NULL;
modelica_metatype _updatedEnv = NULL;
modelica_metatype _currentEnv = NULL;
modelica_metatype _realEnv = NULL;
modelica_metatype _forLoopScope = NULL;
modelica_string _currentName = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_currentName = tmpMeta6;
_topEnv = tmp4_2;
_veAttr = tmp4_4;
_veTy = tmp4_5;
_veBinding = tmp4_6;
_veCnstForRange = tmp4_7;
_veEnv = tmp4_8;
_realEnv = omc_FGraph_splitGraphScope(threadData, _topEnv ,&_forLoopScope);
tmpMeta7 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _currentName, _veAttr, _veTy, _veBinding, mmc_mk_boolean(0), _veCnstForRange);
_updatedEnv = omc_FGraph_updateComp(threadData, _realEnv, tmpMeta7, _OMC_LIT117, _veEnv);
tmpMeta1 = omc_FGraph_pushScope(threadData, _updatedEnv, _forLoopScope);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,4) == 0) goto tmp3_end;
_veCref = tmp4_3;
_cache = tmp4_1;
_topEnv = tmp4_2;
_veAttr = tmp4_4;
_veTy = tmp4_5;
_veBinding = tmp4_6;
_veCnstForRange = tmp4_7;
_veEnv = tmp4_8;
_currentName = omc_ComponentReference_crefLastIdent(threadData, _veCref);
_qualCref = omc_ComponentReference_crefStripLastIdent(threadData, _veCref);
_qualCref = omc_ComponentReference_crefStripLastSubs(threadData, _qualCref);
omc_Lookup_lookupVar(threadData, _cache, _topEnv, _qualCref ,&_currentAttr ,&_currentTy ,&_currentBinding ,&_currentCnstForRange ,NULL ,NULL ,&_currentEnv ,NULL);
_realEnv = omc_FGraph_splitGraphScope(threadData, _currentEnv ,&_forLoopScope);
tmpMeta8 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _currentName, _veAttr, _veTy, _veBinding, mmc_mk_boolean(0), _veCnstForRange);
_currentEnv = omc_FGraph_updateComp(threadData, _realEnv, tmpMeta8, _OMC_LIT117, _veEnv);
_currentEnv = omc_FGraph_pushScope(threadData, _currentEnv, _forLoopScope);
_inCache = _cache;
_inEnv = _topEnv;
_virtualExpandableCref = _qualCref;
_virtualExpandableAttr = _currentAttr;
_virtualExpandableTy = _currentTy;
_virtualExpandableBinding = _currentBinding;
_virtualExpandableCnstForRange = _currentCnstForRange;
_virtualExpandableEnv = _currentEnv;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEnv = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_daeDeclareList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inParentEnv, modelica_metatype _inClassEnv, modelica_metatype _crefs, modelica_metatype _state, modelica_metatype _ty, modelica_metatype _attrs, modelica_metatype _vis, modelica_metatype _io, modelica_metatype _source, modelica_metatype _acc)
{
modelica_metatype _outDAE = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _crefs;
{
modelica_metatype _daeExpandable = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _cref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta1 = _acc;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
_cref = tmpMeta6;
_lst = tmpMeta7;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
_daeExpandable = omc_InstDAE_daeDeclare(threadData, _inCache, _inParentEnv, _inClassEnv, _cref, _state, _ty, _attrs, _vis, mmc_mk_none(), tmpMeta8, mmc_mk_none(), mmc_mk_none(), _OMC_LIT121, _io, _OMC_LIT122, _source, 1);
_daeExpandable = omc_DAEUtil_joinDaes(threadData, _daeExpandable, _acc);
_crefs = _lst;
_acc = _daeExpandable;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDAE = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDAE;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_generateExpandableDAE(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inParentEnv, modelica_metatype _inClassEnv, modelica_metatype _cref, modelica_metatype _state, modelica_metatype _ty, modelica_metatype _attrs, modelica_metatype _vis, modelica_metatype _io, modelica_metatype _source)
{
modelica_metatype _outDAE = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _daeDims = NULL;
modelica_metatype _daeExpandable = NULL;
modelica_metatype _crefs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
_daeDims = omc_Types_getDimensions(threadData, _ty);
omc_List_map(threadData, _daeDims, boxvar_Expression_unelabDimension);
if(listEmpty(_daeDims))
{
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
_daeExpandable = omc_InstDAE_daeDeclare(threadData, _inCache, _inParentEnv, _inClassEnv, _cref, _state, _ty, _attrs, _vis, mmc_mk_none(), tmpMeta6, mmc_mk_none(), mmc_mk_none(), _OMC_LIT121, _io, _OMC_LIT122, _source, 1);
}
else
{
_crefs = omc_ComponentReference_expandCref(threadData, _cref, 0);
_daeExpandable = omc_InstSection_daeDeclareList(threadData, _inCache, _inParentEnv, _inClassEnv, listReverse(_crefs), _state, _ty, _attrs, _vis, _io, _source, _OMC_LIT71);
}
tmpMeta1 = _daeExpandable;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDAE = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDAE;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_connectExpandableConnectors(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_boolean tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inSets;
tmp4_5 = _inPrefix;
tmp4_6 = _inComponentRefLeft;
tmp4_7 = _inComponentRefRight;
tmp4_8 = _inImpl;
tmp4_9 = _inGraph;
{
modelica_metatype _c1_1 = NULL;
modelica_metatype _c2_1 = NULL;
modelica_metatype _c1_2 = NULL;
modelica_metatype _c2_2 = NULL;
modelica_metatype _c1p = NULL;
modelica_metatype _c2p = NULL;
modelica_metatype _attr1 = NULL;
modelica_metatype _attr2 = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _ct1 = NULL;
modelica_metatype _ct2 = NULL;
modelica_boolean _impl;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _sets = NULL;
modelica_metatype _dae = NULL;
modelica_metatype _daeExpandable = NULL;
modelica_metatype _env = NULL;
modelica_metatype _envExpandable = NULL;
modelica_metatype _envComponent = NULL;
modelica_metatype _env1 = NULL;
modelica_metatype _env2 = NULL;
modelica_metatype _envComponentEmpty = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _c1_prefix = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _io1 = NULL;
modelica_metatype _io2 = NULL;
modelica_metatype _vt1 = NULL;
modelica_metatype _vt2 = NULL;
modelica_metatype _prl1 = NULL;
modelica_metatype _prl2 = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_string _componentName = NULL;
modelica_metatype _binding = NULL;
modelica_metatype _cnstForRange = NULL;
modelica_metatype _state = NULL;
modelica_metatype _variables1 = NULL;
modelica_metatype _variables2 = NULL;
modelica_metatype _variablesUnion = NULL;
modelica_metatype _source = NULL;
modelica_metatype _vis1 = NULL;
modelica_metatype _vis2 = NULL;
modelica_metatype _arrDims = NULL;
modelica_metatype _daeDims = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_boolean tmp22;
modelica_boolean tmp23;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
_impl = tmp4_8;
_graph = tmp4_9;
tmpMeta11 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta6);
_cache = tmpMeta11;
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,6,2) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
_c1_1 = tmpMeta9;
_attr1 = tmpMeta10;
tmpMeta17 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0, _pre, _info, &tmpMeta12);
_cache = tmpMeta17;
if (optionNone(tmpMeta12)) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,6,2) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
_c2_1 = tmpMeta15;
_attr2 = tmpMeta16;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c1_1, _impl ,&_c1_2);
_cache = omc_Static_canonCref(threadData, _cache, _env, _c2_1, _impl ,&_c2_2);
_attr1 = omc_Lookup_lookupConnectorVar(threadData, _env, _c1_2, 1 ,&_ty1, NULL, NULL);
_attr2 = omc_Lookup_lookupConnectorVar(threadData, _env, _c2_2, 1 ,&_ty2, NULL, NULL);
tmpMeta18 = _attr1;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,0) == 0) goto goto_2;
tmpMeta20 = _attr2;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,0,0) == 0) goto goto_2;
tmp22 = omc_Types_isExpandableConnector(threadData, _ty1);
if (1 != tmp22) goto goto_2;
tmp23 = omc_Types_isExpandableConnector(threadData, _ty2);
if (1 != tmp23) goto goto_2;
omc_Lookup_lookupVar(threadData, _cache, _env, _c1_2 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,&_env1 ,NULL);
omc_Lookup_lookupVar(threadData, _cache, _env, _c2_2 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,&_env2 ,NULL);
_variables1 = omc_FGraph_getVariablesFromGraphScope(threadData, _env1);
_variables2 = omc_FGraph_getVariablesFromGraphScope(threadData, _env2);
_variablesUnion = omc_List_union(threadData, _variables1, _variables2);
_variablesUnion = omc_List_sort(threadData, _variablesUnion, boxvar_Util_strcmpBool);
tmpMeta[0+0] = omc_InstSection_connectExpandableVariables(threadData, _cache, _env, _ih, _sets, _pre, _c1, _c2, _variablesUnion, _impl, _graph, _info, &tmpMeta[0+1], &tmpMeta[0+2], &tmpMeta[0+3], &tmpMeta[0+4], &tmpMeta[0+5]);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
_impl = tmp4_8;
_graph = tmp4_9;
tmpMeta25 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0, _pre, _info, &tmpMeta24);
_cache = tmpMeta25;
if (!optionNone(tmpMeta24)) goto goto_2;
tmpMeta29 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta26);
_cache = tmpMeta29;
if (optionNone(tmpMeta26)) goto goto_2;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 1));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,6,2) == 0) goto goto_2;
tmpMeta[0+0] = omc_InstSection_connectExpandableConnectors(threadData, _cache, _env, _ih, _sets, _pre, _c2, _c1, _impl, _graph, _info, &tmpMeta[0+1], &tmpMeta[0+2], &tmpMeta[0+3], &tmpMeta[0+4], &tmpMeta[0+5]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_6,2,2) == 0) goto tmp3_end;
_c1 = tmp4_6;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
_c2 = tmp4_7;
_impl = tmp4_8;
tmp4 += 2;
tmpMeta31 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta30);
_cache = tmpMeta31;
if (!optionNone(tmpMeta30)) goto goto_2;
tmpMeta32 = stringAppend(_OMC_LIT123,omc_PrefixUtil_printPrefixStrIgnoreNoPre(threadData, _pre));
tmpMeta33 = stringAppend(tmpMeta32,_OMC_LIT7);
tmpMeta34 = stringAppend(tmpMeta33,omc_Dump_printComponentRefStr(threadData, _c1));
tmpMeta35 = stringAppend(tmpMeta34,_OMC_LIT124);
tmpMeta36 = stringAppend(tmpMeta35,omc_PrefixUtil_printPrefixStrIgnoreNoPre(threadData, _pre));
tmpMeta37 = stringAppend(tmpMeta36,_OMC_LIT7);
tmpMeta38 = stringAppend(tmpMeta37,omc_Dump_printComponentRefStr(threadData, _c2));
tmpMeta39 = stringAppend(tmpMeta38,_OMC_LIT125);
fputs(MMC_STRINGDATA(tmpMeta39),stdout);
goto goto_2;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_boolean tmp59;
modelica_boolean tmp60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_6,1,3) == 0) goto tmp3_end;
_c1 = tmp4_6;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c2 = tmp4_7;
_impl = tmp4_8;
_graph = tmp4_9;
tmpMeta41 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta40);
_cache = tmpMeta41;
if (!optionNone(tmpMeta40)) goto goto_2;
tmpMeta47 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0, _pre, _info, &tmpMeta42);
_cache = tmpMeta47;
if (optionNone(tmpMeta42)) goto goto_2;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 1));
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta44,6,2) == 0) goto goto_2;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta44), 2));
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 3));
_c2_1 = tmpMeta45;
_attr2 = tmpMeta46;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c2_1, _impl ,&_c2_2);
_attr2 = omc_Lookup_lookupConnectorVar(threadData, _env, _c2_2, 1 ,&_ty2, NULL, NULL);
tmpMeta48 = _attr2;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 2));
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 3));
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 4));
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 6));
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 7));
_ct2 = tmpMeta49;
_prl2 = tmpMeta50;
_vt2 = tmpMeta51;
_io2 = tmpMeta52;
_vis2 = tmpMeta53;
_c1_prefix = omc_AbsynUtil_crefStripLast(threadData, _c1);
tmpMeta58 = omc_Static_elabCref(threadData, _cache, _env, _c1_prefix, _impl, 0, _pre, _info, &tmpMeta54);
_cache = tmpMeta58;
if (optionNone(tmpMeta54)) goto goto_2;
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta54), 1));
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta56,6,2) == 0) goto goto_2;
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 2));
_c1_1 = tmpMeta57;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c1_1, _impl ,&_c1_2);
omc_Lookup_lookupConnectorVar(threadData, _env, _c1_2, 1 ,&_ty1, NULL, NULL);
tmp59 = omc_Types_isExpandableConnector(threadData, _ty1);
if (1 != tmp59) goto goto_2;
_c1_2 = omc_ComponentReference_crefStripLastSubs(threadData, _c1_2);
omc_Lookup_lookupVar(threadData, _cache, _env, _c1_2 ,&_attr ,&_ty ,&_binding ,&_cnstForRange ,NULL ,NULL ,&_envExpandable ,NULL);
omc_Lookup_lookupVar(threadData, _cache, _env, _c2_2 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,&_envComponent ,NULL);
_variablesUnion = omc_FGraph_getVariablesFromGraphScope(threadData, _envComponent);
tmp60 = (listLength(_variablesUnion) > ((modelica_integer) 1));
if (1 != tmp60) goto goto_2;
_componentName = omc_AbsynUtil_crefGetLastIdent(threadData, _c1);
_envComponentEmpty = omc_FGraph_removeComponentsFromScope(threadData, _envComponent);
_daeDims = omc_Types_getDimensions(threadData, _ty2);
_arrDims = omc_List_map(threadData, _daeDims, boxvar_Expression_unelabDimension);
_envExpandable = omc_FGraph_cloneLastScopeRef(threadData, _envExpandable);
tmpMeta61 = mmc_mk_box7(3, &DAE_Attributes_ATTR__desc, _ct2, _prl2, _vt2, _OMC_LIT27, _io2, _vis2);
tmpMeta62 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _componentName, tmpMeta61, _ty2, _OMC_LIT126, mmc_mk_boolean(0), mmc_mk_none());
tmpMeta63 = mmc_mk_box7(3, &SCode_Attributes_ATTR__desc, _arrDims, _OMC_LIT130, _OMC_LIT26, _OMC_LIT14, _OMC_LIT27, _OMC_LIT131);
tmpMeta64 = mmc_mk_box9(6, &SCode_Element_COMPONENT__desc, _componentName, _OMC_LIT129, tmpMeta63, _OMC_LIT134, _OMC_LIT135, _OMC_LIT136, mmc_mk_none(), _OMC_LIT138);
_envExpandable = omc_FGraph_mkComponentNode(threadData, _envExpandable, tmpMeta62, tmpMeta64, _OMC_LIT85, _OMC_LIT117, _envComponentEmpty);
_env = omc_InstSection_updateEnvComponentsOnQualPath(threadData, _cache, _env, _c1_2, _attr, _ty, _binding, _cnstForRange, _envExpandable);
tmpMeta[0+0] = omc_InstSection_connectExpandableVariables(threadData, _cache, _env, _ih, _sets, _pre, _c1, _c2, _variablesUnion, _impl, _graph, _info, &tmpMeta[0+1], &tmpMeta[0+2], &tmpMeta[0+3], &tmpMeta[0+4], &tmpMeta[0+5]);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_boolean tmp84;
modelica_boolean tmp85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
modelica_metatype tmpMeta95;
modelica_metatype tmpMeta96;
modelica_metatype tmpMeta97;
modelica_metatype tmpMeta98;
modelica_metatype tmpMeta99;
modelica_metatype tmpMeta100;
modelica_metatype tmpMeta101;
modelica_metatype tmpMeta102;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_6,1,3) == 0) goto tmp3_end;
_c1 = tmp4_6;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c2 = tmp4_7;
_impl = tmp4_8;
_graph = tmp4_9;
tmpMeta66 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta65);
_cache = tmpMeta66;
if (!optionNone(tmpMeta65)) goto goto_2;
tmpMeta72 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0, _pre, _info, &tmpMeta67);
_cache = tmpMeta72;
if (optionNone(tmpMeta67)) goto goto_2;
tmpMeta68 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta67), 1));
tmpMeta69 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta68), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta69,6,2) == 0) goto goto_2;
tmpMeta70 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta69), 2));
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta68), 3));
_c2_1 = tmpMeta70;
_attr2 = tmpMeta71;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c2_1, _impl ,&_c2_2);
_attr2 = omc_Lookup_lookupConnectorVar(threadData, _env, _c2_2, 1 ,&_ty2, NULL, NULL);
tmpMeta73 = _attr2;
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta73), 2));
tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta73), 3));
tmpMeta76 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta73), 4));
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta73), 6));
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta73), 7));
_ct2 = tmpMeta74;
_prl2 = tmpMeta75;
_vt2 = tmpMeta76;
_io2 = tmpMeta77;
_vis2 = tmpMeta78;
_c1_prefix = omc_AbsynUtil_crefStripLast(threadData, _c1);
tmpMeta83 = omc_Static_elabCref(threadData, _cache, _env, _c1_prefix, _impl, 0, _pre, _info, &tmpMeta79);
_cache = tmpMeta83;
if (optionNone(tmpMeta79)) goto goto_2;
tmpMeta80 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta79), 1));
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta80), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta81,6,2) == 0) goto goto_2;
tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta81), 2));
_c1_1 = tmpMeta82;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c1_1, _impl ,&_c1_2);
_attr1 = omc_Lookup_lookupConnectorVar(threadData, _env, _c1_2, 1 ,&_ty1, NULL, NULL);
tmp84 = omc_Types_isExpandableConnector(threadData, _ty1);
if (1 != tmp84) goto goto_2;
_c1_2 = omc_ComponentReference_crefStripLastSubs(threadData, _c1_2);
omc_Lookup_lookupVar(threadData, _cache, _env, _c1_2 ,&_attr ,&_ty ,&_binding ,&_cnstForRange ,NULL ,NULL ,&_envExpandable ,NULL);
omc_Lookup_lookupVar(threadData, _cache, _env, _c2_2 ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL ,&_envComponent ,NULL);
_variablesUnion = omc_FGraph_getVariablesFromGraphScope(threadData, _envComponent);
tmp85 = (listLength(_variablesUnion) > ((modelica_integer) 1));
if (0 != tmp85) goto goto_2;
_componentName = omc_AbsynUtil_crefGetLastIdent(threadData, _c1);
_envComponentEmpty = omc_FGraph_removeComponentsFromScope(threadData, _envComponent);
_daeDims = omc_Types_getDimensions(threadData, _ty2);
_arrDims = omc_List_map(threadData, _daeDims, boxvar_Expression_unelabDimension);
tmpMeta86 = mmc_mk_box7(3, &DAE_Attributes_ATTR__desc, _ct2, _prl2, _vt2, _OMC_LIT27, _io2, _vis2);
tmpMeta87 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _componentName, tmpMeta86, _ty2, _OMC_LIT126, mmc_mk_boolean(0), mmc_mk_none());
tmpMeta88 = mmc_mk_box7(3, &SCode_Attributes_ATTR__desc, _arrDims, _OMC_LIT130, _OMC_LIT26, _OMC_LIT14, _OMC_LIT27, _OMC_LIT131);
tmpMeta89 = mmc_mk_box9(6, &SCode_Element_COMPONENT__desc, _componentName, _OMC_LIT129, tmpMeta88, _OMC_LIT134, _OMC_LIT135, _OMC_LIT136, mmc_mk_none(), _OMC_LIT138);
_envExpandable = omc_FGraph_mkComponentNode(threadData, _envExpandable, tmpMeta87, tmpMeta89, _OMC_LIT85, _OMC_LIT117, _envComponentEmpty);
_env = omc_InstSection_updateEnvComponentsOnQualPath(threadData, _cache, _env, _c1_2, _attr, _ty, _binding, _cnstForRange, _envExpandable);
tmpMeta94 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta90);
_cache = tmpMeta94;
if (optionNone(tmpMeta90)) goto goto_2;
tmpMeta91 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 1));
tmpMeta92 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta91), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta92,6,2) == 0) goto goto_2;
tmpMeta93 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta92), 2));
_c1_1 = tmpMeta93;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c1_1, _impl ,&_c1_2);
_attr1 = omc_Lookup_lookupConnectorVar(threadData, _env, _c1_2, 1 ,&_ty1, NULL, NULL);
tmpMeta95 = _attr1;
tmpMeta96 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta95), 2));
tmpMeta97 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta95), 3));
tmpMeta98 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta95), 4));
tmpMeta99 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta95), 6));
tmpMeta100 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta95), 7));
_ct1 = tmpMeta96;
_prl1 = tmpMeta97;
_vt1 = tmpMeta98;
_io1 = tmpMeta99;
_vis1 = tmpMeta100;
_cache = omc_InstSection_instConnect(threadData, _cache, _env, _ih, _sets, _pre, _c1, _c2, _impl, _graph, _info ,&_env ,&_ih ,&_sets ,&_dae ,&_graph);
_state = _OMC_LIT141;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1_2 ,&_c1p);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c2_2 ,&_c2p);
tmpMeta101 = mmc_mk_box2(0, _c1p, _c2p);
_source = omc_ElementSource_createElementSource(threadData, _info, omc_FGraph_getScopePath(threadData, _env), _pre, tmpMeta101);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _c1_2 ,&_c1_2);
_daeDims = omc_Types_getDimensions(threadData, _ty1);
_arrDims = omc_List_map(threadData, _daeDims, boxvar_Expression_unelabDimension);
tmpMeta102 = mmc_mk_box7(3, &SCode_Attributes_ATTR__desc, _arrDims, omc_DAEUtil_toSCodeConnectorType(threadData, _ct1), _prl1, _vt1, _OMC_LIT27, _OMC_LIT131);
_daeExpandable = omc_InstSection_generateExpandableDAE(threadData, _cache, _env, _envExpandable, _c1_2, _state, _ty1, tmpMeta102, _vis1, _io1, _source);
_dae = omc_DAEUtil_joinDaes(threadData, _dae, _daeExpandable);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta103;
modelica_metatype tmpMeta104;
modelica_metatype tmpMeta105;
modelica_metatype tmpMeta106;
modelica_metatype tmpMeta107;
modelica_metatype tmpMeta108;
modelica_metatype tmpMeta109;
modelica_metatype tmpMeta110;
modelica_metatype tmpMeta111;
modelica_metatype tmpMeta112;
modelica_boolean tmp113;
modelica_boolean tmp114;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
_impl = tmp4_8;
tmpMeta107 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0, _pre, _info, &tmpMeta103);
_cache = tmpMeta107;
if (optionNone(tmpMeta103)) goto goto_2;
tmpMeta104 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta103), 1));
tmpMeta105 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta104), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta105,6,2) == 0) goto goto_2;
tmpMeta106 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta105), 2));
_c1_1 = tmpMeta106;
tmpMeta112 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0, _pre, _info, &tmpMeta108);
_cache = tmpMeta112;
if (optionNone(tmpMeta108)) goto goto_2;
tmpMeta109 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta108), 1));
tmpMeta110 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta109), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta110,6,2) == 0) goto goto_2;
tmpMeta111 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta110), 2));
_c2_1 = tmpMeta111;
_cache = omc_Static_canonCref(threadData, _cache, _env, _c1_1, _impl ,&_c1_2);
_cache = omc_Static_canonCref(threadData, _cache, _env, _c2_1, _impl ,&_c2_2);
omc_Lookup_lookupConnectorVar(threadData, _env, _c1_2, 1 ,&_ty1, NULL, NULL);
omc_Lookup_lookupConnectorVar(threadData, _env, _c2_2, 1 ,&_ty2, NULL, NULL);
tmp113 = omc_Types_isExpandableConnector(threadData, _ty1);
if (0 != tmp113) goto goto_2;
tmp114 = omc_Types_isExpandableConnector(threadData, _ty2);
if (0 != tmp114) goto goto_2;
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outSets = tmpMeta[0+3];
_outDae = tmpMeta[0+4];
_outGraph = tmpMeta[0+5];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_connectExpandableConnectors(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_connectExpandableConnectors(threadData, _inCache, _inEnv, _inIH, _inSets, _inPrefix, _inComponentRefLeft, _inComponentRefRight, tmp1, _inGraph, _info, out_outEnv, out_outIH, out_outSets, out_outDae, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkConstantVariability(threadData_t *threadData, modelica_metatype _inrefs, modelica_metatype _cache, modelica_metatype _env, modelica_string _affectedConnector, modelica_metatype _inPrefix, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;volatile modelica_metatype tmp3_2;
tmp3_1 = _inrefs;
tmp3_2 = _inPrefix;
{
modelica_metatype _cr = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _const = NULL;
modelica_metatype _pre = NULL;
modelica_string _s1 = NULL;
modelica_metatype _refs = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
tmp3 += 2;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_CAR(tmp3_1);
tmpMeta6 = MMC_CDR(tmp3_1);
_cr = tmpMeta5;
_refs = tmpMeta6;
_pre = tmp3_2;
omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta7);
if (optionNone(tmpMeta7)) goto goto_1;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_prop = tmpMeta9;
tmpMeta10 = mmc_mk_cons(_prop, MMC_REFSTRUCTLIT(mmc_nil));
_const = omc_Types_propertiesListToConst(threadData, tmpMeta10);
tmp11 = omc_Types_isParameterOrConstant(threadData, _const);
if (1 != tmp11) goto goto_1;
omc_InstSection_checkConstantVariability(threadData, _refs, _cache, _env, _affectedConnector, _pre, _info);
goto tmp2_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_boolean tmp18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta12 = MMC_CAR(tmp3_1);
tmpMeta13 = MMC_CDR(tmp3_1);
_cr = tmpMeta12;
_pre = tmp3_2;
omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta14);
if (optionNone(tmpMeta14)) goto goto_1;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
_prop = tmpMeta16;
tmpMeta17 = mmc_mk_cons(_prop, MMC_REFSTRUCTLIT(mmc_nil));
_const = omc_Types_propertiesListToConst(threadData, tmpMeta17);
tmp18 = omc_Types_isParameterOrConstant(threadData, _const);
if (0 != tmp18) goto goto_1;
_s1 = omc_Dump_printComponentRefStr(threadData, _cr);
tmpMeta19 = mmc_mk_cons(_affectedConnector, mmc_mk_cons(_s1, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT144, tmpMeta19, _info);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 3) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_connectorCompGt(threadData_t *threadData, modelica_metatype _inVar1, modelica_metatype _inVar2)
{
modelica_boolean _outGt;
modelica_string _id1 = NULL;
modelica_string _id2 = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inVar1;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_id1 = tmpMeta2;
tmpMeta3 = _inVar2;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
_id2 = tmpMeta4;
_outGt = (((modelica_integer) 1) == stringCompare(_id1, _id2));
_return: OMC_LABEL_UNUSED
return _outGt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_connectorCompGt(threadData_t *threadData, modelica_metatype _inVar1, modelica_metatype _inVar2)
{
modelica_boolean _outGt;
modelica_metatype out_outGt;
_outGt = omc_InstSection_connectorCompGt(threadData, _inVar1, _inVar2);
out_outGt = mmc_mk_icon(_outGt);
return out_outGt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_sortConnectorType(threadData_t *threadData, modelica_metatype _inType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
modelica_metatype _ty = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _vars = NULL;
modelica_metatype _ec = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 9: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_ty = tmpMeta5;
_dims = tmpMeta6;
_ty = omc_InstSection_sortConnectorType(threadData, _ty);
tmpMeta7 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, _dims);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_ci_state = tmpMeta8;
_vars = tmpMeta9;
_ec = tmpMeta10;
_vars = omc_List_sort(threadData, _vars, boxvar_InstSection_connectorCompGt);
tmpMeta11 = mmc_mk_box4(12, &DAE_Type_T__COMPLEX__desc, _ci_state, _vars, _ec);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
tmpMeta1 = _inType;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instConnector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _ih, modelica_metatype _connectorCref, modelica_boolean _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outCref, modelica_metatype *out_outAttr, modelica_metatype *out_connectorType, modelica_metatype *out_variability, modelica_metatype *out_innerOuter, modelica_metatype *out_face, modelica_metatype *out_ty, modelica_boolean *out_deleted)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outCref = NULL;
modelica_metatype _outAttr = NULL;
modelica_metatype _connectorType = NULL;
modelica_metatype _variability = NULL;
modelica_metatype _innerOuter = NULL;
modelica_metatype _face = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _deleted;
modelica_metatype _status = NULL;
modelica_boolean _is_expandable;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_boolean tmp3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outCref = omc_ComponentReference_toExpCref(threadData, _connectorCref);
tmpMeta4 = omc_Lookup_lookupConnectorVar(threadData, _env, _outCref, 1, &tmpMeta1, &tmpMeta2, &tmp3);
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 4));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 6));
_connectorType = tmpMeta5;
_variability = tmpMeta6;
_innerOuter = tmpMeta7;
_ty = tmpMeta1;
_status = tmpMeta2;
_is_expandable = tmp3;
_deleted = omc_FCore_isDeletedComp(threadData, _status);
if((_deleted || _is_expandable))
{
_face = _OMC_LIT145;
_outAttr = _OMC_LIT30;
}
else
{
tmpMeta13 = omc_Static_elabCrefNoEval(threadData, _inCache, _env, _connectorCref, _impl, 0, _prefix, _info, &tmpMeta8, &tmpMeta10, &tmpMeta12);
_outCache = tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_outCref = tmpMeta9;
_ty = tmpMeta11;
_outAttr = tmpMeta12;
_outCache = omc_Static_canonCref(threadData, _outCache, _env, _outCref, _impl ,&_outCref);
omc_InstSection_validConnector(threadData, _ty, _outCref, _info);
_face = omc_ConnectUtil_componentFace(threadData, _env, _outCref);
_ty = omc_InstSection_sortConnectorType(threadData, _ty);
}
_return: OMC_LABEL_UNUSED
if (out_outCref) { *out_outCref = _outCref; }
if (out_outAttr) { *out_outAttr = _outAttr; }
if (out_connectorType) { *out_connectorType = _connectorType; }
if (out_variability) { *out_variability = _variability; }
if (out_innerOuter) { *out_innerOuter = _innerOuter; }
if (out_face) { *out_face = _face; }
if (out_ty) { *out_ty = _ty; }
if (out_deleted) { *out_deleted = _deleted; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instConnector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _ih, modelica_metatype _connectorCref, modelica_metatype _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outCref, modelica_metatype *out_outAttr, modelica_metatype *out_connectorType, modelica_metatype *out_variability, modelica_metatype *out_innerOuter, modelica_metatype *out_face, modelica_metatype *out_ty, modelica_metatype *out_deleted)
{
modelica_integer tmp1;
modelica_boolean _deleted;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_impl);
_outCache = omc_InstSection_instConnector(threadData, _inCache, _env, _ih, _connectorCref, tmp1, _prefix, _info, out_outCref, out_outAttr, out_connectorType, out_variability, out_innerOuter, out_face, out_ty, &_deleted);
if (out_deleted) { *out_deleted = mmc_mk_icon(_deleted); }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instConnect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_boolean _inImplicit, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_boolean tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inSets;
tmp4_5 = _inPrefix;
tmp4_6 = _inComponentRefLeft;
tmp4_7 = _inComponentRefRight;
tmp4_8 = _inImplicit;
tmp4_9 = _inGraph;
{
modelica_metatype _c1_2 = NULL;
modelica_metatype _c2_2 = NULL;
modelica_metatype _attr1 = NULL;
modelica_metatype _attr2 = NULL;
modelica_metatype _ct1 = NULL;
modelica_boolean _impl;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _f1 = NULL;
modelica_metatype _f2 = NULL;
modelica_metatype _sets = NULL;
modelica_metatype _dae = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _io1 = NULL;
modelica_metatype _io2 = NULL;
modelica_metatype _vt1 = NULL;
modelica_metatype _vt2 = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _subs1 = NULL;
modelica_metatype _subs2 = NULL;
modelica_metatype _crefs1 = NULL;
modelica_metatype _crefs2 = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_boolean _del1;
modelica_boolean _del2;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_c1 = tmp4_6;
_c2 = tmp4_7;
_graph = tmp4_9;
tmp6 = omc_AbsynUtil_crefEqual(threadData, _c1, _c2);
if (1 != tmp6) goto goto_2;
_s1 = omc_Dump_printComponentRefStr(threadData, _c1);
_s2 = omc_Dump_printComponentRefStr(threadData, _c1);
tmpMeta7 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT148, tmpMeta7, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 1: {
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
_impl = tmp4_8;
_graph = tmp4_9;
_cache = omc_InstSection_instConnector(threadData, _cache, _env, _ih, _c1, _impl, _pre, _info ,&_c1_2 ,&_attr1 ,&_ct1 ,&_vt1 ,&_io1 ,&_f1 ,&_ty1 ,&_del1);
_cache = omc_InstSection_instConnector(threadData, _cache, _env, _ih, _c2, _impl, _pre, _info ,&_c2_2 ,&_attr2 ,NULL ,&_vt2 ,&_io2 ,&_f2 ,&_ty2 ,&_del2);
if((_del1 || _del2))
{
_dae = _OMC_LIT71;
}
else
{
if((omc_Types_isExpandableConnector(threadData, _ty1) || omc_Types_isExpandableConnector(threadData, _ty2)))
{
goto goto_2;
}
else
{
omc_InstSection_checkConnectTypes(threadData, _c1_2, _ty1, _f1, _attr1, _c2_2, _ty2, _f2, _attr2, _info);
_cache = omc_InstSection_connectComponents(threadData, _cache, _env, _ih, _sets, _pre, _c1_2, _f1, _ty1, _vt1, _c2_2, _f2, _ty2, _vt2, _ct1, _io1, _io2, _graph, _info ,NULL ,&_ih ,&_sets ,&_dae ,&_graph);
_sets = omc_ConnectUtil_increaseConnectRefCount(threadData, _c1_2, _c2_2, _sets);
}
}
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp8;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
_impl = tmp4_8;
_graph = tmp4_9;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT149);
tmp8 = omc_System_getHasExpandableConnectors(threadData);
if (1 != tmp8) goto goto_2;
_cache = omc_InstSection_connectExpandableConnectors(threadData, _cache, _env, _ih, _sets, _pre, _c1, _c2, _impl, _graph, _info ,&_env ,&_ih ,&_sets ,&_dae ,&_graph);
omc_ErrorExt_rollBack(threadData, _OMC_LIT149);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _dae;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
_c1 = tmp4_6;
_c2 = tmp4_7;
omc_ErrorExt_rollBack(threadData, _OMC_LIT149);
_subs1 = omc_AbsynUtil_getSubsFromCref(threadData, _c1, 1, 1);
_crefs1 = omc_AbsynUtil_getCrefsFromSubs(threadData, _subs1, 1, 1);
_subs2 = omc_AbsynUtil_getSubsFromCref(threadData, _c2, 1, 1);
_crefs2 = omc_AbsynUtil_getCrefsFromSubs(threadData, _subs2, 1, 1);
_s1 = omc_Dump_printComponentRefStr(threadData, _c1);
_s2 = omc_Dump_printComponentRefStr(threadData, _c2);
tmpMeta9 = stringAppend(_OMC_LIT150,_s1);
tmpMeta10 = stringAppend(tmpMeta9,_OMC_LIT151);
tmpMeta11 = stringAppend(tmpMeta10,_s2);
tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT152);
_s1 = tmpMeta12;
omc_InstSection_checkConstantVariability(threadData, _crefs1, _cache, _env, _s1, _pre, _info);
omc_InstSection_checkConstantVariability(threadData, _crefs2, _cache, _env, _s1, _pre, _info);
goto goto_2;
goto tmp3_done;
}
case 4: {
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_sets = tmp4_4;
_graph = tmp4_9;
if (!omc_Config_getGraphicsExpMode(threadData)) goto tmp3_end;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _sets;
tmpMeta[0+4] = _OMC_LIT71;
tmpMeta[0+5] = _graph;
goto tmp3_done;
}
case 5: {
modelica_boolean tmp13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_c1 = tmp4_6;
_c2 = tmp4_7;
tmp13 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp13) goto goto_2;
tmpMeta14 = stringAppend(_OMC_LIT153,omc_Dump_printComponentRefStr(threadData, _c1));
tmpMeta15 = stringAppend(tmpMeta14,_OMC_LIT151);
tmpMeta16 = stringAppend(tmpMeta15,omc_Dump_printComponentRefStr(threadData, _c2));
tmpMeta17 = stringAppend(tmpMeta16,_OMC_LIT152);
omc_Debug_traceln(threadData, tmpMeta17);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outSets = tmpMeta[0+3];
_outDae = tmpMeta[0+4];
_outGraph = tmpMeta[0+5];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instConnect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inSets, modelica_metatype _inPrefix, modelica_metatype _inComponentRefLeft, modelica_metatype _inComponentRefRight, modelica_metatype _inImplicit, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outSets, modelica_metatype *out_outDae, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_InstSection_instConnect(threadData, _inCache, _inEnv, _inIH, _inSets, _inPrefix, _inComponentRefLeft, _inComponentRefRight, tmp1, _inGraph, _info, out_outEnv, out_outIH, out_outSets, out_outDae, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_checkWhenCondition(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fexp, modelica_metatype _ty, modelica_metatype _aexp, modelica_metatype _info)
{
modelica_metatype _exp = NULL;
modelica_metatype _tyEl = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_exp = __omcQ_24in_5Fexp;
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if(omc_Types_isArray(threadData, _ty))
{
_tyEl = omc_Types_arrayElementType(threadData, _ty);
}
else
{
_tyEl = _ty;
}
_exp = omc_Types_matchType(threadData, _exp, _tyEl, _OMC_LIT72, 0, NULL);
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta5;
tmpMeta5 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _aexp), mmc_mk_cons(omc_Types_unparseType(threadData, _ty), MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT156, tmpMeta5, _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
if(omc_Config_languageStandardAtLeast(threadData, 5))
{
{
modelica_metatype tmp8_1;
tmp8_1 = _exp;
{
volatile mmc_switch_type tmp8;
int tmp9;
tmp8 = 0;
for (; tmp8 < 3; tmp8++) {
switch (MMC_SWITCH_CAST(tmp8)) {
case 0: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,13,3) == 0) goto tmp7_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,1) == 0) goto tmp7_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (7 != MMC_STRLEN(tmpMeta11) || strcmp(MMC_STRINGDATA(_OMC_LIT160), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp7_end;
goto tmp7_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,13,3) == 0) goto tmp7_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,2,1) == 0) goto tmp7_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,1,1) == 0) goto tmp7_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (7 != MMC_STRLEN(tmpMeta14) || strcmp(MMC_STRINGDATA(_OMC_LIT160), MMC_STRINGDATA(tmpMeta14)) != 0) goto tmp7_end;
goto tmp7_done;
}
case 2: {
modelica_metatype tmpMeta15;
if(omc_Expression_expHasInitial(threadData, _exp))
{
tmpMeta15 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _aexp), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT159, tmpMeta15, _info);
}
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
goto_6:;
MMC_THROW_INTERNAL();
goto tmp7_done;
tmp7_done:;
}
}
;
}
_return: OMC_LABEL_UNUSED
return _exp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instWhenEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inBranch, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outCondition, modelica_metatype *out_outEquations, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outCondition = NULL;
modelica_metatype _outEquations = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype _cond = NULL;
modelica_metatype _body = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _aexps = NULL;
modelica_metatype _dexps = NULL;
modelica_metatype _dexp = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _isClock;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inBranch;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_cond = tmpMeta2;
_body = tmpMeta3;
_isClock = 0;
{
modelica_metatype tmp7_1;
tmp7_1 = _cond;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 2; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,13,1) == 0) goto tmp6_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
_aexps = tmpMeta9;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
_dexps = tmpMeta10;
{
modelica_metatype _aexp;
for (tmpMeta11 = _aexps; !listEmpty(tmpMeta11); tmpMeta11=MMC_CDR(tmpMeta11))
{
_aexp = MMC_CAR(tmpMeta11);
_outCache = omc_InstSection_instExp(threadData, _inCache, _inEnv, _inIH, _inPrefix, _aexp, _inImpl, _info ,&_dexp ,&_prop);
_ty = omc_Types_getPropType(threadData, _prop);
_dexp = omc_InstSection_checkWhenCondition(threadData, _dexp, _ty, _aexp, _info);
tmpMeta12 = mmc_mk_cons(_dexp, _dexps);
_dexps = tmpMeta12;
}
}
tmpMeta4 = omc_Expression_makeArray(threadData, listReverse(_dexps), _OMC_LIT72, 1);
goto tmp6_done;
}
case 1: {
_outCache = omc_InstSection_instExp(threadData, _inCache, _inEnv, _inIH, _inPrefix, _cond, _inImpl, _info ,&_dexp ,&_prop);
_ty = omc_Types_getPropType(threadData, _prop);
if(omc_Types_isClockOrSubTypeClock(threadData, _ty))
{
_isClock = 1;
}
else
{
_dexp = omc_InstSection_checkWhenCondition(threadData, _dexp, _ty, _cond, _info);
}
tmpMeta4 = _dexp;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
_outCondition = tmpMeta4;
if((!_isClock))
{
omc_List_map__0(threadData, _body, boxvar_InstSection_checkForNestedWhenInEq);
}
tmpMeta19 = omc_Inst_instList(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, boxvar_InstSection_instEquation, _body, _inImpl, 1, _inGraph, &tmpMeta14, &tmpMeta15, &tmpMeta16, NULL, NULL, &tmpMeta18);
_outCache = tmpMeta19;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
_outEnv = tmpMeta14;
_outIH = tmpMeta15;
_outEquations = tmpMeta17;
_outGraph = tmpMeta18;
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outCondition) { *out_outCondition = _outCondition; }
if (out_outEquations) { *out_outEquations = _outEquations; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instWhenEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inBranch, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype _inGraph, modelica_metatype _info, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outCondition, modelica_metatype *out_outEquations, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_instWhenEqBranch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inBranch, tmp1, tmp2, _inGraph, _info, out_outEnv, out_outIH, out_outCondition, out_outEquations, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instElseIfs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _ci_state, modelica_metatype _inElseIfBranches, modelica_metatype _source, modelica_metatype _initial_, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype _info, modelica_metatype *out_outElseIfBranches)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outElseIfBranches = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_boolean tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inPre;
tmp4_5 = _inElseIfBranches;
tmp4_6 = _inImpl;
{
modelica_metatype _env = NULL;
modelica_boolean _impl;
modelica_metatype _e_1 = NULL;
modelica_metatype _e_2 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _stmts = NULL;
modelica_metatype _tail_1 = NULL;
modelica_metatype _e = NULL;
modelica_metatype _l = NULL;
modelica_metatype _tail = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _ih = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_5)) goto tmp3_end;
_cache = tmp4_1;
tmp4 += 1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_5);
tmpMeta8 = MMC_CDR(tmp4_5);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_e = tmpMeta9;
_l = tmpMeta10;
_tail = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_impl = tmp4_6;
_cache = omc_Static_elabExp(threadData, _cache, _env, _e, _impl, 1, _pre, _info ,&_e_1 ,&_prop);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _e_1, _prop, _impl, _info ,&_e_1 ,&_prop);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _env, _ih, _e_1, _pre ,&_e_2);
_cache = omc_InstSection_instStatements(threadData, _cache, _env, _ih, _pre, _ci_state, _l, _source, _initial_, _impl, _unrollForLoops ,&_stmts);
_cache = omc_InstSection_instElseIfs(threadData, _cache, _env, _ih, _pre, _ci_state, _tail, _source, _initial_, _impl, _unrollForLoops, _info ,&_tail_1);
tmpMeta12 = mmc_mk_box3(0, _e_2, _prop, _stmts);
tmpMeta11 = mmc_mk_cons(tmpMeta12, _tail_1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta11;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp13;
tmp13 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp13) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT161);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outElseIfBranches = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outElseIfBranches) { *out_outElseIfBranches = _outElseIfBranches; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instElseIfs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPre, modelica_metatype _ci_state, modelica_metatype _inElseIfBranches, modelica_metatype _source, modelica_metatype _initial_, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _info, modelica_metatype *out_outElseIfBranches)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_instElseIfs(threadData, _inCache, _inEnv, _inIH, _inPre, _ci_state, _inElseIfBranches, _source, _initial_, tmp1, tmp2, _info, out_outElseIfBranches);
return _outCache;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForConnectInIfBranch2(threadData_t *threadData, modelica_metatype _inEquation)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inEquation;
{
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _info = NULL;
modelica_metatype _eqs = NULL;
modelica_string _cr1_str = NULL;
modelica_string _cr2_str = NULL;
int tmp3;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp3_1))) {
case 6: {
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,4) == 0) goto tmp2_end;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 5));
_cr1 = tmpMeta4;
_cr2 = tmpMeta5;
_info = tmpMeta6;
_cr1_str = omc_Dump_printComponentRefStr(threadData, _cr1);
_cr2_str = omc_Dump_printComponentRefStr(threadData, _cr2);
tmpMeta7 = mmc_mk_cons(_cr1_str, mmc_mk_cons(_cr2_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT164, tmpMeta7, _info);
goto goto_1;
goto tmp2_done;
}
case 7: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,4,5) == 0) goto tmp2_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
_eqs = tmpMeta8;
omc_InstSection_checkForConnectInIfBranch(threadData, _eqs);
goto tmp2_done;
}
default:
tmp2_default: OMC_LABEL_UNUSED; {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForConnectInIfBranch(threadData_t *threadData, modelica_metatype _inEquations)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_List_map__0(threadData, _inEquations, boxvar_InstSection_checkForConnectInIfBranch2);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instInitialIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_boolean _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outEquations = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inState;
tmp4_5 = _inBranches;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _state = NULL;
modelica_metatype _seq = NULL;
modelica_metatype _rest_seq = NULL;
modelica_metatype _deq = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_5);
tmpMeta7 = MMC_CDR(tmp4_5);
_seq = tmpMeta6;
_rest_seq = tmpMeta7;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_state = tmp4_4;
_cache = omc_InstSection_instInitialIfEqBranch(threadData, _cache, _env, _ih, _inPrefix, _state, _seq, _inImpl ,&_env ,&_ih ,&_state ,&_deq);
tmpMeta8 = mmc_mk_cons(_deq, _inAccumEqs);
_inCache = _cache;
_inEnv = _env;
_inIH = _ih;
_inState = _state;
_inBranches = _rest_seq;
_inAccumEqs = tmpMeta8;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
if (!listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inIH;
tmpMeta[0+3] = _inState;
tmpMeta[0+4] = listReverse(_inAccumEqs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outState = tmpMeta[0+3];
_outEquations = tmpMeta[0+4];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outState) { *out_outState = _outState; }
if (out_outEquations) { *out_outEquations = _outEquations; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instInitialIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_metatype _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instInitialIfEqBranches(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inBranches, tmp1, _inAccumEqs, out_outEnv, out_outIH, out_outState, out_outEquations);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instInitialIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_boolean _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outEquations = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_InstSection_checkForConnectInIfBranch(threadData, _inEquations);
tmpMeta6 = omc_Inst_instList(threadData, _inCache, _inEnv, _inIH, _inPrefix, _OMC_LIT167, _inState, boxvar_InstSection_instInitialEquation, _inEquations, _inImpl, 1, _OMC_LIT168, &tmpMeta1, &tmpMeta2, &tmpMeta3, NULL, &tmpMeta5, NULL);
_outCache = tmpMeta6;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
_outEnv = tmpMeta1;
_outIH = tmpMeta2;
_outEquations = tmpMeta4;
_outState = tmpMeta5;
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outState) { *out_outState = _outState; }
if (out_outEquations) { *out_outEquations = _outEquations; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instInitialIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_metatype _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instInitialIfEqBranch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inEquations, tmp1, out_outEnv, out_outIH, out_outState, out_outEquations);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_boolean _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outEquations = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inState;
tmp4_5 = _inBranches;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _state = NULL;
modelica_metatype _seq = NULL;
modelica_metatype _rest_seq = NULL;
modelica_metatype _deq = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_5);
tmpMeta7 = MMC_CDR(tmp4_5);
_seq = tmpMeta6;
_rest_seq = tmpMeta7;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_state = tmp4_4;
_cache = omc_InstSection_instIfEqBranch(threadData, _cache, _env, _ih, _inPrefix, _state, _seq, _inImpl ,&_env ,&_ih ,&_state ,&_deq);
tmpMeta8 = mmc_mk_cons(_deq, _inAccumEqs);
_inCache = _cache;
_inEnv = _env;
_inIH = _ih;
_inState = _state;
_inBranches = _rest_seq;
_inAccumEqs = tmpMeta8;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
if (!listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inIH;
tmpMeta[0+3] = _inState;
tmpMeta[0+4] = listReverse(_inAccumEqs);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outState = tmpMeta[0+3];
_outEquations = tmpMeta[0+4];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outState) { *out_outState = _outState; }
if (out_outEquations) { *out_outEquations = _outEquations; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instIfEqBranches(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inBranches, modelica_metatype _inImpl, modelica_metatype _inAccumEqs, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instIfEqBranches(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inBranches, tmp1, _inAccumEqs, out_outEnv, out_outIH, out_outState, out_outEquations);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_boolean _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outEquations = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_InstSection_checkForConnectInIfBranch(threadData, _inEquations);
tmpMeta6 = omc_Inst_instList(threadData, _inCache, _inEnv, _inIH, _inPrefix, _OMC_LIT167, _inState, boxvar_InstSection_instEquation, _inEquations, _inImpl, 1, _OMC_LIT168, &tmpMeta1, &tmpMeta2, &tmpMeta3, NULL, &tmpMeta5, NULL);
_outCache = tmpMeta6;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
_outEnv = tmpMeta1;
_outIH = tmpMeta2;
_outEquations = tmpMeta4;
_outState = tmpMeta5;
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outState) { *out_outState = _outState; }
if (out_outEquations) { *out_outEquations = _outEquations; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instIfEqBranch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inEquations, modelica_metatype _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outState, modelica_metatype *out_outEquations)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instIfEqBranch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inEquations, tmp1, out_outEnv, out_outIH, out_outState, out_outEquations);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_rangeExpression(threadData_t *threadData, modelica_metatype _inTuple)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inTuple;
{
modelica_metatype _acref = NULL;
modelica_integer _dimNum;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
_acref = tmpMeta6;
_dimNum = tmp8;
tmpMeta10 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _acref);
tmpMeta11 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(_dimNum));
tmpMeta9 = mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta13 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, tmpMeta9, tmpMeta12);
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = mmc_mk_box4(14, &Absyn_Exp_CALL__desc, _OMC_LIT171, tmpMeta13, tmpMeta14);
tmpMeta16 = mmc_mk_box4(18, &Absyn_Exp_RANGE__desc, _OMC_LIT169, mmc_mk_none(), tmpMeta15);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_loopOverRange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _ci_state, modelica_string _inIdent, modelica_metatype _inValue, modelica_metatype _inAlgItmLst, modelica_metatype _source, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype *out_outStatements)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_string tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_metatype tmp4_8;volatile modelica_boolean tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inPrefix;
tmp4_5 = _inIdent;
tmp4_6 = _inValue;
tmp4_7 = _inAlgItmLst;
tmp4_8 = _inInitial;
tmp4_9 = _inImpl;
{
modelica_metatype _env_1 = NULL;
modelica_metatype _env_2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pre = NULL;
modelica_string _i = NULL;
modelica_metatype _fst = NULL;
modelica_metatype _v = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _algs = NULL;
modelica_metatype _initial_ = NULL;
modelica_boolean _impl;
modelica_metatype _cache = NULL;
modelica_metatype _dims = NULL;
modelica_integer _dim;
modelica_metatype _stmts = NULL;
modelica_metatype _stmts1 = NULL;
modelica_metatype _stmts2 = NULL;
modelica_metatype _ih = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_6,5,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_6), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
_cache = tmp4_1;
tmp4 += 1;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_6,5,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_6), 2));
if (listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_6), 3));
if (listEmpty(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmpMeta11);
tmpMeta13 = MMC_CDR(tmpMeta11);
tmp14 = mmc_unbox_integer(tmpMeta12);
_fst = tmpMeta9;
_rest = tmpMeta10;
_dim = tmp14;
_dims = tmpMeta13;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_i = tmp4_5;
_algs = tmp4_7;
_initial_ = tmp4_8;
_impl = tmp4_9;
_dim = ((modelica_integer) -1) + _dim;
tmpMeta15 = mmc_mk_cons(mmc_mk_integer(_dim), _dims);
_dims = tmpMeta15;
_env_1 = omc_FGraph_openScope(threadData, _env, _OMC_LIT172, _OMC_LIT173, mmc_mk_none());
tmpMeta16 = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _fst, _OMC_LIT175);
_env_2 = omc_FGraph_addForIterator(threadData, _env_1, _i, _OMC_LIT174, tmpMeta16, _OMC_LIT176, _OMC_LIT178);
_cache = omc_InstSection_instStatements(threadData, _cache, _env_2, _ih, _pre, _ci_state, _algs, _source, _initial_, _impl, _unrollForLoops ,&_stmts1);
tmpMeta17 = mmc_mk_box3(8, &Values_Value_ARRAY__desc, _rest, _dims);
_cache = omc_InstSection_loopOverRange(threadData, _cache, _env, _ih, _pre, _ci_state, _i, tmpMeta17, _algs, _source, _initial_, _impl, _unrollForLoops ,&_stmts2);
_stmts = listAppend(_stmts1, _stmts2);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _stmts;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp18;
modelica_metatype tmpMeta19;
_v = tmp4_6;
tmp18 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp18) goto goto_2;
tmpMeta19 = stringAppend(_OMC_LIT179,omc_ValuesUtil_valString(threadData, _v));
omc_Debug_traceln(threadData, tmpMeta19);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outStatements = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_loopOverRange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _ci_state, modelica_metatype _inIdent, modelica_metatype _inValue, modelica_metatype _inAlgItmLst, modelica_metatype _source, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_loopOverRange(threadData, _inCache, _inEnv, _inIH, _inPrefix, _ci_state, _inIdent, _inValue, _inAlgItmLst, _source, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_containsWhenStatements(threadData_t *threadData, modelica_metatype _statementList)
{
modelica_boolean _hasWhenStatements;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _statementList;
{
modelica_metatype _rest = NULL;
modelica_metatype _tb = NULL;
modelica_metatype _eb = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _eib = NULL;
modelica_boolean _b1;
modelica_boolean _b2;
modelica_boolean _b3;
modelica_boolean _b4;
modelica_metatype _blst = NULL;
modelica_metatype _slst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 6;
tmp1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,5,3) == 0) goto tmp3_end;
tmp4 += 4;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmp4_1);
tmpMeta9 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,6) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 5));
_tb = tmpMeta10;
_eib = tmpMeta11;
_eb = tmpMeta12;
_rest = tmpMeta9;
tmp4 += 3;
_b1 = omc_InstSection_containsWhenStatements(threadData, _tb);
_b2 = omc_InstSection_containsWhenStatements(threadData, _eb);
_slst = omc_List_map(threadData, _eib, boxvar_Util_tuple22);
_blst = omc_List_map(threadData, _slst, boxvar_InstSection_containsWhenStatements);
tmpMeta13 = mmc_mk_cons(mmc_mk_boolean(0), _blst);
_b3 = mmc_unbox_boolean(omc_List_reduce(threadData, tmpMeta13, boxvar_boolOr));
_b4 = omc_InstSection_containsWhenStatements(threadData, _rest);
tmpMeta14 = mmc_mk_cons(mmc_mk_boolean(_b1), mmc_mk_cons(mmc_mk_boolean(_b2), mmc_mk_cons(mmc_mk_boolean(_b3), mmc_mk_cons(mmc_mk_boolean(_b4), MMC_REFSTRUCTLIT(mmc_nil)))));
tmp1 = mmc_unbox_boolean(omc_List_reduce(threadData, tmpMeta14, boxvar_boolOr));
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_1);
tmpMeta16 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,2,5) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
_lst = tmpMeta17;
_rest = tmpMeta16;
tmp4 += 2;
_b1 = omc_InstSection_containsWhenStatements(threadData, _lst);
_b2 = omc_InstSection_containsWhenStatements(threadData, _rest);
tmp1 = (_b1 || _b2);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta18 = MMC_CAR(tmp4_1);
tmpMeta19 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,3,5) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 4));
_lst = tmpMeta20;
_rest = tmpMeta19;
tmp4 += 1;
_b1 = omc_InstSection_containsWhenStatements(threadData, _lst);
_b2 = omc_InstSection_containsWhenStatements(threadData, _rest);
tmp1 = (_b1 || _b2);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmp4_1);
tmpMeta22 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,4,4) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
_lst = tmpMeta23;
_rest = tmpMeta22;
_b1 = omc_InstSection_containsWhenStatements(threadData, _lst);
_b2 = omc_InstSection_containsWhenStatements(threadData, _rest);
tmp1 = (_b1 || _b2);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmp4_1);
tmpMeta25 = MMC_CDR(tmp4_1);
_rest = tmpMeta25;
tmp1 = omc_InstSection_containsWhenStatements(threadData, _rest);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 7) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_hasWhenStatements = tmp1;
_return: OMC_LABEL_UNUSED
return _hasWhenStatements;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_containsWhenStatements(threadData_t *threadData, modelica_metatype _statementList)
{
modelica_boolean _hasWhenStatements;
modelica_metatype out_hasWhenStatements;
_hasWhenStatements = omc_InstSection_containsWhenStatements(threadData, _statementList);
out_hasWhenStatements = mmc_mk_icon(_hasWhenStatements);
return out_hasWhenStatements;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeAssignment(threadData_t *threadData, modelica_metatype _inLhs, modelica_metatype _inLhsProps, modelica_metatype _inRhs, modelica_metatype _inRhsProps, modelica_metatype _inAttributes, modelica_metatype _inInitial, modelica_metatype _inSource)
{
modelica_metatype _outStatement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inLhsProps;
tmp4_2 = _inRhs;
tmp4_3 = _inRhsProps;
{
modelica_metatype _wild_props = NULL;
modelica_integer _wild_count;
modelica_metatype _wilds = NULL;
modelica_metatype _wildCrefExp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,13,3) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,2) == 0) goto tmp3_end;
tmpMeta6 = omc_Types_propTuplePropList(threadData, _inRhsProps);
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
_wild_props = tmpMeta8;
_wild_count = listLength(_wild_props);
_wildCrefExp = omc_Expression_makeCrefExp(threadData, _OMC_LIT165, _OMC_LIT24);
_wilds = omc_List_fill(threadData, _wildCrefExp, _wild_count);
_wild_props = omc_List_fill(threadData, _OMC_LIT182, _wild_count);
tmpMeta9 = mmc_mk_cons(_inLhs, _wilds);
tmpMeta10 = mmc_mk_cons(_inLhsProps, _wild_props);
tmpMeta1 = omc_Algorithm_makeTupleAssignment(threadData, tmpMeta9, tmpMeta10, _inRhs, _inRhsProps, _inInitial, _inSource);
goto tmp3_done;
}
case 1: {
tmpMeta1 = omc_Algorithm_makeAssignment(threadData, _inLhs, _inLhsProps, _inRhs, _inRhsProps, _inAttributes, _inInitial, _inSource);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outStatement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outStatement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_integer _num_errors;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_num_errors = omc_Error_getNumErrorMessages(threadData);
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
{
modelica_metatype tmp8_1;
tmp8_1 = _inStatement;
{
modelica_metatype _cond_exp = NULL;
modelica_metatype _msg_exp = NULL;
modelica_metatype _level_exp = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _cr_exp = NULL;
modelica_metatype _cond_prop = NULL;
modelica_metatype _msg_prop = NULL;
modelica_metatype _level_prop = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _cr_prop = NULL;
modelica_metatype _if_branch = NULL;
modelica_metatype _else_branch = NULL;
modelica_metatype _branch = NULL;
modelica_metatype _else_if_branches = NULL;
modelica_metatype _aexp = NULL;
modelica_metatype _sstmts = NULL;
modelica_metatype _source = NULL;
modelica_metatype _info = NULL;
modelica_metatype _when_stmt_opt = NULL;
modelica_metatype _when_stmt = NULL;
modelica_metatype _cases = NULL;
int tmp8;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp8_1))) {
case 3: {
_outCache = omc_InstSection_instAssignment(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inStatement, _inSource, _inInitial, _inImpl, _inUnrollLoops, _num_errors ,&_outStatements);
tmpMeta5 = _outStatements;
goto tmp7_done;
}
case 4: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,1,6) == 0) goto tmp7_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 7));
_info = tmpMeta9;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, _info ,&_cond_exp ,&_cond_prop);
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 3))), _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_if_branch);
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
_else_if_branches = tmpMeta10;
{
modelica_metatype _else_if;
for (tmpMeta11 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 4))); !listEmpty(tmpMeta11); tmpMeta11=MMC_CDR(tmpMeta11))
{
_else_if = MMC_CAR(tmpMeta11);
tmpMeta12 = _else_if;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_aexp = tmpMeta13;
_sstmts = tmpMeta14;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, _aexp, _inImpl, _info ,&_exp ,&_prop);
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _sstmts, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_branch);
tmpMeta16 = mmc_mk_box3(0, _exp, _prop, _branch);
tmpMeta15 = mmc_mk_cons(tmpMeta16, _else_if_branches);
_else_if_branches = tmpMeta15;
}
}
_else_if_branches = listReverse(_else_if_branches);
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 5))), _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_else_branch);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta5 = omc_Algorithm_makeIf(threadData, _cond_exp, _cond_prop, _if_branch, _else_if_branches, _else_branch, _source);
goto tmp7_done;
}
case 5: {
_outCache = omc_InstSection_instForStatement(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _inStatement, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
tmpMeta5 = _outStatements;
goto tmp7_done;
}
case 6: {
_outCache = omc_InstSection_instParForStatement(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _inStatement, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
tmpMeta5 = _outStatements;
goto tmp7_done;
}
case 7: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,4,4) == 0) goto tmp7_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 5));
_info = tmpMeta18;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, _info ,&_cond_exp ,&_cond_prop);
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 3))), _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_branch);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta19 = mmc_mk_cons(omc_Algorithm_makeWhile(threadData, _cond_exp, _cond_prop, _branch, _source), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta19;
goto tmp7_done;
}
case 8: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,5,3) == 0) goto tmp7_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 4));
_info = tmpMeta20;
if(omc_ClassInf_isFunction(threadData, _inState))
{
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT185, _OMC_LIT187, _info);
}
omc_InstSection_checkWhenAlgorithm(threadData, _inStatement);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
_when_stmt_opt = mmc_mk_none();
{
modelica_metatype _b;
for (tmpMeta21 = listReverse((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2)))); !listEmpty(tmpMeta21); tmpMeta21=MMC_CDR(tmpMeta21))
{
_b = MMC_CAR(tmpMeta21);
tmpMeta22 = _b;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 1));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
_aexp = tmpMeta23;
_sstmts = tmpMeta24;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, _aexp, _inImpl, _info ,&_cond_exp ,&_cond_prop);
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _sstmts, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_branch);
_when_stmt = omc_Algorithm_makeWhenA(threadData, _cond_exp, _cond_prop, _branch, _when_stmt_opt, _source);
_when_stmt_opt = mmc_mk_some(_when_stmt);
}
}
tmpMeta26 = mmc_mk_cons(_when_stmt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta26;
goto tmp7_done;
}
case 9: {
modelica_metatype tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,6,5) == 0) goto tmp7_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 6));
_info = tmpMeta27;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, _info ,&_cond_exp ,&_cond_prop);
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 3))), _inImpl, _info ,&_msg_exp ,&_msg_prop);
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 4))), _inImpl, _info ,&_level_exp ,&_level_prop);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta5 = omc_Algorithm_makeAssert(threadData, _cond_exp, _msg_exp, _level_exp, _cond_prop, _msg_prop, _level_prop, _source);
goto tmp7_done;
}
case 10: {
modelica_metatype tmpMeta28;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,7,3) == 0) goto tmp7_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 4));
_info = tmpMeta28;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, _info ,&_msg_exp ,&_msg_prop);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta5 = omc_Algorithm_makeTerminate(threadData, _msg_exp, _msg_prop, _source);
goto tmp7_done;
}
case 11: {
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,8,4) == 0) goto tmp7_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 5));
_info = tmpMeta29;
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, _info ,&_cr_exp ,&_cr_prop);
_outCache = omc_InstSection_instExp(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 3))), _inImpl, _info ,&_exp ,&_prop);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta5 = omc_Algorithm_makeReinit(threadData, _cr_exp, _exp, _cr_prop, _prop, _source);
goto tmp7_done;
}
case 12: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_boolean tmp34;
modelica_metatype tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,9,3) == 0) goto tmp7_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 4));
_info = tmpMeta30;
_outCache = omc_Static_elabExp(threadData, _outCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, 1, _inPrefix, _info ,&_exp, NULL);
omc_InstSection_checkValidNoRetcall(threadData, _exp, _info);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _exp, _inPrefix ,&_exp);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmp34 = (modelica_boolean)omc_Expression_isTuple(threadData, _exp);
if(tmp34)
{
tmpMeta31 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta35 = tmpMeta31;
}
else
{
tmpMeta33 = mmc_mk_box3(14, &DAE_Statement_STMT__NORETCALL__desc, _exp, _source);
tmpMeta32 = mmc_mk_cons(tmpMeta33, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta35 = tmpMeta32;
}
tmpMeta5 = tmpMeta35;
goto tmp7_done;
}
case 14: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,11,2) == 0) goto tmp7_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 3));
_info = tmpMeta36;
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta38 = mmc_mk_box2(16, &DAE_Statement_STMT__BREAK__desc, _source);
tmpMeta37 = mmc_mk_cons(tmpMeta38, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta37;
goto tmp7_done;
}
case 17: {
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,14,2) == 0) goto tmp7_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 3));
_info = tmpMeta39;
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta41 = mmc_mk_box2(17, &DAE_Statement_STMT__CONTINUE__desc, _source);
tmpMeta40 = mmc_mk_cons(tmpMeta41, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta40;
goto tmp7_done;
}
case 13: {
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,10,2) == 0) goto tmp7_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 3));
_info = tmpMeta42;
if((!omc_ClassInf_isFunction(threadData, _inState)))
{
tmpMeta43 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT190, tmpMeta43, _info);
}
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta45 = mmc_mk_box2(15, &DAE_Statement_STMT__RETURN__desc, _source);
tmpMeta44 = mmc_mk_cons(tmpMeta45, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta44;
goto tmp7_done;
}
case 15: {
modelica_metatype tmpMeta46;
modelica_boolean tmp47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,12,3) == 0) goto tmp7_end;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 4));
_info = tmpMeta46;
tmp47 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp47) goto goto_6;
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_branch);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta49 = mmc_mk_box3(19, &DAE_Statement_STMT__FAILURE__desc, _branch, _source);
tmpMeta48 = mmc_mk_cons(tmpMeta49, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta48;
goto tmp7_done;
}
case 16: {
modelica_metatype tmpMeta50;
modelica_boolean tmp51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,13,4) == 0) goto tmp7_end;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 5));
_info = tmpMeta50;
tmp51 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp51) goto goto_6;
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_if_branch);
_outCache = omc_InstSection_instStatements(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 3))), _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_else_branch);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _info);
tmpMeta53 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta54 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta55 = mmc_mk_box9(3, &DAE_MatchCase_CASE__desc, tmpMeta53, mmc_mk_none(), tmpMeta54, _if_branch, _OMC_LIT192, _info, mmc_mk_integer(((modelica_integer) 0)), _info);
tmpMeta56 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta57 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta58 = mmc_mk_box9(3, &DAE_MatchCase_CASE__desc, tmpMeta56, mmc_mk_none(), tmpMeta57, _else_branch, _OMC_LIT192, _info, mmc_mk_integer(((modelica_integer) 0)), _info);
tmpMeta52 = mmc_mk_cons(tmpMeta55, mmc_mk_cons(tmpMeta58, MMC_REFSTRUCTLIT(mmc_nil)));
_cases = tmpMeta52;
tmpMeta59 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta60 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta61 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta62 = mmc_mk_box7(36, &DAE_Exp_MATCHEXPRESSION__desc, (omc_SCodeUtil_commentHasBooleanNamedAnnotation(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 4))), _OMC_LIT193)?_OMC_LIT194:_OMC_LIT195), tmpMeta59, tmpMeta60, tmpMeta61, _cases, _OMC_LIT196);
_exp = tmpMeta62;
tmpMeta64 = mmc_mk_box3(14, &DAE_Statement_STMT__NORETCALL__desc, _exp, _source);
tmpMeta63 = mmc_mk_cons(tmpMeta64, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = tmpMeta63;
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
goto_6:;
goto goto_1;
goto tmp7_done;
tmp7_done:;
}
}
_outStatements = tmpMeta5;
goto tmp2_done;
}
case 1: {
modelica_boolean tmp65;
modelica_metatype tmpMeta66;
tmp65 = (_num_errors == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp65) goto goto_1;
tmpMeta66 = mmc_mk_cons(omc_SCodeDump_statementStr(threadData, _inStatement, _OMC_LIT200), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT199, tmpMeta66, omc_SCodeUtil_getStatementInfo(threadData, _inStatement));
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_instStatement(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inStatement, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inExp, modelica_boolean _inImpl, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _inExp, _inImpl, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_outCache = omc_Ceval_cevalIfConstant(threadData, _outCache, _inEnv, _outExp, _outProperties, _inImpl, _inInfo ,&_outExp ,&_outProperties);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _outExp, _inPrefix ,&_outExp);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inExp, modelica_metatype _inImpl, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instExp(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inExp, tmp1, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_InstSection_instStatements(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inStatements, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype *out_outStatements)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_metatype _stmts = NULL;
modelica_metatype _stmtsl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_stmtsl = tmpMeta1;
{
modelica_metatype _stmt;
for (tmpMeta2 = _inStatements; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_stmt = MMC_CAR(tmpMeta2);
_outCache = omc_InstSection_instStatement(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _stmt, _inSource, _inInitial, _inImpl, _unrollForLoops ,&_stmts);
tmpMeta3 = mmc_mk_cons(_stmts, _stmtsl);
_stmtsl = tmpMeta3;
}
}
_outStatements = omc_List_flattenReverse(threadData, _stmtsl);
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
return _outCache;
}
modelica_metatype boxptr_InstSection_instStatements(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inStatements, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_instStatements(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inStatements, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
DLLExport
modelica_metatype omc_InstSection_instConstraint(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inConstraints, modelica_boolean _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outDae, modelica_metatype *out_outState)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outState = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_boolean tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inPrefix;
tmp4_4 = _inState;
tmp4_5 = _inConstraints;
tmp4_6 = _inImpl;
{
modelica_metatype _env = NULL;
modelica_metatype _constraints_1 = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _constraints = NULL;
modelica_boolean _impl;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _source = NULL;
modelica_metatype _dae = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_5), 2));
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_3;
_ci_state = tmp4_4;
_constraints = tmpMeta6;
_impl = tmp4_6;
_ci_state = omc_ClassInf_trans(threadData, _ci_state, _OMC_LIT201);
_source = omc_ElementSource_createElementSource(threadData, _OMC_LIT138, omc_FGraph_getScopePath(threadData, _env), _pre, _OMC_LIT203);
_cache = omc_Static_elabExpList(threadData, _cache, _env, _constraints, _impl, 1, _pre, _OMC_LIT138, _OMC_LIT24 ,&_constraints_1 ,NULL);
tmpMeta8 = mmc_mk_box2(3, &DAE_Constraint_CONSTRAINT__EXPS__desc, _constraints_1);
tmpMeta9 = mmc_mk_box3(30, &DAE_Element_CONSTRAINT__desc, tmpMeta8, _source);
tmpMeta7 = mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta7);
_dae = tmpMeta10;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _dae;
tmpMeta[0+3] = _ci_state;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp11;
tmp11 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp11) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT204);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outDae = tmpMeta[0+2];
_outState = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outState) { *out_outState = _outState; }
return _outCache;
}
modelica_metatype boxptr_InstSection_instConstraint(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inConstraints, modelica_metatype _inImpl, modelica_metatype *out_outEnv, modelica_metatype *out_outDae, modelica_metatype *out_outState)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instConstraint(threadData, _inCache, _inEnv, _inPrefix, _inState, _inConstraints, tmp1, out_outEnv, out_outDae, out_outState);
return _outCache;
}
DLLExport
modelica_metatype omc_InstSection_instInitialAlgorithm(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inAlgorithm, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_boolean tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inPrefix;
tmp4_5 = _inSets;
tmp4_6 = _inState;
tmp4_7 = _inAlgorithm;
tmp4_8 = _inImpl;
tmp4_9 = _inGraph;
{
modelica_metatype _env = NULL;
modelica_metatype _statements_1 = NULL;
modelica_metatype _csets = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _statements = NULL;
modelica_boolean _impl;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _source = NULL;
modelica_metatype _dae = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_statements = tmpMeta6;
_impl = tmp4_8;
_graph = tmp4_9;
_source = omc_ElementSource_createElementSource(threadData, _OMC_LIT138, omc_FGraph_getScopePath(threadData, _env), _pre, _OMC_LIT203);
_cache = omc_InstSection_instStatements(threadData, _cache, _env, _ih, _pre, _ci_state, _statements, _source, _OMC_LIT205, _impl, _unrollForLoops ,&_statements_1);
tmpMeta7 = mmc_mk_box2(0, boxvar_ExpressionSimplify_simplifyWork, _OMC_LIT207);
_statements_1 = omc_DAEUtil_traverseDAEEquationsStmts(threadData, _statements_1, boxvar_Expression_traverseSubexpressionsHelper, tmpMeta7, NULL);
tmpMeta9 = mmc_mk_box2(3, &DAE_Algorithm_ALGORITHM__STMTS__desc, _statements_1);
tmpMeta10 = mmc_mk_box3(20, &DAE_Element_INITIALALGORITHM__desc, tmpMeta9, _source);
tmpMeta8 = mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta8);
_dae = tmpMeta11;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _dae;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp12;
tmp12 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp12) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT208);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outDae = tmpMeta[0+3];
_outSets = tmpMeta[0+4];
_outState = tmpMeta[0+5];
_outGraph = tmpMeta[0+6];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
modelica_metatype boxptr_InstSection_instInitialAlgorithm(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inAlgorithm, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_instInitialAlgorithm(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inAlgorithm, tmp1, tmp2, _inGraph, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
DLLExport
modelica_metatype omc_InstSection_instAlgorithm(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inAlgorithm, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_boolean tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inPrefix;
tmp4_5 = _inSets;
tmp4_6 = _inState;
tmp4_7 = _inAlgorithm;
tmp4_8 = _inImpl;
tmp4_9 = _inGraph;
{
modelica_metatype _env = NULL;
modelica_metatype _statements_1 = NULL;
modelica_metatype _csets = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _statements = NULL;
modelica_metatype _stmt = NULL;
modelica_boolean _impl;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _source = NULL;
modelica_metatype _dae = NULL;
modelica_string _s = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_statements = tmpMeta6;
_impl = tmp4_8;
_graph = tmp4_9;
_ci_state = omc_ClassInf_trans(threadData, _ci_state, _OMC_LIT201);
_source = omc_ElementSource_createElementSource(threadData, _OMC_LIT138, omc_FGraph_getScopePath(threadData, _env), _pre, _OMC_LIT203);
_cache = omc_InstSection_instStatements(threadData, _cache, _env, _ih, _pre, _ci_state, _statements, _source, _OMC_LIT209, _impl, _unrollForLoops ,&_statements_1);
tmpMeta7 = mmc_mk_box2(0, boxvar_ExpressionSimplify_simplifyWork, _OMC_LIT207);
_statements_1 = omc_DAEUtil_traverseDAEEquationsStmts(threadData, _statements_1, boxvar_Expression_traverseSubexpressionsHelper, tmpMeta7, NULL);
tmpMeta9 = mmc_mk_box2(3, &DAE_Algorithm_ALGORITHM__STMTS__desc, _statements_1);
tmpMeta10 = mmc_mk_box3(19, &DAE_Element_ALGORITHM__desc, tmpMeta9, _source);
tmpMeta8 = mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta8);
_dae = tmpMeta11;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _dae;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_boolean tmp15;
modelica_metatype tmpMeta17;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
_stmt = tmpMeta13;
_ci_state = tmp4_6;
tmp15 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_ClassInf_trans(threadData, _ci_state, _OMC_LIT201);
tmp15 = 1;
goto goto_16;
goto_16:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp15) {goto goto_2;}
_s = omc_ClassInf_printStateStr(threadData, _ci_state);
_info = omc_SCodeUtil_getStatementInfo(threadData, _stmt);
tmpMeta17 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT212, tmpMeta17, _info);
goto goto_2;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp18;
tmp18 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp18) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT213);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outDae = tmpMeta[0+3];
_outSets = tmpMeta[0+4];
_outState = tmpMeta[0+5];
_outGraph = tmpMeta[0+6];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
modelica_metatype boxptr_InstSection_instAlgorithm(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inAlgorithm, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_instAlgorithm(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inAlgorithm, tmp1, tmp2, _inGraph, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeComplexDaeEquation(threadData_t *threadData, modelica_metatype _lhs, modelica_metatype _rhs, modelica_metatype _source, modelica_metatype _initial_)
{
modelica_metatype _dae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _initial_;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,0) == 0) goto tmp3_end;
tmpMeta7 = mmc_mk_box4(11, &DAE_Element_COMPLEX__EQUATION__desc, _lhs, _rhs, _source);
tmpMeta6 = mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta8 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta6);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
tmpMeta10 = mmc_mk_box4(12, &DAE_Element_INITIAL__COMPLEX__EQUATION__desc, _lhs, _rhs, _source);
tmpMeta9 = mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta9);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_dae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _dae;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instComplexEquation(threadData_t *threadData, modelica_metatype _lhs, modelica_metatype _rhs, modelica_metatype _tp, modelica_metatype _source, modelica_metatype _initial_)
{
modelica_metatype _dae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_string _s = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
tmp6 = omc_Types_isRecord(threadData, _tp);
if (1 != tmp6) goto goto_2;
tmpMeta1 = omc_InstSection_makeComplexDaeEquation(threadData, _lhs, _rhs, _source, _initial_);
goto tmp3_done;
}
case 1: {
modelica_boolean tmp7;
tmp7 = omc_Types_isExternalObject(threadData, _tp);
if (1 != tmp7) goto goto_2;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _lhs, _rhs, _source, _initial_);
goto tmp3_done;
}
case 2: {
tmpMeta1 = omc_InstSection_makeComplexDaeEquation(threadData, _lhs, _rhs, _source, _initial_);
goto tmp3_done;
}
case 3: {
modelica_boolean tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmp8 = omc_Types_isRecord(threadData, _tp);
if (0 != tmp8) goto goto_2;
tmpMeta9 = stringAppend(omc_ExpressionDump_printExpStr(threadData, _lhs),_OMC_LIT214);
tmpMeta10 = stringAppend(tmpMeta9,omc_ExpressionDump_printExpStr(threadData, _rhs));
_s = tmpMeta10;
_info = omc_ElementSource_getElementSourceFileInfo(threadData, _source);
tmpMeta11 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT217, tmpMeta11, _info);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_dae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _dae;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_string _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _env = NULL;
modelica_metatype _source = NULL;
modelica_metatype _range = NULL;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_c = omc_Types_getPropConst(threadData, _inRangeProps);
if(omc_Types_isParameterOrConstant(threadData, _c))
{
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta7 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta8 = omc_Ceval_ceval(threadData, _outCache, _inEnv, _inRange, _inImpl, tmpMeta7, ((modelica_integer) 0), &tmpMeta5);
_outCache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,5,2) == 0) goto goto_1;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
if (!listEmpty(tmpMeta6)) goto goto_1;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
_outStatements = tmpMeta9;
goto _return;
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
}
_ty = omc_Types_getPropType(threadData, _inRangeProps);
_ty = omc_InstSection_getIteratorType(threadData, _ty, _inIterator, _inInfo);
_outCache = omc_Ceval_cevalRangeIfConstant(threadData, _outCache, _inEnv, _inRange, _inRangeProps, _inImpl, _inInfo ,&_range);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _range, _inPrefix ,&_range);
_env = omc_InstSection_addForLoopScope(threadData, _inEnv, _inIterator, _ty, _OMC_LIT14, mmc_mk_some(_c));
_outCache = omc_InstSection_instStatements(threadData, _outCache, _env, _inIH, _inPrefix, _inState, _inBody, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
_source = omc_ElementSource_addElementSourceFileInfo(threadData, _inSource, _inInfo);
tmpMeta10 = mmc_mk_cons(omc_Algorithm_makeFor(threadData, _inIterator, _range, _inRangeProps, _outStatements, _source), MMC_REFSTRUCTLIT(mmc_nil));
_outStatements = tmpMeta10;
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
threadData->mmc_jumper = old_mmc_jumper;
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instForStatement__dispatch(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_instForStatement__dispatch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inIterator, _inRange, _inRangeProps, _inBody, _inInfo, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_string _iterator = NULL;
modelica_metatype _oarange = NULL;
modelica_metatype _arange = NULL;
modelica_metatype _range = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _body = NULL;
modelica_metatype _info = NULL;
modelica_metatype _iter_crefs = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inForStatement;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,5) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 6));
_iterator = tmpMeta2;
_oarange = tmpMeta3;
_body = tmpMeta4;
_info = tmpMeta5;
if(isSome(_oarange))
{
tmpMeta6 = _oarange;
if (optionNone(tmpMeta6)) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
_arange = tmpMeta7;
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _arange, _inImpl, 1, _inPrefix, _info ,&_range ,&_prop);
}
else
{
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
_iter_crefs = omc_SCodeUtil_findIteratorIndexedCrefsInStatements(threadData, _body, _iterator, tmpMeta8);
_range = omc_Static_deduceIterationRange(threadData, _iterator, _iter_crefs, _inEnv, _inCache, _info ,&_prop ,&_outCache);
}
if(omc_InstSection_containsWhenStatements(threadData, _body))
{
_outCache = omc_InstSection_unrollForLoop(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _iterator, _range, _prop, _body, _inForStatement, _info, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
}
else
{
_outCache = omc_InstSection_instForStatement__dispatch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _iterator, _range, _prop, _body, _info, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
}
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instForStatement(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inForStatement, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_instForStatement(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inForStatement, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_unrollForLoop(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_string _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inStatement, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_boolean _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outStatements = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _range = NULL;
modelica_metatype _env = NULL;
modelica_metatype _val = NULL;
modelica_string _str = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_boolean tmp7;
modelica_metatype tmpMeta8;
tmpMeta5 = omc_Types_getPropType(threadData, _inRangeProps);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,6,2) == 0) goto goto_1;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
_ty = tmpMeta6;
_c = omc_Types_getPropConst(threadData, _inRangeProps);
tmp7 = omc_Types_isParameterOrConstant(threadData, _c);
if (1 != tmp7) goto goto_1;
_env = omc_InstSection_addForLoopScope(threadData, _inEnv, _inIterator, _ty, _OMC_LIT14, mmc_mk_some(_c));
tmpMeta8 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
_outCache = omc_Ceval_ceval(threadData, _inCache, _env, _inRange, _inImpl, tmpMeta8, ((modelica_integer) 0) ,&_val);
_outCache = omc_InstSection_loopOverRange(threadData, _inCache, _env, _inIH, _inPrefix, _inState, _inIterator, _val, _inBody, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta9;
tmpMeta9 = mmc_mk_cons(omc_SCodeDump_statementStr(threadData, _inStatement, _OMC_LIT200), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT220, tmpMeta9, _inInfo);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outStatements) { *out_outStatements = _outStatements; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_unrollForLoop(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inState, modelica_metatype _inIterator, modelica_metatype _inRange, modelica_metatype _inRangeProps, modelica_metatype _inBody, modelica_metatype _inStatement, modelica_metatype _inInfo, modelica_metatype _inSource, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inUnrollLoops, modelica_metatype *out_outStatements)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inUnrollLoops);
_outCache = omc_InstSection_unrollForLoop(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inState, _inIterator, _inRange, _inRangeProps, _inBody, _inStatement, _inInfo, _inSource, _inInitial, tmp1, tmp2, out_outStatements);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instArrayElEq(threadData_t *threadData, modelica_metatype _inLhsExp, modelica_metatype _inRhsExp, modelica_metatype _inType, modelica_metatype _inConst, modelica_metatype _inLhsIndices, modelica_metatype _inRhsIndices, modelica_metatype _inSource, modelica_metatype _inInitial)
{
modelica_metatype _outDAE = NULL;
modelica_metatype _rhs_idx = NULL;
modelica_metatype _rhs_idxs = NULL;
modelica_metatype _dae = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outDAE = _OMC_LIT71;
_rhs_idxs = listReverse(_inRhsIndices);
{
modelica_metatype _lhs_idx;
for (tmpMeta1 = listReverse(_inLhsIndices); !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_lhs_idx = MMC_CAR(tmpMeta1);
tmpMeta2 = _rhs_idxs;
if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_CAR(tmpMeta2);
tmpMeta4 = MMC_CDR(tmpMeta2);
_rhs_idx = tmpMeta3;
_rhs_idxs = tmpMeta4;
_dae = omc_InstSection_instEqEquation2(threadData, _lhs_idx, _rhs_idx, _inType, _inConst, _inSource, _inInitial);
_outDAE = omc_DAEUtil_joinDaes(threadData, _dae, _outDAE);
}
}
_return: OMC_LABEL_UNUSED
return _outDAE;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instArrayEquation(threadData_t *threadData, modelica_metatype _lhs, modelica_metatype _rhs, modelica_metatype _tp, modelica_metatype _inConst, modelica_metatype _inSource, modelica_metatype _initial_)
{
modelica_metatype _dae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _tp;
tmp4_2 = _inSource;
tmp4_3 = _initial_;
{
modelica_boolean _b;
modelica_boolean _b1;
modelica_boolean _b2;
modelica_metatype _ds = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _lhs_dim = NULL;
modelica_metatype _rhs_dim = NULL;
modelica_metatype _lhs_idxs = NULL;
modelica_metatype _rhs_idxs = NULL;
modelica_metatype _t = NULL;
modelica_string _lhs_str = NULL;
modelica_string _rhs_str = NULL;
modelica_string _eq_str = NULL;
modelica_metatype _elt = NULL;
modelica_metatype _source = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 10; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
_source = tmp4_2;
tmp4 += 1;
_b1 = omc_Expression_containVectorFunctioncall(threadData, _lhs);
_b2 = omc_Expression_containVectorFunctioncall(threadData, _rhs);
tmp6 = (_b1 || _b2);
if (1 != tmp6) goto goto_2;
_ds = omc_Types_getDimensions(threadData, _tp);
tmpMeta7 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
_elt = tmpMeta7;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmpMeta9 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
tmpMeta8 = mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta8);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,0) == 0) goto tmp3_end;
_source = tmp4_2;
_b1 = omc_Expression_containVectorFunctioncall(threadData, _lhs);
_b2 = omc_Expression_containVectorFunctioncall(threadData, _rhs);
tmp11 = (_b1 || _b2);
if (1 != tmp11) goto goto_2;
_ds = omc_Types_getDimensions(threadData, _tp);
tmpMeta12 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
_elt = tmpMeta12;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmpMeta14 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
tmpMeta13 = mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta15 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta13);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_boolean tmp20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta17)) goto tmp3_end;
tmpMeta18 = MMC_CAR(tmpMeta17);
tmpMeta19 = MMC_CDR(tmpMeta17);
if (!listEmpty(tmpMeta19)) goto tmp3_end;
_t = tmpMeta16;
tmp20 = omc_Config_splitArrays(threadData);
if (0 != tmp20) goto goto_2;
tmpMeta21 = omc_Expression_typeof(threadData, _lhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,6,2) == 0) goto goto_2;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
if (listEmpty(tmpMeta22)) goto goto_2;
tmpMeta23 = MMC_CAR(tmpMeta22);
tmpMeta24 = MMC_CDR(tmpMeta22);
_lhs_dim = tmpMeta23;
tmpMeta25 = omc_Expression_typeof(threadData, _rhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,6,2) == 0) goto goto_2;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 3));
if (listEmpty(tmpMeta26)) goto goto_2;
tmpMeta27 = MMC_CAR(tmpMeta26);
tmpMeta28 = MMC_CDR(tmpMeta26);
_rhs_dim = tmpMeta27;
_lhs_idxs = omc_InstSection_expandArrayDimension(threadData, _lhs_dim, _lhs);
_rhs_idxs = omc_InstSection_expandArrayDimension(threadData, _rhs_dim, _rhs);
tmpMeta1 = omc_InstSection_instArrayElEq(threadData, _lhs, _rhs, _t, _inConst, _lhs_idxs, _rhs_idxs, _inSource, _initial_);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_boolean tmp33;
modelica_boolean tmp34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta30)) goto tmp3_end;
tmpMeta31 = MMC_CAR(tmpMeta30);
tmpMeta32 = MMC_CDR(tmpMeta30);
if (!listEmpty(tmpMeta32)) goto tmp3_end;
_t = tmpMeta29;
_dim = tmpMeta31;
tmp33 = omc_Config_splitArrays(threadData);
if (1 != tmp33) goto goto_2;
tmp34 = omc_Expression_dimensionKnown(threadData, _dim);
if (1 != tmp34) goto goto_2;
tmpMeta35 = omc_Expression_typeof(threadData, _lhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,6,2) == 0) goto goto_2;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 3));
if (listEmpty(tmpMeta36)) goto goto_2;
tmpMeta37 = MMC_CAR(tmpMeta36);
tmpMeta38 = MMC_CDR(tmpMeta36);
_lhs_dim = tmpMeta37;
tmpMeta39 = omc_Expression_typeof(threadData, _rhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta39,6,2) == 0) goto goto_2;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 3));
if (listEmpty(tmpMeta40)) goto goto_2;
tmpMeta41 = MMC_CAR(tmpMeta40);
tmpMeta42 = MMC_CDR(tmpMeta40);
_rhs_dim = tmpMeta41;
_lhs_idxs = omc_InstSection_expandArrayDimension(threadData, _lhs_dim, _lhs);
_rhs_idxs = omc_InstSection_expandArrayDimension(threadData, _rhs_dim, _rhs);
tmpMeta1 = omc_InstSection_instArrayElEq(threadData, _lhs, _rhs, _t, _inConst, _lhs_idxs, _rhs_idxs, _inSource, _initial_);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_boolean tmp46;
modelica_boolean tmp47;
modelica_boolean tmp48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_boolean tmp51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_boolean tmp55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta43)) goto tmp3_end;
tmpMeta44 = MMC_CAR(tmpMeta43);
tmpMeta45 = MMC_CDR(tmpMeta43);
if (!listEmpty(tmpMeta45)) goto tmp3_end;
_dim = tmpMeta44;
_source = tmp4_2;
tmp46 = omc_Config_splitArrays(threadData);
if (1 != tmp46) goto goto_2;
tmp47 = omc_Expression_dimensionKnown(threadData, _dim);
if (1 != tmp47) goto goto_2;
tmp48 = (((omc_Expression_isRange(threadData, _lhs) || omc_Expression_isRange(threadData, _rhs)) || omc_Expression_isReduction(threadData, _lhs)) || omc_Expression_isReduction(threadData, _rhs));
if (1 != tmp48) goto goto_2;
_ds = omc_Types_getDimensions(threadData, _tp);
_b = omc_SCodeUtil_isInitial(threadData, _initial_);
tmp51 = (modelica_boolean)_b;
if(tmp51)
{
tmpMeta49 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
tmpMeta52 = tmpMeta49;
}
else
{
tmpMeta50 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
tmpMeta52 = tmpMeta50;
}
_elt = tmpMeta52;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmp55 = (modelica_boolean)_b;
if(tmp55)
{
tmpMeta53 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
tmpMeta56 = tmpMeta53;
}
else
{
tmpMeta54 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _ds, _lhs, _rhs, _source);
tmpMeta56 = tmpMeta54;
}
_elt = tmpMeta56;
tmpMeta57 = mmc_mk_cons(_elt, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta58 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta57);
tmpMeta1 = tmpMeta58;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_boolean tmp63;
modelica_boolean tmp64;
modelica_boolean tmp65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta60)) goto tmp3_end;
tmpMeta61 = MMC_CAR(tmpMeta60);
tmpMeta62 = MMC_CDR(tmpMeta60);
if (!listEmpty(tmpMeta62)) goto tmp3_end;
_t = tmpMeta59;
_dim = tmpMeta61;
tmp63 = omc_Config_splitArrays(threadData);
if (1 != tmp63) goto goto_2;
tmp64 = omc_Expression_dimensionKnown(threadData, _dim);
if (0 != tmp64) goto goto_2;
tmp65 = omc_Flags_getConfigBool(threadData, _OMC_LIT70);
if (1 != tmp65) goto goto_2;
tmpMeta66 = omc_Expression_typeof(threadData, _lhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta66,6,2) == 0) goto goto_2;
tmpMeta67 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta66), 3));
if (listEmpty(tmpMeta67)) goto goto_2;
tmpMeta68 = MMC_CAR(tmpMeta67);
tmpMeta69 = MMC_CDR(tmpMeta67);
_lhs_dim = tmpMeta68;
tmpMeta70 = omc_Expression_typeof(threadData, _rhs);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta70,6,2) == 0) goto goto_2;
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta70), 3));
if (listEmpty(tmpMeta71)) goto goto_2;
tmpMeta72 = MMC_CAR(tmpMeta71);
tmpMeta73 = MMC_CDR(tmpMeta71);
_rhs_dim = tmpMeta72;
_lhs_idxs = omc_InstSection_expandArrayDimension(threadData, _lhs_dim, _lhs);
_rhs_idxs = omc_InstSection_expandArrayDimension(threadData, _rhs_dim, _rhs);
tmpMeta1 = omc_InstSection_instArrayElEq(threadData, _lhs, _rhs, _t, _inConst, _lhs_idxs, _rhs_idxs, _inSource, _initial_);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_boolean tmp77;
modelica_boolean tmp78;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta74)) goto tmp3_end;
tmpMeta75 = MMC_CAR(tmpMeta74);
tmpMeta76 = MMC_CDR(tmpMeta74);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta75,4,0) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta76)) goto tmp3_end;
_source = tmp4_2;
tmp4 += 1;
tmp77 = omc_Config_splitArrays(threadData);
if (1 != tmp77) goto goto_2;
tmp78 = omc_Flags_getConfigBool(threadData, _OMC_LIT70);
if (1 != tmp78) goto goto_2;
tmpMeta79 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _OMC_LIT222, _lhs, _rhs, _source);
_elt = tmpMeta79;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmpMeta81 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _OMC_LIT222, _lhs, _rhs, _source);
tmpMeta80 = mmc_mk_cons(tmpMeta81, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta82 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta80);
tmpMeta1 = tmpMeta82;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
modelica_metatype tmpMeta85;
modelica_boolean tmp86;
modelica_boolean tmp87;
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta83 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta83)) goto tmp3_end;
tmpMeta84 = MMC_CAR(tmpMeta83);
tmpMeta85 = MMC_CDR(tmpMeta83);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta84,4,0) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta85)) goto tmp3_end;
_source = tmp4_2;
tmp86 = omc_Config_splitArrays(threadData);
if (1 != tmp86) goto goto_2;
tmp87 = omc_Flags_getConfigBool(threadData, _OMC_LIT70);
if (1 != tmp87) goto goto_2;
tmpMeta88 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _OMC_LIT222, _lhs, _rhs, _source);
_elt = tmpMeta88;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmpMeta90 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _OMC_LIT222, _lhs, _rhs, _source);
tmpMeta89 = mmc_mk_cons(tmpMeta90, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta91 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta89);
tmpMeta1 = tmpMeta91;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
modelica_boolean tmp95;
modelica_boolean tmp96;
modelica_metatype tmpMeta97;
modelica_metatype tmpMeta98;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta92 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta92)) goto tmp3_end;
tmpMeta93 = MMC_CAR(tmpMeta92);
tmpMeta94 = MMC_CDR(tmpMeta92);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta93,4,0) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta94)) goto tmp3_end;
tmp95 = omc_Config_splitArrays(threadData);
if (1 != tmp95) goto goto_2;
tmp96 = omc_Flags_getConfigBool(threadData, _OMC_LIT70);
if (0 != tmp96) goto goto_2;
_lhs_str = omc_ExpressionDump_printExpStr(threadData, _lhs);
_rhs_str = omc_ExpressionDump_printExpStr(threadData, _rhs);
tmpMeta97 = mmc_mk_cons(_lhs_str, mmc_mk_cons(_OMC_LIT223, mmc_mk_cons(_rhs_str, MMC_REFSTRUCTLIT(mmc_nil))));
_eq_str = stringAppendList(tmpMeta97);
tmpMeta98 = mmc_mk_cons(_eq_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT226, tmpMeta98, omc_ElementSource_getElementSourceFileInfo(threadData, _inSource));
goto goto_2;
goto tmp3_done;
}
case 9: {
modelica_boolean tmp99;
tmp99 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp99) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT227);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 10) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_dae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _dae;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeDaeDefine(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inExp, modelica_metatype _source, modelica_metatype _inInitial)
{
modelica_metatype _outDae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inComponentRef;
tmp4_2 = _inExp;
tmp4_3 = _inInitial;
{
modelica_metatype _cr = NULL;
modelica_metatype _e2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,0) == 0) goto tmp3_end;
_cr = tmp4_1;
_e2 = tmp4_2;
tmpMeta7 = mmc_mk_box4(4, &DAE_Element_DEFINE__desc, _cr, _e2, _source);
tmpMeta6 = mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta8 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta6);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
_cr = tmp4_1;
_e2 = tmp4_2;
tmpMeta10 = mmc_mk_box4(5, &DAE_Element_INITIALDEFINE__desc, _cr, _e2, _source);
tmpMeta9 = mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta9);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDae;
}
DLLExport
modelica_metatype omc_InstSection_makeDaeEquation(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2, modelica_metatype _inSource, modelica_metatype _inInitial3)
{
modelica_metatype _outDae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inExp1;
tmp4_2 = _inExp2;
tmp4_3 = _inSource;
tmp4_4 = _inInitial3;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _source = NULL;
modelica_metatype _elt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,0) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_source = tmp4_3;
tmpMeta6 = mmc_mk_box4(6, &DAE_Element_EQUATION__desc, _e1, _e2, _source);
_elt = tmpMeta6;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmpMeta8 = mmc_mk_box4(6, &DAE_Element_EQUATION__desc, _e1, _e2, _source);
tmpMeta7 = mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta9 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta7);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,0) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_source = tmp4_3;
tmpMeta10 = mmc_mk_box4(18, &DAE_Element_INITIALEQUATION__desc, _e1, _e2, _source);
_elt = tmpMeta10;
_source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
tmpMeta12 = mmc_mk_box4(18, &DAE_Element_INITIALEQUATION__desc, _e1, _e2, _source);
tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta13 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta11);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDae;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEqEquation2List(threadData_t *threadData, modelica_metatype _inExps1, modelica_metatype _inExps2, modelica_metatype _inTypes3, modelica_metatype _const, modelica_metatype _source, modelica_metatype _initial_, modelica_metatype _acc)
{
modelica_metatype _outDae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inExps1;
tmp4_2 = _inExps2;
tmp4_3 = _inTypes3;
{
modelica_metatype _rest1 = NULL;
modelica_metatype _rest2 = NULL;
modelica_metatype _rest3 = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _res = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
if (!listEmpty(tmp4_2)) goto tmp3_end;
if (!listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta1 = omc_DAEUtil_joinDaeLst(threadData, listReverse(_acc));
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmp4_2);
tmpMeta9 = MMC_CDR(tmp4_2);
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_3);
tmpMeta11 = MMC_CDR(tmp4_3);
_exp1 = tmpMeta6;
_rest1 = tmpMeta7;
_exp2 = tmpMeta8;
_rest2 = tmpMeta9;
_ty = tmpMeta10;
_rest3 = tmpMeta11;
_res = omc_InstSection_instEqEquation2(threadData, _exp1, _exp2, _ty, _const, _source, _initial_);
tmpMeta12 = mmc_mk_cons(_res, _acc);
_inExps1 = _rest1;
_inExps2 = _rest2;
_inTypes3 = _rest3;
_acc = tmpMeta12;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDae;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEqEquation2(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2, modelica_metatype _inType3, modelica_metatype _inConst, modelica_metatype _source, modelica_metatype _inInitial4)
{
modelica_metatype _outDae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inExp1;
tmp4_2 = _inExp2;
tmp4_3 = _inType3;
tmp4_4 = _inInitial4;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _initial_ = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _vs = NULL;
modelica_metatype _tt = NULL;
modelica_metatype _exps1 = NULL;
modelica_metatype _exps2 = NULL;
modelica_metatype _tys = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 19; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 17;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 16;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 15;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 14;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,4,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 13;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,5,5) == 0) goto tmp3_end;
_cr = tmpMeta6;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmpMeta1 = omc_InstSection_makeDaeDefine(threadData, _cr, _e2, _source, _initial_);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,5,5) == 0) goto tmp3_end;
_cr = tmpMeta7;
_e1 = tmp4_1;
_initial_ = tmp4_4;
tmpMeta1 = omc_InstSection_makeDaeDefine(threadData, _cr, _e1, _source, _initial_);
goto tmp3_done;
}
case 7: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,5,5) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 10;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
_tt = tmp4_3;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 9;
tmpMeta1 = omc_InstSection_instArrayEquation(threadData, _e1, _e2, _tt, _inConst, _source, _initial_);
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,19,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,14,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
_exps1 = tmpMeta8;
_e2 = tmp4_2;
_initial_ = tmp4_4;
_exps1 = omc_List_map(threadData, _exps1, boxvar_Expression_emptyToWild);
omc_InstSection_checkNoDuplicateAssignments(threadData, _exps1, omc_ElementSource_getElementSourceFileInfo(threadData, _source));
tmpMeta12 = mmc_mk_box2(22, &DAE_Exp_TUPLE__desc, _exps1);
_e1 = tmpMeta12;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 10: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,14,2) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 7;
if (!(!omc_Expression_isTuple(threadData, _e1))) goto tmp3_end;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 11: {
modelica_boolean tmp13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,17,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 6;
tmp13 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp13) goto goto_2;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 12: {
modelica_boolean tmp14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,18,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 5;
tmp14 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp14) goto goto_2;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 13: {
modelica_boolean tmp15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,19,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 4;
tmp15 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp15) goto goto_2;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 14: {
modelica_boolean tmp16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,20,5) == 0) goto tmp3_end;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 3;
tmp16 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp16) goto goto_2;
tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _e1, _e2, _source, _initial_);
goto tmp3_done;
}
case 15: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,10,4) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_tt = tmpMeta17;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmp4 += 2;
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1, _e2, _tt, _inConst, _source, _initial_);
goto tmp3_done;
}
case 16: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,9,3) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_vs = tmpMeta18;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
_exps1 = omc_Expression_splitRecord(threadData, _e1, _inType3);
_exps2 = omc_Expression_splitRecord(threadData, _e2, _inType3);
_tys = omc_List_map(threadData, _vs, boxvar_Types_getVarType);
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = omc_InstSection_instEqEquation2List(threadData, _exps1, _exps2, _tys, _inConst, _source, _initial_, tmpMeta19);
goto tmp3_done;
}
case 17: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,9,3) == 0) goto tmp3_end;
_tt = tmp4_3;
_e1 = tmp4_1;
_e2 = tmp4_2;
_initial_ = tmp4_4;
tmpMeta1 = omc_InstSection_instComplexEquation(threadData, _e1, _e2, _tt, _source, _initial_);
goto tmp3_done;
}
case 18: {
modelica_boolean tmp20;
tmp20 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp20) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT228);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 19) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outDae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDae;
}
DLLExport
modelica_metatype omc_InstSection_instEqEquation(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inProperties2, modelica_metatype _inExp3, modelica_metatype _inProperties4, modelica_metatype _source, modelica_metatype _inInitial5, modelica_boolean _inImplicit, modelica_metatype _extraInfo)
{
modelica_metatype _outDae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inExp1;
tmp4_2 = _inProperties2;
tmp4_3 = _inExp3;
tmp4_4 = _inProperties4;
tmp4_5 = _inInitial5;
{
modelica_metatype _e1_1 = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _e2_1 = NULL;
modelica_metatype _t_1 = NULL;
modelica_metatype _t1 = NULL;
modelica_metatype _t2 = NULL;
modelica_metatype _t = NULL;
modelica_metatype _p1 = NULL;
modelica_metatype _p2 = NULL;
modelica_metatype _initial_ = NULL;
modelica_string _e1_str = NULL;
modelica_string _t1_str = NULL;
modelica_string _e2_str = NULL;
modelica_string _t2_str = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _c = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,9,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,3,1) == 0) goto tmp3_end;
_e1 = tmp4_1;
_p2 = tmp4_4;
_c = tmpMeta6;
_p1 = tmp4_2;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmpMeta11 = omc_Types_matchProp(threadData, _e2, _p2, _p1, 1, &tmpMeta9);
_e2_1 = tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_t_1 = tmpMeta10;
_e1 = omc_ExpressionSimplify_simplify(threadData, _e1, NULL);
_e2_1 = omc_ExpressionSimplify_simplify(threadData, _e2_1, NULL);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1, _e2_1, _t_1, _c, _source, _initial_);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_p1 = tmp4_2;
_p2 = tmp4_4;
_c = tmpMeta12;
_e1 = tmp4_1;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmpMeta15 = omc_Types_matchProp(threadData, _e1, _p1, _p2, 0, &tmpMeta13);
_e1_1 = tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,2) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
_t_1 = tmpMeta14;
_e1_1 = omc_ExpressionSimplify_simplify(threadData, _e1_1, NULL);
_e2 = omc_ExpressionSimplify_simplify(threadData, _e2, NULL);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1_1, _e2, _t_1, _c, _source, _initial_);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,2) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_p1 = tmp4_2;
_p2 = tmp4_4;
_c = tmpMeta16;
_e1 = tmp4_1;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmp4 += 2;
tmpMeta19 = omc_Types_matchProp(threadData, _e2, _p2, _p1, 1, &tmpMeta17);
_e2_1 = tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,2) == 0) goto goto_2;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_t_1 = tmpMeta18;
_e1 = omc_ExpressionSimplify_simplify(threadData, _e1, NULL);
_e2_1 = omc_ExpressionSimplify_simplify(threadData, _e2_1, NULL);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1, _e2_1, _t_1, _c, _source, _initial_);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,2) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_p1 = tmp4_2;
_p2 = tmp4_4;
_tp = tmpMeta20;
_e1 = tmp4_1;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmpMeta23 = omc_Types_matchProp(threadData, _e1, _p1, _p2, 0, &tmpMeta21);
_e1_1 = tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,1,2) == 0) goto goto_2;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
_t_1 = tmpMeta22;
_e1_1 = omc_ExpressionSimplify_simplify(threadData, _e1_1, NULL);
_e2 = omc_ExpressionSimplify_simplify(threadData, _e2, NULL);
_c = omc_Types_propTupleAllConst(threadData, _tp);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1_1, _e2, _t_1, _c, _source, _initial_);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,2) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_p1 = tmp4_2;
_p2 = tmp4_4;
_tp = tmpMeta24;
_e1 = tmp4_1;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmp4 += 3;
tmpMeta27 = omc_Types_matchProp(threadData, _e2, _p2, _p1, 1, &tmpMeta25);
_e2_1 = tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,1,2) == 0) goto goto_2;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 2));
_t_1 = tmpMeta26;
_e1 = omc_ExpressionSimplify_simplify(threadData, _e1, NULL);
_e2_1 = omc_ExpressionSimplify_simplify(threadData, _e2_1, NULL);
_c = omc_Types_propTupleAllConst(threadData, _tp);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1, _e2_1, _t_1, _c, _source, _initial_);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,5,5) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,2) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,5,5) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_e1 = tmp4_1;
_t = tmpMeta29;
_c = tmpMeta30;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmp4 += 1;
_e1 = omc_ExpressionSimplify_simplify(threadData, _e1, NULL);
_e2 = omc_ExpressionSimplify_simplify(threadData, _e2, NULL);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1, _e2, _t, _c, _source, _initial_);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,2) == 0) goto tmp3_end;
_p1 = tmp4_2;
_e1 = tmp4_1;
_e2 = tmp4_3;
_initial_ = tmp4_5;
tmp4 += 1;
_p2 = omc_Types_propTupleFirstProp(threadData, _inProperties4);
tmpMeta31 = _p2;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta31,0,2) == 0) goto goto_2;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 3));
_c = tmpMeta32;
tmpMeta35 = omc_Types_matchProp(threadData, _e1, _p1, _p2, 0, &tmpMeta33);
_e1 = tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,0,2) == 0) goto goto_2;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
_t_1 = tmpMeta34;
_e1 = omc_ExpressionSimplify_simplify(threadData, _e1, NULL);
tmpMeta36 = mmc_mk_box4(25, &DAE_Exp_TSUB__desc, _e2, mmc_mk_integer(((modelica_integer) 1)), _t_1);
_e2 = tmpMeta36;
_e2 = omc_ExpressionSimplify_simplify(threadData, _e2, NULL);
tmpMeta1 = omc_InstSection_instEqEquation2(threadData, _e1, _e2, _t_1, _c, _source, _initial_);
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_boolean tmp44;
modelica_metatype tmpMeta45;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,2) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
_t1 = tmpMeta37;
_t2 = tmpMeta38;
_e1 = tmp4_1;
_e2 = tmp4_3;
_e1_str = omc_ExpressionDump_printExpStr(threadData, _e1);
_t1_str = omc_Types_unparseTypeNoAttr(threadData, _t1);
_e2_str = omc_ExpressionDump_printExpStr(threadData, _e2);
_t2_str = omc_Types_unparseTypeNoAttr(threadData, _t2);
tmpMeta39 = mmc_mk_cons(_e1_str, mmc_mk_cons(_OMC_LIT223, mmc_mk_cons(_e2_str, MMC_REFSTRUCTLIT(mmc_nil))));
_s1 = stringAppendList(tmpMeta39);
tmpMeta40 = mmc_mk_cons(_t1_str, mmc_mk_cons(_OMC_LIT223, mmc_mk_cons(_t2_str, MMC_REFSTRUCTLIT(mmc_nil))));
_s2 = stringAppendList(tmpMeta40);
_info = omc_ElementSource_getElementSourceFileInfo(threadData, _source);
omc_Types_typeErrorSanityCheck(threadData, _t1_str, _t2_str, _info);
tmpMeta41 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
tmp44 = (modelica_boolean)(stringEqual((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_extraInfo), 2))), _OMC_LIT132));
if(tmp44)
{
tmpMeta42 = mmc_mk_cons(_info, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta45 = tmpMeta42;
}
else
{
tmpMeta43 = mmc_mk_cons(_extraInfo, mmc_mk_cons(_info, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta45 = tmpMeta43;
}
omc_Error_addMultiSourceMessage(threadData, _OMC_LIT231, tmpMeta41, tmpMeta45);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 8) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outDae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDae;
}
modelica_metatype boxptr_InstSection_instEqEquation(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inProperties2, modelica_metatype _inExp3, modelica_metatype _inProperties4, modelica_metatype _source, modelica_metatype _inInitial5, modelica_metatype _inImplicit, modelica_metatype _extraInfo)
{
modelica_integer tmp1;
modelica_metatype _outDae = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outDae = omc_InstSection_instEqEquation(threadData, _inExp1, _inProperties2, _inExp3, _inProperties4, _source, _inInitial5, tmp1, _extraInfo);
return _outDae;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_addParForLoopScope(threadData_t *threadData, modelica_metatype _env, modelica_string _iterName, modelica_metatype _iterType, modelica_metatype _iterVariability, modelica_metatype _constOfForIteratorRange)
{
modelica_metatype _newEnv = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_newEnv = omc_FGraph_openScope(threadData, _env, _OMC_LIT172, _OMC_LIT232, mmc_mk_none());
_newEnv = omc_FGraph_addForIterator(threadData, _newEnv, _iterName, _iterType, _OMC_LIT126, _iterVariability, _constOfForIteratorRange);
_return: OMC_LABEL_UNUSED
return _newEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_addForLoopScope(threadData_t *threadData, modelica_metatype _env, modelica_string _iterName, modelica_metatype _iterType, modelica_metatype _iterVariability, modelica_metatype _constOfForIteratorRange)
{
modelica_metatype _newEnv = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_newEnv = omc_FGraph_openScope(threadData, _env, _OMC_LIT172, _OMC_LIT173, mmc_mk_none());
_newEnv = omc_FGraph_addForIterator(threadData, _newEnv, _iterName, _iterType, _OMC_LIT126, _iterVariability, _constOfForIteratorRange);
_return: OMC_LABEL_UNUSED
return _newEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_unroll(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_string _inIdent, modelica_metatype _inIteratorType, modelica_metatype _inValue, modelica_metatype _inEquations, modelica_metatype _inInitial, modelica_boolean _inImplicit, modelica_metatype _inGraph, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype _values = NULL;
modelica_metatype _env = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _daes = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _dae = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outSets = _inSets;
_outGraph = _inGraph;
_ci_state = _inState;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_daes = tmpMeta1;
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmpMeta6 = _inValue;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,5,2) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_values = tmpMeta7;
{
modelica_metatype _val;
for (tmpMeta8 = _values; !listEmpty(tmpMeta8); tmpMeta8=MMC_CDR(tmpMeta8))
{
_val = MMC_CAR(tmpMeta8);
_env = omc_FGraph_openScope(threadData, _inEnv, _OMC_LIT172, _OMC_LIT173, mmc_mk_none());
tmpMeta9 = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _val, _OMC_LIT175);
_env = omc_FGraph_addForIterator(threadData, _env, _inIdent, _inIteratorType, tmpMeta9, _OMC_LIT176, _OMC_LIT178);
_outCache = omc_Inst_instList(threadData, _outCache, _env, _inIH, _inPrefix, _outSets, _ci_state, (omc_SCodeUtil_isInitial(threadData, _inInitial)?boxvar_InstSection_instInitialEquation:boxvar_InstSection_instEquation), _inEquations, _inImplicit, 1, _outGraph ,NULL ,NULL ,&_dae ,&_outSets ,&_ci_state ,&_outGraph);
tmpMeta10 = mmc_mk_cons(_dae, _daes);
_daes = tmpMeta10;
}
}
_outDae = omc_List_fold(threadData, _daes, boxvar_DAEUtil_joinDaes, _OMC_LIT71);
goto tmp3_done;
}
case 1: {
modelica_boolean tmp12;
modelica_metatype tmpMeta13;
tmp12 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp12) goto goto_2;
tmpMeta13 = stringAppend(_OMC_LIT233,omc_ValuesUtil_valString(threadData, _inValue));
omc_Debug_traceln(threadData, tmpMeta13);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_unroll(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inIdent, modelica_metatype _inIteratorType, modelica_metatype _inValue, modelica_metatype _inEquations, modelica_metatype _inInitial, modelica_metatype _inImplicit, modelica_metatype _inGraph, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_InstSection_unroll(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inIdent, _inIteratorType, _inValue, _inEquations, _inInitial, tmp1, _inGraph, out_outDae, out_outSets, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationCommonCiTrans(threadData_t *threadData, modelica_metatype _inState, modelica_metatype _inInitial)
{
modelica_metatype _outState = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inInitial;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,0) == 0) goto tmp3_end;
tmpMeta1 = omc_ClassInf_trans(threadData, _inState, _OMC_LIT234);
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inState;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outState = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outState;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_expandTupleEquationWithWild(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _propCall, modelica_metatype _propTuple, modelica_metatype *out_oprop)
{
modelica_metatype _outExp = NULL;
modelica_metatype _oprop = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inExp;
tmp4_2 = _propCall;
tmp4_3 = _propTuple;
{
modelica_metatype _aexpl = NULL;
modelica_metatype _aexpl2 = NULL;
modelica_metatype _typeList = NULL;
modelica_integer _fillValue;
modelica_metatype _propType = NULL;
modelica_metatype _lst = NULL;
modelica_metatype _lst2 = NULL;
modelica_metatype _tupleConst = NULL;
modelica_metatype _tupleConst2 = NULL;
modelica_metatype _tconst = NULL;
modelica_metatype _names = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,14,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,14,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_aexpl = tmpMeta6;
_typeList = tmpMeta8;
_names = tmpMeta9;
_lst = tmpMeta11;
_tupleConst = tmpMeta13;
tmp4 += 1;
_fillValue = listLength(_typeList) - listLength(_aexpl);
_lst2 = omc_List_fill(threadData, _OMC_LIT180, _fillValue);
_aexpl2 = omc_List_fill(threadData, _OMC_LIT236, _fillValue);
_tupleConst2 = omc_List_fill(threadData, _OMC_LIT237, _fillValue);
_aexpl2 = listAppend(_aexpl, _aexpl2);
_lst2 = listAppend(_lst, _lst2);
_tupleConst2 = listAppend(_tupleConst, _tupleConst2);
tmpMeta14 = mmc_mk_box2(19, &Absyn_Exp_TUPLE__desc, _aexpl2);
tmpMeta15 = mmc_mk_box3(17, &DAE_Type_T__TUPLE__desc, _lst2, _names);
tmpMeta16 = mmc_mk_box2(4, &DAE_TupleConst_TUPLE__CONST__desc, _tupleConst2);
tmpMeta17 = mmc_mk_box3(4, &DAE_Properties_PROP__TUPLE__desc, tmpMeta15, tmpMeta16);
tmpMeta[0+0] = tmpMeta14;
tmpMeta[0+1] = tmpMeta17;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,2) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,2) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,14,2) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 3));
_propType = tmpMeta18;
_tconst = tmpMeta19;
_typeList = tmpMeta21;
_names = tmpMeta22;
_fillValue = ((modelica_integer) -1) + listLength(_typeList);
_aexpl2 = omc_List_fill(threadData, _OMC_LIT236, _fillValue);
_lst2 = omc_List_fill(threadData, _OMC_LIT180, _fillValue);
_tupleConst2 = omc_List_fill(threadData, _OMC_LIT237, _fillValue);
tmpMeta23 = mmc_mk_cons(_inExp, _aexpl2);
_aexpl = tmpMeta23;
tmpMeta24 = mmc_mk_cons(_propType, _lst2);
_lst = tmpMeta24;
tmpMeta26 = mmc_mk_box2(3, &DAE_TupleConst_SINGLE__CONST__desc, _tconst);
tmpMeta25 = mmc_mk_cons(tmpMeta26, _tupleConst2);
_tupleConst = tmpMeta25;
tmpMeta27 = mmc_mk_box2(19, &Absyn_Exp_TUPLE__desc, _aexpl);
tmpMeta28 = mmc_mk_box3(17, &DAE_Type_T__TUPLE__desc, _lst, _names);
tmpMeta29 = mmc_mk_box2(4, &DAE_TupleConst_TUPLE__CONST__desc, _tupleConst);
tmpMeta30 = mmc_mk_box3(4, &DAE_Properties_PROP__TUPLE__desc, tmpMeta28, tmpMeta29);
tmpMeta[0+0] = tmpMeta27;
tmpMeta[0+1] = tmpMeta30;
goto tmp3_done;
}
case 2: {
if (!(!omc_Types_isPropTuple(threadData, _propCall))) goto tmp3_end;
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _propTuple;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp31;
tmp31 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp31) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT238);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta[0+0];
_oprop = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_oprop) { *out_oprop = _oprop; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_condenseArrayEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ie1, modelica_metatype _ie2, modelica_metatype _elabedE1, modelica_metatype _elabedE2, modelica_metatype _iprop, modelica_metatype _iprop2, modelica_boolean _impl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outE1, modelica_metatype *out_outE2, modelica_metatype *out_oprop)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outE1 = NULL;
modelica_metatype _outE2 = NULL;
modelica_metatype _oprop = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _ie1;
tmp4_4 = _ie2;
tmp4_5 = _iprop;
tmp4_6 = _iprop2;
tmp4_7 = _inPrefix;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_boolean _b3;
modelica_boolean _b4;
modelica_metatype _elabedE1_2 = NULL;
modelica_metatype _elabedE2_2 = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_boolean tmp7;
modelica_boolean tmp8;
_cache = tmp4_1;
_env = tmp4_2;
_e1 = tmp4_3;
_e2 = tmp4_4;
_prop = tmp4_5;
_prop2 = tmp4_6;
_pre = tmp4_7;
tmp6 = omc_Flags_getConfigBool(threadData, _OMC_LIT244);
if (1 != tmp6) goto goto_2;
_b3 = omc_Types_isPropTupleArray(threadData, _prop);
_b4 = omc_Types_isPropTupleArray(threadData, _prop2);
tmp7 = (_b3 || _b4);
if (1 != tmp7) goto goto_2;
tmp8 = omc_Expression_containFunctioncall(threadData, _elabedE2);
if (1 != tmp8) goto goto_2;
_e1 = omc_InstSection_expandTupleEquationWithWild(threadData, _e1, _prop2, _prop ,&_prop);
_cache = omc_Static_elabExpLHS(threadData, _cache, _env, _e1, _impl, 0, _pre, _info ,&_elabedE1_2 ,&_prop1);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _elabedE1_2, _prop1, _impl, _info ,&_elabedE1_2 ,&_prop1);
_cache = omc_Static_elabExp(threadData, _cache, _env, _e2, _impl, 0, _pre, _info ,&_elabedE2_2 ,&_prop2);
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _elabedE2_2, _prop2, _impl, _info ,&_elabedE2_2 ,&_prop2);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _elabedE1_2;
tmpMeta[0+2] = _elabedE2_2;
tmpMeta[0+3] = _prop;
goto tmp3_done;
}
case 1: {
_cache = tmp4_1;
_prop = tmp4_5;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _elabedE1;
tmpMeta[0+2] = _elabedE2;
tmpMeta[0+3] = _prop;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outE1 = tmpMeta[0+1];
_outE2 = tmpMeta[0+2];
_oprop = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outE1) { *out_outE1 = _outE1; }
if (out_outE2) { *out_outE2 = _outE2; }
if (out_oprop) { *out_oprop = _oprop; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_condenseArrayEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _ie1, modelica_metatype _ie2, modelica_metatype _elabedE1, modelica_metatype _elabedE2, modelica_metatype _iprop, modelica_metatype _iprop2, modelica_metatype _impl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outE1, modelica_metatype *out_outE2, modelica_metatype *out_oprop)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_impl);
_outCache = omc_InstSection_condenseArrayEquation(threadData, _inCache, _inEnv, _ie1, _ie2, _elabedE1, _elabedE2, _iprop, _iprop2, tmp1, _inPrefix, _info, out_outE1, out_outE2, out_oprop);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeDAEArrayEqToReinitForm(threadData_t *threadData, modelica_metatype _inEq)
{
modelica_metatype _outEqn = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inEq;
{
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _e = NULL;
modelica_metatype _t = NULL;
modelica_metatype _source = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cr1 = tmpMeta7;
_e = tmpMeta8;
_source = tmpMeta9;
tmpMeta10 = mmc_mk_box4(27, &DAE_Element_REINIT__desc, _cr1, _e, _source);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cr1 = tmpMeta11;
_e = tmpMeta12;
_source = tmpMeta13;
tmpMeta14 = mmc_mk_box4(27, &DAE_Element_REINIT__desc, _cr1, _e, _source);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cr1 = tmpMeta15;
_cr2 = tmpMeta16;
_source = tmpMeta17;
_t = omc_ComponentReference_crefLastType(threadData, _cr2);
_e2 = omc_Expression_makeCrefExp(threadData, _cr2, _t);
tmpMeta18 = mmc_mk_box4(27, &DAE_Element_REINIT__desc, _cr1, _e2, _source);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,4) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,6,2) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_cr1 = tmpMeta20;
_e = tmpMeta21;
_source = tmpMeta22;
tmpMeta23 = mmc_mk_box4(27, &DAE_Element_REINIT__desc, _cr1, _e, _source);
tmpMeta1 = tmpMeta23;
goto tmp3_done;
}
case 4: {
modelica_boolean tmp24;
tmp24 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp24) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT245);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEqn = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outEqn;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationNoRetCallVectorization(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _initial_, modelica_metatype _source)
{
modelica_metatype _dae = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _initial_;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,0) == 0) goto tmp3_end;
tmpMeta7 = mmc_mk_box3(28, &DAE_Element_NORETCALL__desc, _exp, _source);
tmpMeta6 = mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta8 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta6);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
tmpMeta10 = mmc_mk_box3(29, &DAE_Element_INITIAL__NORETCALL__desc, _exp, _source);
tmpMeta9 = mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta9);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_dae = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _dae;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkTupleCallEquationMessage(threadData_t *threadData, modelica_metatype _left, modelica_metatype _right, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = omc_AbsynUtil_stripCommentExpressions(threadData, _left);
tmp3_2 = omc_AbsynUtil_stripCommentExpressions(threadData, _right);
{
modelica_metatype _crefs = NULL;
modelica_string _left_str = NULL;
modelica_string _right_str = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 4; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,16,1) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (listEmpty(tmpMeta5)) goto tmp2_end;
tmpMeta6 = MMC_CAR(tmpMeta5);
tmpMeta7 = MMC_CDR(tmpMeta5);
if (!listEmpty(tmpMeta7)) goto tmp2_end;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,16,1) == 0) goto tmp2_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp3_2,11,3) == 0) goto tmp2_end;
_crefs = tmpMeta8;
if((!omc_List_all(threadData, _crefs, boxvar_AbsynUtil_isCref)))
{
_left_str = omc_Dump_printExpStr(threadData, _left);
_right_str = omc_Dump_printExpStr(threadData, _right);
tmpMeta10 = stringAppend(_left_str,_OMC_LIT214);
tmpMeta11 = stringAppend(tmpMeta10,_right_str);
tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT246);
tmpMeta9 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT33, tmpMeta9, _info);
}
goto tmp2_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,16,1) == 0) goto tmp2_end;
_left_str = omc_Dump_printExpStr(threadData, _left);
_right_str = omc_Dump_printExpStr(threadData, _right);
tmpMeta14 = stringAppend(_left_str,_OMC_LIT214);
tmpMeta15 = stringAppend(tmpMeta14,_right_str);
tmpMeta16 = stringAppend(tmpMeta15,_OMC_LIT246);
tmpMeta13 = mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT39, tmpMeta13, _info);
goto goto_1;
goto tmp2_done;
}
case 3: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkReinitType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inProperties, modelica_metatype _inCref, modelica_metatype _inInfo)
{
modelica_boolean _outSucceeded;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inProperties;
{
modelica_metatype _ty = NULL;
modelica_string _cref_str = NULL;
modelica_string _ty_str = NULL;
modelica_string _cnst_str = NULL;
modelica_metatype _cnst = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
_ty = omc_Types_arrayElementType(threadData, _inType);
tmp6 = omc_Types_isReal(threadData, _ty);
if (0 != tmp6) goto goto_2;
_cref_str = omc_ComponentReference_printComponentRefStr(threadData, _inCref);
_ty_str = omc_Types_unparseType(threadData, _ty);
tmpMeta7 = mmc_mk_cons(_cref_str, mmc_mk_cons(_ty_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT249, tmpMeta7, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cnst = tmpMeta8;
tmp9 = omc_Types_isVar(threadData, _cnst);
if (0 != tmp9) goto goto_2;
_cnst_str = omc_Types_unparseConst(threadData, _cnst);
_cref_str = omc_ComponentReference_printComponentRefStr(threadData, _inCref);
tmpMeta10 = mmc_mk_cons(_cref_str, mmc_mk_cons(_cnst_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT252, tmpMeta10, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 2: {
tmp1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outSucceeded = tmp1;
_return: OMC_LABEL_UNUSED
return _outSucceeded;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkReinitType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inProperties, modelica_metatype _inCref, modelica_metatype _inInfo)
{
modelica_boolean _outSucceeded;
modelica_metatype out_outSucceeded;
_outSucceeded = omc_InstSection_checkReinitType(threadData, _inType, _inProperties, _inCref, _inInfo);
out_outSucceeded = mmc_mk_icon(_outSucceeded);
return out_outSucceeded;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_uniqueRootArguments(threadData_t *threadData, modelica_metatype _inFunctionArgs, modelica_metatype _info, modelica_metatype _inPrefix, modelica_metatype _inEquation, modelica_metatype *out_outMessage)
{
modelica_metatype _outCref = NULL;
modelica_metatype _outMessage = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inFunctionArgs;
{
modelica_metatype _cr = NULL;
modelica_metatype _msg = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (!listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta10)) goto tmp3_end;
_cr = tmpMeta9;
tmp4 += 2;
tmpMeta[0+0] = _cr;
tmpMeta[0+1] = _OMC_LIT253;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmpMeta11);
tmpMeta13 = MMC_CDR(tmpMeta11);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,2,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmpMeta13);
tmpMeta16 = MMC_CDR(tmpMeta13);
if (!listEmpty(tmpMeta16)) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta17)) goto tmp3_end;
_cr = tmpMeta14;
_msg = tmpMeta15;
tmp4 += 1;
tmpMeta[0+0] = _cr;
tmpMeta[0+1] = _msg;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,2,1) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
if (!listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta22)) goto tmp3_end;
tmpMeta23 = MMC_CAR(tmpMeta22);
tmpMeta24 = MMC_CDR(tmpMeta22);
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
if (7 != MMC_STRLEN(tmpMeta25) || strcmp(MMC_STRINGDATA(_OMC_LIT257), MMC_STRINGDATA(tmpMeta25)) != 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 3));
if (!listEmpty(tmpMeta24)) goto tmp3_end;
_cr = tmpMeta21;
_msg = tmpMeta26;
tmpMeta[0+0] = _cr;
tmpMeta[0+1] = _msg;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta27;
_s1 = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200);
_s2 = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta27 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT256, tmpMeta27, _info);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCref = tmpMeta[0+0];
_outMessage = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outMessage) { *out_outMessage = _outMessage; }
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_potentialRootArguments(threadData_t *threadData, modelica_metatype _inFunctionArgs, modelica_metatype _info, modelica_metatype _inPrefix, modelica_metatype _inEquation, modelica_integer *out_outPriority)
{
modelica_metatype _outCref = NULL;
modelica_integer _outPriority;
modelica_integer tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inFunctionArgs;
{
modelica_metatype _cr = NULL;
modelica_integer _p;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (!listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta10)) goto tmp3_end;
_cr = tmpMeta9;
tmp4 += 2;
tmpMeta[0+0] = _cr;
tmp1_c1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_integer tmp18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmpMeta11);
tmpMeta13 = MMC_CDR(tmpMeta11);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,2,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmpMeta13);
tmpMeta16 = MMC_CDR(tmpMeta13);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmp18 = mmc_unbox_integer(tmpMeta17);
if (!listEmpty(tmpMeta16)) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta19)) goto tmp3_end;
_cr = tmpMeta14;
_p = tmp18;
tmp4 += 1;
tmpMeta[0+0] = _cr;
tmp1_c1 = _p;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_integer tmp30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmpMeta20);
tmpMeta22 = MMC_CDR(tmpMeta20);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,2,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (!listEmpty(tmpMeta22)) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta24)) goto tmp3_end;
tmpMeta25 = MMC_CAR(tmpMeta24);
tmpMeta26 = MMC_CDR(tmpMeta24);
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 2));
if (8 != MMC_STRLEN(tmpMeta27) || strcmp(MMC_STRINGDATA(_OMC_LIT258), MMC_STRINGDATA(tmpMeta27)) != 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,0,1) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 2));
tmp30 = mmc_unbox_integer(tmpMeta29);
if (!listEmpty(tmpMeta26)) goto tmp3_end;
_cr = tmpMeta23;
_p = tmp30;
tmpMeta[0+0] = _cr;
tmp1_c1 = _p;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta31;
_s1 = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200);
_s2 = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta31 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT256, tmpMeta31, _info);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCref = tmpMeta[0+0];
_outPriority = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outPriority) { *out_outPriority = _outPriority; }
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_potentialRootArguments(threadData_t *threadData, modelica_metatype _inFunctionArgs, modelica_metatype _info, modelica_metatype _inPrefix, modelica_metatype _inEquation, modelica_metatype *out_outPriority)
{
modelica_integer _outPriority;
modelica_metatype _outCref = NULL;
_outCref = omc_InstSection_potentialRootArguments(threadData, _inFunctionArgs, _info, _inPrefix, _inEquation, &_outPriority);
if (out_outPriority) { *out_outPriority = mmc_mk_icon(_outPriority); }
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_handleConnectionsOperators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _flattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;volatile modelica_metatype tmp4_8;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inIH;
tmp4_4 = _inPrefix;
tmp4_5 = _inSets;
tmp4_6 = _inState;
tmp4_7 = _inEquation;
tmp4_8 = _inGraph;
{
modelica_metatype _csets = NULL;
modelica_metatype _ci_state = NULL;
modelica_metatype _env = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_boolean _b1;
modelica_boolean _b2;
modelica_string _s = NULL;
modelica_metatype _msg = NULL;
modelica_metatype _e_1 = NULL;
modelica_metatype _e_2 = NULL;
modelica_metatype _msg_1 = NULL;
modelica_metatype _eqn = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _ih = NULL;
modelica_metatype _info = NULL;
modelica_integer _ipriority;
modelica_metatype _cr_ = NULL;
modelica_metatype _cr1_ = NULL;
modelica_metatype _cr2_ = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _functionArgs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,11,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (11 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
if (!listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (4 != MMC_STRLEN(tmpMeta11) || strcmp(MMC_STRINGDATA(_OMC_LIT270), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (!listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (listEmpty(tmpMeta14)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmpMeta14);
tmpMeta16 = MMC_CDR(tmpMeta14);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,2,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (!listEmpty(tmpMeta16)) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
if (!listEmpty(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_cr = tmpMeta17;
_info = tmpMeta19;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
tmpMeta24 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta20);
_cache = tmpMeta24;
if (optionNone(tmpMeta20)) goto goto_2;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 1));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,16,3) == 0) goto goto_2;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 4));
if (!listEmpty(tmpMeta23)) goto goto_2;
_s = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200);
tmpMeta25 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT261, tmpMeta25, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,11,3) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,1,3) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
if (11 != MMC_STRLEN(tmpMeta28) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta28)) != 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 3));
if (!listEmpty(tmpMeta29)) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,2,2) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
if (4 != MMC_STRLEN(tmpMeta31) || strcmp(MMC_STRINGDATA(_OMC_LIT270), MMC_STRINGDATA(tmpMeta31)) != 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 3));
if (!listEmpty(tmpMeta32)) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,0,2) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
if (listEmpty(tmpMeta34)) goto tmp3_end;
tmpMeta35 = MMC_CAR(tmpMeta34);
tmpMeta36 = MMC_CDR(tmpMeta34);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,2,1) == 0) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 2));
if (!listEmpty(tmpMeta36)) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 3));
if (!listEmpty(tmpMeta38)) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_cr = tmpMeta37;
_info = tmpMeta39;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
tmp4 += 5;
tmpMeta44 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta40);
_cache = tmpMeta44;
if (optionNone(tmpMeta40)) goto goto_2;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 1));
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta41), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta42,6,2) == 0) goto goto_2;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 2));
_cr_ = tmpMeta43;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _cr_ ,&_cr_);
_graph = omc_ConnectionGraph_addDefiniteRoot(threadData, _graph, _cr_);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta45,11,3) == 0) goto tmp3_end;
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,1,3) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 2));
if (11 != MMC_STRLEN(tmpMeta47) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta47)) != 0) goto tmp3_end;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 3));
if (!listEmpty(tmpMeta48)) goto tmp3_end;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta49,2,2) == 0) goto tmp3_end;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 2));
if (13 != MMC_STRLEN(tmpMeta50) || strcmp(MMC_STRINGDATA(_OMC_LIT271), MMC_STRINGDATA(tmpMeta50)) != 0) goto tmp3_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 3));
if (!listEmpty(tmpMeta51)) goto tmp3_end;
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 3));
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_functionArgs = tmpMeta52;
_info = tmpMeta53;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
_cr = omc_InstSection_potentialRootArguments(threadData, _functionArgs, _info, _pre, _inEquation, NULL);
tmpMeta58 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta54);
_cache = tmpMeta58;
if (optionNone(tmpMeta54)) goto goto_2;
tmpMeta55 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta54), 1));
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta56,16,3) == 0) goto goto_2;
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 4));
if (!listEmpty(tmpMeta57)) goto goto_2;
_s = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200);
tmpMeta59 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT261, tmpMeta59, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta60,11,3) == 0) goto tmp3_end;
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta61,1,3) == 0) goto tmp3_end;
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 2));
if (11 != MMC_STRLEN(tmpMeta62) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta62)) != 0) goto tmp3_end;
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 3));
if (!listEmpty(tmpMeta63)) goto tmp3_end;
tmpMeta64 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta64,2,2) == 0) goto tmp3_end;
tmpMeta65 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta64), 2));
if (13 != MMC_STRLEN(tmpMeta65) || strcmp(MMC_STRINGDATA(_OMC_LIT271), MMC_STRINGDATA(tmpMeta65)) != 0) goto tmp3_end;
tmpMeta66 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta64), 3));
if (!listEmpty(tmpMeta66)) goto tmp3_end;
tmpMeta67 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 3));
tmpMeta68 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_functionArgs = tmpMeta67;
_info = tmpMeta68;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
tmp4 += 3;
_cr = omc_InstSection_potentialRootArguments(threadData, _functionArgs, _info, _pre, _inEquation ,&_ipriority);
tmpMeta73 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta69);
_cache = tmpMeta73;
if (optionNone(tmpMeta69)) goto goto_2;
tmpMeta70 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta69), 1));
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta70), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta71,6,2) == 0) goto goto_2;
tmpMeta72 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta71), 2));
_cr_ = tmpMeta72;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _cr_ ,&_cr_);
_graph = omc_ConnectionGraph_addPotentialRoot(threadData, _graph, _cr_, ((modelica_real)_ipriority));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
modelica_metatype tmpMeta79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
modelica_metatype tmpMeta85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
modelica_metatype tmpMeta88;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta74,11,3) == 0) goto tmp3_end;
tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta74), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta75,1,3) == 0) goto tmp3_end;
tmpMeta76 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta75), 2));
if (11 != MMC_STRLEN(tmpMeta76) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta76)) != 0) goto tmp3_end;
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta75), 3));
if (!listEmpty(tmpMeta77)) goto tmp3_end;
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta75), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta78,2,2) == 0) goto tmp3_end;
tmpMeta79 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta78), 2));
if (10 != MMC_STRLEN(tmpMeta79) || strcmp(MMC_STRINGDATA(_OMC_LIT272), MMC_STRINGDATA(tmpMeta79)) != 0) goto tmp3_end;
tmpMeta80 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta78), 3));
if (!listEmpty(tmpMeta80)) goto tmp3_end;
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta74), 3));
tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_functionArgs = tmpMeta81;
_info = tmpMeta82;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
_cr = omc_InstSection_uniqueRootArguments(threadData, _functionArgs, _info, _pre, _inEquation, NULL);
tmpMeta87 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0, 0, _pre, _info, &tmpMeta83);
_cache = tmpMeta87;
if (optionNone(tmpMeta83)) goto goto_2;
tmpMeta84 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta83), 1));
tmpMeta85 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta84), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta85,16,3) == 0) goto goto_2;
tmpMeta86 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta85), 4));
if (!listEmpty(tmpMeta86)) goto goto_2;
_s = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200);
tmpMeta88 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT261, tmpMeta88, _info);
omc_Error_addSourceMessage(threadData, _OMC_LIT264, _OMC_LIT266, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
modelica_metatype tmpMeta95;
modelica_metatype tmpMeta96;
modelica_metatype tmpMeta97;
modelica_metatype tmpMeta98;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta89 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta89,11,3) == 0) goto tmp3_end;
tmpMeta90 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta89), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta90,1,3) == 0) goto tmp3_end;
tmpMeta91 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 2));
if (11 != MMC_STRLEN(tmpMeta91) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta91)) != 0) goto tmp3_end;
tmpMeta92 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 3));
if (!listEmpty(tmpMeta92)) goto tmp3_end;
tmpMeta93 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta93,2,2) == 0) goto tmp3_end;
tmpMeta94 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta93), 2));
if (10 != MMC_STRLEN(tmpMeta94) || strcmp(MMC_STRINGDATA(_OMC_LIT272), MMC_STRINGDATA(tmpMeta94)) != 0) goto tmp3_end;
tmpMeta95 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta93), 3));
if (!listEmpty(tmpMeta95)) goto tmp3_end;
tmpMeta96 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta89), 3));
tmpMeta97 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_functionArgs = tmpMeta96;
_info = tmpMeta97;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
tmp4 += 1;
_cr = omc_InstSection_uniqueRootArguments(threadData, _functionArgs, _info, _pre, _inEquation ,&_msg);
tmpMeta98 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr);
_cache = omc_Static_elabExp(threadData, _cache, _env, tmpMeta98, 0, 1, _pre, _info ,&_exp ,NULL);
_cache = omc_Static_elabExp(threadData, _cache, _env, _msg, 0, 0, _pre, _info ,&_msg_1 ,NULL);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _env, _ih, _exp, _pre ,&_exp);
_cache = omc_PrefixUtil_prefixExp(threadData, _cache, _env, _ih, _msg_1, _pre ,&_msg_1);
_graph = omc_ConnectionGraph_addUniqueRoots(threadData, _graph, _exp, _msg_1);
omc_Error_addSourceMessage(threadData, _OMC_LIT264, _OMC_LIT266, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta99;
modelica_metatype tmpMeta100;
modelica_metatype tmpMeta101;
modelica_metatype tmpMeta102;
modelica_metatype tmpMeta103;
modelica_metatype tmpMeta104;
modelica_metatype tmpMeta105;
modelica_metatype tmpMeta106;
modelica_metatype tmpMeta107;
modelica_metatype tmpMeta108;
modelica_metatype tmpMeta109;
modelica_metatype tmpMeta110;
modelica_metatype tmpMeta111;
modelica_metatype tmpMeta112;
modelica_metatype tmpMeta113;
modelica_metatype tmpMeta114;
modelica_metatype tmpMeta115;
modelica_metatype tmpMeta116;
modelica_metatype tmpMeta117;
modelica_metatype tmpMeta118;
modelica_metatype tmpMeta119;
modelica_metatype tmpMeta120;
modelica_metatype tmpMeta121;
modelica_metatype tmpMeta122;
modelica_metatype tmpMeta123;
modelica_metatype tmpMeta124;
modelica_metatype tmpMeta125;
modelica_metatype tmpMeta126;
modelica_metatype tmpMeta127;
modelica_metatype tmpMeta128;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_7,9,3) == 0) goto tmp3_end;
tmpMeta99 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta99,11,3) == 0) goto tmp3_end;
tmpMeta100 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta99), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta100,1,3) == 0) goto tmp3_end;
tmpMeta101 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta100), 2));
if (11 != MMC_STRLEN(tmpMeta101) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta101)) != 0) goto tmp3_end;
tmpMeta102 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta100), 3));
if (!listEmpty(tmpMeta102)) goto tmp3_end;
tmpMeta103 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta100), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta103,2,2) == 0) goto tmp3_end;
tmpMeta104 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta103), 2));
if (6 != MMC_STRLEN(tmpMeta104) || strcmp(MMC_STRINGDATA(_OMC_LIT273), MMC_STRINGDATA(tmpMeta104)) != 0) goto tmp3_end;
tmpMeta105 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta103), 3));
if (!listEmpty(tmpMeta105)) goto tmp3_end;
tmpMeta106 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta99), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta106,0,2) == 0) goto tmp3_end;
tmpMeta107 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta106), 2));
if (listEmpty(tmpMeta107)) goto tmp3_end;
tmpMeta108 = MMC_CAR(tmpMeta107);
tmpMeta109 = MMC_CDR(tmpMeta107);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta108,2,1) == 0) goto tmp3_end;
tmpMeta110 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta108), 2));
if (listEmpty(tmpMeta109)) goto tmp3_end;
tmpMeta111 = MMC_CAR(tmpMeta109);
tmpMeta112 = MMC_CDR(tmpMeta109);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta111,2,1) == 0) goto tmp3_end;
tmpMeta113 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta111), 2));
if (!listEmpty(tmpMeta112)) goto tmp3_end;
tmpMeta114 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta106), 3));
if (!listEmpty(tmpMeta114)) goto tmp3_end;
tmpMeta115 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_7), 4));
_cr1 = tmpMeta110;
_cr2 = tmpMeta113;
_info = tmpMeta115;
_cache = tmp4_1;
_env = tmp4_2;
_ih = tmp4_3;
_pre = tmp4_4;
_csets = tmp4_5;
_ci_state = tmp4_6;
_graph = tmp4_8;
tmpMeta119 = omc_Static_elabCref(threadData, _cache, _env, _cr1, 0, 0, _pre, _info, &tmpMeta116);
_cache = tmpMeta119;
if (optionNone(tmpMeta116)) goto goto_2;
tmpMeta117 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta116), 1));
tmpMeta118 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta117), 1));
_e_1 = tmpMeta118;
tmpMeta123 = omc_Static_elabCref(threadData, _cache, _env, _cr2, 0, 0, _pre, _info, &tmpMeta120);
_cache = tmpMeta123;
if (optionNone(tmpMeta120)) goto goto_2;
tmpMeta121 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta120), 1));
tmpMeta122 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta121), 1));
_e_2 = tmpMeta122;
_b1 = omc_Types_isZeroLengthArray(threadData, omc_Expression_typeof(threadData, _e_1));
_b2 = omc_Types_isZeroLengthArray(threadData, omc_Expression_typeof(threadData, _e_2));
if((_b1 || _b2))
{
_s = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200);
tmpMeta124 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT261, tmpMeta124, _info);
}
else
{
tmpMeta125 = _e_1;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta125,6,2) == 0) goto goto_2;
tmpMeta126 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta125), 2));
_cr1_ = tmpMeta126;
tmpMeta127 = _e_2;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta127,6,2) == 0) goto goto_2;
tmpMeta128 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta127), 2));
_cr2_ = tmpMeta128;
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _cr1_ ,&_cr1_);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _env, _ih, _pre, _cr2_ ,&_cr2_);
_graph = omc_ConnectionGraph_addBranch(threadData, _graph, _cr1_, _cr2_);
}
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _ih;
tmpMeta[0+3] = _OMC_LIT71;
tmpMeta[0+4] = _csets;
tmpMeta[0+5] = _ci_state;
tmpMeta[0+6] = _graph;
goto tmp3_done;
}
case 7: {
modelica_boolean tmp129;
modelica_metatype tmpMeta130;
modelica_metatype tmpMeta131;
_env = tmp4_2;
_eqn = tmp4_7;
tmp129 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp129) goto goto_2;
_s = omc_SCodeDump_equationStr(threadData, _eqn, _OMC_LIT200);
omc_Debug_trace(threadData, _OMC_LIT267);
tmpMeta130 = stringAppend(_s,_OMC_LIT268);
tmpMeta131 = stringAppend(tmpMeta130,omc_FGraph_getGraphNameStr(threadData, _env));
omc_Debug_traceln(threadData, tmpMeta131);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 8) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outIH = tmpMeta[0+2];
_outDae = tmpMeta[0+3];
_outSets = tmpMeta[0+4];
_outState = tmpMeta[0+5];
_outGraph = tmpMeta[0+6];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_handleConnectionsOperators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _flattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_handleConnectionsOperators(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _inInitial, tmp1, _inGraph, _flattenOp, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_isConnectionsOperator(threadData_t *threadData, modelica_metatype _inExp)
{
modelica_boolean _yes;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_string _id = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (11 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT269), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (!listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
if (!listEmpty(tmpMeta11)) goto tmp3_end;
_id = tmpMeta10;
tmp1 = listMember(_id, _OMC_LIT277);
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_yes = tmp1;
_return: OMC_LABEL_UNUSED
return _yes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_isConnectionsOperator(threadData_t *threadData, modelica_metatype _inExp)
{
modelica_boolean _yes;
modelica_metatype out_yes;
_yes = omc_InstSection_isConnectionsOperator(threadData, _inExp);
out_yes = mmc_mk_icon(_yes);
return out_yes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instOperatorArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inArg, modelica_boolean _inImpl, modelica_metatype _inExpectedType, modelica_string _inOperatorName, modelica_string _inArgName, modelica_integer _inArgIndex, modelica_metatype _inInfo, modelica_metatype *out_outArg)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outArg = NULL;
modelica_metatype _props = NULL;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _inArg, _inImpl, 1, _inPrefix, _inInfo ,&_outArg ,&_props);
_ty = omc_Types_getPropType(threadData, _props);
if((!omc_Types_subtype(threadData, _ty, _inExpectedType, 1)))
{
tmpMeta1 = mmc_mk_cons(intString(_inArgIndex), mmc_mk_cons(_inOperatorName, mmc_mk_cons(_inArgName, mmc_mk_cons(omc_Dump_printExpStr(threadData, _inArg), mmc_mk_cons(omc_Types_unparseTypeNoAttr(threadData, _ty), mmc_mk_cons(omc_Types_unparseType(threadData, _inExpectedType), MMC_REFSTRUCTLIT(mmc_nil)))))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT280, tmpMeta1, _inInfo);
}
_outCache = omc_Ceval_cevalIfConstant(threadData, _outCache, _inEnv, _outArg, _props, _inImpl, _inInfo ,&_outArg, NULL);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _outArg, _inPrefix ,&_outArg);
_return: OMC_LABEL_UNUSED
if (out_outArg) { *out_outArg = _outArg; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instOperatorArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inArg, modelica_metatype _inImpl, modelica_metatype _inExpectedType, modelica_metatype _inOperatorName, modelica_metatype _inArgName, modelica_metatype _inArgIndex, modelica_metatype _inInfo, modelica_metatype *out_outArg)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inArgIndex);
_outCache = omc_InstSection_instOperatorArg(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inArg, tmp1, _inExpectedType, _inOperatorName, _inArgName, tmp2, _inInfo, out_outArg);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_InstSection_checkIfConditionBinding(threadData_t *threadData, modelica_metatype _inValues, modelica_metatype _inInfo)
{
modelica_boolean _outHasBindings;
modelica_metatype _empty_val = NULL;
modelica_string _scope = NULL;
modelica_string _name = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_empty_val = omc_ValuesUtil_containsEmpty(threadData, _inValues);
if(isSome(_empty_val))
{
tmpMeta1 = _empty_val;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,16,4) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_scope = tmpMeta3;
_name = tmpMeta4;
tmpMeta5 = mmc_mk_cons(_name, mmc_mk_cons(_scope, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT20, tmpMeta5, _inInfo);
_outHasBindings = 0;
}
else
{
_outHasBindings = 1;
}
_return: OMC_LABEL_UNUSED
return _outHasBindings;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_checkIfConditionBinding(threadData_t *threadData, modelica_metatype _inValues, modelica_metatype _inInfo)
{
modelica_boolean _outHasBindings;
modelica_metatype out_outHasBindings;
_outHasBindings = omc_InstSection_checkIfConditionBinding(threadData, _inValues, _inInfo);
out_outHasBindings = mmc_mk_icon(_outHasBindings);
return out_outHasBindings;
}
PROTECTED_FUNCTION_STATIC void omc_InstSection_checkIfConditionTypes(threadData_t *threadData, modelica_metatype _inAccumProp, modelica_metatype _inConditions, modelica_metatype _inProperties, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inAccumProp;
{
modelica_metatype _props = NULL;
modelica_metatype _ty = NULL;
modelica_string _exp_str = NULL;
modelica_string _ty_str = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,2) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,3,1) == 0) goto tmp2_end;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
_props = _inProperties;
{
modelica_metatype _cond;
for (tmpMeta6 = _inConditions; !listEmpty(tmpMeta6); tmpMeta6=MMC_CDR(tmpMeta6))
{
_cond = MMC_CAR(tmpMeta6);
tmpMeta7 = _props;
if (listEmpty(tmpMeta7)) goto goto_1;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) goto goto_1;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_ty = tmpMeta10;
_props = tmpMeta9;
if((!omc_Types_isScalarBoolean(threadData, _ty)))
{
_exp_str = omc_Dump_printExpStr(threadData, _cond);
_ty_str = omc_Types_unparseTypeNoAttr(threadData, _ty);
tmpMeta11 = mmc_mk_cons(_exp_str, mmc_mk_cons(_ty_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT156, tmpMeta11, _inInfo);
}
}
}
omc_Error_addInternalError(threadData, _OMC_LIT281, _inInfo);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_makeEqSource(threadData_t *threadData, modelica_metatype _inInfo, modelica_metatype _inEnv, modelica_metatype _inPrefix, modelica_metatype _inFlattenOp)
{
modelica_metatype _outSource = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outSource = omc_ElementSource_createElementSource(threadData, _inInfo, omc_FGraph_getScopePath(threadData, _inEnv), _inPrefix, _OMC_LIT203);
_outSource = omc_ElementSource_addSymbolicTransformation(threadData, _outSource, _inFlattenOp);
_return: OMC_LABEL_UNUSED
return _outSource;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationCommonWork(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype _inFlattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outEnv = _inEnv;
_outIH = _inIH;
_outSets = _inSets;
_outGraph = _inGraph;
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inEquation;
{
modelica_metatype _lhs_acr = NULL;
modelica_metatype _rhs_acr = NULL;
modelica_metatype _acr = NULL;
modelica_metatype _info = NULL;
modelica_metatype _lhs_aexp = NULL;
modelica_metatype _rhs_aexp = NULL;
modelica_metatype _range_aexp = NULL;
modelica_metatype _comment = NULL;
modelica_metatype _lhs_exp = NULL;
modelica_metatype _rhs_exp = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _cond_exp = NULL;
modelica_metatype _msg_exp = NULL;
modelica_metatype _level_exp = NULL;
modelica_metatype _cr_exp = NULL;
modelica_metatype _lhs_prop = NULL;
modelica_metatype _rhs_prop = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _cr_prop = NULL;
modelica_metatype _source = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _c = NULL;
modelica_metatype _val = NULL;
modelica_metatype _eql = NULL;
modelica_metatype _else_branch = NULL;
modelica_metatype _branches = NULL;
modelica_metatype _rest_branches = NULL;
modelica_metatype _ell = NULL;
modelica_metatype _el = NULL;
modelica_metatype _el2 = NULL;
modelica_metatype _else_when = NULL;
modelica_metatype _iter_crefs = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _env = NULL;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 10; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_lhs_acr = tmpMeta6;
_rhs_acr = tmpMeta7;
_info = tmpMeta8;
tmp4 += 8;
_outCache = omc_InstSection_instConnect(threadData, _outCache, _outEnv, _outIH, _outSets, _inPrefix, _lhs_acr, _rhs_acr, _inImpl, _inGraph, _info ,&_outEnv ,&_outIH ,&_outSets ,&_outDae ,&_outGraph);
_outState = omc_InstSection_instEquationCommonCiTrans(threadData, _inState, _inInitial);
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _outState;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_lhs_aexp = tmpMeta9;
_rhs_aexp = tmpMeta10;
_comment = tmpMeta11;
_info = tmpMeta12;
tmp4 += 7;
omc_InstSection_checkTupleCallEquationMessage(threadData, _lhs_aexp, _rhs_aexp, _info);
_outCache = omc_Static_elabExpLHS(threadData, _inCache, _inEnv, _lhs_aexp, _inImpl, 1, _inPrefix, _info ,&_lhs_exp ,&_lhs_prop);
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _rhs_aexp, _inImpl, 1, _inPrefix, _info ,&_rhs_exp ,&_rhs_prop);
_outCache = omc_Ceval_cevalIfConstant(threadData, _outCache, _inEnv, _lhs_exp, _lhs_prop, _inImpl, _info ,&_lhs_exp ,&_lhs_prop);
_outCache = omc_Ceval_cevalIfConstant(threadData, _outCache, _inEnv, _rhs_exp, _rhs_prop, _inImpl, _info ,&_rhs_exp ,&_rhs_prop);
_outCache = omc_InstSection_condenseArrayEquation(threadData, _outCache, _inEnv, _lhs_aexp, _rhs_aexp, _lhs_exp, _rhs_exp, _lhs_prop, _rhs_prop, _inImpl, _inPrefix, _info ,&_lhs_exp ,&_rhs_exp ,&_lhs_prop);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _lhs_exp, _inPrefix ,&_lhs_exp);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _rhs_exp, _inPrefix ,&_rhs_exp);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
_source = omc_ElementSource_addCommentToSource(threadData, _source, mmc_mk_some(_comment));
_outDae = omc_InstSection_instEqEquation(threadData, _lhs_exp, _lhs_prop, _rhs_exp, _rhs_prop, _source, _inInitial, _inImpl, _OMC_LIT138);
_outState = omc_InstSection_instEquationCommonCiTrans(threadData, _inState, _inInitial);
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _outState;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,5) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_branches = tmpMeta13;
_else_branch = tmpMeta14;
_info = tmpMeta15;
tmp4 += 6;
_outCache = omc_Static_elabExpList(threadData, _outCache, _outEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, 1, _inPrefix, _info, _OMC_LIT24 ,&_expl ,&_props);
_prop = omc_Types_propsAnd(threadData, _props);
omc_InstSection_checkIfConditionTypes(threadData, _prop, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _props, _info);
{
{
volatile mmc_switch_type tmp18;
int tmp19;
tmp18 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp17_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp18 < 2; tmp18++) {
switch (MMC_SWITCH_CAST(tmp18)) {
case 0: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_boolean tmp25;
modelica_boolean tmp26;
modelica_metatype tmpMeta27;
_rest_branches = _branches;
_eql = _else_branch;
{
modelica_metatype _cond;
for (tmpMeta20 = _expl; !listEmpty(tmpMeta20); tmpMeta20=MMC_CDR(tmpMeta20))
{
_cond = MMC_CAR(tmpMeta20);
tmpMeta21 = _props;
if (listEmpty(tmpMeta21)) goto goto_16;
tmpMeta22 = MMC_CAR(tmpMeta21);
tmpMeta23 = MMC_CDR(tmpMeta21);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,0,2) == 0) goto goto_16;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
_c = tmpMeta24;
_props = tmpMeta23;
tmp25 = omc_Types_isParameterOrConstant(threadData, _c);
if (1 != tmp25) goto goto_16;
_outCache = omc_Ceval_ceval(threadData, _outCache, _outEnv, _cond, _inImpl, _OMC_LIT282, ((modelica_integer) 0) ,&_val);
tmp26 = omc_InstSection_checkIfConditionBinding(threadData, _val, _info);
if (1 != tmp26) goto goto_16;
if(omc_ValuesUtil_valueBool(threadData, _val))
{
_eql = listHead(_rest_branches);
break;
}
_rest_branches = listRest(_rest_branches);
}
}
_outCache = omc_InstUtil_popStructuralParameters(threadData, _outCache, _inPrefix);
_outCache = omc_Inst_instList(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, (omc_SCodeUtil_isInitial(threadData, _inInitial)?boxvar_InstSection_instInitialEquation:boxvar_InstSection_instEquation), _eql, _inImpl, 1, _inGraph ,&_outEnv ,&_outIH ,&_outDae ,&_outSets ,&_outState ,&_outGraph);
goto tmp17_done;
}
case 1: {
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
_outCache = omc_PrefixUtil_prefixExpList(threadData, _outCache, _inEnv, _inIH, _expl, _inPrefix ,&_expl);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
if(omc_SCodeUtil_isInitial(threadData, _inInitial))
{
tmpMeta28 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_InstSection_instInitialIfEqBranches(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _branches, _inImpl, tmpMeta28 ,&_outEnv ,&_outIH ,&_outState ,&_ell);
_outCache = omc_InstSection_instInitialIfEqBranch(threadData, _outCache, _outEnv, _outIH, _inPrefix, _outState, _else_branch, _inImpl ,&_outEnv ,&_outIH ,&_outState ,&_el);
tmpMeta30 = mmc_mk_box5(17, &DAE_Element_INITIAL__IF__EQUATION__desc, _expl, _ell, _el, _source);
tmpMeta29 = mmc_mk_cons(tmpMeta30, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta31 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta29);
_outDae = tmpMeta31;
}
else
{
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_InstSection_instIfEqBranches(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _branches, _inImpl, tmpMeta32 ,&_outEnv ,&_outIH ,&_outState ,&_ell);
_outCache = omc_InstSection_instIfEqBranch(threadData, _outCache, _outEnv, _outIH, _inPrefix, _outState, _else_branch, _inImpl ,&_outEnv ,&_outIH ,&_outState ,&_el);
tmpMeta34 = mmc_mk_box5(16, &DAE_Element_IF__EQUATION__desc, _expl, _ell, _el, _source);
tmpMeta33 = mmc_mk_cons(tmpMeta34, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta35 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta33);
_outDae = tmpMeta35;
}
goto tmp17_done;
}
}
goto tmp17_end;
tmp17_end: ;
}
goto goto_16;
tmp17_done:
(void)tmp18;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp17_done2;
goto_16:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp18 < 2) {
goto tmp17_top;
}
goto goto_2;
tmp17_done2:;
}
}
;
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _outState;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,5) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_info = tmpMeta36;
tmp4 += 5;
if(omc_SCodeUtil_isInitial(threadData, _inInitial))
{
tmpMeta37 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT285, tmpMeta37, _info);
}
tmpMeta38 = mmc_mk_box2(0, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3))));
_outCache = omc_InstSection_instWhenEqBranch(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, tmpMeta38, _inImpl, 1, _inGraph, _info ,&_outEnv ,&_outIH ,&_cond_exp ,&_el ,&_outGraph);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
_else_when = mmc_mk_none();
{
modelica_metatype _branch;
for (tmpMeta39 = listReverse((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 4)))); !listEmpty(tmpMeta39); tmpMeta39=MMC_CDR(tmpMeta39))
{
_branch = MMC_CAR(tmpMeta39);
_outCache = omc_InstSection_instWhenEqBranch(threadData, _outCache, _outEnv, _outIH, _inPrefix, _inSets, _inState, _branch, _inImpl, 1, _outGraph, _info ,&_outEnv ,&_outIH ,&_exp ,&_el2 ,&_outGraph);
tmpMeta40 = mmc_mk_box5(13, &DAE_Element_WHEN__EQUATION__desc, _exp, _el2, _else_when, _source);
_else_when = mmc_mk_some(tmpMeta40);
}
}
_outState = omc_InstSection_instEquationCommonCiTrans(threadData, _inState, _inInitial);
tmpMeta43 = mmc_mk_box5(13, &DAE_Element_WHEN__EQUATION__desc, _cond_exp, _el, _else_when, _source);
tmpMeta42 = mmc_mk_cons(tmpMeta43, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta44 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta42);
_outDae = tmpMeta44;
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _outState;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,5) == 0) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_info = tmpMeta45;
tmp4 += 4;
if(isSome((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3)))))
{
tmpMeta46 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3)));
if (optionNone(tmpMeta46)) goto goto_2;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 1));
_range_aexp = tmpMeta47;
tmpMeta53 = omc_Static_elabExp(threadData, _outCache, _inEnv, _range_aexp, _inImpl, 1, _inPrefix, _info, &tmpMeta48, &tmpMeta49);
_outCache = tmpMeta53;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta49,0,2) == 0) goto goto_2;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta50,6,2) == 0) goto goto_2;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 2));
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 3));
_exp = tmpMeta48;
_ty = tmpMeta51;
_c = tmpMeta52;
}
else
{
tmpMeta54 = MMC_REFSTRUCTLIT(mmc_nil);
_iter_crefs = omc_SCodeUtil_findIteratorIndexedCrefsInEquations(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 4))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), tmpMeta54);
tmpMeta60 = omc_Static_deduceIterationRange(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _iter_crefs, _inEnv, _outCache, _info, &tmpMeta55, &tmpMeta59);
_exp = tmpMeta60;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta55,0,2) == 0) goto goto_2;
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta56,6,2) == 0) goto goto_2;
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 2));
tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 3));
_ty = tmpMeta57;
_c = tmpMeta58;
_outCache = tmpMeta59;
_range_aexp = _OMC_LIT287;
}
_env = omc_InstSection_addForLoopScope(threadData, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _ty, _OMC_LIT14, mmc_mk_some(_c));
{
{
volatile mmc_switch_type tmp63;
int tmp64;
tmp63 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp62_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp63 < 2; tmp63++) {
switch (MMC_SWITCH_CAST(tmp63)) {
case 0: {
_outCache = omc_Ceval_ceval(threadData, _outCache, _inEnv, _exp, _inImpl, _OMC_LIT282, ((modelica_integer) 0) ,&_val);
goto tmp62_done;
}
case 1: {
modelica_metatype tmpMeta65;
if(omc_Flags_getConfigBool(threadData, _OMC_LIT70))
{
_val = _OMC_LIT294;
}
else
{
tmpMeta65 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _range_aexp), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT290, tmpMeta65, _info);
}
goto tmp62_done;
}
}
goto tmp62_end;
tmp62_end: ;
}
goto goto_61;
tmp62_done:
(void)tmp63;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp62_done2;
goto_61:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp63 < 2) {
goto tmp62_top;
}
goto goto_2;
tmp62_done2:;
}
}
;
_outCache = omc_InstSection_unroll(threadData, _outCache, _env, _inIH, _inPrefix, _inSets, _inState, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _ty, _val, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 4))), _inInitial, _inImpl, _inGraph ,&_outDae ,&_outSets ,&_outGraph);
_outState = omc_InstSection_instEquationCommonCiTrans(threadData, _inState, _inInitial);
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _outState;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,5) == 0) goto tmp3_end;
tmpMeta66 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_info = tmpMeta66;
tmp4 += 3;
_outCache = omc_InstSection_instOperatorArg(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, _OMC_LIT72, _OMC_LIT295, _OMC_LIT296, ((modelica_integer) 1), _info ,&_cond_exp);
_outCache = omc_InstSection_instOperatorArg(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3))), _inImpl, _OMC_LIT297, _OMC_LIT295, _OMC_LIT257, ((modelica_integer) 2), _info ,&_msg_exp);
_outCache = omc_InstSection_instOperatorArg(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 4))), _inImpl, _OMC_LIT303, _OMC_LIT295, _OMC_LIT304, ((modelica_integer) 3), _info ,&_level_exp);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
if(omc_SCodeUtil_isInitial(threadData, _inInitial))
{
tmpMeta68 = mmc_mk_box5(24, &DAE_Element_INITIAL__ASSERT__desc, _cond_exp, _msg_exp, _level_exp, _source);
tmpMeta67 = mmc_mk_cons(tmpMeta68, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta69 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta67);
_outDae = tmpMeta69;
}
else
{
tmpMeta71 = mmc_mk_box5(23, &DAE_Element_ASSERT__desc, _cond_exp, _msg_exp, _level_exp, _source);
tmpMeta70 = mmc_mk_cons(tmpMeta71, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta72 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta70);
_outDae = tmpMeta72;
}
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _inState;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_metatype tmpMeta77;
modelica_metatype tmpMeta78;
modelica_metatype tmpMeta79;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,3) == 0) goto tmp3_end;
tmpMeta73 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_info = tmpMeta73;
tmp4 += 2;
_outCache = omc_InstSection_instOperatorArg(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, _OMC_LIT297, _OMC_LIT305, _OMC_LIT257, ((modelica_integer) 1), _info ,&_msg_exp);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
if(omc_SCodeUtil_isInitial(threadData, _inInitial))
{
tmpMeta75 = mmc_mk_box3(26, &DAE_Element_INITIAL__TERMINATE__desc, _msg_exp, _source);
tmpMeta74 = mmc_mk_cons(tmpMeta75, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta76 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta74);
_outDae = tmpMeta76;
}
else
{
tmpMeta78 = mmc_mk_box3(25, &DAE_Element_TERMINATE__desc, _msg_exp, _source);
tmpMeta77 = mmc_mk_cons(tmpMeta78, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta79 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta77);
_outDae = tmpMeta79;
}
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _inState;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
modelica_metatype tmpMeta85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
modelica_boolean tmp88;
modelica_metatype tmpMeta89;
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta95;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,4) == 0) goto tmp3_end;
tmpMeta80 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta80,2,1) == 0) goto tmp3_end;
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta80), 2));
tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_acr = tmpMeta81;
_info = tmpMeta82;
tmp4 += 1;
tmpMeta87 = omc_Static_elabCrefNoEval(threadData, _outCache, _inEnv, _acr, _inImpl, 0, _inPrefix, _info, &tmpMeta83, &tmpMeta86, NULL);
_outCache = tmpMeta87;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta83,6,2) == 0) goto goto_2;
tmpMeta84 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta83), 2));
tmpMeta85 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta83), 3));
_cr_exp = tmpMeta83;
_cr = tmpMeta84;
_ty = tmpMeta85;
_cr_prop = tmpMeta86;
tmp88 = omc_InstSection_checkReinitType(threadData, _ty, _cr_prop, _cr, _info);
if (1 != tmp88) goto goto_2;
_outCache = omc_Static_elabExp(threadData, _outCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3))), _inImpl, 1, _inPrefix, _info ,&_exp ,&_prop);
_outCache = omc_Ceval_cevalIfConstant(threadData, _outCache, _inEnv, _exp, _prop, _inImpl, _info ,&_exp ,&_prop);
_exp = omc_Types_matchProp(threadData, _exp, _prop, _cr_prop, 1, NULL);
_outCache = omc_InstSection_condenseArrayEquation(threadData, _outCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3))), _cr_exp, _exp, _cr_prop, _prop, _inImpl, _inPrefix, _info ,&_cr_exp ,&_exp ,&_cr_prop);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _cr_exp, _inPrefix ,&_cr_exp);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _exp, _inPrefix ,&_exp);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
tmpMeta89 = omc_InstSection_instEqEquation(threadData, _cr_exp, _cr_prop, _exp, _prop, _source, _inInitial, _inImpl, _OMC_LIT138);
tmpMeta90 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta89), 2));
_el = tmpMeta90;
{
modelica_metatype __omcQ_24tmpVar1;
modelica_metatype* tmp92;
modelica_metatype tmpMeta93;
modelica_metatype __omcQ_24tmpVar0;
modelica_integer tmp94;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _el;
tmpMeta93 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar1 = tmpMeta93;
tmp92 = &__omcQ_24tmpVar1;
while(1) {
tmp94 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp94--;
}
if (tmp94 == 0) {
__omcQ_24tmpVar0 = omc_InstSection_makeDAEArrayEqToReinitForm(threadData, _e);
*tmp92 = mmc_mk_cons(__omcQ_24tmpVar0,0);
tmp92 = &MMC_CDR(*tmp92);
} else if (tmp94 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp92 = mmc_mk_nil();
tmpMeta91 = __omcQ_24tmpVar1;
}
_el = tmpMeta91;
tmpMeta95 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, _el);
_outDae = tmpMeta95;
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _inState;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta96;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta96 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_info = tmpMeta96;
if(omc_InstSection_isConnectionsOperator(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2)))))
{
_outCache = omc_InstSection_handleConnectionsOperators(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _inInitial, _inImpl, _inGraph, _inFlattenOp ,&_outEnv ,&_outIH ,&_outDae ,&_outSets ,&_outState ,&_outGraph);
}
else
{
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, 0, _inPrefix, _info ,&_exp, NULL);
_outCache = omc_PrefixUtil_prefixExp(threadData, _outCache, _inEnv, _inIH, _exp, _inPrefix ,&_exp);
_source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);
_outDae = omc_InstSection_instEquationNoRetCallVectorization(threadData, _exp, _inInitial, _source);
_outState = _inState;
}
tmpMeta[0+0] = _outDae;
tmpMeta[0+1] = _outState;
goto tmp3_done;
}
case 9: {
modelica_boolean tmp97;
modelica_metatype tmpMeta98;
modelica_metatype tmpMeta99;
tmp97 = omc_Flags_isSet(threadData, _OMC_LIT56);
if (1 != tmp97) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT306);
tmpMeta98 = stringAppend(omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200),_OMC_LIT307);
tmpMeta99 = stringAppend(tmpMeta98,omc_FGraph_getGraphNameStr(threadData, _inEnv));
omc_Debug_traceln(threadData, tmpMeta99);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 10) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outDae = tmpMeta[0+0];
_outState = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instEquationCommonWork(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype _inFlattenOp, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instEquationCommonWork(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _inInitial, tmp1, _inGraph, _inFlattenOp, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_InstSection_instEquationCommon(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_boolean _inImpl, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
modelica_integer _errorCount;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_errorCount = omc_Error_getNumErrorMessages(threadData);
{
{
modelica_string _s = NULL;
modelica_metatype _state = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
_state = omc_ClassInf_trans(threadData, _inState, _OMC_LIT234);
tmpMeta5 = mmc_mk_box3(3, &DAE_SymbolicOperation_FLATTEN__desc, _inEquation, mmc_mk_none());
_outCache = omc_InstSection_instEquationCommonWork(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _state, _inEquation, _inInitial, _inImpl, _inGraph, tmpMeta5 ,&_outEnv ,&_outIH ,&_outDae ,&_outSets ,&_outState ,&_outGraph);
tmpMeta6 = mmc_mk_box2(0, boxvar_ExpressionSimplify_simplifyWork, _OMC_LIT207);
_outDae = omc_DAEUtil_traverseDAE(threadData, _outDae, _OMC_LIT308, boxvar_Expression_traverseSubexpressionsHelper, tmpMeta6, NULL, NULL);
goto tmp2_done;
}
case 1: {
modelica_boolean tmp7;
modelica_metatype tmpMeta9;
tmp7 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_ClassInf_trans(threadData, _inState, _OMC_LIT234);
tmp7 = 1;
goto goto_8;
goto_8:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp7) {goto goto_1;}
_s = omc_ClassInf_printStateStr(threadData, _inState);
tmpMeta9 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT311, tmpMeta9, omc_SCodeUtil_getEquationInfo(threadData, _inEquation));
goto goto_1;
goto tmp2_done;
}
case 2: {
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
tmp10 = (_errorCount == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp10) goto goto_1;
tmpMeta11 = stringAppend(_OMC_LIT9,omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT200));
_s = tmpMeta11;
tmpMeta12 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT314, tmpMeta12, omc_SCodeUtil_getEquationInfo(threadData, _inEquation));
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 3) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_InstSection_instEquationCommon(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inInitial, modelica_metatype _inImpl, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_InstSection_instEquationCommon(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _inInitial, tmp1, _inGraph, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
DLLExport
modelica_metatype omc_InstSection_instInitialEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_InstSection_instEquationCommon(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _OMC_LIT205, _inImpl, _inGraph ,&_outEnv ,&_outIH ,&_outDae ,&_outSets ,&_outState ,&_outGraph);
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
modelica_metatype boxptr_InstSection_instInitialEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_instInitialEquation(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, tmp1, tmp2, _inGraph, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
DLLExport
modelica_metatype omc_InstSection_instEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_boolean _inImpl, modelica_boolean _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outIH = NULL;
modelica_metatype _outDae = NULL;
modelica_metatype _outSets = NULL;
modelica_metatype _outState = NULL;
modelica_metatype _outGraph = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_InstSection_instEquationCommon(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _OMC_LIT209, _inImpl, _inGraph ,&_outEnv ,&_outIH ,&_outDae ,&_outSets ,&_outState ,&_outGraph);
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outIH) { *out_outIH = _outIH; }
if (out_outDae) { *out_outDae = _outDae; }
if (out_outSets) { *out_outSets = _outSets; }
if (out_outState) { *out_outState = _outState; }
if (out_outGraph) { *out_outGraph = _outGraph; }
return _outCache;
}
modelica_metatype boxptr_InstSection_instEquation(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIH, modelica_metatype _inPrefix, modelica_metatype _inSets, modelica_metatype _inState, modelica_metatype _inEquation, modelica_metatype _inImpl, modelica_metatype _unrollForLoops, modelica_metatype _inGraph, modelica_metatype *out_outEnv, modelica_metatype *out_outIH, modelica_metatype *out_outDae, modelica_metatype *out_outSets, modelica_metatype *out_outState, modelica_metatype *out_outGraph)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_unrollForLoops);
_outCache = omc_InstSection_instEquation(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, tmp1, tmp2, _inGraph, out_outEnv, out_outIH, out_outDae, out_outSets, out_outState, out_outGraph);
return _outCache;
}
