#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 "The same variable is being defined twice: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT18,45,_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(5037)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT19}};
#define _OMC_LIT20 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT20)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT21,1,11) {&DAE_Type_T__UNKNOWN__desc,}};
#define _OMC_LIT21 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT21)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,1,6) {&DAE_ConnectorType_NON__CONNECTOR__desc,}};
#define _OMC_LIT22 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT23,1,5) {&SCode_Parallelism_NON__PARALLEL__desc,}};
#define _OMC_LIT23 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT23)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT24,1,5) {&Absyn_Direction_BIDIR__desc,}};
#define _OMC_LIT24 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,1,6) {&Absyn_InnerOuter_NOT__INNER__OUTER__desc,}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT26,1,3) {&SCode_Visibility_PUBLIC__desc,}};
#define _OMC_LIT26 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT26)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT27,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT22,_OMC_LIT23,_OMC_LIT14,_OMC_LIT24,_OMC_LIT25,_OMC_LIT26}};
#define _OMC_LIT27 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT27)
#define _OMC_LIT28_data "Tuple assignment only allowed for tuple of component references in lhs (in %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT28,79,_OMC_LIT28_data);
#define _OMC_LIT28 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT28)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT29,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT28}};
#define _OMC_LIT29 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT29)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT30,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(147)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT29}};
#define _OMC_LIT30 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT30)
#define _OMC_LIT31_data "Type mismatch in assignment in %s := %s of %s := %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT31,51,_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(9)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT32}};
#define _OMC_LIT33 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT33)
#define _OMC_LIT34_data "Tuple assignment only allowed when rhs is function call (in %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT34,64,_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(47)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT35}};
#define _OMC_LIT36 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT36)
#define _OMC_LIT37_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_STRUCT37,153,_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(244)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT38}};
#define _OMC_LIT39 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT39)
#define _OMC_LIT40_data "der"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT40,3,_OMC_LIT40_data);
#define _OMC_LIT40 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "Failed to elaborate rhs of %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,30,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT42,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT41}};
#define _OMC_LIT42 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT42)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT43,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(521)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT42}};
#define _OMC_LIT43 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT43)
#define _OMC_LIT44_data "Nested when statements are not allowed."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT44,39,_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(126)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT45}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "connect may not be used inside when-equations (found connect(%s, %s))."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,70,_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(117)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT48}};
#define _OMC_LIT49 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data "failtrace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,9,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
#define _OMC_LIT51_data "Sets whether to print a failtrace or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT51,41,_OMC_LIT51_data);
#define _OMC_LIT51 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT51}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT53,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT50,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),_OMC_LIT52}};
#define _OMC_LIT53 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "- InstSection.checkForNestedWhenInEq failed.\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,45,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
#define _OMC_LIT55_data "Using reinit in when with condition initial() is not allowed. Use assignment or equality equation instead."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT55,106,_OMC_LIT55_data);
#define _OMC_LIT55 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT55)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT56,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT55}};
#define _OMC_LIT56 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT56)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT57,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(531)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT56}};
#define _OMC_LIT57 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT57)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT58,2,6) {&DAE_Exp_BCONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT58 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT58)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT59,2,1) {_OMC_LIT58,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT59 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT59)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT60,2,6) {&DAE_Exp_BCONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT60 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT60)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT61,2,1) {_OMC_LIT60,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT61 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT61)
#define _OMC_LIT62_data "checkModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT62,10,_OMC_LIT62_data);
#define _OMC_LIT62 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,1,3) {&Flags_FlagVisibility_INTERNAL__desc,}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT64,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT64 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT64)
#define _OMC_LIT65_data "Set when checkModel is used to turn on specific features for checking."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT65,70,_OMC_LIT65_data);
#define _OMC_LIT65 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT65)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT66,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT65}};
#define _OMC_LIT66 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(29)),_OMC_LIT62,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT63,_OMC_LIT64,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT66}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT68,2,3) {&DAE_DAElist_DAE__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT68 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,2,6) {&DAE_Type_T__BOOL__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT70,2,32) {&DAE_Operator_EQUAL__desc,_OMC_LIT69}};
#define _OMC_LIT70 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT70)
#define _OMC_LIT71_data "automatically generated from connect"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT71,36,_OMC_LIT71_data);
#define _OMC_LIT71 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT71)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT72,2,5) {&DAE_Exp_SCONST__desc,_OMC_LIT71}};
#define _OMC_LIT72 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT72)
#define _OMC_LIT73_data "AssertionLevel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT73,14,_OMC_LIT73_data);
#define _OMC_LIT73 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "error"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,5,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT75,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT74}};
#define _OMC_LIT75 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT75)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT76,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT73,_OMC_LIT75}};
#define _OMC_LIT76 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT76)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT77,3,8) {&DAE_Exp_ENUM__LITERAL__desc,_OMC_LIT76,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT77 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT77)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT78,7,3) {&ConnectionGraph_ConnectionGraph_GRAPH__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT78 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT78)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT79,2,4) {&DAE_Type_T__REAL__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT79 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT79)
#define _OMC_LIT80_data " equation generated by overconstrained connection graph breaking"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT80,64,_OMC_LIT80_data);
#define _OMC_LIT80 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT80)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT81,1,3) {&DAE_TailCall_NO__TAIL__desc,}};
#define _OMC_LIT81 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT81)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT82,1,5) {&DAE_Mod_NOMOD__desc,}};
#define _OMC_LIT82 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT82)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT83,1,3) {&DAE_Prefix_NOPRE__desc,}};
#define _OMC_LIT83 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data " type:\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,7,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data "The type of variables %s and %s\nare inconsistent in connect equations."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,70,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT86,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT85}};
#define _OMC_LIT86 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT86)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT87,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(52)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT86}};
#define _OMC_LIT87 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "- InstSection.connectComponents failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,39,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
#define _OMC_LIT89_data "Illegal connecting two outer connectors in statement connect(%s, %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT89,69,_OMC_LIT89_data);
#define _OMC_LIT89 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT89)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT90,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT89}};
#define _OMC_LIT90 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT90)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT91,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(119)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT90}};
#define _OMC_LIT91 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT91)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT92,1,5) {&ErrorTypes_Severity_WARNING__desc,}};
#define _OMC_LIT92 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT92)
#define _OMC_LIT93_data "Connecting two signal sources while connecting %s to %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT93,56,_OMC_LIT93_data);
#define _OMC_LIT93 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT93)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT94,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT93}};
#define _OMC_LIT94 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT94)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT95,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(226)),_OMC_LIT0,_OMC_LIT92,_OMC_LIT94}};
#define _OMC_LIT95 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "Cannot connect %1 component %2 to non-%1 component %3."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,54,_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(51)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT97}};
#define _OMC_LIT98 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT98)
#define _OMC_LIT99_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_STRUCT99,107,_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(118)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT100}};
#define _OMC_LIT101 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,1,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
#define _OMC_LIT103_data "]"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT103,1,_OMC_LIT103_data);
#define _OMC_LIT103 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "Unmatched dimension in equation connect(%s, %s), %s != %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,58,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT105,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT104}};
#define _OMC_LIT105 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT105)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT106,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(121)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT105}};
#define _OMC_LIT106 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT106)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT107,2,8) {&SCode_Restriction_R__CONNECTOR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT107 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT107)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT108,2,8) {&SCode_Restriction_R__CONNECTOR__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT108 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT108)
#define _OMC_LIT109_data "%s is not a valid connector."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT109,28,_OMC_LIT109_data);
#define _OMC_LIT109 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT109)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT110,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT109}};
#define _OMC_LIT110 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT110)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT111,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(48)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT110}};
#define _OMC_LIT111 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT111)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT112,1,4) {&Absyn_Direction_OUTPUT__desc,}};
#define _OMC_LIT112 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,1,3) {&Absyn_Direction_INPUT__desc,}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT114,1,4) {&FCore_Status_VAR__TYPED__desc,}};
#define _OMC_LIT114 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT114)
#define _OMC_LIT115_data "virtual variable in expandable connector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT115,40,_OMC_LIT115_data);
#define _OMC_LIT115 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT115)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT116,1,1) {_OMC_LIT115}};
#define _OMC_LIT116 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,3,3) {&SCode_Comment_COMMENT__desc,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT116}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT118,1,1) {_OMC_LIT117}};
#define _OMC_LIT118 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT119,1,4) {&SCode_Final_NOT__FINAL__desc,}};
#define _OMC_LIT119 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT119)
#define _OMC_LIT120_data "Error: The marked virtual expandable component reference in connect(["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT120,69,_OMC_LIT120_data);
#define _OMC_LIT120 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT120)
#define _OMC_LIT121_data "], "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT121,3,_OMC_LIT121_data);
#define _OMC_LIT121 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT121)
#define _OMC_LIT122_data "); should be qualified, i.e. expandableConnectorName.virtualName!\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT122,66,_OMC_LIT122_data);
#define _OMC_LIT122 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT122)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT123,1,3) {&DAE_Binding_UNBOUND__desc,}};
#define _OMC_LIT123 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT123)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT124,1,4) {&SCode_Redeclare_NOT__REDECLARE__desc,}};
#define _OMC_LIT124 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT124)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT125,1,4) {&SCode_Replaceable_NOT__REPLACEABLE__desc,}};
#define _OMC_LIT125 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT125)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT126,6,3) {&SCode_Prefixes_PREFIXES__desc,_OMC_LIT26,_OMC_LIT124,_OMC_LIT119,_OMC_LIT25,_OMC_LIT125}};
#define _OMC_LIT126 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT126)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT127,1,3) {&SCode_ConnectorType_POTENTIAL__desc,}};
#define _OMC_LIT127 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT127)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT128,1,3) {&Absyn_IsField_NONFIELD__desc,}};
#define _OMC_LIT128 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT128)
#define _OMC_LIT129_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT129,0,_OMC_LIT129_data);
#define _OMC_LIT129 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT129)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT130,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT129}};
#define _OMC_LIT130 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT130)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT131,3,3) {&Absyn_TypeSpec_TPATH__desc,_OMC_LIT130,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT131 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT131)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT132,1,7) {&SCode_Mod_NOMOD__desc,}};
#define _OMC_LIT132 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT132)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT133,3,3) {&SCode_Comment_COMMENT__desc,MMC_REFSTRUCTLIT(mmc_none),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT133 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT133)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT134,0.0);
#define _OMC_LIT134 MMC_REFREALLIT(_OMC_LIT_STRUCT134)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT135,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT129,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT134}};
#define _OMC_LIT135 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT135)
#define _OMC_LIT136_data "expandable connector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT136,20,_OMC_LIT136_data);
#define _OMC_LIT136 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT136)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT137,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT136}};
#define _OMC_LIT137 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT137)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT138,3,8) {&ClassInf_State_CONNECTOR__desc,_OMC_LIT137,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT138 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT138)
#define _OMC_LIT139_data "in statement %s, subscript %s is not a parameter or constant."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT139,61,_OMC_LIT139_data);
#define _OMC_LIT139 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT139)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT140,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT139}};
#define _OMC_LIT140 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT140)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT141,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(120)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT140}};
#define _OMC_LIT141 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT141)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT142,1,5) {&DAE_Connect_Face_NO__FACE__desc,}};
#define _OMC_LIT142 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT142)
#define _OMC_LIT143_data "connect(%s, %s) connects the same connector instance! The connect equation will be ignored."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT143,91,_OMC_LIT143_data);
#define _OMC_LIT143 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT143)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT144,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT143}};
#define _OMC_LIT144 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT144)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT145,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(204)),_OMC_LIT0,_OMC_LIT92,_OMC_LIT144}};
#define _OMC_LIT145 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT145)
#define _OMC_LIT146_data "expandableConnectors"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT146,20,_OMC_LIT146_data);
#define _OMC_LIT146 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT146)
#define _OMC_LIT147_data "connect("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT147,8,_OMC_LIT147_data);
#define _OMC_LIT147 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT147)
#define _OMC_LIT148_data ", "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT148,2,_OMC_LIT148_data);
#define _OMC_LIT148 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT148)
#define _OMC_LIT149_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT149,1,_OMC_LIT149_data);
#define _OMC_LIT149 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT149)
#define _OMC_LIT150_data "- InstSection.instConnect failed for: connect("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT150,46,_OMC_LIT150_data);
#define _OMC_LIT150 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT150)
#define _OMC_LIT151_data "Type error in conditional '%s'. Expected Boolean, got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT151,57,_OMC_LIT151_data);
#define _OMC_LIT151 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT151)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT152,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT151}};
#define _OMC_LIT152 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT152)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(10)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT152}};
#define _OMC_LIT153 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153)
#define _OMC_LIT154_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_STRUCT154,118,_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(294)),_OMC_LIT0,_OMC_LIT92,_OMC_LIT155}};
#define _OMC_LIT156 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT156)
#define _OMC_LIT157_data "initial"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT157,7,_OMC_LIT157_data);
#define _OMC_LIT157 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT157)
#define _OMC_LIT158_data "- InstSection.instElseIfs failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT158,33,_OMC_LIT158_data);
#define _OMC_LIT158 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT158)
#define _OMC_LIT159_data "connect may not be used inside if-equations with non-parametric conditions (found connect(%s, %s))."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT159,99,_OMC_LIT159_data);
#define _OMC_LIT159 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT159)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT160,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT159}};
#define _OMC_LIT160 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT160)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT161,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(116)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT160}};
#define _OMC_LIT161 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT161)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT162,1,6) {&DAE_ComponentRef_WILD__desc,}};
#define _OMC_LIT162 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT162)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT163,5,3) {&DAE_Connect_SetTrieNode_SET__TRIE__NODE__desc,_OMC_LIT129,_OMC_LIT162,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT163 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT163)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT164,5,3) {&DAE_Connect_Sets_SETS__desc,_OMC_LIT163,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT164 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT164)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT165,7,3) {&ConnectionGraph_ConnectionGraph_GRAPH__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */)),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT165 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT165)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT166,2,3) {&Absyn_Exp_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT166 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT166)
#define _OMC_LIT167_data "size"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT167,4,_OMC_LIT167_data);
#define _OMC_LIT167 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT167)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT168,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT167,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT168 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT168)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT169,1,4) {&SCode_Encapsulated_NOT__ENCAPSULATED__desc,}};
#define _OMC_LIT169 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT169)
#define _OMC_LIT170_data "$for loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT170,16,_OMC_LIT170_data);
#define _OMC_LIT170 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT170)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT171,2,3) {&DAE_Type_T__INTEGER__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT171 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT171)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT172,1,3) {&DAE_BindingSource_BINDING__FROM__DEFAULT__VALUE__desc,}};
#define _OMC_LIT172 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT172)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT173,1,6) {&SCode_Variability_CONST__desc,}};
#define _OMC_LIT173 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT173)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT174,1,3) {&DAE_Const_C__CONST__desc,}};
#define _OMC_LIT174 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT174)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT175,1,1) {_OMC_LIT174}};
#define _OMC_LIT175 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT175)
#define _OMC_LIT176_data "- InstSection.loopOverRange failed to loop over range: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT176,55,_OMC_LIT176_data);
#define _OMC_LIT176 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT176)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT177,2,19) {&DAE_Type_T__ANYTYPE__desc,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT177 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT177)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT178,1,5) {&DAE_Const_C__VAR__desc,}};
#define _OMC_LIT178 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT178)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT179,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT177,_OMC_LIT178}};
#define _OMC_LIT179 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT179)
#define _OMC_LIT180_data "Element is not allowed in function context: %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT180,46,_OMC_LIT180_data);
#define _OMC_LIT180 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT180)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT181,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT180}};
#define _OMC_LIT181 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT181)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT182,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(155)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT181}};
#define _OMC_LIT182 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT182)
#define _OMC_LIT183_data "when"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT183,4,_OMC_LIT183_data);
#define _OMC_LIT183 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT183)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT184,2,1) {_OMC_LIT183,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT184 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT184)
#define _OMC_LIT185_data "'return' may not be used outside function."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT185,42,_OMC_LIT185_data);
#define _OMC_LIT185 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT185)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT186,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT185}};
#define _OMC_LIT186 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT186)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT187,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(281)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT186}};
#define _OMC_LIT187 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT187)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT188,2,22) {&DAE_Exp_TUPLE__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT188 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT188)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT189,1,1) {_OMC_LIT188}};
#define _OMC_LIT189 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT189)
#define _OMC_LIT190_data "__OpenModelica_stackOverflowCheckpoint"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT190,38,_OMC_LIT190_data);
#define _OMC_LIT190 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT190)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT191,1,4) {&DAE_MatchType_TRY__STACKOVERFLOW__desc,}};
#define _OMC_LIT191 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT191)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT192,1,3) {&DAE_MatchType_MATCHCONTINUE__desc,}};
#define _OMC_LIT192 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT192)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT193,1,10) {&DAE_Type_T__NORETCALL__desc,}};
#define _OMC_LIT193 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT193)
#define _OMC_LIT194_data "Failed to instantiate statement:\n%s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT194,35,_OMC_LIT194_data);
#define _OMC_LIT194 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT194)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT195,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT194}};
#define _OMC_LIT195 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT195)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT196,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(190)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT195}};
#define _OMC_LIT196 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT196)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT197,10,3) {&SCodeDump_SCodeDumpOptions_OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT197 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT197)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT198,1,4) {&ClassInf_Event_FOUND__ALGORITHM__desc,}};
#define _OMC_LIT198 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT198)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT199,4,4) {&DAE_ComponentRef_CREF__IDENT__desc,_OMC_LIT129,_OMC_LIT21,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT199 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT199)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT200,2,0) {_OMC_LIT199,_OMC_LIT199}};
#define _OMC_LIT200 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT200)
#define _OMC_LIT201_data "- InstSection.instConstraints failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT201,37,_OMC_LIT201_data);
#define _OMC_LIT201 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT201)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT202,1,3) {&SCode_Initial_INITIAL__desc,}};
#define _OMC_LIT202 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT202)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT203,1,3) {&ExpressionSimplifyTypes_Evaluate_NO__EVAL__desc,}};
#define _OMC_LIT203 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT203)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT204,2,0) {MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT203}};
#define _OMC_LIT204 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT204)
#define _OMC_LIT205_data "- InstSection.instInitialAlgorithm failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT205,42,_OMC_LIT205_data);
#define _OMC_LIT205 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT205)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT206,1,4) {&SCode_Initial_NON__INITIAL__desc,}};
#define _OMC_LIT206 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT206)
#define _OMC_LIT207_data "Algorithm sections are not allowed in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT207,41,_OMC_LIT207_data);
#define _OMC_LIT207 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT207)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT208,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT207}};
#define _OMC_LIT208 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT208)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT209,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(187)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT208}};
#define _OMC_LIT209 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT209)
#define _OMC_LIT210_data "- InstSection.instAlgorithm failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT210,34,_OMC_LIT210_data);
#define _OMC_LIT210 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT210)
#define _OMC_LIT211_data " = "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT211,3,_OMC_LIT211_data);
#define _OMC_LIT211 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT211)
#define _OMC_LIT212_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_STRUCT212,131,_OMC_LIT212_data);
#define _OMC_LIT212 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT212)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT213,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT212}};
#define _OMC_LIT213 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT213)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT214,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(105)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT213}};
#define _OMC_LIT214 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT214)
#define _OMC_LIT215_data "Unable to unroll for loop containing when statements or equations: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT215,70,_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(124)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT216}};
#define _OMC_LIT217 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT217)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT218,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT218 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT218)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT219,2,1) {_OMC_LIT218,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT219 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT219)
#define _OMC_LIT220_data "="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT220,1,_OMC_LIT220_data);
#define _OMC_LIT220 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT220)
#define _OMC_LIT221_data "Array equation has unknown size in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT221,38,_OMC_LIT221_data);
#define _OMC_LIT221 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT221)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT222,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT221}};
#define _OMC_LIT222 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT222)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT223,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(46)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT222}};
#define _OMC_LIT223 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT223)
#define _OMC_LIT224_data "- InstSection.instArrayEquation failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT224,39,_OMC_LIT224_data);
#define _OMC_LIT224 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT224)
#define _OMC_LIT225_data "- InstSection.instEqEquation2 failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT225,37,_OMC_LIT225_data);
#define _OMC_LIT225 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT225)
#define _OMC_LIT226_data "Type mismatch in equation %s of type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT226,40,_OMC_LIT226_data);
#define _OMC_LIT226 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT226)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT227,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT226}};
#define _OMC_LIT227 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT227)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT228,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(45)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT227}};
#define _OMC_LIT228 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT228)
#define _OMC_LIT229_data "$pafor loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT229,18,_OMC_LIT229_data);
#define _OMC_LIT229 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT229)
#define _OMC_LIT230_data "- InstSection.unroll failed: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT230,29,_OMC_LIT230_data);
#define _OMC_LIT230 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT230)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT231,1,3) {&ClassInf_Event_FOUND__EQUATION__desc,}};
#define _OMC_LIT231 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT231)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT232,1,6) {&Absyn_ComponentRef_WILD__desc,}};
#define _OMC_LIT232 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT232)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT233,2,5) {&Absyn_Exp_CREF__desc,_OMC_LIT232}};
#define _OMC_LIT233 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT233)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT234,2,3) {&DAE_TupleConst_SINGLE__CONST__desc,_OMC_LIT178}};
#define _OMC_LIT234 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT234)
#define _OMC_LIT235_data "- expandTupleEquationWithWild failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT235,36,_OMC_LIT235_data);
#define _OMC_LIT235 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT235)
#define _OMC_LIT236_data "condenseArrays"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT236,14,_OMC_LIT236_data);
#define _OMC_LIT236 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT236)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT237,1,4) {&Flags_FlagVisibility_EXTERNAL__desc,}};
#define _OMC_LIT237 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT237)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT238,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT238 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT238)
#define _OMC_LIT239_data "Sets whether array expressions containing function calls are condensed or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT239,78,_OMC_LIT239_data);
#define _OMC_LIT239 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT239)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT240,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT239}};
#define _OMC_LIT240 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT240)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT241,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(102)),_OMC_LIT236,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT237,_OMC_LIT238,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT240}};
#define _OMC_LIT241 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT241)
#define _OMC_LIT242_data "Failure in: makeDAEArrayEqToReinitForm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT242,38,_OMC_LIT242_data);
#define _OMC_LIT242 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT242)
#define _OMC_LIT243_data ";"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT243,1,_OMC_LIT243_data);
#define _OMC_LIT243 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT243)
#define _OMC_LIT244_data "The first argument to reinit must be a subtype of Real, but %s has type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT244,75,_OMC_LIT244_data);
#define _OMC_LIT244 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT244)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT245,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT244}};
#define _OMC_LIT245 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT245)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT246,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(224)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT245}};
#define _OMC_LIT246 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT246)
#define _OMC_LIT247_data "The first argument to reinit must be a continuous time variable, but %s is %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT247,78,_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(225)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT248}};
#define _OMC_LIT249 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT249)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT250,2,6) {&Absyn_Exp_STRING__desc,_OMC_LIT129}};
#define _OMC_LIT250 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT250)
#define _OMC_LIT251_data "Wrong type or wrong number of arguments to %s (in component %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT251,64,_OMC_LIT251_data);
#define _OMC_LIT251 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT251)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT252,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT251}};
#define _OMC_LIT252 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT252)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT253,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(68)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT252}};
#define _OMC_LIT253 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT253)
#define _OMC_LIT254_data "message"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT254,7,_OMC_LIT254_data);
#define _OMC_LIT254 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT254)
#define _OMC_LIT255_data "priority"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT255,8,_OMC_LIT255_data);
#define _OMC_LIT255 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT255)
#define _OMC_LIT256_data "Ignoring overconstrained operator applied to array components having size zero: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT256,83,_OMC_LIT256_data);
#define _OMC_LIT256 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT256)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT257,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT256}};
#define _OMC_LIT257 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT257)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT258,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(551)),_OMC_LIT0,_OMC_LIT92,_OMC_LIT257}};
#define _OMC_LIT258 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT258)
#define _OMC_LIT259_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_STRUCT259,147,_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(547)),_OMC_LIT0,_OMC_LIT92,_OMC_LIT260}};
#define _OMC_LIT261 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT261)
#define _OMC_LIT262_data "Connections.uniqueRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT262,22,_OMC_LIT262_data);
#define _OMC_LIT262 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT262)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT263,2,1) {_OMC_LIT262,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT263 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT263)
#define _OMC_LIT264_data "- handleConnectionsOperators failed for eqn: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT264,45,_OMC_LIT264_data);
#define _OMC_LIT264 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT264)
#define _OMC_LIT265_data " in scope:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT265,10,_OMC_LIT265_data);
#define _OMC_LIT265 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT265)
#define _OMC_LIT266_data "Connections"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT266,11,_OMC_LIT266_data);
#define _OMC_LIT266 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT266)
#define _OMC_LIT267_data "root"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT267,4,_OMC_LIT267_data);
#define _OMC_LIT267 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT267)
#define _OMC_LIT268_data "potentialRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT268,13,_OMC_LIT268_data);
#define _OMC_LIT268 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT268)
#define _OMC_LIT269_data "uniqueRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT269,10,_OMC_LIT269_data);
#define _OMC_LIT269 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT269)
#define _OMC_LIT270_data "branch"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT270,6,_OMC_LIT270_data);
#define _OMC_LIT270 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT270)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT271,2,1) {_OMC_LIT269,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT271 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT271)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT272,2,1) {_OMC_LIT270,_OMC_LIT271}};
#define _OMC_LIT272 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT272)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT273,2,1) {_OMC_LIT268,_OMC_LIT272}};
#define _OMC_LIT273 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT273)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT274,2,1) {_OMC_LIT267,_OMC_LIT273}};
#define _OMC_LIT274 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT274)
#define _OMC_LIT275_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_STRUCT275,102,_OMC_LIT275_data);
#define _OMC_LIT275 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT275)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT276,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT275}};
#define _OMC_LIT276 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT276)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT277,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(269)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT276}};
#define _OMC_LIT277 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT277)
#define _OMC_LIT278_data "The conditional expression %s could not be evaluated."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT278,53,_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(137)),_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)
#define _OMC_LIT282_data "Connect equations are not allowed in initial equation sections."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT282,63,_OMC_LIT282_data);
#define _OMC_LIT282 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT282)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT283,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT282}};
#define _OMC_LIT283 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT283)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT284,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(221)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT283}};
#define _OMC_LIT284 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT284)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT285,1,4) {&Absyn_Msg_NO__MSG__desc,}};
#define _OMC_LIT285 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT285)
#define _OMC_LIT286_data "when-clause is not allowed in initial section."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT286,46,_OMC_LIT286_data);
#define _OMC_LIT286 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT286)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT287,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT286}};
#define _OMC_LIT287 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT287)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT288,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(139)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT287}};
#define _OMC_LIT288 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT288)
#define _OMC_LIT289_data "Internal error: generated implicit range could not be evaluated."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT289,64,_OMC_LIT289_data);
#define _OMC_LIT289 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT289)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT290,2,6) {&Absyn_Exp_STRING__desc,_OMC_LIT289}};
#define _OMC_LIT290 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT290)
#define _OMC_LIT291_data "The iteration range %s is not a constant or parameter expression."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT291,65,_OMC_LIT291_data);
#define _OMC_LIT291 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT291)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT292,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT291}};
#define _OMC_LIT292 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT292)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT293,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(109)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT292}};
#define _OMC_LIT293 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT293)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT294,2,3) {&Values_Value_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT294 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT294)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT295,2,1) {_OMC_LIT294,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT295 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT295)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT296,2,1) {MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT296 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT296)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT297,3,8) {&Values_Value_ARRAY__desc,_OMC_LIT295,_OMC_LIT296}};
#define _OMC_LIT297 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT297)
#define _OMC_LIT298_data "assert"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT298,6,_OMC_LIT298_data);
#define _OMC_LIT298 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT298)
#define _OMC_LIT299_data "condition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT299,9,_OMC_LIT299_data);
#define _OMC_LIT299 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT299)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT300,2,5) {&DAE_Type_T__STRING__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT300 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT300)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT301,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT73}};
#define _OMC_LIT301 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT301)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT302,2,5) {&Absyn_Path_FULLYQUALIFIED__desc,_OMC_LIT301}};
#define _OMC_LIT302 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT302)
#define _OMC_LIT303_data "warning"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT303,7,_OMC_LIT303_data);
#define _OMC_LIT303 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT303)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT304,2,1) {_OMC_LIT74,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT304 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT304)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT305,2,1) {_OMC_LIT303,_OMC_LIT304}};
#define _OMC_LIT305 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT305)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT306,6,8) {&DAE_Type_T__ENUMERATION__desc,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT302,_OMC_LIT305,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT306 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT306)
#define _OMC_LIT307_data "level"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT307,5,_OMC_LIT307_data);
#define _OMC_LIT307 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT307)
#define _OMC_LIT308_data "terminate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT308,9,_OMC_LIT308_data);
#define _OMC_LIT308 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT308)
#define _OMC_LIT309_data "- InstSection.instEquationCommonWork failed for eqn: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT309,53,_OMC_LIT309_data);
#define _OMC_LIT309 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT309)
#define _OMC_LIT310_data " in scope: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT310,11,_OMC_LIT310_data);
#define _OMC_LIT310 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT310)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT311,1,5) {&DAE_AvlTreePathFunction_Tree_EMPTY__desc,}};
#define _OMC_LIT311 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT311)
#define _OMC_LIT312_data "Equations are not allowed in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT312,32,_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(167)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT313}};
#define _OMC_LIT314 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT314)
#define _OMC_LIT315_data "Failed to instantiate equation %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT315,34,_OMC_LIT315_data);
#define _OMC_LIT315 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT315)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT316,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT315}};
#define _OMC_LIT316 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT316)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT317,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(133)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT316}};
#define _OMC_LIT317 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT317)
#include "util/modelica.h"

#include "InstSection_includes.h"


/* default, do not make protected functions static */
#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_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
  { /* match expression */
    modelica_metatype tmp3_1;
    tmp3_1 = _exp;
    {
      modelica_string _str = NULL;
      volatile mmc_switch_type tmp3;
      int tmp4;
      // _str has no default value.
      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;
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        case 1: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,27,3) == 0) goto tmp2_end;
          
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        case 3: {
          modelica_metatype tmpMeta6;
          
          /* Pattern matching succeeded */
          _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
  // _outCrefInfos has no default value.
  { /* matchcontinue expression */
    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;
      // _restSubs has no default value.
      // _crefInfoList has no default value.
      // _exp1 has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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
  // _outCrefInfos has no default value.
  { /* matchcontinue expression */
    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;
      modelica_metatype _subs = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _restExps has no default value.
      // _crefInfoList has no default value.
      // _foundCref has no default value.
      // _exp1 has no default value.
      // _exp2 has no default value.
      // _exp3 has no default value.
      // _expLst1 has no default value.
      // _subscriptLst has no default value.
      // _alreadyInList has no default value.
      // _subs has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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;

          /* Pattern-matching assignment */
          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;
          modelica_metatype tmpMeta23;
          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;
          _subs = tmpMeta18;
          _restExps = tmpMeta16;
          _crefInfoList = tmp4_1;
          tmp4 += 7; /* Pattern matching succeeded; we may skip some cases if we fail */
          {
            modelica_metatype __omcQ_24tmpVar3;
            modelica_metatype* tmp20;
            modelica_metatype tmpMeta21;
            modelica_metatype __omcQ_24tmpVar2;
            modelica_integer tmp22;
            modelica_metatype _sub_loopVar = 0;
            modelica_metatype _sub;
            _sub_loopVar = _subs;
            tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
            __omcQ_24tmpVar3 = tmpMeta21; /* defaultValue */
            tmp20 = &__omcQ_24tmpVar3;
            while(1) {
              tmp22 = 1;
              if (!listEmpty(_sub_loopVar)) {
                _sub = MMC_CAR(_sub_loopVar);
                _sub_loopVar = MMC_CDR(_sub_loopVar);
                tmp22--;
              }
              if (tmp22 == 0) {
                __omcQ_24tmpVar2 = omc_Expression_getSubscriptExp(threadData, _sub);
                *tmp20 = mmc_mk_cons(__omcQ_24tmpVar2,0);
                tmp20 = &MMC_CDR(*tmp20);
              } else if (tmp22 == 1) {
                break;
              } else {
                goto goto_2;
              }
            }
            *tmp20 = mmc_mk_nil();
            tmpMeta19 = __omcQ_24tmpVar3;
          }
          _expLst1 = tmpMeta19;

          tmpMeta23 = mmc_mk_cons(_exp1, _expLst1);
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta23, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta24;
          modelica_metatype tmpMeta25;
          modelica_metatype tmpMeta26;
          modelica_metatype tmpMeta27;
          modelica_metatype tmpMeta28;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta24 = MMC_CAR(tmp4_2);
          tmpMeta25 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,7,3) == 0) goto tmp3_end;
          tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
          tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 4));
          
          _exp1 = tmpMeta26;
          _exp2 = tmpMeta27;
          _restExps = tmpMeta25;
          _crefInfoList = tmp4_1;
          tmp4 += 6; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta28 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, MMC_REFSTRUCTLIT(mmc_nil)));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta28, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta29;
          modelica_metatype tmpMeta30;
          modelica_metatype tmpMeta31;
          modelica_metatype tmpMeta32;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta29 = MMC_CAR(tmp4_2);
          tmpMeta30 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,8,2) == 0) goto tmp3_end;
          tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 3));
          
          _exp1 = tmpMeta31;
          _restExps = tmpMeta30;
          _crefInfoList = tmp4_1;
          tmp4 += 5; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta32 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta32, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta33;
          modelica_metatype tmpMeta34;
          modelica_metatype tmpMeta35;
          modelica_metatype tmpMeta36;
          modelica_metatype tmpMeta37;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta33 = MMC_CAR(tmp4_2);
          tmpMeta34 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,9,3) == 0) goto tmp3_end;
          tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
          tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 4));
          
          _exp1 = tmpMeta35;
          _exp2 = tmpMeta36;
          _restExps = tmpMeta34;
          _crefInfoList = tmp4_1;
          tmp4 += 4; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta37 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, MMC_REFSTRUCTLIT(mmc_nil)));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta37, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta38;
          modelica_metatype tmpMeta39;
          modelica_metatype tmpMeta40;
          modelica_metatype tmpMeta41;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta38 = MMC_CAR(tmp4_2);
          tmpMeta39 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,10,2) == 0) goto tmp3_end;
          tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 3));
          
          _exp1 = tmpMeta40;
          _restExps = tmpMeta39;
          _crefInfoList = tmp4_1;
          tmp4 += 3; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta41 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta41, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 7: {
          modelica_metatype tmpMeta42;
          modelica_metatype tmpMeta43;
          modelica_metatype tmpMeta44;
          modelica_metatype tmpMeta45;
          modelica_metatype tmpMeta46;
          modelica_metatype tmpMeta47;
          modelica_metatype tmpMeta48;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta42 = MMC_CAR(tmp4_2);
          tmpMeta43 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta42,18,4) == 0) goto tmp3_end;
          tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 3));
          tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 4));
          if (optionNone(tmpMeta45)) goto tmp3_end;
          tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 1));
          tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta42), 5));
          
          _exp1 = tmpMeta44;
          _exp2 = tmpMeta46;
          _exp3 = tmpMeta47;
          _restExps = tmpMeta43;
          _crefInfoList = tmp4_1;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta48 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil))));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta48, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta49;
          modelica_metatype tmpMeta50;
          modelica_metatype tmpMeta51;
          modelica_metatype tmpMeta52;
          modelica_metatype tmpMeta53;
          modelica_metatype tmpMeta54;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta49 = MMC_CAR(tmp4_2);
          tmpMeta50 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta49,18,4) == 0) goto tmp3_end;
          tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 3));
          tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 4));
          if (!optionNone(tmpMeta52)) goto tmp3_end;
          tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 5));
          
          _exp1 = tmpMeta51;
          _exp3 = tmpMeta53;
          _restExps = tmpMeta50;
          _crefInfoList = tmp4_1;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta54 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil)));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta54, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 9: {
          modelica_metatype tmpMeta55;
          modelica_metatype tmpMeta56;
          modelica_metatype tmpMeta57;
          modelica_metatype tmpMeta58;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta55 = MMC_CAR(tmp4_2);
          tmpMeta56 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta55,20,2) == 0) goto tmp3_end;
          tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 3));
          
          _exp1 = tmpMeta57;
          _restExps = tmpMeta56;
          _crefInfoList = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta58 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
          _crefInfoList = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, tmpMeta58, _inInfo);
          tmpMeta1 = omc_InstSection_collectParallelVariablesinExps(threadData, _crefInfoList, _restExps, _inInfo);
          goto tmp3_done;
        }
        case 10: {
          modelica_metatype tmpMeta59;
          modelica_metatype tmpMeta60;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta59 = MMC_CAR(tmp4_2);
          tmpMeta60 = MMC_CDR(tmp4_2);
          
          _restExps = tmpMeta60;
          _crefInfoList = tmp4_1;
          /* Pattern matching succeeded */
          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
  // _outCrefInfos has no default value.
  { /* matchcontinue expression */
    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;
      // _restStmts has no default value.
      // _stmtList has no default value.
      // _crefInfoList has no default value.
      // _foundCref has no default value.
      // _exp1 has no default value.
      // _exp2 has no default value.
      // _info has no default value.
      // _iter has no default value.
      // _iterType has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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
  // _outBoolean has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inCrefInfos;
    {
      modelica_metatype _cref1 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _cref1 has no default value.
      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;
          /* Pattern matching succeeded */
          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
  { /* matchcontinue expression */
    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;
      // _errorString has no default value.
      // _cref has no default value.
      // _info has no default value.
      // _prl has no default value.
      // _isParglobal has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment, wild first pattern */
          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);

          /* Pattern-matching assignment */
          tmp8 = _isParglobal;
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          tmpMeta11 = stringAppend(_OMC_LIT6,omc_AbsynUtil_pathString(threadData, omc_ComponentReference_crefToPath(threadData, _cref), _OMC_LIT7, 1 /* true */, 0 /* false */));
          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;
  // _outStatements has no default value.
  // _ty has no default value.
  // _c has no default value.
  // _env has no default value.
  // _source has no default value.
  // _loop_prl_vars has no default value.
  // _parfor_iter has no default value.
  // _range has no default value.
  _c = omc_Types_getPropConst(threadData, _inRangeProps);

  if(omc_Types_isParameterOrConstant(threadData, _c))
  {
    { /* matchcontinue expression */
      {
        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;
            /* Pattern matching succeeded */
            /* Pattern-matching tuple assignment */
            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: {
            /* Pattern matching succeeded */
            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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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
  // _outCache has no default value.
  // _outStatements has no default value.
  // _iterator has no default value.
  // _oarange has no default value.
  // _arange has no default value.
  // _range has no default value.
  // _prop has no default value.
  // _body has no default value.
  // _info has no default value.
  // _iter_crefs has no default value.
  /* Pattern-matching assignment */
  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))
  {
    /* Pattern-matching assignment */
    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 /* true */, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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
  // _oty has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _ty;
    {
      modelica_string _str = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _str has no default value.
      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;
          
          /* Pattern matching succeeded */
          _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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          /* Tail recursive call */
          _ty = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2)));
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta12;
          
          /* Pattern matching succeeded */
          _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_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
  // _exp has no default value.
  _exps = _inExps;
  while(1)
  {
    if(!(!listEmpty(_exps))) break;
    /* Pattern-matching assignment */
    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_LIT20, 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
  // _outCache has no default value.
  // _stmts has no default value.
  // _varNoComment has no default value.
  // _inRhsNoComment has no default value.
  _varNoComment = omc_AbsynUtil_stripCommentExpressions(threadData, _var, 0 /* false */);

  _inRhsNoComment = omc_AbsynUtil_stripCommentExpressions(threadData, _inRhs, 0 /* false */);

  { /* match expression */
    modelica_metatype tmp3_1;
    tmp3_1 = _varNoComment;
    {
      modelica_metatype _lhs = NULL;
      volatile mmc_switch_type tmp3;
      int tmp4;
      // _lhs has no default value.
      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;
          /* Pattern matching succeeded */
          _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: {
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        }
        goto tmp2_end;
        tmp2_end: ;
      }
      goto goto_1;
      goto_1:;
      MMC_THROW_INTERNAL();
      goto tmp2_done;
      tmp2_done:;
    }
  }
  ;

  
  
  { /* matchcontinue expression */
    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;
      // _ce has no default value.
      // _ce_1 has no default value.
      // _cprop has no default value.
      // _eprop has no default value.
      // _prop has no default value.
      // _prop1 has no default value.
      // _prop2 has no default value.
      // _e_1 has no default value.
      // _e_2 has no default value.
      // _cre has no default value.
      // _cre2 has no default value.
      // _e2_2 has no default value.
      // _e2_2_2 has no default value.
      // _lhs has no default value.
      // _rhs has no default value.
      // _stmt has no default value.
      // _cr has no default value.
      // _e has no default value.
      // _e1 has no default value.
      // _e2 has no default value.
      // _left has no default value.
      // _expl has no default value.
      // _expl_1 has no default value.
      // _expl_2 has no default value.
      // _cprops has no default value.
      // _eprops has no default value.
      // _attrs has no default value.
      // _lt has no default value.
      // _rt has no default value.
      // _ty has no default value.
      // _t has no default value.
      // _s has no default value.
      // _lhs_str has no default value.
      // _rhs_str has no default value.
      // _lt_str has no default value.
      // _rt_str has no default value.
      // _s1 has no default value.
      // _s2 has no default value.
      // _cache has no default value.
      // _pattern has no default value.
      // _attr has no default value.
      // _source has no default value.
      // _lhs_dim has no default value.
      // _rhs_dim has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta17 = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0 /* false */, _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;

          /* Pattern-matching assignment */
          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 /* false */, _info);

          /* Pattern-matching assignment */
          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;

          /* Pattern-matching assignment */
          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;

          /* Pattern-matching assignment */
          tmpMeta30 = omc_InstSection_expandArrayDimension(threadData, _lhs_dim, _lhs);
          if (!listEmpty(tmpMeta30)) goto goto_9;

          /* Pattern-matching assignment */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching tuple assignment */
          tmpMeta39 = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0 /* false */, _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 /* false */, _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_LIT40), 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _cache = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0 /* false */, _inPre, _info ,NULL ,&_cprop ,&_attr);

          /* Pattern-matching tuple assignment */
          tmpMeta49 = omc_Static_elabExp(threadData, _cache, _inEnv, _e2, _inImpl, 1 /* true */, _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _cache = omc_Static_elabCrefNoEval(threadData, _cache, _inEnv, _cr, _inImpl, 0 /* false */, _inPre, _info ,&_cre ,&_cprop ,&_attr);

          omc_Static_checkAssignmentToInput(threadData, _varNoComment, _attr, _inEnv, 0 /* false */, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp54 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
          if (1 /* true */ != tmp54) goto goto_9;

          /* Pattern-matching tuple assignment */
          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 /* false */, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp60 = omc_Config_acceptMetaModelicaGrammar(threadData);
          if (1 /* true */ != tmp60) goto goto_9;

          /* Pattern-matching assignment */
          tmp61 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
          if (1 /* true */ != tmp61) goto goto_9;

          /* Pattern-matching assignment */
          tmp62 = omc_Types_isTuple(threadData, omc_Types_getPropType(threadData, _eprop));
          if (1 /* true */ != tmp62) goto goto_9;

          /* Pattern-matching tuple assignment */
          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 /* false */, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp67 = omc_Config_acceptMetaModelicaGrammar(threadData);
          if (1 /* true */ != 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_LIT21, 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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          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 /* false */, _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_LIT27, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp80 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
          if (0 /* false */ != tmp80) goto goto_9;

          _s = omc_Dump_printExpStr(threadData, _e);

          tmpMeta81 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT30, 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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmpMeta83 = _inRhsNoComment;
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta83,11,3) == 0) goto goto_9;
          

          /* Pattern-matching assignment */
          tmp84 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
          if (1 /* true */ != tmp84) goto goto_9;

          _cache = omc_Static_elabExpLHS(threadData, _cache, _inEnv, _e1, _inImpl, 0 /* false */, _inPre, _info ,&_e_1 ,&_prop1);

          _lt = omc_Types_getPropType(threadData, _prop1);

          _rt = omc_Types_getPropType(threadData, _prop2);

          /* Pattern-matching assignment */
          tmp85 = omc_Types_subtype(threadData, _lt, _rt, 1 /* true */);
          if (0 /* false */ != 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_LIT33, 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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp88 = omc_List_all(threadData, _expl, boxvar_AbsynUtil_isCref);
          if (1 /* true */ != tmp88) goto goto_9;

          tmp89 = 0; /* begin failure */
          MMC_TRY_INTERNAL(mmc_jumper)
            /* Pattern-matching assignment */
            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;} /* end failure */

          _s = omc_ExpressionDump_printExpStr(threadData, _e_1);

          tmpMeta92 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT36, tmpMeta92, _info);
          goto goto_9;
          goto tmp10_done;
        }
        case 11: {
          modelica_boolean tmp93;
          modelica_metatype tmpMeta94;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp93 = (_numError == omc_Error_getNumErrorMessages(threadData));
          if (1 /* true */ != 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_LIT39, 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _stmts; list<DAE.Statement> */
  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
  // _outCache has no default value.
  // _stmts has no default value.
  
  
  { /* matchcontinue expression */
    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;
      // _cache has no default value.
      // _env has no default value.
      // _e_1 has no default value.
      // _eprop has no default value.
      // _pre has no default value.
      // _var has no default value.
      // _value has no default value.
      // _info has no default value.
      // _str has no default value.
      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;
          /* Pattern matching succeeded */
          _cache = omc_Static_elabExp(threadData, _cache, _env, _value, _impl, 1 /* true */, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp11 = (_numError == omc_Error_getNumErrorMessages(threadData));
          if (1 /* true */ != tmp11) goto goto_2;

          tmp12 = 0; /* begin failure */
          MMC_TRY_INTERNAL(mmc_jumper)
            omc_Static_elabExp(threadData, _cache, _env, _value, _impl, 1 /* true */, _pre, _info, NULL, NULL);
            tmp12 = 1;
          goto goto_13;
          goto_13:;
          MMC_CATCH_INTERNAL(mmc_jumper)
          if (tmp12) {goto goto_2;} /* end failure */

          _str = omc_Dump_unparseAlgorithmStr(threadData, omc_SCodeUtil_statementToAlgorithmItem(threadData, _alg));

          tmpMeta14 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT43, 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _stmts; list<DAE.Statement> */
  return _outCache;
}

PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForNestedWhenInEq(threadData_t *threadData, modelica_metatype _inEq)
{
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  { /* match expression */
    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;
      // _eqs has no default value.
      // _eqs_lst has no default value.
      // _cr1 has no default value.
      // _cr2 has no default value.
      // _info has no default value.
      // _cr1_str has no default value.
      // _cr2_str has no default value.
      {
        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;
          /* Pattern matching succeeded */
          tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
          omc_Error_addSourceMessage(threadData, _OMC_LIT46, 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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          omc_InstSection_checkForNestedWhenInEqList(threadData, _eqs);
          goto tmp2_done;
        }
        case 4: {
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        case 5: {
          
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          _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_LIT49, tmpMeta12, _info);
          goto goto_1;
          goto tmp2_done;
        }
        case 9: {
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        case 10: {
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        case 11: {
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        case 12: {
          
          /* Pattern matching succeeded */
          goto tmp2_done;
        }
        default:
        tmp2_default: OMC_LABEL_UNUSED; {
          modelica_boolean tmp13;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp13 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp13) goto goto_1;

          omc_Debug_trace(threadData, _OMC_LIT54);
          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
  { /* match expression */
    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;
      // _eqs has no default value.
      // _eqs_lst has no default value.
      // _tpl_el has no default value.
      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;
          /* Pattern matching succeeded */
          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
  // _outOK has no default value.
  { /* matchcontinue expression */
    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;
      // _exp has no default value.
      // _info has no default value.
      // _el has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp9 = omc_AbsynUtil_expContainsInitial(threadData, _exp);
          if (1 /* true */ != tmp9) goto goto_2;

          /* Pattern-matching assignment */
          tmp10 = omc_SCodeUtil_equationsContainReinit(threadData, _el);
          if (1 /* true */ != tmp10) goto goto_2;

          tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
          omc_Error_addSourceMessage(threadData, _OMC_LIT57, tmpMeta11, _info);
          tmp1 = 0 /* false */;
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          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
  /* Pattern-matching assignment */
  tmp1 = omc_InstSection_checkForReinitInWhenInitialEq(threadData, _inWhenEq);
  if (1 /* true */ != 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
  // _branches has no default value.
  // _info has no default value.
  // _body has no default value.
  /* Pattern-matching assignment */
  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);
      /* Pattern-matching assignment */
      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_LIT46, 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
  // _outOK has no default value.
  { /* matchcontinue expression */
    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;
      // _exp has no default value.
      // _info has no default value.
      // _algs has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp12 = omc_AbsynUtil_expContainsInitial(threadData, _exp);
          if (1 /* true */ != tmp12) goto goto_2;

          /* Pattern-matching assignment */
          tmp13 = omc_SCodeUtil_algorithmsContainReinit(threadData, _algs);
          if (1 /* true */ != tmp13) goto goto_2;

          tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
          omc_Error_addSourceMessage(threadData, _OMC_LIT57, tmpMeta14, _info);
          tmp1 = 0 /* false */;
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          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
  /* Pattern-matching assignment */
  tmp1 = omc_InstSection_checkForReinitInWhenInitialAlg(threadData, _inWhenAlgorithm);
  if (1 /* true */ != 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
  // _cref has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _crefOrArray;
    {
      modelica_metatype _cr = NULL;
      modelica_metatype _t = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _cr has no default value.
      // _t has no default value.
      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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          _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
  // _enumIndices has no default value.
  { /* match expression */
    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;
      // _l has no default value.
      // _ls has no default value.
      // _e has no default value.
      // _expl has no default value.
      // _enum_type_name has no default value.
      // _index has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (!listEmpty(tmp4_1)) goto tmp3_end;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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);
  /* skip box _enumIndices; list<DAE.Exp> */
  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
  // _asub has no default value.
  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);
  /* skip box _asub; DAE.Exp */
  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
  // _outExpl has no default value.
  { /* matchcontinue expression */
    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;
      // _sz has no default value.
      // _ints has no default value.
      // _name has no default value.
      // _ls has no default value.
      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;
          /* Pattern matching succeeded */
          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;
          
          /* Pattern matching succeeded */
          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  /* pattern as ty=Integer */;
          tmp4 += 3; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta12 = mmc_mk_cons(omc_ExpressionSimplify_simplify1(threadData, omc_Expression_makeASUB(threadData, _inArray, _OMC_LIT59), NULL), mmc_mk_cons(omc_ExpressionSimplify_simplify1(threadData, omc_Expression_makeASUB(threadData, _inArray, _OMC_LIT61), 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp15 = omc_Flags_getConfigBool(threadData, _OMC_LIT67);
          if (1 /* true */ != 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
  // _outSubConnectorType has no default value.
  { /* match expression */
    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;
          /* Pattern matching succeeded */
          tmpMeta1 = _inSubConnectorType;
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outSets has no default value.
  // _outDae has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  { /* match expression */
    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;
      // _sets has no default value.
      // _sets_1 has no default value.
      // _sets_2 has no default value.
      // _env has no default value.
      // _c1_1 has no default value.
      // _c2_1 has no default value.
      // _c1 has no default value.
      // _c2 has no default value.
      // _dae has no default value.
      // _dae2 has no default value.
      // _dae_1 has no default value.
      // _f1 has no default value.
      // _f2 has no default value.
      // _n has no default value.
      // _attr1 has no default value.
      // _attr2 has no default value.
      // _ct has no default value.
      // _ty1 has no default value.
      // _ty2 has no default value.
      // _xs1 has no default value.
      // _xs2 has no default value.
      // _vta has no default value.
      // _vtb has no default value.
      // _ty_2 has no default value.
      // _cache has no default value.
      // _graph has no default value.
      // _ih has no default value.
      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;
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _sets;
          tmpMeta[0+4] = _OMC_LIT68;
          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;
          /* Pattern matching succeeded */
          _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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outSets has no default value.
  // _outDae has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  { /* match expression */
    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;
      // _lhs has no default value.
      // _rhs has no default value.
      // _rest_lhs has no default value.
      // _rest_rhs has no default value.
      // _cache has no default value.
      // _env has no default value.
      // _ih has no default value.
      // _sets has no default value.
      // _dae1 has no default value.
      // _dae2 has no default value.
      // _graph has no default value.
      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;
          /* Pattern matching succeeded */
          _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: {
          
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _inCache;
          tmpMeta[0+1] = _inEnv;
          tmpMeta[0+2] = _inIH;
          tmpMeta[0+3] = _inSets;
          tmpMeta[0+4] = _OMC_LIT68;
          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
  // _outAssert has no default value.
  // _exp has no default value.
  tmpMeta1 = mmc_mk_box6(14, &DAE_Exp_RELATION__desc, _inLhsExp, _OMC_LIT70, _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_LIT72, _OMC_LIT77, _inSource);
  _outAssert = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _outAssert;
}

DLLDirection
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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outSets has no default value.
  // _outDae has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _c1_1 has no default value.
      // _c2_1 has no default value.
      // _c1 has no default value.
      // _c2 has no default value.
      // _c1p has no default value.
      // _c2p has no default value.
      // _sets_1 has no default value.
      // _sets has no default value.
      // _env has no default value.
      // _pre has no default value.
      // _f1 has no default value.
      // _f2 has no default value.
      // _t1 has no default value.
      // _t2 has no default value.
      // _bc_tp1 has no default value.
      // _bc_tp2 has no default value.
      // _equalityConstraintFunctionReturnType has no default value.
      // _dim1 has no default value.
      // _dim2 has no default value.
      // _dae has no default value.
      // _l1 has no default value.
      // _l2 has no default value.
      // _ct has no default value.
      // _c1_str has no default value.
      // _t1_str has no default value.
      // _t2_str has no default value.
      // _c2_str has no default value.
      // _cache has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _source has no default value.
      // _inlineType1 has no default value.
      // _fpath1 has no default value.
      // _idim1 has no default value.
      // _zeroVector has no default value.
      // _crefExp1 has no default value.
      // _crefExp2 has no default value.
      // _breakDAEElements has no default value.
      // _elts has no default value.
      // _equalityConstraintFunction has no default value.
      // _dims has no default value.
      // _dims2 has no default value.
      // _crefs1 has no default value.
      // _crefs2 has no default value.
      // _const1 has no default value.
      // _const2 has no default value.
      // _lhsl has no default value.
      // _rhsl has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp6 = omc_DAEUtil_streamBool(threadData, _ct);
          if (0 /* false */ != tmp6) goto goto_2;

          /* Pattern-matching assignment */
          tmp7 = omc_InnerOuter_outerConnection(threadData, _io1, _io2);
          if (1 /* true */ != tmp7) goto goto_2;

          /* Pattern-matching tuple assignment */
          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;

          /* Pattern-matching tuple assignment */
          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_LIT68;
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp15 = (omc_SCodeUtil_isParameterOrConst(threadData, _vt1) && omc_SCodeUtil_isParameterOrConst(threadData, _vt2));
          if (1 /* true */ != tmp15) goto goto_2;

          /* Pattern-matching assignment */
          tmp16 = omc_Types_basicType(threadData, omc_Types_arrayElementType(threadData, _t1));
          if (1 /* true */ != tmp16) goto goto_2;

          /* Pattern-matching assignment */
          tmp17 = omc_Types_basicType(threadData, omc_Types_arrayElementType(threadData, _t2));
          if (1 /* true */ != 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 /* true */, _info ,&_crefExp1, NULL);

          tmpMeta20 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t2, _const2);
          _cache = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _crefExp2, tmpMeta20, 1 /* true */, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp22 = omc_Types_basicType(threadData, _t1);
          if (1 /* true */ != tmp22) goto goto_2;

          /* Pattern-matching assignment */
          tmp23 = omc_Types_basicType(threadData, _t2);
          if (1 /* true */ != 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_LIT68;
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmpMeta33 = omc_Types_arrayElementType(threadData, _t1);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,9,4) == 0) goto goto_2;
          

          /* Pattern-matching assignment */
          tmpMeta34 = omc_Types_arrayElementType(threadData, _t2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta34,9,4) == 0) goto goto_2;
          

          /* Pattern-matching assignment */
          tmp35 = omc_Expression_dimensionsKnownAndEqual(threadData, _dim1, _dim2);
          if (1 /* true */ != tmp35) goto goto_2;

          omc_Expression_dimensionSize(threadData, _dim1);

          _crefs1 = omc_ComponentReference_expandCref(threadData, _c1, 0 /* false */);

          _crefs2 = omc_ComponentReference_expandCref(threadData, _c2, 0 /* false */);

          _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          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));

          /* Pattern-matching assignment */
          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));

          /* Pattern-matching assignment */
          tmp50 = omc_Expression_dimensionsKnownAndEqual(threadData, _dim1, _dim2);
          if (1 /* true */ != tmp50) goto goto_2;

          omc_Expression_dimensionSize(threadData, _dim1);

          _crefs1 = omc_ComponentReference_expandCref(threadData, _c1, 0 /* false */);

          _crefs2 = omc_ComponentReference_expandCref(threadData, _c2, 0 /* false */);

          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _dims = omc_Types_getDimensions(threadData, _t1);

          _dims2 = omc_Types_getDimensions(threadData, _t2);

          /* Pattern-matching assignment */
          tmp51 = omc_List_isEqualOnTrue(threadData, _dims, _dims2, boxvar_Expression_dimensionsKnownAndEqual);
          if (1 /* true */ != 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_LIT68;
          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 /* true */ != 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,4) == 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,4) == 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  /* pattern as ty=Integer */;
          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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_LIT78, _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_LIT79, tmpMeta64);
          _equalityConstraintFunctionReturnType = tmpMeta66;

          _source = omc_ElementSource_addAdditionalComment(threadData, _source, _OMC_LIT80);

          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 /* false */), mmc_mk_boolean(0 /* false */), mmc_mk_boolean(0 /* false */), mmc_mk_boolean(0 /* false */), _inlineType1, _OMC_LIT81);
          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_LIT82, _OMC_LIT83, _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 /* true */ != 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  /* pattern as ty=Integer */;
          _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;
          /* Pattern matching succeeded */
          _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_LIT78, _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_LIT79, tmpMeta88);
          _equalityConstraintFunctionReturnType = tmpMeta90;

          _source = omc_ElementSource_addAdditionalComment(threadData, _source, _OMC_LIT80);

          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 /* false */), mmc_mk_boolean(0 /* false */), mmc_mk_boolean(0 /* false */), mmc_mk_boolean(0 /* false */), _inlineType1, _OMC_LIT81);
          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_LIT82, _OMC_LIT83, _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;
          /* Pattern matching succeeded */
          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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,4) == 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,4) == 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;
          /* Pattern matching succeeded */
          _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_LIT68;
          tmpMeta[0+5] = _graph;
          goto tmp3_done;
        }
        case 11: {
          modelica_metatype tmpMeta106;
          modelica_metatype tmpMeta107;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_8,9,4) == 0) goto tmp3_end;
          tmpMeta106 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_8), 3));
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_11,9,4) == 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;
          /* Pattern matching succeeded */
          _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;
          /* Pattern matching succeeded */
          _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_LIT84, 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_LIT84, 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_LIT87, tmpMeta110, _info);
          goto goto_2;
          goto tmp3_done;
        }
        case 13: {
          modelica_boolean tmp111;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp111 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp111) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT88);
          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
  { /* match expression */
    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;
      // _cref_str1 has no default value.
      // _cref_str2 has no default value.
      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;
          /* Pattern matching succeeded */
          _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_LIT91, tmpMeta5, _inInfo);
          goto goto_1;
          goto tmp2_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          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
  // _outIsSignal has no default value.
  { /* match expression */
    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;
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          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;
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          goto tmp3_done;
        }
        case 2: {
          
          /* Pattern matching succeeded */
          tmp1 = 0 /* false */;
          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
  { /* matchcontinue expression */
    {
      modelica_string _cref_str1 = NULL;
      modelica_string _cref_str2 = NULL;
      volatile mmc_switch_type tmp3;
      int tmp4;
      // _cref_str1 has no default value.
      // _cref_str2 has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp5 = (omc_InstSection_isSignalSource(threadData, _inLhsDirection, _inLhsFace, _inLhsVisibility) && omc_InstSection_isSignalSource(threadData, _inRhsDirection, _inRhsFace, _inRhsVisibility));
          if (0 /* false */ != tmp5) goto goto_1;
          goto tmp2_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          /* Pattern matching succeeded */
          _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_LIT95, 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
  { /* matchcontinue expression */
    {
      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;
      // _cref_str1 has no default value.
      // _cref_str2 has no default value.
      // _pre_str1 has no default value.
      // _pre_str2 has no default value.
      // _err_strl has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp5 = omc_DAEUtil_connectorTypeEqual(threadData, _inLhsConnectorType, _inRhsConnectorType);
          if (1 /* true */ != tmp5) goto goto_1;
          goto tmp2_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_boolean tmp8;
          modelica_metatype tmpMeta9;
          /* Pattern matching succeeded */
          _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_LIT98, _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
  { /* matchcontinue expression */
    {
      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;
      // _t1 has no default value.
      // _t2 has no default value.
      // _cs1 has no default value.
      // _cs2 has no default value.
      // _cref_str1 has no default value.
      // _cref_str2 has no default value.
      // _str1 has no default value.
      // _str2 has no default value.
      // _dims1 has no default value.
      // _dims2 has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp5 = omc_Types_equivtypesOrRecordSubtypeOf(threadData, _inLhsType, _inRhsType);
          if (1 /* true */ != tmp5) goto goto_1;
          goto tmp2_done;
        }
        case 1: {
          modelica_boolean tmp6;
          modelica_metatype tmpMeta7;
          /* Pattern matching succeeded */
          _t1 = omc_Types_arrayElementType(threadData, _inLhsType);

          _t2 = omc_Types_arrayElementType(threadData, _inRhsType);

          /* Pattern-matching assignment */
          tmp6 = omc_Types_equivtypesOrRecordSubtypeOf(threadData, _t1, _t2);
          if (0 /* false */ != 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_LIT101, 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;
          /* Pattern matching succeeded */
          _dims1 = omc_Types_getDimensions(threadData, _inLhsType);

          _dims2 = omc_Types_getDimensions(threadData, _inRhsType);

          /* Pattern-matching assignment */
          tmp8 = omc_List_isEqualOnTrue(threadData, _dims1, _dims2, boxvar_Expression_dimensionsEqual);
          if (0 /* false */ != tmp8) goto goto_1;

          /* Pattern-matching assignment */
          tmp9 = (listEmpty(_dims1) && listEmpty(_dims2));
          if (0 /* false */ != tmp9) goto goto_1;

          _cref_str1 = omc_ComponentReference_printComponentRefStr(threadData, _inLhsCref);

          _cref_str2 = omc_ComponentReference_printComponentRefStr(threadData, _inRhsCref);

          tmpMeta10 = stringAppend(_OMC_LIT102,omc_ExpressionDump_dimensionsString(threadData, _dims1));
          tmpMeta11 = stringAppend(tmpMeta10,_OMC_LIT103);
          _str1 = tmpMeta11;

          tmpMeta12 = stringAppend(_OMC_LIT102,omc_ExpressionDump_dimensionsString(threadData, _dims2));
          tmpMeta13 = stringAppend(tmpMeta12,_OMC_LIT103);
          _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_LIT106, 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
  // _lhs_ct has no default value.
  // _rhs_ct has no default value.
  // _lhs_dir has no default value.
  // _rhs_dir has no default value.
  // _lhs_io has no default value.
  // _rhs_io has no default value.
  // _lhs_vis has no default value.
  // _rhs_vis has no default value.
  omc_ComponentReference_checkCrefSubscriptsBounds(threadData, _inLhsCref, _inInfo);

  omc_ComponentReference_checkCrefSubscriptsBounds(threadData, _inRhsCref, _inInfo);

  /* Pattern-matching assignment */
  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;

  /* Pattern-matching assignment */
  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
  { /* matchcontinue expression */
    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;
      // _state has no default value.
      // _tp has no default value.
      // _str has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          goto tmp2_done;
        }
        case 1: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,1) == 0) goto tmp2_end;
          
          tmp3 += 9; /* Pattern matching succeeded; we may skip some cases if we fail */
          goto tmp2_done;
        }
        case 2: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,2,1) == 0) goto tmp2_end;
          
          tmp3 += 8; /* Pattern matching succeeded; we may skip some cases if we fail */
          goto tmp2_done;
        }
        case 3: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
          
          tmp3 += 7; /* Pattern matching succeeded; we may skip some cases if we fail */
          goto tmp2_done;
        }
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,5) == 0) goto tmp2_end;
          
          tmp3 += 6; /* Pattern matching succeeded; we may skip some cases if we fail */
          goto tmp2_done;
        }
        case 5: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,4,1) == 0) goto tmp2_end;
          
          tmp3 += 5; /* Pattern matching succeeded; we may skip some cases if we fail */
          goto tmp2_done;
        }
        case 6: {
          modelica_metatype tmpMeta5;
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,4) == 0) goto tmp2_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
          
          _state = tmpMeta5;
          /* Pattern matching succeeded */
          omc_ClassInf_valid(threadData, _state, _OMC_LIT107);
          goto tmp2_done;
        }
        case 7: {
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,4) == 0) goto tmp2_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
          
          _state = tmpMeta6;
          tmp3 += 3; /* Pattern matching succeeded; we may skip some cases if we fail */
          omc_ClassInf_valid(threadData, _state, _OMC_LIT108);
          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;
          /* Pattern matching succeeded */
          omc_ClassInf_valid(threadData, _state, _OMC_LIT107);
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          omc_ClassInf_valid(threadData, _state, _OMC_LIT108);
          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;
          /* Pattern matching succeeded */
          omc_InstSection_validConnector(threadData, _tp, _inCref, _inInfo);
          goto tmp2_done;
        }
        case 11: {
          modelica_boolean tmp10;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp10 = omc_ConnectUtil_isExpandable(threadData, _inCref);
          if (1 /* true */ != tmp10) goto goto_1;
          goto tmp2_done;
        }
        case 12: {
          modelica_metatype tmpMeta11;
          
          /* Pattern matching succeeded */
          _str = omc_ComponentReference_printComponentRefStr(threadData, _inCref);

          tmpMeta11 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT111, 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
  // _outDir has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inDir;
    {
      int tmp4;
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
        case 3: {
          
          /* Pattern matching succeeded */
          tmpMeta1 = _OMC_LIT112;
          goto tmp3_done;
        }
        case 4: {
          
          /* Pattern matching succeeded */
          tmpMeta1 = _OMC_LIT113;
          goto tmp3_done;
        }
        case 5: {
          
          /* Pattern matching succeeded */
          tmpMeta1 = _OMC_LIT24;
          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
  // _isConnector has no default value.
  { /* match expression */
    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,4) == 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 /* false */ != tmp8) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          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 /* false */ != tmp11) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          goto tmp3_done;
        }
        case 2: {
          
          /* Pattern matching succeeded */
          tmp1 = 0 /* false */;
          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
  // _outState has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _ty;
    {
      modelica_metatype _state = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _state has no default value.
      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,4) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
          
          _state = tmpMeta6;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outSets has no default value.
  // _outDae has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  { /* match expression */
    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;
      // _impl has no default value.
      // _sets has no default value.
      // _dae has no default value.
      // _dae1 has no default value.
      // _dae2 has no default value.
      // _env has no default value.
      // _pre has no default value.
      // _c1 has no default value.
      // _c2 has no default value.
      // _c1_full has no default value.
      // _c2_full has no default value.
      // _cache has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _names has no default value.
      // _name has no default value.
      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;
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _sets;
          tmpMeta[0+4] = _OMC_LIT68;
          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;
          /* Pattern matching succeeded */
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  // _outEnv has no default value.
  { /* match expression */
    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;
      // _cache has no default value.
      // _topEnv has no default value.
      // _veCref has no default value.
      // _qualCref has no default value.
      // _veAttr has no default value.
      // _currentAttr has no default value.
      // _veTy has no default value.
      // _currentTy has no default value.
      // _veBinding has no default value.
      // _currentBinding has no default value.
      // _veCnstForRange has no default value.
      // _currentCnstForRange has no default value.
      // _veEnv has no default value.
      // _updatedEnv has no default value.
      // _currentEnv has no default value.
      // _realEnv has no default value.
      // _forLoopScope has no default value.
      // _currentName has no default value.
      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;
          /* Pattern matching succeeded */
          _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 /* false */), _veCnstForRange);
          _updatedEnv = omc_FGraph_updateComp(threadData, _realEnv, tmpMeta7, _OMC_LIT114, _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;
          /* Pattern matching succeeded */
          _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 /* false */), _veCnstForRange);
          _currentEnv = omc_FGraph_updateComp(threadData, _realEnv, tmpMeta8, _OMC_LIT114, _veEnv);

          _currentEnv = omc_FGraph_pushScope(threadData, _currentEnv, _forLoopScope);
          /* Tail recursive call */
          _inCache = _cache;
          _inEnv = _topEnv;
          _virtualExpandableCref = _qualCref;
          _virtualExpandableAttr = _currentAttr;
          _virtualExpandableTy = _currentTy;
          _virtualExpandableBinding = _currentBinding;
          _virtualExpandableCnstForRange = _currentCnstForRange;
          _virtualExpandableEnv = _currentEnv;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          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
  // _outDAE has no default value.
  { /* match expression */
    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;
      // _daeExpandable has no default value.
      // _lst has no default value.
      // _cref has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_1)) goto tmp3_end;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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_LIT118, _io, _OMC_LIT119, _source, 1 /* true */);

          _daeExpandable = omc_DAEUtil_joinDaes(threadData, _daeExpandable, _acc);
          /* Tail recursive call */
          _crefs = _lst;
          _acc = _daeExpandable;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          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
  // _outDAE has no default value.
  { /* match expression */
    {
      modelica_metatype _daeDims = NULL;
      modelica_metatype _daeExpandable = NULL;
      modelica_metatype _crefs = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _daeDims has no default value.
      // _daeExpandable has no default value.
      // _crefs has no default value.
      tmp4 = 0;
      for (; tmp4 < 1; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          /* Pattern matching succeeded */
          _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_LIT118, _io, _OMC_LIT119, _source, 1 /* true */);
          }
          else
          {
            _crefs = omc_ComponentReference_expandCref(threadData, _cref, 0 /* false */);

            _daeExpandable = omc_InstSection_daeDeclareList(threadData, _inCache, _inParentEnv, _inClassEnv, listReverse(_crefs), _state, _ty, _attrs, _vis, _io, _source, _OMC_LIT68);
          }
          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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outSets has no default value.
  // _outDae has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _c1_1 has no default value.
      // _c2_1 has no default value.
      // _c1_2 has no default value.
      // _c2_2 has no default value.
      // _c1p has no default value.
      // _c2p has no default value.
      // _attr1 has no default value.
      // _attr2 has no default value.
      // _attr has no default value.
      // _ct1 has no default value.
      // _ct2 has no default value.
      // _impl has no default value.
      // _ty1 has no default value.
      // _ty2 has no default value.
      // _ty has no default value.
      // _sets has no default value.
      // _dae has no default value.
      // _daeExpandable has no default value.
      // _env has no default value.
      // _envExpandable has no default value.
      // _envComponent has no default value.
      // _env1 has no default value.
      // _env2 has no default value.
      // _envComponentEmpty has no default value.
      // _pre has no default value.
      // _c1 has no default value.
      // _c2 has no default value.
      // _c1_prefix has no default value.
      // _cache has no default value.
      // _io1 has no default value.
      // _io2 has no default value.
      // _vt1 has no default value.
      // _vt2 has no default value.
      // _prl1 has no default value.
      // _prl2 has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _componentName has no default value.
      // _binding has no default value.
      // _cnstForRange has no default value.
      // _state has no default value.
      // _variables1 has no default value.
      // _variables2 has no default value.
      // _variablesUnion has no default value.
      // _source has no default value.
      // _vis1 has no default value.
      // _vis2 has no default value.
      // _arrDims has no default value.
      // _daeDims has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta11 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _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;

          /* Pattern-matching tuple assignment */
          tmpMeta17 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0 /* false */, _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 /* true */ ,&_ty1, NULL, NULL);

          _attr2 = omc_Lookup_lookupConnectorVar(threadData, _env, _c2_2, 1 /* true */ ,&_ty2, NULL, NULL);

          /* Pattern-matching assignment */
          tmpMeta18 = _attr1;
          tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,0) == 0) goto goto_2;
          

          /* Pattern-matching assignment */
          tmpMeta20 = _attr2;
          tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,0,0) == 0) goto goto_2;
          

          /* Pattern-matching assignment */
          tmp22 = omc_Types_isExpandableConnector(threadData, _ty1);
          if (1 /* true */ != tmp22) goto goto_2;

          /* Pattern-matching assignment */
          tmp23 = omc_Types_isExpandableConnector(threadData, _ty2);
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta25 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0 /* false */, _pre, _info, &tmpMeta24);
          _cache = tmpMeta25;
          if (!optionNone(tmpMeta24)) goto goto_2;

          /* Pattern-matching tuple assignment */
          tmpMeta29 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching tuple assignment */
          tmpMeta31 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _pre, _info, &tmpMeta30);
          _cache = tmpMeta31;
          if (!optionNone(tmpMeta30)) goto goto_2;

          tmpMeta32 = stringAppend(_OMC_LIT120,omc_PrefixUtil_printPrefixStrIgnoreNoPre(threadData, _pre));
          tmpMeta33 = stringAppend(tmpMeta32,_OMC_LIT7);
          tmpMeta34 = stringAppend(tmpMeta33,omc_Dump_printComponentRefStr(threadData, _c1));
          tmpMeta35 = stringAppend(tmpMeta34,_OMC_LIT121);
          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_LIT122);
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta41 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _pre, _info, &tmpMeta40);
          _cache = tmpMeta41;
          if (!optionNone(tmpMeta40)) goto goto_2;

          /* Pattern-matching tuple assignment */
          tmpMeta47 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0 /* false */, _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 /* true */ ,&_ty2, NULL, NULL);

          /* Pattern-matching assignment */
          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);

          /* Pattern-matching tuple assignment */
          tmpMeta58 = omc_Static_elabCref(threadData, _cache, _env, _c1_prefix, _impl, 0 /* false */, _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 /* true */ ,&_ty1, NULL, NULL);

          /* Pattern-matching assignment */
          tmp59 = omc_Types_isExpandableConnector(threadData, _ty1);
          if (1 /* true */ != 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);

          /* Pattern-matching assignment */
          tmp60 = (listLength(_variablesUnion) > ((modelica_integer) 1));
          if (1 /* true */ != 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_LIT24, _io2, _vis2);
          tmpMeta62 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _componentName, tmpMeta61, _ty2, _OMC_LIT123, mmc_mk_boolean(0 /* false */), mmc_mk_none());
          tmpMeta63 = mmc_mk_box7(3, &SCode_Attributes_ATTR__desc, _arrDims, _OMC_LIT127, _OMC_LIT23, _OMC_LIT14, _OMC_LIT24, _OMC_LIT128);
          tmpMeta64 = mmc_mk_box9(6, &SCode_Element_COMPONENT__desc, _componentName, _OMC_LIT126, tmpMeta63, _OMC_LIT131, _OMC_LIT132, _OMC_LIT133, mmc_mk_none(), _OMC_LIT135);
          _envExpandable = omc_FGraph_mkComponentNode(threadData, _envExpandable, tmpMeta62, tmpMeta64, _OMC_LIT82, _OMC_LIT114, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta66 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _pre, _info, &tmpMeta65);
          _cache = tmpMeta66;
          if (!optionNone(tmpMeta65)) goto goto_2;

          /* Pattern-matching tuple assignment */
          tmpMeta72 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0 /* false */, _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 /* true */ ,&_ty2, NULL, NULL);

          /* Pattern-matching assignment */
          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);

          /* Pattern-matching tuple assignment */
          tmpMeta83 = omc_Static_elabCref(threadData, _cache, _env, _c1_prefix, _impl, 0 /* false */, _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 /* true */ ,&_ty1, NULL, NULL);

          /* Pattern-matching assignment */
          tmp84 = omc_Types_isExpandableConnector(threadData, _ty1);
          if (1 /* true */ != 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);

          /* Pattern-matching assignment */
          tmp85 = (listLength(_variablesUnion) > ((modelica_integer) 1));
          if (0 /* false */ != 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_LIT24, _io2, _vis2);
          tmpMeta87 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _componentName, tmpMeta86, _ty2, _OMC_LIT123, mmc_mk_boolean(0 /* false */), mmc_mk_none());
          tmpMeta88 = mmc_mk_box7(3, &SCode_Attributes_ATTR__desc, _arrDims, _OMC_LIT127, _OMC_LIT23, _OMC_LIT14, _OMC_LIT24, _OMC_LIT128);
          tmpMeta89 = mmc_mk_box9(6, &SCode_Element_COMPONENT__desc, _componentName, _OMC_LIT126, tmpMeta88, _OMC_LIT131, _OMC_LIT132, _OMC_LIT133, mmc_mk_none(), _OMC_LIT135);
          _envExpandable = omc_FGraph_mkComponentNode(threadData, _envExpandable, tmpMeta87, tmpMeta89, _OMC_LIT82, _OMC_LIT114, _envComponentEmpty);

          _env = omc_InstSection_updateEnvComponentsOnQualPath(threadData, _cache, _env, _c1_2, _attr, _ty, _binding, _cnstForRange, _envExpandable);

          /* Pattern-matching tuple assignment */
          tmpMeta94 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _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 /* true */ ,&_ty1, NULL, NULL);

          /* Pattern-matching assignment */
          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_LIT138;

          _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_LIT24, _OMC_LIT128);
          _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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta107 = omc_Static_elabCref(threadData, _cache, _env, _c1, _impl, 0 /* false */, _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;

          /* Pattern-matching tuple assignment */
          tmpMeta112 = omc_Static_elabCref(threadData, _cache, _env, _c2, _impl, 0 /* false */, _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 /* true */ ,&_ty1, NULL, NULL);

          omc_Lookup_lookupConnectorVar(threadData, _env, _c2_2, 1 /* true */ ,&_ty2, NULL, NULL);

          /* Pattern-matching assignment */
          tmp113 = omc_Types_isExpandableConnector(threadData, _ty1);
          if (0 /* false */ != tmp113) goto goto_2;

          /* Pattern-matching assignment */
          tmp114 = omc_Types_isExpandableConnector(threadData, _ty2);
          if (0 /* false */ != 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  { /* matchcontinue expression */
    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;
      // _cr has no default value.
      // _prop has no default value.
      // _const has no default value.
      // _pre has no default value.
      // _s1 has no default value.
      // _refs has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment, wild first pattern */
          omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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);

          /* Pattern-matching assignment */
          tmp11 = omc_Types_isParameterOrConstant(threadData, _const);
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment, wild first pattern */
          omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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);

          /* Pattern-matching assignment */
          tmp18 = omc_Types_isParameterOrConstant(threadData, _const);
          if (0 /* false */ != 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_LIT141, 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
  // _outGt has no default value.
  // _id1 has no default value.
  // _id2 has no default value.
  /* Pattern-matching assignment */
  tmpMeta1 = _inVar1;
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _id1 = tmpMeta2;

  /* Pattern-matching assignment */
  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
  // _outType has no default value.
  { /* match expression */
    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;
      // _ty has no default value.
      // _dims has no default value.
      // _ci_state has no default value.
      // _vars has no default value.
      // _ec has no default value.
      {
        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;
          /* Pattern matching succeeded */
          _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,4) == 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;
          /* Pattern matching succeeded */
          _vars = omc_List_sort(threadData, _vars, boxvar_InstSection_connectorCompGt);
          tmpMeta11 = mmc_mk_box5(12, &DAE_Type_T__COMPLEX__desc, _ci_state, _vars, _ec, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 5))));
          tmpMeta1 = tmpMeta11;
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          /* Pattern matching succeeded */
          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 has no default value.
  // _outAttr has no default value.
  // _connectorType has no default value.
  // _variability has no default value.
  // _innerOuter has no default value.
  // _face has no default value.
  // _ty has no default value.
  // _deleted has no default value.
  // _status has no default value.
  // _is_expandable has no default value.
  _outCref = omc_ComponentReference_toExpCref(threadData, _connectorCref);

  /* Pattern-matching tuple assignment */
  tmpMeta4 = omc_Lookup_lookupConnectorVar(threadData, _env, _outCref, 1 /* true */, &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_LIT142;

    _outAttr = _OMC_LIT27;
  }
  else
  {
    /* Pattern-matching tuple assignment */
    tmpMeta13 = omc_Static_elabCrefNoEval(threadData, _inCache, _env, _connectorCref, _impl, 0 /* false */, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outCref; DAE.ComponentRef */
  /* skip box _outAttr; DAE.Attributes */
  /* skip box _connectorType; DAE.ConnectorType */
  /* skip box _variability; SCode.Variability */
  /* skip box _innerOuter; Absyn.InnerOuter */
  /* skip box _face; DAE.Connect.Face */
  /* skip box _ty; DAE.Type */
  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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outSets has no default value.
  // _outDae has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _c1_2 has no default value.
      // _c2_2 has no default value.
      // _attr1 has no default value.
      // _attr2 has no default value.
      // _ct1 has no default value.
      // _impl has no default value.
      // _ty1 has no default value.
      // _ty2 has no default value.
      // _f1 has no default value.
      // _f2 has no default value.
      // _sets has no default value.
      // _dae has no default value.
      // _env has no default value.
      // _pre has no default value.
      // _c1 has no default value.
      // _c2 has no default value.
      // _cache has no default value.
      // _io1 has no default value.
      // _io2 has no default value.
      // _vt1 has no default value.
      // _vt2 has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _subs1 has no default value.
      // _subs2 has no default value.
      // _crefs1 has no default value.
      // _crefs2 has no default value.
      // _s1 has no default value.
      // _s2 has no default value.
      // _del1 has no default value.
      // _del2 has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp6 = omc_AbsynUtil_crefEqual(threadData, _c1, _c2);
          if (1 /* true */ != 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_LIT145, tmpMeta7, _info);
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _sets;
          tmpMeta[0+4] = _OMC_LIT68;
          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;
          /* Pattern matching succeeded */
          _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_LIT68;
          }
          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;
          /* Pattern matching succeeded */
          omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT146);

          /* Pattern-matching assignment */
          tmp8 = omc_System_getHasExpandableConnectors(threadData);
          if (1 /* true */ != 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_LIT146);
          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;
          /* Pattern matching succeeded */
          omc_ErrorExt_rollBack(threadData, _OMC_LIT146);

          _subs1 = omc_AbsynUtil_getSubsFromCref(threadData, _c1, 1 /* true */, 1 /* true */);

          _crefs1 = omc_AbsynUtil_getCrefsFromSubs(threadData, _subs1, 1 /* true */, 1 /* true */);

          _subs2 = omc_AbsynUtil_getSubsFromCref(threadData, _c2, 1 /* true */, 1 /* true */);

          _crefs2 = omc_AbsynUtil_getCrefsFromSubs(threadData, _subs2, 1 /* true */, 1 /* true */);

          _s1 = omc_Dump_printComponentRefStr(threadData, _c1);

          _s2 = omc_Dump_printComponentRefStr(threadData, _c2);

          tmpMeta9 = stringAppend(_OMC_LIT147,_s1);
          tmpMeta10 = stringAppend(tmpMeta9,_OMC_LIT148);
          tmpMeta11 = stringAppend(tmpMeta10,_s2);
          tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT149);
          _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;
          /* Pattern matching succeeded */
          /* Check guard condition after assignments */
          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_LIT68;
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp13 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp13) goto goto_2;

          tmpMeta14 = stringAppend(_OMC_LIT150,omc_Dump_printComponentRefStr(threadData, _c1));
          tmpMeta15 = stringAppend(tmpMeta14,_OMC_LIT148);
          tmpMeta16 = stringAppend(tmpMeta15,omc_Dump_printComponentRefStr(threadData, _c2));
          tmpMeta17 = stringAppend(tmpMeta16,_OMC_LIT149);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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;
  // _tyEl has no default value.
  { /* matchcontinue expression */
    {
      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: {
          /* Pattern matching succeeded */
          if(omc_Types_isArray(threadData, _ty))
          {
            _tyEl = omc_Types_arrayElementType(threadData, _ty);
          }
          else
          {
            _tyEl = _ty;
          }

          _exp = omc_Types_matchType(threadData, _exp, _tyEl, _OMC_LIT69, 0 /* false */, NULL);
          goto tmp2_done;
        }
        case 1: {
          modelica_metatype tmpMeta5;
          /* Pattern matching succeeded */
          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_LIT153, 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))
  {
    { /* match expression */
      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_LIT157), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp7_end;
            
            /* Pattern matching succeeded */
            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_LIT157), MMC_STRINGDATA(tmpMeta14)) != 0) goto tmp7_end;
            
            /* Pattern matching succeeded */
            goto tmp7_done;
          }
          case 2: {
            modelica_metatype tmpMeta15;
            
            /* Pattern matching succeeded */
            if(omc_Expression_expHasInitial(threadData, _exp))
            {
              tmpMeta15 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _aexp), MMC_REFSTRUCTLIT(mmc_nil));
              omc_Error_addSourceMessage(threadData, _OMC_LIT156, 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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outCondition has no default value.
  // _outEquations has no default value.
  // _outGraph has no default value.
  // _cond has no default value.
  // _body has no default value.
  // _prop has no default value.
  // _aexps has no default value.
  // _dexps has no default value.
  // _dexp has no default value.
  // _ty has no default value.
  // _isClock has no default value.
  /* Pattern-matching assignment */
  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 /* false */;

  { /* match expression */
    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;
          /* Pattern matching succeeded */
          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_LIT69, 1 /* true */);
          goto tmp6_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          _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 /* true */;
          }
          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);
  }

  /* Pattern-matching tuple assignment */
  tmpMeta19 = omc_Inst_instList(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, boxvar_InstSection_instEquation, _body, _inImpl, 1 /* true */, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outCondition; DAE.Exp */
  /* skip box _outEquations; list<DAE.Element> */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  // _outCache has no default value.
  // _outElseIfBranches has no default value.
  
  
  { /* matchcontinue expression */
    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;
      // _env has no default value.
      // _impl has no default value.
      // _e_1 has no default value.
      // _e_2 has no default value.
      // _prop has no default value.
      // _stmts has no default value.
      // _tail_1 has no default value.
      // _e has no default value.
      // _l has no default value.
      // _tail has no default value.
      // _cache has no default value.
      // _pre has no default value.
      // _ih has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          /* Pattern matching succeeded */
          _cache = omc_Static_elabExp(threadData, _cache, _env, _e, _impl, 1 /* true */, _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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp13 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp13) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT158);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outElseIfBranches; list<tuple<DAE.Exp, DAE.Properties, list<DAE.Statement>>> */
  return _outCache;
}

PROTECTED_FUNCTION_STATIC void omc_InstSection_checkForConnectInIfBranch2(threadData_t *threadData, modelica_metatype _inEquation)
{
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  { /* match expression */
    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;
      // _cr1 has no default value.
      // _cr2 has no default value.
      // _info has no default value.
      // _eqs has no default value.
      // _cr1_str has no default value.
      // _cr2_str has no default value.
      {
        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;
          /* Pattern matching succeeded */
          _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_LIT161, 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;
          /* Pattern matching succeeded */
          omc_InstSection_checkForConnectInIfBranch(threadData, _eqs);
          goto tmp2_done;
        }
        default:
        tmp2_default: OMC_LABEL_UNUSED; {
          
          /* Pattern matching succeeded */
          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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outState has no default value.
  // _outEquations has no default value.
  
  
  
  
  
  { /* match expression */
    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;
      // _cache has no default value.
      // _env has no default value.
      // _ih has no default value.
      // _state has no default value.
      // _seq has no default value.
      // _rest_seq has no default value.
      // _deq has no default value.
      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;
          /* Pattern matching succeeded */
          _cache = omc_InstSection_instInitialIfEqBranch(threadData, _cache, _env, _ih, _inPrefix, _state, _seq, _inImpl ,&_env ,&_ih ,&_state ,&_deq);
          tmpMeta8 = mmc_mk_cons(_deq, _inAccumEqs);
          /* Tail recursive call */
          _inCache = _cache;
          _inEnv = _env;
          _inIH = _ih;
          _inState = _state;
          _inBranches = _rest_seq;
          _inAccumEqs = tmpMeta8;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 1: {
          if (!listEmpty(tmp4_5)) goto tmp3_end;
          
          /* Pattern matching succeeded */
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outState; ClassInf.State */
  /* skip box _outEquations; list<list<DAE.Element>> */
  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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outState has no default value.
  // _outEquations has no default value.
  omc_InstSection_checkForConnectInIfBranch(threadData, _inEquations);

  /* Pattern-matching tuple assignment */
  tmpMeta6 = omc_Inst_instList(threadData, _inCache, _inEnv, _inIH, _inPrefix, _OMC_LIT164, _inState, boxvar_InstSection_instInitialEquation, _inEquations, _inImpl, 1 /* true */, _OMC_LIT165, &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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outState; ClassInf.State */
  /* skip box _outEquations; list<DAE.Element> */
  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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outState has no default value.
  // _outEquations has no default value.
  
  
  
  
  
  { /* match expression */
    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;
      // _cache has no default value.
      // _env has no default value.
      // _ih has no default value.
      // _state has no default value.
      // _seq has no default value.
      // _rest_seq has no default value.
      // _deq has no default value.
      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;
          /* Pattern matching succeeded */
          _cache = omc_InstSection_instIfEqBranch(threadData, _cache, _env, _ih, _inPrefix, _state, _seq, _inImpl ,&_env ,&_ih ,&_state ,&_deq);
          tmpMeta8 = mmc_mk_cons(_deq, _inAccumEqs);
          /* Tail recursive call */
          _inCache = _cache;
          _inEnv = _env;
          _inIH = _ih;
          _inState = _state;
          _inBranches = _rest_seq;
          _inAccumEqs = tmpMeta8;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 1: {
          if (!listEmpty(tmp4_5)) goto tmp3_end;
          
          /* Pattern matching succeeded */
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outState; ClassInf.State */
  /* skip box _outEquations; list<list<DAE.Element>> */
  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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outState has no default value.
  // _outEquations has no default value.
  omc_InstSection_checkForConnectInIfBranch(threadData, _inEquations);

  /* Pattern-matching tuple assignment */
  tmpMeta6 = omc_Inst_instList(threadData, _inCache, _inEnv, _inIH, _inPrefix, _OMC_LIT164, _inState, boxvar_InstSection_instEquation, _inEquations, _inImpl, 1 /* true */, _OMC_LIT165, &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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outState; ClassInf.State */
  /* skip box _outEquations; list<DAE.Element> */
  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
  // _outExp has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inTuple;
    {
      modelica_metatype _acref = NULL;
      modelica_integer _dimNum;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _acref has no default value.
      // _dimNum has no default value.
      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  /* pattern as ty=Integer */;
          /* Pattern matching succeeded */
          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_LIT168, tmpMeta13, tmpMeta14);
          tmpMeta16 = mmc_mk_box4(18, &Absyn_Exp_RANGE__desc, _OMC_LIT166, 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
  // _outCache has no default value.
  // _outStatements has no default value.
  
  
  { /* matchcontinue expression */
    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;
      // _env_1 has no default value.
      // _env_2 has no default value.
      // _env has no default value.
      // _pre has no default value.
      // _i has no default value.
      // _fst has no default value.
      // _v has no default value.
      // _rest has no default value.
      // _algs has no default value.
      // _initial_ has no default value.
      // _impl has no default value.
      // _cache has no default value.
      // _dims has no default value.
      // _dim has no default value.
      // _stmts has no default value.
      // _stmts1 has no default value.
      // _stmts2 has no default value.
      // _ih has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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  /* pattern as ty=Integer */;
          _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;
          /* Pattern matching succeeded */
          _dim = ((modelica_integer) -1) + _dim;

          tmpMeta15 = mmc_mk_cons(mmc_mk_integer(_dim), _dims);
          _dims = tmpMeta15;

          _env_1 = omc_FGraph_openScope(threadData, _env, _OMC_LIT169, _OMC_LIT170, mmc_mk_none());

          tmpMeta16 = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _fst, _OMC_LIT172);
          _env_2 = omc_FGraph_addForIterator(threadData, _env_1, _i, _OMC_LIT171, tmpMeta16, _OMC_LIT173, _OMC_LIT175);

          _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp18 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp18) goto goto_2;

          tmpMeta19 = stringAppend(_OMC_LIT176,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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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
  // _hasWhenStatements has no default value.
  { /* matchcontinue expression */
    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;
      // _rest has no default value.
      // _tb has no default value.
      // _eb has no default value.
      // _lst has no default value.
      // _eib has no default value.
      // _b1 has no default value.
      // _b2 has no default value.
      // _b3 has no default value.
      // _b4 has no default value.
      // _blst has no default value.
      // _slst has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmp1 = 0 /* false */;
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmp1 = 1 /* true */;
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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 /* false */), _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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;
          /* Pattern matching succeeded */
          _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;
          /* Pattern matching succeeded */
          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
  // _outStatement has no default value.
  { /* match expression */
    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;
      // _wild_props has no default value.
      // _wild_count has no default value.
      // _wilds has no default value.
      // _wildCrefExp has no default value.
      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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          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_LIT162, _OMC_LIT21);

          _wilds = omc_List_fill(threadData, _wildCrefExp, _wild_count);

          _wild_props = omc_List_fill(threadData, _OMC_LIT179, _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: {
          
          /* Pattern matching succeeded */
          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;
  // _outStatements has no default value.
  _num_errors = omc_Error_getNumErrorMessages(threadData);
  { /* matchcontinue expression */
    {
      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;
          /* Pattern matching succeeded */
          { /* match expression */
            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;
              // _cond_exp has no default value.
              // _msg_exp has no default value.
              // _level_exp has no default value.
              // _exp has no default value.
              // _cr_exp has no default value.
              // _cond_prop has no default value.
              // _msg_prop has no default value.
              // _level_prop has no default value.
              // _prop has no default value.
              // _cr_prop has no default value.
              // _if_branch has no default value.
              // _else_branch has no default value.
              // _branch has no default value.
              // _else_if_branches has no default value.
              // _aexp has no default value.
              // _sstmts has no default value.
              // _source has no default value.
              // _info has no default value.
              // _when_stmt_opt has no default value.
              // _when_stmt has no default value.
              // _cases has no default value.
              {
                switch (MMC_SWITCH_CAST(valueConstructor(tmp8_1))) {
                case 3: {
                  
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  _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);
                      /* Pattern-matching assignment */
                      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: {
                  
                  /* Pattern matching succeeded */
                  _outCache = omc_InstSection_instForStatement(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _inStatement, _inSource, _inInitial, _inImpl, _inUnrollLoops ,&_outStatements);
                  tmpMeta5 = _outStatements;
                  goto tmp7_done;
                }
                case 6: {
                  
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  if(omc_ClassInf_isFunction(threadData, _inState))
                  {
                    omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT182, _OMC_LIT184, _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);
                      /* Pattern-matching assignment */
                      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;
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  _outCache = omc_Static_elabExp(threadData, _outCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inStatement), 2))), _inImpl, 1 /* true */, _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;
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  _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;
                  /* Pattern matching succeeded */
                  if((!omc_ClassInf_isFunction(threadData, _inState)))
                  {
                    tmpMeta43 = MMC_REFSTRUCTLIT(mmc_nil);
                    omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT187, 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;
                  /* Pattern matching succeeded */
                  /* Pattern-matching assignment */
                  tmp47 = omc_Config_acceptMetaModelicaGrammar(threadData);
                  if (1 /* true */ != 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;
                  /* Pattern matching succeeded */
                  /* Pattern-matching assignment */
                  tmp51 = omc_Config_acceptMetaModelicaGrammar(threadData);
                  if (1 /* true */ != 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_LIT189, _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_LIT189, _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_LIT190)?_OMC_LIT191:_OMC_LIT192), tmpMeta59, tmpMeta60, tmpMeta61, _cases, _OMC_LIT193);
                  _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp65 = (_num_errors == omc_Error_getNumErrorMessages(threadData));
          if (1 /* true */ != tmp65) goto goto_1;

          tmpMeta66 = mmc_mk_cons(omc_SCodeDump_statementStr(threadData, _inStatement, _OMC_LIT197), MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT196, 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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 has no default value.
  // _outExp has no default value.
  // _outProperties has no default value.
  _outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _inExp, _inImpl, 1 /* true */, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outExp; DAE.Exp */
  /* skip box _outProperties; DAE.Properties */
  return _outCache;
}

DLLDirection
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;
  // _outStatements has no default value.
  // _stmts has no default value.
  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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  return _outCache;
}

DLLDirection
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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outDae has no default value.
  // _outState has no default value.
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _env has no default value.
      // _constraints_1 has no default value.
      // _ci_state has no default value.
      // _constraints has no default value.
      // _impl has no default value.
      // _cache has no default value.
      // _pre has no default value.
      // _source has no default value.
      // _dae has no default value.
      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;
          /* Pattern matching succeeded */
          _ci_state = omc_ClassInf_trans(threadData, _ci_state, _OMC_LIT198);

          _source = omc_ElementSource_createElementSource(threadData, _OMC_LIT135, omc_FGraph_getScopePath(threadData, _env), _pre, _OMC_LIT200);

          _cache = omc_Static_elabExpList(threadData, _cache, _env, _constraints, _impl, 1 /* true */, _pre, _OMC_LIT135, _OMC_LIT21 ,&_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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp11 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp11) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT201);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outState; ClassInf.State */
  return _outCache;
}

DLLDirection
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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outDae has no default value.
  // _outSets has no default value.
  // _outState has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _env has no default value.
      // _statements_1 has no default value.
      // _csets has no default value.
      // _ci_state has no default value.
      // _statements has no default value.
      // _impl has no default value.
      // _cache has no default value.
      // _pre has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _source has no default value.
      // _dae has no default value.
      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;
          /* Pattern matching succeeded */
          _source = omc_ElementSource_createElementSource(threadData, _OMC_LIT135, omc_FGraph_getScopePath(threadData, _env), _pre, _OMC_LIT200);

          _cache = omc_InstSection_instStatements(threadData, _cache, _env, _ih, _pre, _ci_state, _statements, _source, _OMC_LIT202, _impl, _unrollForLoops ,&_statements_1);

          tmpMeta7 = mmc_mk_box2(0, boxvar_ExpressionSimplify_simplifyWork, _OMC_LIT204);
          _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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp12 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp12) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT205);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  return _outCache;
}

DLLDirection
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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outDae has no default value.
  // _outSets has no default value.
  // _outState has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _env has no default value.
      // _statements_1 has no default value.
      // _csets has no default value.
      // _ci_state has no default value.
      // _statements has no default value.
      // _stmt has no default value.
      // _impl has no default value.
      // _cache has no default value.
      // _pre has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _source has no default value.
      // _dae has no default value.
      // _s has no default value.
      // _info has no default value.
      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;
          /* Pattern matching succeeded */
          _ci_state = omc_ClassInf_trans(threadData, _ci_state, _OMC_LIT198);

          _source = omc_ElementSource_createElementSource(threadData, _OMC_LIT135, omc_FGraph_getScopePath(threadData, _env), _pre, _OMC_LIT200);

          _cache = omc_InstSection_instStatements(threadData, _cache, _env, _ih, _pre, _ci_state, _statements, _source, _OMC_LIT206, _impl, _unrollForLoops ,&_statements_1);

          tmpMeta7 = mmc_mk_box2(0, boxvar_ExpressionSimplify_simplifyWork, _OMC_LIT204);
          _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;
          /* Pattern matching succeeded */
          tmp15 = 0; /* begin failure */
          MMC_TRY_INTERNAL(mmc_jumper)
            omc_ClassInf_trans(threadData, _ci_state, _OMC_LIT198);
            tmp15 = 1;
          goto goto_16;
          goto_16:;
          MMC_CATCH_INTERNAL(mmc_jumper)
          if (tmp15) {goto goto_2;} /* end failure */

          _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_LIT209, tmpMeta17, _info);
          goto goto_2;
          goto tmp3_done;
        }
        case 2: {
          modelica_boolean tmp18;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp18 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp18) goto goto_2;

          omc_Debug_traceln(threadData, _OMC_LIT210);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  // _dae has no default value.
  { /* match expression */
    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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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
  // _dae has no default value.
  { /* matchcontinue expression */
    {
      modelica_string _s = NULL;
      modelica_metatype _info = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _s has no default value.
      // _info has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp6 = omc_Types_isRecord(threadData, _tp);
          if (1 /* true */ != tmp6) goto goto_2;
          tmpMeta1 = omc_InstSection_makeComplexDaeEquation(threadData, _lhs, _rhs, _source, _initial_);
          goto tmp3_done;
        }
        case 1: {
          modelica_boolean tmp7;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp7 = omc_Types_isExternalObject(threadData, _tp);
          if (1 /* true */ != tmp7) goto goto_2;
          tmpMeta1 = omc_InstSection_makeDaeEquation(threadData, _lhs, _rhs, _source, _initial_);
          goto tmp3_done;
        }
        case 2: {
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp8 = omc_Types_isRecord(threadData, _tp);
          if (0 /* false */ != tmp8) goto goto_2;

          tmpMeta9 = stringAppend(omc_ExpressionDump_printExpStr(threadData, _lhs),_OMC_LIT211);
          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_LIT214, 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;
  // _outStatements has no default value.
  // _ty has no default value.
  // _c has no default value.
  // _env has no default value.
  // _source has no default value.
  // _range has no default value.
  _c = omc_Types_getPropConst(threadData, _inRangeProps);

  if(omc_Types_isParameterOrConstant(threadData, _c))
  {
    { /* matchcontinue expression */
      {
        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;
            /* Pattern matching succeeded */
            /* Pattern-matching tuple assignment */
            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: {
            /* Pattern matching succeeded */
            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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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
  // _outCache has no default value.
  // _outStatements has no default value.
  // _iterator has no default value.
  // _oarange has no default value.
  // _arange has no default value.
  // _range has no default value.
  // _prop has no default value.
  // _body has no default value.
  // _info has no default value.
  // _iter_crefs has no default value.
  /* Pattern-matching assignment */
  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))
  {
    /* Pattern-matching assignment */
    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 /* true */, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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
  // _outCache has no default value.
  // _outStatements has no default value.
  // _ty has no default value.
  // _c has no default value.
  // _range has no default value.
  // _env has no default value.
  // _val has no default value.
  // _str has no default value.
  { /* matchcontinue expression */
    {
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          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);

          /* Pattern-matching assignment */
          tmp7 = omc_Types_isParameterOrConstant(threadData, _c);
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          tmpMeta9 = mmc_mk_cons(omc_SCodeDump_statementStr(threadData, _inStatement, _OMC_LIT197), MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT217, 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outStatements; list<DAE.Statement> */
  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_LIT68;
  // _rhs_idx has no default value.
  _rhs_idxs = listReverse(_inRhsIndices);
  // _dae has no default value.
  {
    modelica_metatype _lhs_idx;
    for (tmpMeta1 = listReverse(_inLhsIndices); !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
    {
      _lhs_idx = MMC_CAR(tmpMeta1);
      /* Pattern-matching assignment */
      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
  // _dae has no default value.
  { /* matchcontinue expression */
    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;
      // _b has no default value.
      // _b1 has no default value.
      // _b2 has no default value.
      // _ds has no default value.
      // _dim has no default value.
      // _lhs_dim has no default value.
      // _rhs_dim has no default value.
      // _lhs_idxs has no default value.
      // _rhs_idxs has no default value.
      // _t has no default value.
      // _lhs_str has no default value.
      // _rhs_str has no default value.
      // _eq_str has no default value.
      // _elt has no default value.
      // _source has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _b1 = omc_Expression_containVectorFunctioncall(threadData, _lhs);

          _b2 = omc_Expression_containVectorFunctioncall(threadData, _rhs);

          /* Pattern-matching assignment */
          tmp6 = (_b1 || _b2);
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          _b1 = omc_Expression_containVectorFunctioncall(threadData, _lhs);

          _b2 = omc_Expression_containVectorFunctioncall(threadData, _rhs);

          /* Pattern-matching assignment */
          tmp11 = (_b1 || _b2);
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp20 = omc_Config_splitArrays(threadData);
          if (0 /* false */ != tmp20) goto goto_2;

          /* Pattern-matching assignment */
          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;

          /* Pattern-matching assignment */
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp33 = omc_Config_splitArrays(threadData);
          if (1 /* true */ != tmp33) goto goto_2;

          /* Pattern-matching assignment */
          tmp34 = omc_Expression_dimensionKnown(threadData, _dim);
          if (1 /* true */ != tmp34) goto goto_2;

          /* Pattern-matching assignment */
          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;

          /* Pattern-matching assignment */
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp46 = omc_Config_splitArrays(threadData);
          if (1 /* true */ != tmp46) goto goto_2;

          /* Pattern-matching assignment */
          tmp47 = omc_Expression_dimensionKnown(threadData, _dim);
          if (1 /* true */ != tmp47) goto goto_2;

          /* Pattern-matching assignment */
          tmp48 = (((omc_Expression_isRange(threadData, _lhs) || omc_Expression_isRange(threadData, _rhs)) || omc_Expression_isReduction(threadData, _lhs)) || omc_Expression_isReduction(threadData, _rhs));
          if (1 /* true */ != 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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp63 = omc_Config_splitArrays(threadData);
          if (1 /* true */ != tmp63) goto goto_2;

          /* Pattern-matching assignment */
          tmp64 = omc_Expression_dimensionKnown(threadData, _dim);
          if (0 /* false */ != tmp64) goto goto_2;

          /* Pattern-matching assignment */
          tmp65 = omc_Flags_getConfigBool(threadData, _OMC_LIT67);
          if (1 /* true */ != tmp65) goto goto_2;

          /* Pattern-matching assignment */
          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;

          /* Pattern-matching assignment */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmp77 = omc_Config_splitArrays(threadData);
          if (1 /* true */ != tmp77) goto goto_2;

          /* Pattern-matching assignment */
          tmp78 = omc_Flags_getConfigBool(threadData, _OMC_LIT67);
          if (1 /* true */ != tmp78) goto goto_2;

          tmpMeta79 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _OMC_LIT219, _lhs, _rhs, _source);
          _elt = tmpMeta79;

          _source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
          tmpMeta81 = mmc_mk_box5(9, &DAE_Element_INITIAL__ARRAY__EQUATION__desc, _OMC_LIT219, _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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp86 = omc_Config_splitArrays(threadData);
          if (1 /* true */ != tmp86) goto goto_2;

          /* Pattern-matching assignment */
          tmp87 = omc_Flags_getConfigBool(threadData, _OMC_LIT67);
          if (1 /* true */ != tmp87) goto goto_2;

          tmpMeta88 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _OMC_LIT219, _lhs, _rhs, _source);
          _elt = tmpMeta88;

          _source = omc_ElementSource_addSymbolicTransformationFlattenedEqs(threadData, _source, _elt);
          tmpMeta90 = mmc_mk_box5(8, &DAE_Element_ARRAY__EQUATION__desc, _OMC_LIT219, _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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp95 = omc_Config_splitArrays(threadData);
          if (1 /* true */ != tmp95) goto goto_2;

          /* Pattern-matching assignment */
          tmp96 = omc_Flags_getConfigBool(threadData, _OMC_LIT67);
          if (0 /* false */ != 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_LIT220, 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_LIT223, tmpMeta98, omc_ElementSource_getElementSourceFileInfo(threadData, _inSource));
          goto goto_2;
          goto tmp3_done;
        }
        case 9: {
          modelica_boolean tmp99;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp99 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp99) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT224);
          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
  // _outDae has no default value.
  { /* match expression */
    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;
      // _cr has no default value.
      // _e2 has no default value.
      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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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;
}

DLLDirection
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
  // _outDae has no default value.
  { /* match expression */
    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;
      // _e1 has no default value.
      // _e2 has no default value.
      // _source has no default value.
      // _elt has no default value.
      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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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
  // _outDae has no default value.
  { /* match expression */
    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;
      // _rest1 has no default value.
      // _rest2 has no default value.
      // _rest3 has no default value.
      // _ty has no default value.
      // _exp1 has no default value.
      // _exp2 has no default value.
      // _res has no default value.
      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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          _res = omc_InstSection_instEqEquation2(threadData, _exp1, _exp2, _ty, _const, _source, _initial_);
          tmpMeta12 = mmc_mk_cons(_res, _acc);
          /* Tail recursive call */
          _inExps1 = _rest1;
          _inExps2 = _rest2;
          _inTypes3 = _rest3;
          _acc = tmpMeta12;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          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
  // _outDae has no default value.
  { /* matchcontinue expression */
    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;
      // _e1 has no default value.
      // _e2 has no default value.
      // _initial_ has no default value.
      // _cr has no default value.
      // _vs has no default value.
      // _tt has no default value.
      // _exps1 has no default value.
      // _exps2 has no default value.
      // _tys has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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;
          /* Pattern matching succeeded */
          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Check guard condition after assignments */
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmp13 = omc_Config_acceptMetaModelicaGrammar(threadData);
          if (1 /* true */ != 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmp14 = omc_Config_acceptMetaModelicaGrammar(threadData);
          if (1 /* true */ != 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmp15 = omc_Config_acceptMetaModelicaGrammar(threadData);
          if (1 /* true */ != 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmp16 = omc_Config_acceptMetaModelicaGrammar(threadData);
          if (1 /* true */ != 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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,4) == 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;
          /* Pattern matching succeeded */
          _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,4) == 0) goto tmp3_end;
          
          _tt = tmp4_3;
          _e1 = tmp4_1;
          _e2 = tmp4_2;
          _initial_ = tmp4_4;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_InstSection_instComplexEquation(threadData, _e1, _e2, _tt, _source, _initial_);
          goto tmp3_done;
        }
        case 18: {
          modelica_boolean tmp20;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp20 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp20) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT225);
          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;
}

DLLDirection
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
  // _outDae has no default value.
  { /* matchcontinue expression */
    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;
      // _e1_1 has no default value.
      // _e1 has no default value.
      // _e2 has no default value.
      // _e2_1 has no default value.
      // _t_1 has no default value.
      // _t1 has no default value.
      // _t2 has no default value.
      // _t has no default value.
      // _p1 has no default value.
      // _p2 has no default value.
      // _initial_ has no default value.
      // _e1_str has no default value.
      // _t1_str has no default value.
      // _e2_str has no default value.
      // _t2_str has no default value.
      // _s1 has no default value.
      // _s2 has no default value.
      // _c has no default value.
      // _tp has no default value.
      // _info has no default value.
      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,4) == 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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta11 = omc_Types_matchProp(threadData, _e2, _p2, _p1, 1 /* true */, &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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta15 = omc_Types_matchProp(threadData, _e1, _p1, _p2, 0 /* false */, &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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching tuple assignment */
          tmpMeta19 = omc_Types_matchProp(threadData, _e2, _p2, _p1, 1 /* true */, &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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta23 = omc_Types_matchProp(threadData, _e1, _p1, _p2, 0 /* false */, &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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching tuple assignment */
          tmpMeta27 = omc_Types_matchProp(threadData, _e2, _p2, _p1, 1 /* true */, &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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _p2 = omc_Types_propTupleFirstProp(threadData, _inProperties4);

          /* Pattern-matching assignment */
          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;

          /* Pattern-matching tuple assignment */
          tmpMeta35 = omc_Types_matchProp(threadData, _e1, _p1, _p2, 0 /* false */, &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;
          /* Pattern matching succeeded */
          _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_LIT220, mmc_mk_cons(_e2_str, MMC_REFSTRUCTLIT(mmc_nil))));
          _s1 = stringAppendList(tmpMeta39);

          tmpMeta40 = mmc_mk_cons(_t1_str, mmc_mk_cons(_OMC_LIT220, 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_LIT129));
          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_LIT228, 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);
  /* skip box _outDae; DAE.DAElist */
  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 has no default value.
  _newEnv = omc_FGraph_openScope(threadData, _env, _OMC_LIT169, _OMC_LIT229, mmc_mk_none());

  _newEnv = omc_FGraph_addForIterator(threadData, _newEnv, _iterName, _iterType, _OMC_LIT123, _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 has no default value.
  _newEnv = omc_FGraph_openScope(threadData, _env, _OMC_LIT169, _OMC_LIT170, mmc_mk_none());

  _newEnv = omc_FGraph_addForIterator(threadData, _newEnv, _iterName, _iterType, _OMC_LIT123, _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;
  // _outDae has no default value.
  _outSets = _inSets;
  _outGraph = _inGraph;
  // _values has no default value.
  // _env has no default value.
  _ci_state = _inState;
  tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
  _daes = tmpMeta1;
  // _dae has no default value.
  { /* matchcontinue expression */
    {
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          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_LIT169, _OMC_LIT170, mmc_mk_none());

              tmpMeta9 = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _val, _OMC_LIT172);
              _env = omc_FGraph_addForIterator(threadData, _env, _inIdent, _inIteratorType, tmpMeta9, _OMC_LIT173, _OMC_LIT175);

              _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 /* true */, _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_LIT68);
          goto tmp3_done;
        }
        case 1: {
          modelica_boolean tmp12;
          modelica_metatype tmpMeta13;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp12 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp12) goto goto_2;

          tmpMeta13 = stringAppend(_OMC_LIT230,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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  // _outState has no default value.
  { /* match expression */
    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;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_ClassInf_trans(threadData, _inState, _OMC_LIT231);
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          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
  // _outExp has no default value.
  // _oprop has no default value.
  
  
  { /* matchcontinue expression */
    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;
      // _aexpl has no default value.
      // _aexpl2 has no default value.
      // _typeList has no default value.
      // _fillValue has no default value.
      // _propType has no default value.
      // _lst has no default value.
      // _lst2 has no default value.
      // _tupleConst has no default value.
      // _tupleConst2 has no default value.
      // _tconst has no default value.
      // _names has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _fillValue = listLength(_typeList) - listLength(_aexpl);

          _lst2 = omc_List_fill(threadData, _OMC_LIT177, _fillValue);

          _aexpl2 = omc_List_fill(threadData, _OMC_LIT233, _fillValue);

          _tupleConst2 = omc_List_fill(threadData, _OMC_LIT234, _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;
          /* Pattern matching succeeded */
          _fillValue = ((modelica_integer) -1) + listLength(_typeList);

          _aexpl2 = omc_List_fill(threadData, _OMC_LIT233, _fillValue);

          _lst2 = omc_List_fill(threadData, _OMC_LIT177, _fillValue);

          _tupleConst2 = omc_List_fill(threadData, _OMC_LIT234, _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: {
          
          /* Pattern matching succeeded */
          /* Check guard condition after assignments */
          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;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp31 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp31) goto goto_2;

          omc_Debug_traceln(threadData, _OMC_LIT235);
          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
  // _outCache has no default value.
  // _outE1 has no default value.
  // _outE2 has no default value.
  // _oprop has no default value.
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _cache has no default value.
      // _env has no default value.
      // _b3 has no default value.
      // _b4 has no default value.
      // _elabedE1_2 has no default value.
      // _elabedE2_2 has no default value.
      // _prop1 has no default value.
      // _prop has no default value.
      // _prop2 has no default value.
      // _pre has no default value.
      // _e1 has no default value.
      // _e2 has no default value.
      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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp6 = omc_Flags_getConfigBool(threadData, _OMC_LIT241);
          if (1 /* true */ != tmp6) goto goto_2;

          _b3 = omc_Types_isPropTupleArray(threadData, _prop);

          _b4 = omc_Types_isPropTupleArray(threadData, _prop2);

          /* Pattern-matching assignment */
          tmp7 = (_b3 || _b4);
          if (1 /* true */ != tmp7) goto goto_2;

          /* Pattern-matching assignment */
          tmp8 = omc_Expression_containFunctioncall(threadData, _elabedE2);
          if (1 /* true */ != tmp8) goto goto_2;

          _e1 = omc_InstSection_expandTupleEquationWithWild(threadData, _e1, _prop2, _prop ,&_prop);

          _cache = omc_Static_elabExpLHS(threadData, _cache, _env, _e1, _impl, 0 /* false */, _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 /* false */, _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;
          /* Pattern matching succeeded */
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outE1; DAE.Exp */
  /* skip box _outE2; DAE.Exp */
  /* skip box _oprop; DAE.Properties */
  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
  // _outEqn has no default value.
  { /* match expression */
    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;
      // _cr1 has no default value.
      // _cr2 has no default value.
      // _e2 has no default value.
      // _e has no default value.
      // _t has no default value.
      // _source has no default value.
      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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          _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;
          /* Pattern matching succeeded */
          tmpMeta23 = mmc_mk_box4(27, &DAE_Element_REINIT__desc, _cr1, _e, _source);
          tmpMeta1 = tmpMeta23;
          goto tmp3_done;
        }
        case 4: {
          modelica_boolean tmp24;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp24 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp24) goto goto_2;

          omc_Debug_traceln(threadData, _OMC_LIT242);
          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
  // _dae has no default value.
  { /* match expression */
    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;
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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
  { /* match expression */
    modelica_metatype tmp3_1;modelica_metatype tmp3_2;
    tmp3_1 = omc_AbsynUtil_stripCommentExpressions(threadData, _left, 0 /* false */);
    tmp3_2 = omc_AbsynUtil_stripCommentExpressions(threadData, _right, 0 /* false */);
    {
      modelica_metatype _crefs = NULL;
      modelica_string _left_str = NULL;
      modelica_string _right_str = NULL;
      volatile mmc_switch_type tmp3;
      int tmp4;
      // _crefs has no default value.
      // _left_str has no default value.
      // _right_str has no default value.
      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;
          
          /* Pattern matching succeeded */
          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;
          /* Pattern matching succeeded */
          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_LIT211);
            tmpMeta11 = stringAppend(tmpMeta10,_right_str);
            tmpMeta12 = stringAppend(tmpMeta11,_OMC_LIT243);
            tmpMeta9 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
            omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT30, 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;
          
          /* Pattern matching succeeded */
          _left_str = omc_Dump_printExpStr(threadData, _left);

          _right_str = omc_Dump_printExpStr(threadData, _right);

          tmpMeta14 = stringAppend(_left_str,_OMC_LIT211);
          tmpMeta15 = stringAppend(tmpMeta14,_right_str);
          tmpMeta16 = stringAppend(tmpMeta15,_OMC_LIT243);
          tmpMeta13 = mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT36, tmpMeta13, _info);
          goto goto_1;
          goto tmp2_done;
        }
        case 3: {
          
          /* Pattern matching succeeded */
          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
  // _outSucceeded has no default value.
  { /* matchcontinue expression */
    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;
      // _ty has no default value.
      // _cref_str has no default value.
      // _ty_str has no default value.
      // _cnst_str has no default value.
      // _cnst has no default value.
      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;
          
          /* Pattern matching succeeded */
          _ty = omc_Types_arrayElementType(threadData, _inType);

          /* Pattern-matching assignment */
          tmp6 = omc_Types_isReal(threadData, _ty);
          if (0 /* false */ != 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_LIT246, tmpMeta7, _inInfo);
          tmp1 = 0 /* false */;
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp9 = omc_Types_isVar(threadData, _cnst);
          if (0 /* false */ != 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_LIT249, tmpMeta10, _inInfo);
          tmp1 = 0 /* false */;
          goto tmp3_done;
        }
        case 2: {
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          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
  // _outCref has no default value.
  // _outMessage has no default value.
  
  
  { /* matchcontinue expression */
    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;
      // _cr has no default value.
      // _msg has no default value.
      // _s1 has no default value.
      // _s2 has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta[0+0] = _cr;
          tmpMeta[0+1] = _OMC_LIT250;
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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_LIT254), 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;
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _cr;
          tmpMeta[0+1] = _msg;
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta27;
          
          /* Pattern matching succeeded */
          _s1 = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT197);

          _s2 = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);

          tmpMeta27 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
          omc_Error_addSourceMessage(threadData, _OMC_LIT253, 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
  // _outCref has no default value.
  // _outPriority has no default value.
  
  
  { /* matchcontinue expression */
    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;
      // _cr has no default value.
      // _p has no default value.
      // _s1 has no default value.
      // _s2 has no default value.
      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; /* Pattern matching succeeded; we may skip some cases if we fail */
          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  /* pattern as ty=Integer */;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          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_LIT255), 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  /* pattern as ty=Integer */;
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _cr;
          tmp1_c1 = _p;
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta31;
          
          /* Pattern matching succeeded */
          _s1 = omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT197);

          _s2 = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);

          tmpMeta31 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
          omc_Error_addSourceMessage(threadData, _OMC_LIT253, 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);
  /* skip box _outCref; Absyn.ComponentRef */
  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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outDae has no default value.
  // _outSets has no default value.
  // _outState has no default value.
  // _outGraph has no default value.
  
  
  
  
  
  
  
  { /* matchcontinue expression */
    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;
      // _csets has no default value.
      // _ci_state has no default value.
      // _env has no default value.
      // _pre has no default value.
      // _cr has no default value.
      // _cr1 has no default value.
      // _cr2 has no default value.
      // _b1 has no default value.
      // _b2 has no default value.
      // _s has no default value.
      // _msg has no default value.
      // _e_1 has no default value.
      // _e_2 has no default value.
      // _msg_1 has no default value.
      // _eqn has no default value.
      // _cache has no default value.
      // _graph has no default value.
      // _ih has no default value.
      // _info has no default value.
      // _ipriority has no default value.
      // _cr_ has no default value.
      // _cr1_ has no default value.
      // _cr2_ has no default value.
      // _exp has no default value.
      // _functionArgs has no default value.
      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_LIT266), 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_LIT267), 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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta24 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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_LIT197);

          tmpMeta25 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT258, tmpMeta25, _info);
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _OMC_LIT68;
          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_LIT266), 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_LIT267), 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching tuple assignment */
          tmpMeta44 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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_LIT68;
          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_LIT266), 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_LIT268), 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;
          /* Pattern matching succeeded */
          _cr = omc_InstSection_potentialRootArguments(threadData, _functionArgs, _info, _pre, _inEquation, NULL);

          /* Pattern-matching tuple assignment */
          tmpMeta58 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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_LIT197);

          tmpMeta59 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT258, tmpMeta59, _info);
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _OMC_LIT68;
          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_LIT266), 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_LIT268), 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _cr = omc_InstSection_potentialRootArguments(threadData, _functionArgs, _info, _pre, _inEquation ,&_ipriority);

          /* Pattern-matching tuple assignment */
          tmpMeta73 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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_LIT68;
          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_LIT266), 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_LIT269), 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;
          /* Pattern matching succeeded */
          _cr = omc_InstSection_uniqueRootArguments(threadData, _functionArgs, _info, _pre, _inEquation, NULL);

          /* Pattern-matching tuple assignment */
          tmpMeta87 = omc_Static_elabCref(threadData, _cache, _env, _cr, 0 /* false */, 0 /* false */, _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_LIT197);

          tmpMeta88 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT258, tmpMeta88, _info);

          omc_Error_addSourceMessage(threadData, _OMC_LIT261, _OMC_LIT263, _info);
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _OMC_LIT68;
          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_LIT266), 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_LIT269), 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; /* Pattern matching succeeded; we may skip some cases if we fail */
          _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 /* false */, 1 /* true */, _pre, _info ,&_exp ,NULL);

          _cache = omc_Static_elabExp(threadData, _cache, _env, _msg, 0 /* false */, 0 /* false */, _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_LIT261, _OMC_LIT263, _info);
          tmpMeta[0+0] = _cache;
          tmpMeta[0+1] = _env;
          tmpMeta[0+2] = _ih;
          tmpMeta[0+3] = _OMC_LIT68;
          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_LIT266), 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_LIT270), 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;
          /* Pattern matching succeeded */
          /* Pattern-matching tuple assignment */
          tmpMeta119 = omc_Static_elabCref(threadData, _cache, _env, _cr1, 0 /* false */, 0 /* false */, _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;

          /* Pattern-matching tuple assignment */
          tmpMeta123 = omc_Static_elabCref(threadData, _cache, _env, _cr2, 0 /* false */, 0 /* false */, _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_LIT197);

            tmpMeta124 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
            omc_Error_addSourceMessage(threadData, _OMC_LIT258, tmpMeta124, _info);
          }
          else
          {
            /* Pattern-matching assignment */
            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;

            /* Pattern-matching assignment */
            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_LIT68;
          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;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp129 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp129) goto goto_2;

          _s = omc_SCodeDump_equationStr(threadData, _eqn, _OMC_LIT197);

          omc_Debug_trace(threadData, _OMC_LIT264);

          tmpMeta130 = stringAppend(_s,_OMC_LIT265);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  // _yes has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inExp;
    {
      modelica_string _id = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _id has no default value.
      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_LIT266), 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;
          /* Pattern matching succeeded */
          tmp1 = listMember(_id, _OMC_LIT274);
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          tmp1 = 0 /* false */;
          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 has no default value.
  // _outArg has no default value.
  // _props has no default value.
  // _ty has no default value.
  _outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _inArg, _inImpl, 1 /* true */, _inPrefix, _inInfo ,&_outArg ,&_props);

  _ty = omc_Types_getPropType(threadData, _props);

  if((!omc_Types_subtype(threadData, _ty, _inExpectedType, 1 /* true */)))
  {
    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_LIT277, 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outArg; DAE.Exp */
  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 _name = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outHasBindings has no default value.
  // _empty_val has no default value.
  // _name has no default value.
  _empty_val = omc_ValuesUtil_containsEmpty(threadData, _inValues);

  if(isSome(_empty_val))
  {
    /* Pattern-matching assignment */
    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), 3));
    _name = tmpMeta3;

    tmpMeta4 = mmc_mk_cons(_name, MMC_REFSTRUCTLIT(mmc_nil));
    omc_Error_addSourceMessage(threadData, _OMC_LIT280, tmpMeta4, _inInfo);

    _outHasBindings = 0 /* false */;
  }
  else
  {
    _outHasBindings = 1 /* true */;
  }
  _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
  { /* match expression */
    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;
      // _props has no default value.
      // _ty has no default value.
      // _exp_str has no default value.
      // _ty_str has no default value.
      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;
          
          /* Pattern matching succeeded */
          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;
          
          /* Pattern matching succeeded */
          _props = _inProperties;

          {
            modelica_metatype _cond;
            for (tmpMeta6 = _inConditions; !listEmpty(tmpMeta6); tmpMeta6=MMC_CDR(tmpMeta6))
            {
              _cond = MMC_CAR(tmpMeta6);
              /* Pattern-matching assignment */
              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_LIT153, 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 has no default value.
  _outSource = omc_ElementSource_createElementSource(threadData, _inInfo, omc_FGraph_getScopePath(threadData, _inEnv), _inPrefix, _OMC_LIT200);

  _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;
  // _outDae has no default value.
  _outSets = _inSets;
  // _outState has no default value.
  _outGraph = _inGraph;
  
  
  { /* matchcontinue expression */
    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;
      // _lhs_acr has no default value.
      // _rhs_acr has no default value.
      // _acr has no default value.
      // _info has no default value.
      // _lhs_aexp has no default value.
      // _rhs_aexp has no default value.
      // _range_aexp has no default value.
      // _comment has no default value.
      // _lhs_exp has no default value.
      // _rhs_exp has no default value.
      // _exp has no default value.
      // _cond_exp has no default value.
      // _msg_exp has no default value.
      // _level_exp has no default value.
      // _cr_exp has no default value.
      // _lhs_prop has no default value.
      // _rhs_prop has no default value.
      // _prop has no default value.
      // _cr_prop has no default value.
      // _source has no default value.
      // _expl has no default value.
      // _props has no default value.
      // _c has no default value.
      // _val has no default value.
      // _eql has no default value.
      // _else_branch has no default value.
      // _branches has no default value.
      // _rest_branches has no default value.
      // _ell has no default value.
      // _el has no default value.
      // _el2 has no default value.
      // _else_when has no default value.
      // _iter_crefs has no default value.
      // _ty has no default value.
      // _env has no default value.
      // _cr has no default value.
      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;
          modelica_metatype tmpMeta9;
          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; /* Pattern matching succeeded; we may skip some cases if we fail */
          if(omc_SCodeUtil_isInitial(threadData, _inInitial))
          {
            tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
            omc_Error_addSourceMessage(threadData, _OMC_LIT284, tmpMeta9, _info);

            goto goto_2;
          }

          _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 tmpMeta10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
          _lhs_aexp = tmpMeta10;
          _rhs_aexp = tmpMeta11;
          _comment = tmpMeta12;
          _info = tmpMeta13;
          tmp4 += 7; /* Pattern matching succeeded; we may skip some cases if we fail */
          omc_InstSection_checkTupleCallEquationMessage(threadData, _lhs_aexp, _rhs_aexp, _info);

          _outCache = omc_Static_elabExpLHS(threadData, _inCache, _inEnv, _lhs_aexp, _inImpl, 1 /* true */, _inPrefix, _info ,&_lhs_exp ,&_lhs_prop);

          _outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _rhs_aexp, _inImpl, 1 /* true */, _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_LIT135);

          _outState = omc_InstSection_instEquationCommonCiTrans(threadData, _inState, _inInitial);
          tmpMeta[0+0] = _outDae;
          tmpMeta[0+1] = _outState;
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta14;
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,5) == 0) goto tmp3_end;
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
          tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
          tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
          _branches = tmpMeta14;
          _else_branch = tmpMeta15;
          _info = tmpMeta16;
          tmp4 += 6; /* Pattern matching succeeded; we may skip some cases if we fail */
          _outCache = omc_Static_elabExpList(threadData, _outCache, _outEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, 1 /* true */, _inPrefix, _info, _OMC_LIT21 ,&_expl ,&_props);

          _prop = omc_Types_propsAnd(threadData, _props);

          omc_InstSection_checkIfConditionTypes(threadData, _prop, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _props, _info);

          { /* matchcontinue expression */
            {
              volatile mmc_switch_type tmp19;
              int tmp20;
              tmp19 = 0;
              MMC_TRY_INTERNAL(mmc_jumper)
              tmp18_top:
              threadData->mmc_jumper = &new_mmc_jumper;
              for (; tmp19 < 2; tmp19++) {
                switch (MMC_SWITCH_CAST(tmp19)) {
                case 0: {
                  modelica_metatype tmpMeta21;
                  modelica_metatype tmpMeta22;
                  modelica_metatype tmpMeta23;
                  modelica_metatype tmpMeta24;
                  modelica_metatype tmpMeta25;
                  modelica_boolean tmp26;
                  modelica_boolean tmp27;
                  modelica_metatype tmpMeta28;
                  /* Pattern matching succeeded */
                  _rest_branches = _branches;

                  _eql = _else_branch;

                  {
                    modelica_metatype _cond;
                    for (tmpMeta21 = _expl; !listEmpty(tmpMeta21); tmpMeta21=MMC_CDR(tmpMeta21))
                    {
                      _cond = MMC_CAR(tmpMeta21);
                      /* Pattern-matching assignment */
                      tmpMeta22 = _props;
                      if (listEmpty(tmpMeta22)) goto goto_17;
                      tmpMeta23 = MMC_CAR(tmpMeta22);
                      tmpMeta24 = MMC_CDR(tmpMeta22);
                      if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,0,2) == 0) goto goto_17;
                      tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 3));
                      _c = tmpMeta25;
                      _props = tmpMeta24;

                      /* Pattern-matching assignment */
                      tmp26 = omc_Types_isParameterOrConstant(threadData, _c);
                      if (1 /* true */ != tmp26) goto goto_17;

                      _outCache = omc_Ceval_ceval(threadData, _outCache, _outEnv, _cond, _inImpl, _OMC_LIT285, ((modelica_integer) 0) ,&_val);

                      /* Pattern-matching assignment */
                      tmp27 = omc_InstSection_checkIfConditionBinding(threadData, _val, _info);
                      if (1 /* true */ != tmp27) goto goto_17;

                      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 /* true */, _inGraph ,&_outEnv ,&_outIH ,&_outDae ,&_outSets ,&_outState ,&_outGraph);
                  goto tmp18_done;
                }
                case 1: {
                  modelica_metatype tmpMeta29;
                  modelica_metatype tmpMeta30;
                  modelica_metatype tmpMeta31;
                  modelica_metatype tmpMeta32;
                  modelica_metatype tmpMeta33;
                  modelica_metatype tmpMeta34;
                  modelica_metatype tmpMeta35;
                  modelica_metatype tmpMeta36;
                  /* Pattern matching succeeded */
                  _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))
                  {
                    tmpMeta29 = MMC_REFSTRUCTLIT(mmc_nil);
                    _outCache = omc_InstSection_instInitialIfEqBranches(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _branches, _inImpl, tmpMeta29 ,&_outEnv ,&_outIH ,&_outState ,&_ell);

                    _outCache = omc_InstSection_instInitialIfEqBranch(threadData, _outCache, _outEnv, _outIH, _inPrefix, _outState, _else_branch, _inImpl ,&_outEnv ,&_outIH ,&_outState ,&_el);

                    tmpMeta31 = mmc_mk_box5(17, &DAE_Element_INITIAL__IF__EQUATION__desc, _expl, _ell, _el, _source);
                    tmpMeta30 = mmc_mk_cons(tmpMeta31, MMC_REFSTRUCTLIT(mmc_nil));
                    tmpMeta32 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta30);
                    _outDae = tmpMeta32;
                  }
                  else
                  {
                    tmpMeta33 = MMC_REFSTRUCTLIT(mmc_nil);
                    _outCache = omc_InstSection_instIfEqBranches(threadData, _outCache, _inEnv, _inIH, _inPrefix, _inState, _branches, _inImpl, tmpMeta33 ,&_outEnv ,&_outIH ,&_outState ,&_ell);

                    _outCache = omc_InstSection_instIfEqBranch(threadData, _outCache, _outEnv, _outIH, _inPrefix, _outState, _else_branch, _inImpl ,&_outEnv ,&_outIH ,&_outState ,&_el);

                    tmpMeta35 = mmc_mk_box5(16, &DAE_Element_IF__EQUATION__desc, _expl, _ell, _el, _source);
                    tmpMeta34 = mmc_mk_cons(tmpMeta35, MMC_REFSTRUCTLIT(mmc_nil));
                    tmpMeta36 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta34);
                    _outDae = tmpMeta36;
                  }
                  goto tmp18_done;
                }
                }
                goto tmp18_end;
                tmp18_end: ;
              }
              goto goto_17;
              tmp18_done:
              (void)tmp19;
              MMC_RESTORE_INTERNAL(mmc_jumper);
              goto tmp18_done2;
              goto_17:;
              MMC_CATCH_INTERNAL(mmc_jumper);
              if (++tmp19 < 2) {
                goto tmp18_top;
              }
              goto goto_2;
              tmp18_done2:;
            }
          }
          ;
          tmpMeta[0+0] = _outDae;
          tmpMeta[0+1] = _outState;
          goto tmp3_done;
        }
        case 3: {
          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;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,5) == 0) goto tmp3_end;
          tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
          _info = tmpMeta37;
          tmp4 += 5; /* Pattern matching succeeded; we may skip some cases if we fail */
          if(omc_SCodeUtil_isInitial(threadData, _inInitial))
          {
            tmpMeta38 = MMC_REFSTRUCTLIT(mmc_nil);
            omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT288, tmpMeta38, _info);
          }

          tmpMeta39 = 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, tmpMeta39, _inImpl, 1 /* true */, _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 (tmpMeta40 = listReverse((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 4)))); !listEmpty(tmpMeta40); tmpMeta40=MMC_CDR(tmpMeta40))
            {
              _branch = MMC_CAR(tmpMeta40);
              _outCache = omc_InstSection_instWhenEqBranch(threadData, _outCache, _outEnv, _outIH, _inPrefix, _inSets, _inState, _branch, _inImpl, 1 /* true */, _outGraph, _info ,&_outEnv ,&_outIH ,&_exp ,&_el2 ,&_outGraph);

              tmpMeta41 = mmc_mk_box5(13, &DAE_Element_WHEN__EQUATION__desc, _exp, _el2, _else_when, _source);
              _else_when = mmc_mk_some(tmpMeta41);
            }
          }

          _outState = omc_InstSection_instEquationCommonCiTrans(threadData, _inState, _inInitial);

          tmpMeta44 = mmc_mk_box5(13, &DAE_Element_WHEN__EQUATION__desc, _cond_exp, _el, _else_when, _source);
          tmpMeta43 = mmc_mk_cons(tmpMeta44, MMC_REFSTRUCTLIT(mmc_nil));
          tmpMeta45 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta43);
          _outDae = tmpMeta45;
          tmpMeta[0+0] = _outDae;
          tmpMeta[0+1] = _outState;
          goto tmp3_done;
        }
        case 4: {
          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;
          modelica_metatype tmpMeta61;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,5) == 0) goto tmp3_end;
          tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
          _info = tmpMeta46;
          tmp4 += 4; /* Pattern matching succeeded; we may skip some cases if we fail */
          if(isSome((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3)))))
          {
            /* Pattern-matching assignment */
            tmpMeta47 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3)));
            if (optionNone(tmpMeta47)) goto goto_2;
            tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 1));
            _range_aexp = tmpMeta48;

            /* Pattern-matching tuple assignment */
            tmpMeta54 = omc_Static_elabExp(threadData, _outCache, _inEnv, _range_aexp, _inImpl, 1 /* true */, _inPrefix, _info, &tmpMeta49, &tmpMeta50);
            _outCache = tmpMeta54;
            if (mmc__uniontype__metarecord__typedef__equal(tmpMeta50,0,2) == 0) goto goto_2;
            tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 2));
            if (mmc__uniontype__metarecord__typedef__equal(tmpMeta51,6,2) == 0) goto goto_2;
            tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 2));
            tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 3));
            _exp = tmpMeta49;
            _ty = tmpMeta52;
            _c = tmpMeta53;
          }
          else
          {
            tmpMeta55 = 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))), tmpMeta55);

            /* Pattern-matching tuple assignment */
            tmpMeta61 = omc_Static_deduceIterationRange(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _iter_crefs, _inEnv, _outCache, _info, &tmpMeta56, &tmpMeta60);
            _exp = tmpMeta61;
            if (mmc__uniontype__metarecord__typedef__equal(tmpMeta56,0,2) == 0) goto goto_2;
            tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 2));
            if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,6,2) == 0) goto goto_2;
            tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta57), 2));
            tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta56), 3));
            _ty = tmpMeta58;
            _c = tmpMeta59;
            _outCache = tmpMeta60;

            _range_aexp = _OMC_LIT290;
          }

          _env = omc_InstSection_addForLoopScope(threadData, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _ty, _OMC_LIT14, mmc_mk_some(_c));

          { /* matchcontinue expression */
            {
              volatile mmc_switch_type tmp64;
              int tmp65;
              tmp64 = 0;
              MMC_TRY_INTERNAL(mmc_jumper)
              tmp63_top:
              threadData->mmc_jumper = &new_mmc_jumper;
              for (; tmp64 < 2; tmp64++) {
                switch (MMC_SWITCH_CAST(tmp64)) {
                case 0: {
                  /* Pattern matching succeeded */
                  _outCache = omc_Ceval_ceval(threadData, _outCache, _inEnv, _exp, _inImpl, _OMC_LIT285, ((modelica_integer) 0) ,&_val);
                  goto tmp63_done;
                }
                case 1: {
                  modelica_metatype tmpMeta66;
                  /* Pattern matching succeeded */
                  if(omc_Flags_getConfigBool(threadData, _OMC_LIT67))
                  {
                    _val = _OMC_LIT297;
                  }
                  else
                  {
                    tmpMeta66 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _range_aexp), MMC_REFSTRUCTLIT(mmc_nil));
                    omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT293, tmpMeta66, _info);
                  }
                  goto tmp63_done;
                }
                }
                goto tmp63_end;
                tmp63_end: ;
              }
              goto goto_62;
              tmp63_done:
              (void)tmp64;
              MMC_RESTORE_INTERNAL(mmc_jumper);
              goto tmp63_done2;
              goto_62:;
              MMC_CATCH_INTERNAL(mmc_jumper);
              if (++tmp64 < 2) {
                goto tmp63_top;
              }
              goto goto_2;
              tmp63_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 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,5) == 0) goto tmp3_end;
          tmpMeta67 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
          _info = tmpMeta67;
          tmp4 += 3; /* Pattern matching succeeded; we may skip some cases if we fail */
          _outCache = omc_InstSection_instOperatorArg(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, _OMC_LIT69, _OMC_LIT298, _OMC_LIT299, ((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_LIT300, _OMC_LIT298, _OMC_LIT254, ((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_LIT306, _OMC_LIT298, _OMC_LIT307, ((modelica_integer) 3), _info ,&_level_exp);

          _source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);

          if(omc_SCodeUtil_isInitial(threadData, _inInitial))
          {
            tmpMeta69 = mmc_mk_box5(24, &DAE_Element_INITIAL__ASSERT__desc, _cond_exp, _msg_exp, _level_exp, _source);
            tmpMeta68 = mmc_mk_cons(tmpMeta69, MMC_REFSTRUCTLIT(mmc_nil));
            tmpMeta70 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta68);
            _outDae = tmpMeta70;
          }
          else
          {
            tmpMeta72 = mmc_mk_box5(23, &DAE_Element_ASSERT__desc, _cond_exp, _msg_exp, _level_exp, _source);
            tmpMeta71 = mmc_mk_cons(tmpMeta72, MMC_REFSTRUCTLIT(mmc_nil));
            tmpMeta73 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta71);
            _outDae = tmpMeta73;
          }
          tmpMeta[0+0] = _outDae;
          tmpMeta[0+1] = _inState;
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta74;
          modelica_metatype tmpMeta75;
          modelica_metatype tmpMeta76;
          modelica_metatype tmpMeta77;
          modelica_metatype tmpMeta78;
          modelica_metatype tmpMeta79;
          modelica_metatype tmpMeta80;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,3) == 0) goto tmp3_end;
          tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
          _info = tmpMeta74;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          _outCache = omc_InstSection_instOperatorArg(threadData, _outCache, _inEnv, _inIH, _inPrefix, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 2))), _inImpl, _OMC_LIT300, _OMC_LIT308, _OMC_LIT254, ((modelica_integer) 1), _info ,&_msg_exp);

          _source = omc_InstSection_makeEqSource(threadData, _info, _inEnv, _inPrefix, _inFlattenOp);

          if(omc_SCodeUtil_isInitial(threadData, _inInitial))
          {
            tmpMeta76 = mmc_mk_box3(26, &DAE_Element_INITIAL__TERMINATE__desc, _msg_exp, _source);
            tmpMeta75 = mmc_mk_cons(tmpMeta76, MMC_REFSTRUCTLIT(mmc_nil));
            tmpMeta77 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta75);
            _outDae = tmpMeta77;
          }
          else
          {
            tmpMeta79 = mmc_mk_box3(25, &DAE_Element_TERMINATE__desc, _msg_exp, _source);
            tmpMeta78 = mmc_mk_cons(tmpMeta79, MMC_REFSTRUCTLIT(mmc_nil));
            tmpMeta80 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, tmpMeta78);
            _outDae = tmpMeta80;
          }
          tmpMeta[0+0] = _outDae;
          tmpMeta[0+1] = _inState;
          goto tmp3_done;
        }
        case 7: {
          modelica_metatype tmpMeta81;
          modelica_metatype tmpMeta82;
          modelica_metatype tmpMeta83;
          modelica_metatype tmpMeta84;
          modelica_metatype tmpMeta85;
          modelica_metatype tmpMeta86;
          modelica_metatype tmpMeta87;
          modelica_metatype tmpMeta88;
          modelica_boolean tmp89;
          modelica_metatype tmpMeta90;
          modelica_metatype tmpMeta91;
          modelica_metatype tmpMeta92;
          modelica_metatype tmpMeta96;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,4) == 0) goto tmp3_end;
          tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta81,2,1) == 0) goto tmp3_end;
          tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta81), 2));
          tmpMeta83 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
          _acr = tmpMeta82;
          _info = tmpMeta83;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching tuple assignment */
          tmpMeta88 = omc_Static_elabCrefNoEval(threadData, _outCache, _inEnv, _acr, _inImpl, 0 /* false */, _inPrefix, _info, &tmpMeta84, &tmpMeta87, NULL);
          _outCache = tmpMeta88;
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta84,6,2) == 0) goto goto_2;
          tmpMeta85 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta84), 2));
          tmpMeta86 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta84), 3));
          _cr_exp = tmpMeta84;
          _cr = tmpMeta85;
          _ty = tmpMeta86;
          _cr_prop = tmpMeta87;

          /* Pattern-matching assignment */
          tmp89 = omc_InstSection_checkReinitType(threadData, _ty, _cr_prop, _cr, _info);
          if (1 /* true */ != tmp89) goto goto_2;

          _outCache = omc_Static_elabExp(threadData, _outCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inEquation), 3))), _inImpl, 1 /* true */, _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 /* true */, 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);

          /* Pattern-matching assignment */
          tmpMeta90 = omc_InstSection_instEqEquation(threadData, _cr_exp, _cr_prop, _exp, _prop, _source, _inInitial, _inImpl, _OMC_LIT135);
          tmpMeta91 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 2));
          _el = tmpMeta91;

          {
            modelica_metatype __omcQ_24tmpVar5;
            modelica_metatype* tmp93;
            modelica_metatype tmpMeta94;
            modelica_metatype __omcQ_24tmpVar4;
            modelica_integer tmp95;
            modelica_metatype _e_loopVar = 0;
            modelica_metatype _e;
            _e_loopVar = _el;
            tmpMeta94 = MMC_REFSTRUCTLIT(mmc_nil);
            __omcQ_24tmpVar5 = tmpMeta94; /* defaultValue */
            tmp93 = &__omcQ_24tmpVar5;
            while(1) {
              tmp95 = 1;
              if (!listEmpty(_e_loopVar)) {
                _e = MMC_CAR(_e_loopVar);
                _e_loopVar = MMC_CDR(_e_loopVar);
                tmp95--;
              }
              if (tmp95 == 0) {
                __omcQ_24tmpVar4 = omc_InstSection_makeDAEArrayEqToReinitForm(threadData, _e);
                *tmp93 = mmc_mk_cons(__omcQ_24tmpVar4,0);
                tmp93 = &MMC_CDR(*tmp93);
              } else if (tmp95 == 1) {
                break;
              } else {
                goto goto_2;
              }
            }
            *tmp93 = mmc_mk_nil();
            tmpMeta92 = __omcQ_24tmpVar5;
          }
          _el = tmpMeta92;

          tmpMeta96 = mmc_mk_box2(3, &DAE_DAElist_DAE__desc, _el);
          _outDae = tmpMeta96;
          tmpMeta[0+0] = _outDae;
          tmpMeta[0+1] = _inState;
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta97;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
          tmpMeta97 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
          _info = tmpMeta97;
          /* Pattern matching succeeded */
          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 /* false */, _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 tmp98;
          modelica_metatype tmpMeta99;
          modelica_metatype tmpMeta100;
          
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp98 = omc_Flags_isSet(threadData, _OMC_LIT53);
          if (1 /* true */ != tmp98) goto goto_2;

          omc_Debug_trace(threadData, _OMC_LIT309);

          tmpMeta99 = stringAppend(omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT197),_OMC_LIT310);
          tmpMeta100 = stringAppend(tmpMeta99,omc_FGraph_getGraphNameStr(threadData, _inEnv));
          omc_Debug_traceln(threadData, tmpMeta100);
          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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  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
  // _outCache has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outDae has no default value.
  // _outSets has no default value.
  // _outState has no default value.
  // _outGraph has no default value.
  _errorCount = omc_Error_getNumErrorMessages(threadData);
  { /* matchcontinue expression */
    {
      modelica_string _s = NULL;
      modelica_metatype _state = NULL;
      volatile mmc_switch_type tmp3;
      int tmp4;
      // _s has no default value.
      // _state has no default value.
      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;
          /* Pattern matching succeeded */
          _state = omc_ClassInf_trans(threadData, _inState, _OMC_LIT231);

          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_LIT204);
          _outDae = omc_DAEUtil_traverseDAE(threadData, _outDae, _OMC_LIT311, boxvar_Expression_traverseSubexpressionsHelper, tmpMeta6, NULL, NULL);
          goto tmp2_done;
        }
        case 1: {
          modelica_boolean tmp7;
          modelica_metatype tmpMeta9;
          /* Pattern matching succeeded */
          tmp7 = 0; /* begin failure */
          MMC_TRY_INTERNAL(mmc_jumper)
            omc_ClassInf_trans(threadData, _inState, _OMC_LIT231);
            tmp7 = 1;
          goto goto_8;
          goto_8:;
          MMC_CATCH_INTERNAL(mmc_jumper)
          if (tmp7) {goto goto_1;} /* end failure */

          _s = omc_ClassInf_printStateStr(threadData, _inState);

          tmpMeta9 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT314, tmpMeta9, omc_SCodeUtil_getEquationInfo(threadData, _inEquation));
          goto goto_1;
          goto tmp2_done;
        }
        case 2: {
          modelica_boolean tmp10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp10 = (_errorCount == omc_Error_getNumErrorMessages(threadData));
          if (1 /* true */ != tmp10) goto goto_1;

          tmpMeta11 = stringAppend(_OMC_LIT9,omc_SCodeDump_equationStr(threadData, _inEquation, _OMC_LIT197));
          _s = tmpMeta11;

          tmpMeta12 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT317, 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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  return _outCache;
}

DLLDirection
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 has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outDae has no default value.
  // _outSets has no default value.
  // _outState has no default value.
  // _outGraph has no default value.
  _outCache = omc_InstSection_instEquationCommon(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _OMC_LIT202, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  return _outCache;
}

DLLDirection
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 has no default value.
  // _outEnv has no default value.
  // _outIH has no default value.
  // _outDae has no default value.
  // _outSets has no default value.
  // _outState has no default value.
  // _outGraph has no default value.
  _outCache = omc_InstSection_instEquationCommon(threadData, _inCache, _inEnv, _inIH, _inPrefix, _inSets, _inState, _inEquation, _OMC_LIT206, _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);
  /* skip box _outCache; FCore.Cache */
  /* skip box _outEnv; FCore.Graph */
  /* skip box _outIH; list<InnerOuter.TopInstance> */
  /* skip box _outDae; DAE.DAElist */
  /* skip box _outSets; DAE.Connect.Sets */
  /* skip box _outState; ClassInf.State */
  /* skip box _outGraph; ConnectionGraph.ConnectionGraph */
  return _outCache;
}

