#ifdef OMC_BASE_FILE
#define OMC_FILE OMC_BASE_FILE
#else
#define OMC_FILE "Static.c"
#endif
#include "omc_simulation_settings.h"
#include "Static.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 "Wrong number of arguments to %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,32,_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(146)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT3}};
#define _OMC_LIT4 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)
#define _OMC_LIT5_data "size"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT5,4,_OMC_LIT5_data);
#define _OMC_LIT5 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT5)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT6,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT5,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT6 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT6)
#define _OMC_LIT7_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT7,0,_OMC_LIT7_data);
#define _OMC_LIT7 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT7)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT8,0.0);
#define _OMC_LIT8 MMC_REFREALLIT(_OMC_LIT_STRUCT8)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT9,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT7,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT8}};
#define _OMC_LIT9 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT9)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT10,2,3) {&Absyn_Msg_MSG__desc,_OMC_LIT9}};
#define _OMC_LIT10 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT10)
#define _OMC_LIT11_data "Dimensions must be parameter or constant expression (in %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT11,60,_OMC_LIT11_data);
#define _OMC_LIT11 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT11)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT12,2,3) {&Gettext_TranslatableContent_gettext__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(23)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT12}};
#define _OMC_LIT13 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT13)
#define _OMC_LIT14_data "checkModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT14,10,_OMC_LIT14_data);
#define _OMC_LIT14 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT14)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT15,1,3) {&Flags_FlagVisibility_INTERNAL__desc,}};
#define _OMC_LIT15 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT15)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT16,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT16 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "Set when checkModel is used to turn on specific features for checking."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,70,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT18,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT17}};
#define _OMC_LIT18 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT18)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT19,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(31)),_OMC_LIT14,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT15,_OMC_LIT16,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT18}};
#define _OMC_LIT19 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT19)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT20,1,7) {&DAE_Dimension_DIM__UNKNOWN__desc,}};
#define _OMC_LIT20 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT20)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT21,1,1) {_OMC_LIT20}};
#define _OMC_LIT21 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT21)
#define _OMC_LIT22_data "["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT22,1,_OMC_LIT22_data);
#define _OMC_LIT22 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT22)
#define _OMC_LIT23_data "]"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT23,1,_OMC_LIT23_data);
#define _OMC_LIT23 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT23)
#define _OMC_LIT24_data "Could not evaluate structural parameter (or constant): %s which gives dimensions of array: %s. Array dimensions must be known at compile time."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT24,142,_OMC_LIT24_data);
#define _OMC_LIT24 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT24}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT26,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5033)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT25}};
#define _OMC_LIT26 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT26)
#define _OMC_LIT27_data "Integer"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT27,7,_OMC_LIT27_data);
#define _OMC_LIT27 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT27)
#define _OMC_LIT28_data "Array dimension must be integer expression in %s which has type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT28,67,_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(44)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT29}};
#define _OMC_LIT30 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT30)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT31,1,4) {&DAE_Dimension_DIM__BOOLEAN__desc,}};
#define _OMC_LIT31 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT31)
#define _OMC_LIT32_data "failtrace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT32,9,_OMC_LIT32_data);
#define _OMC_LIT32 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT32)
#define _OMC_LIT33_data "Sets whether to print a failtrace or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT33,41,_OMC_LIT33_data);
#define _OMC_LIT33 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT33)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT34,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT33}};
#define _OMC_LIT34 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT34)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT35,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT32,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT34}};
#define _OMC_LIT35 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT35)
#define _OMC_LIT36_data "- Static.elabArrayDim failed on: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT36,33,_OMC_LIT36_data);
#define _OMC_LIT36 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT36)
#define _OMC_LIT37_data "Boolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT37,7,_OMC_LIT37_data);
#define _OMC_LIT37 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT37)
#define _OMC_LIT38_data "elabCodeExp_dispatch1"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT38,21,_OMC_LIT38_data);
#define _OMC_LIT38 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT38)
#define _OMC_LIT39_data "OpenModelica"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT39,12,_OMC_LIT39_data);
#define _OMC_LIT39 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT39)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT40,1,3) {&DAE_Prefix_NOPRE__desc,}};
#define _OMC_LIT40 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "elabCodeExp_dispatch"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,20,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT42,1,11) {&DAE_Type_T__UNKNOWN__desc,}};
#define _OMC_LIT42 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT42)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT43,1,7) {&DAE_CodeType_C__VARIABLENAME__desc,}};
#define _OMC_LIT43 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT43)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT44,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT44 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT44)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT45,2,1) {_OMC_LIT44,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT45 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT45)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT46,3,9) {&DAE_Type_T__ARRAY__desc,_OMC_LIT42,_OMC_LIT45}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "Failed to elaborate %s as a code expression of type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,55,_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(166)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT48}};
#define _OMC_LIT49 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data "der"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,3,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT51,1,6) {&DAE_Const_C__UNKNOWN__desc,}};
#define _OMC_LIT51 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,1,5) {&DAE_Const_C__VAR__desc,}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT53,1,6) {&DAE_ComponentRef_WILD__desc,}};
#define _OMC_LIT53 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT53)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT54,1,4) {&Absyn_Msg_NO__MSG__desc,}};
#define _OMC_LIT54 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT54)
#define _OMC_LIT55_data "- Static.canonCref failed, cr: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT55,31,_OMC_LIT55_data);
#define _OMC_LIT55 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT55)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT56,2,6) {&DAE_Type_T__BOOL__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT56 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT56)
#define _OMC_LIT57_data "Type error in conditional '%s'. Expected Boolean, got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT57,57,_OMC_LIT57_data);
#define _OMC_LIT57 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT57)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT58,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT57}};
#define _OMC_LIT58 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT58)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT59,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(10)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT58}};
#define _OMC_LIT59 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT59)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT60,1,3) {&DAE_Const_C__CONST__desc,}};
#define _OMC_LIT60 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT60)
#define _OMC_LIT61_data "Type mismatch in if-expression in component %s. True branch: %s has type %s, false branch: %s has type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT61,106,_OMC_LIT61_data);
#define _OMC_LIT61 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT61)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT62,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT61}};
#define _OMC_LIT62 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(83)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT62}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
#define _OMC_LIT64_data "- subscript_type failed ("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT64,25,_OMC_LIT64_data);
#define _OMC_LIT64 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT64)
#define _OMC_LIT65_data " , [...])\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT65,10,_OMC_LIT65_data);
#define _OMC_LIT65 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT65)
#define _OMC_LIT66_data "Subscript %s of type %s is not a subtype of Integer, Boolean or enumeration."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT66,76,_OMC_LIT66_data);
#define _OMC_LIT66 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT66}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT68,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(82)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT67}};
#define _OMC_LIT68 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,1,3) {&DAE_Subscript_WHOLEDIM__desc,}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
#define _OMC_LIT70_data "- Static.elabSubscript failed on "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT70,33,_OMC_LIT70_data);
#define _OMC_LIT70 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT70)
#define _OMC_LIT71_data " in env: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT71,9,_OMC_LIT71_data);
#define _OMC_LIT71 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT71)
#define _OMC_LIT72_data "Illegal subscript %s for dimensions %s in component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT72,55,_OMC_LIT72_data);
#define _OMC_LIT72 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT72)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT73,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT72}};
#define _OMC_LIT73 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT73)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT74,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(104)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT73}};
#define _OMC_LIT74 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT74)
#define _OMC_LIT75_data "Wrong number of subscripts in %s (%s subscripts for %s dimensions)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT75,67,_OMC_LIT75_data);
#define _OMC_LIT75 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT75)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT76,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT75}};
#define _OMC_LIT76 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT76)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT77,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(154)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT76}};
#define _OMC_LIT77 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT77)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT78,1,3) {&SCode_Variability_VAR__desc,}};
#define _OMC_LIT78 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT78)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT79,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT7}};
#define _OMC_LIT79 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT79)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT80,2,3) {&ClassInf_State_UNKNOWN__desc,_OMC_LIT79}};
#define _OMC_LIT80 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT80)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT81,4,12) {&DAE_Type_T__COMPLEX__desc,_OMC_LIT80,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT81 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT81)
#define _OMC_LIT82_data "- Static.elabCrefSubs failed on: [top:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT82,38,_OMC_LIT82_data);
#define _OMC_LIT82 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT82)
#define _OMC_LIT83_data "]."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT83,2,_OMC_LIT83_data);
#define _OMC_LIT83 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,1,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data " env: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,6,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
#define _OMC_LIT86_data "- Static.createCrefArray2d failed on: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT86,38,_OMC_LIT86_data);
#define _OMC_LIT86 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data "createCrefArray failed on:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,26,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "- Static.callVectorize failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,30,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,2,3) {&DAE_Type_T__INTEGER__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT90,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT90 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT90)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT91,2,1) {_OMC_LIT90,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT91 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data "- Static.removeDoubleEmptyArrays failure for: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,46,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
#define _OMC_LIT93_data "\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT93,1,_OMC_LIT93_data);
#define _OMC_LIT93 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT93)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT94,4,19) {&DAE_Exp_ARRAY__desc,_OMC_LIT42,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT94 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT94)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT95,1,3) {&DAE_BindingSource_BINDING__FROM__DEFAULT__VALUE__desc,}};
#define _OMC_LIT95 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "evaluateAllParameters"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,21,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
#define _OMC_LIT97_data "Evaluates all parameters if set."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT97,32,_OMC_LIT97_data);
#define _OMC_LIT97 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT97)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT98,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT97}};
#define _OMC_LIT98 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT98)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT99,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(26)),_OMC_LIT96,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT98}};
#define _OMC_LIT99 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT99)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT100,1,6) {&SCode_Variability_CONST__desc,}};
#define _OMC_LIT100 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT100)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT101,1,4) {&DAE_Const_C__PARAM__desc,}};
#define _OMC_LIT101 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "- Static.elabCref2 failed on: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,30,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
#define _OMC_LIT103_data " with no constant binding in scope: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT103,36,_OMC_LIT103_data);
#define _OMC_LIT103 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "static"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,6,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
#define _OMC_LIT105_data "Enables extra debug output from the static elaboration."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT105,55,_OMC_LIT105_data);
#define _OMC_LIT105 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT105)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT106,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT105}};
#define _OMC_LIT106 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT106)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT107,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(63)),_OMC_LIT104,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT106}};
#define _OMC_LIT107 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT107)
#define _OMC_LIT108_data "- Static.elabCref2 failed for: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT108,31,_OMC_LIT108_data);
#define _OMC_LIT108 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT108)
#define _OMC_LIT109_data "\n env:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT109,6,_OMC_LIT109_data);
#define _OMC_LIT109 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT109)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT110,1,5) {&SCode_Variability_PARAM__desc,}};
#define _OMC_LIT110 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT110)
#define _OMC_LIT111_data "Static.lookupFunctionsInEnvNoError"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT111,34,_OMC_LIT111_data);
#define _OMC_LIT111 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT111)
#define _OMC_LIT112_data "Built-in variable 'time' may only be used in a model or block."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT112,62,_OMC_LIT112_data);
#define _OMC_LIT112 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT112}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT114,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(288)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT113}};
#define _OMC_LIT114 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT114)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT115,2,19) {&DAE_Type_T__ANYTYPE__desc,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT115 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT115)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT116,1,6) {&DAE_ConnectorType_NON__CONNECTOR__desc,}};
#define _OMC_LIT116 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,1,5) {&SCode_Parallelism_NON__PARALLEL__desc,}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT118,1,5) {&Absyn_Direction_BIDIR__desc,}};
#define _OMC_LIT118 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT119,1,6) {&Absyn_InnerOuter_NOT__INNER__OUTER__desc,}};
#define _OMC_LIT119 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT119)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT120,1,3) {&SCode_Visibility_PUBLIC__desc,}};
#define _OMC_LIT120 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT120)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT121,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT116,_OMC_LIT117,_OMC_LIT78,_OMC_LIT118,_OMC_LIT119,_OMC_LIT120}};
#define _OMC_LIT121 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT121)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT122,2,6) {&DAE_Exp_BCONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT122 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT122)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT123,2,6) {&DAE_Exp_BCONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT123 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT123)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT124,2,1) {_OMC_LIT123,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT124 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT124)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT125,2,1) {_OMC_LIT122,_OMC_LIT124}};
#define _OMC_LIT125 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT125)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT126,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT126 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT126)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT127,2,1) {_OMC_LIT126,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT127 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT127)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT128,3,9) {&DAE_Type_T__ARRAY__desc,_OMC_LIT56,_OMC_LIT127}};
#define _OMC_LIT128 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT128)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT129,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT116,_OMC_LIT117,_OMC_LIT100,_OMC_LIT118,_OMC_LIT119,_OMC_LIT120}};
#define _OMC_LIT129 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT129)
#define _OMC_LIT130_data "time"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT130,4,_OMC_LIT130_data);
#define _OMC_LIT130 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT130)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT131,2,4) {&DAE_Type_T__REAL__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT131 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT131)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT132,4,4) {&DAE_ComponentRef_CREF__IDENT__desc,_OMC_LIT130,_OMC_LIT131,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT132 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT132)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT133,3,9) {&DAE_Exp_CREF__desc,_OMC_LIT132,_OMC_LIT131}};
#define _OMC_LIT133 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT133)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT134,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT131,_OMC_LIT52}};
#define _OMC_LIT134 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT134)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT135,1,3) {&Absyn_Direction_INPUT__desc,}};
#define _OMC_LIT135 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT135)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT136,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT116,_OMC_LIT117,_OMC_LIT78,_OMC_LIT135,_OMC_LIT119,_OMC_LIT120}};
#define _OMC_LIT136 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT136)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT137,3,0) {_OMC_LIT133,_OMC_LIT134,_OMC_LIT136}};
#define _OMC_LIT137 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT137)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT138,1,1) {_OMC_LIT137}};
#define _OMC_LIT138 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT138)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT139,1,3) {&DAE_FunctionBuiltin_FUNCTION__NOT__BUILTIN__desc,}};
#define _OMC_LIT139 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT139)
#define _OMC_LIT140_data "NONE is not acceptable syntax. Use NONE() instead."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT140,50,_OMC_LIT140_data);
#define _OMC_LIT140 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT140)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT141,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT140}};
#define _OMC_LIT141 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT141)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT142,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5017)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT141}};
#define _OMC_LIT142 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT142)
#define _OMC_LIT143_data "- Static.elabCref failed: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT143,26,_OMC_LIT143_data);
#define _OMC_LIT143 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT143)
#define _OMC_LIT144_data "Variable %s not found in scope %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT144,34,_OMC_LIT144_data);
#define _OMC_LIT144 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT144)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT145,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT144}};
#define _OMC_LIT145 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT145)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT146,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT145}};
#define _OMC_LIT146 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT146)
#define _OMC_LIT147_data "NONE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT147,4,_OMC_LIT147_data);
#define _OMC_LIT147 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT147)
#define _OMC_LIT148_data "Slot %s already filled in a function call in component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT148,58,_OMC_LIT148_data);
#define _OMC_LIT148 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT148)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT149,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT148}};
#define _OMC_LIT149 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT149)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT150,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(79)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT149}};
#define _OMC_LIT150 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT150)
#define _OMC_LIT151_data "Function argument %s=%s in call to %s has variability %s which is not a %s expression."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT151,86,_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(195)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT152}};
#define _OMC_LIT153 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153)
#define _OMC_LIT154_data "$in_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT154,4,_OMC_LIT154_data);
#define _OMC_LIT154 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT154)
#define _OMC_LIT155_data "Function %s has no parameter named %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT155,38,_OMC_LIT155_data);
#define _OMC_LIT155 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT155)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT156,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT155}};
#define _OMC_LIT156 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT156)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT157,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(80)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT156}};
#define _OMC_LIT157 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT157)
#define _OMC_LIT158_data "Type mismatch for named argument in %s(%s=%s). The argument has type:\n  %s\nexpected type:\n  %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT158,94,_OMC_LIT158_data);
#define _OMC_LIT158 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT158)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT159,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT158}};
#define _OMC_LIT159 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT159)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT160,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(268)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT159}};
#define _OMC_LIT160 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT160)
#define _OMC_LIT161_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_STRUCT161,102,_OMC_LIT161_data);
#define _OMC_LIT161 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT161)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT162,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT161}};
#define _OMC_LIT162 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT162)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT163,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(269)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT162}};
#define _OMC_LIT163 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT163)
#define _OMC_LIT164_data "filled"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT164,6,_OMC_LIT164_data);
#define _OMC_LIT164 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT164)
#define _OMC_LIT165_data "not filled"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT165,10,_OMC_LIT165_data);
#define _OMC_LIT165 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT165)
#define _OMC_LIT166_data ", "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT166,2,_OMC_LIT166_data);
#define _OMC_LIT166 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT166)
#define _OMC_LIT167_data "SLOT("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT167,5,_OMC_LIT167_data);
#define _OMC_LIT167 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT167)
#define _OMC_LIT168_data ", ["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT168,3,_OMC_LIT168_data);
#define _OMC_LIT168 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT168)
#define _OMC_LIT169_data "])\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT169,3,_OMC_LIT169_data);
#define _OMC_LIT169 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT169)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT170,2,1) {_OMC_LIT60,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT170 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT170)
#define _OMC_LIT171_data "No support for tuples built by tuples"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT171,37,_OMC_LIT171_data);
#define _OMC_LIT171 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT171)
#define _OMC_LIT172_data "Static.mo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT172,9,_OMC_LIT172_data);
#define _OMC_LIT172 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT172)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT173_6,0.0);
#define _OMC_LIT173_6 MMC_REFREALLIT(_OMC_LIT_STRUCT173_6)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT173,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT172,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(9285)),MMC_IMMEDIATE(MMC_TAGFIXNUM(9)),MMC_IMMEDIATE(MMC_TAGFIXNUM(9285)),MMC_IMMEDIATE(MMC_TAGFIXNUM(86)),_OMC_LIT173_6}};
#define _OMC_LIT173 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT173)
#define _OMC_LIT174_data "- Static.getProperties failed: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT174,31,_OMC_LIT174_data);
#define _OMC_LIT174 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT174)
#define _OMC_LIT175_data "Failed to vectorize function call because arguments %s=%s and %s=%s have mismatched dimensions %s and %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT175,105,_OMC_LIT175_data);
#define _OMC_LIT175 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT175)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT176,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT175}};
#define _OMC_LIT176 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT176)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT177,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(274)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT176}};
#define _OMC_LIT177 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT177)
#define _OMC_LIT178_data "-slots_vectorizable failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT178,27,_OMC_LIT178_data);
#define _OMC_LIT178 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT178)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT179,1,5) {&DAE_Mod_NOMOD__desc,}};
#define _OMC_LIT179 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT179)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT180,1,4) {&FCore_Status_VAR__TYPED__desc,}};
#define _OMC_LIT180 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT180)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT181,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT116,_OMC_LIT117,_OMC_LIT110,_OMC_LIT118,_OMC_LIT119,_OMC_LIT120}};
#define _OMC_LIT181 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT181)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT182,1,3) {&DAE_Binding_UNBOUND__desc,}};
#define _OMC_LIT182 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT182)
#define _OMC_LIT183_data "dummy"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT183,5,_OMC_LIT183_data);
#define _OMC_LIT183 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT183)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT184,1,4) {&SCode_Redeclare_NOT__REDECLARE__desc,}};
#define _OMC_LIT184 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT184)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT185,1,4) {&SCode_Final_NOT__FINAL__desc,}};
#define _OMC_LIT185 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT185)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT186,1,4) {&SCode_Replaceable_NOT__REPLACEABLE__desc,}};
#define _OMC_LIT186 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT186)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT187,6,3) {&SCode_Prefixes_PREFIXES__desc,_OMC_LIT120,_OMC_LIT184,_OMC_LIT185,_OMC_LIT119,_OMC_LIT186}};
#define _OMC_LIT187 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT187)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT188,1,3) {&SCode_ConnectorType_POTENTIAL__desc,}};
#define _OMC_LIT188 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT188)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT189,1,3) {&Absyn_IsField_NONFIELD__desc,}};
#define _OMC_LIT189 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT189)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT190,7,3) {&SCode_Attributes_ATTR__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT188,_OMC_LIT117,_OMC_LIT78,_OMC_LIT118,_OMC_LIT189}};
#define _OMC_LIT190 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT190)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT191,3,3) {&Absyn_TypeSpec_TPATH__desc,_OMC_LIT79,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT191 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT191)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT192,1,5) {&SCode_Mod_NOMOD__desc,}};
#define _OMC_LIT192 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT192)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT193,3,3) {&SCode_Comment_COMMENT__desc,MMC_REFSTRUCTLIT(mmc_none),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT193 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT193)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT194,9,6) {&SCode_Element_COMPONENT__desc,_OMC_LIT183,_OMC_LIT187,_OMC_LIT190,_OMC_LIT191,_OMC_LIT192,_OMC_LIT193,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT9}};
#define _OMC_LIT194 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT194)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT195,1,4) {&SCode_Encapsulated_NOT__ENCAPSULATED__desc,}};
#define _OMC_LIT195 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT195)
#define _OMC_LIT196_data "$for loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT196,16,_OMC_LIT196_data);
#define _OMC_LIT196 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT196)
#define _OMC_LIT197_data "$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT197,1,_OMC_LIT197_data);
#define _OMC_LIT197 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT197)
#define _OMC_LIT198_data "Too many type variables given in call to ‘%s‘."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT198,50,_OMC_LIT198_data);
#define _OMC_LIT198 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT198)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT199,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT198}};
#define _OMC_LIT199 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT199)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT200,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(377)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT199}};
#define _OMC_LIT200 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT200)
#define _OMC_LIT201_data "-Static.vectorizeCallScalar failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT201,35,_OMC_LIT201_data);
#define _OMC_LIT201 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT201)
#define _OMC_LIT202_data "Internal error %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT202,17,_OMC_LIT202_data);
#define _OMC_LIT202 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT202)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT203,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT202}};
#define _OMC_LIT203 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT203)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT204,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(63)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT203}};
#define _OMC_LIT204 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT204)
#define _OMC_LIT205_data "Static.vectorizeCallUnknownDimension could not find any slot to vectorize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT205,73,_OMC_LIT205_data);
#define _OMC_LIT205 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT205)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT206,2,1) {_OMC_LIT205,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT206 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT206)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT207,1,4) {&Absyn_ReductionIterType_THREAD__desc,}};
#define _OMC_LIT207 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT207)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT208,1,3) {&Absyn_ReductionIterType_COMBINE__desc,}};
#define _OMC_LIT208 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT208)
#define _OMC_LIT209_data "array"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT209,5,_OMC_LIT209_data);
#define _OMC_LIT209 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT209)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT210,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT209}};
#define _OMC_LIT210 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT210)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT211,2,1) {MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT211 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT211)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT212,3,8) {&Values_Value_ARRAY__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT211}};
#define _OMC_LIT212 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT212)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT213,1,1) {_OMC_LIT212}};
#define _OMC_LIT213 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT213)
#define _OMC_LIT214_data "Cannot vectorize call with dimensions ["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT214,39,_OMC_LIT214_data);
#define _OMC_LIT214 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT214)
#define _OMC_LIT215_data "- Static.vectorizeCall failed: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT215,31,_OMC_LIT215_data);
#define _OMC_LIT215 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT215)
#define _OMC_LIT216_data "constructor"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT216,11,_OMC_LIT216_data);
#define _OMC_LIT216 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT216)
#define _OMC_LIT217_data "destructor"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT217,10,_OMC_LIT217_data);
#define _OMC_LIT217 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT217)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT218,1,8) {&ErrorTypes_MessageType_SCRIPTING__desc,}};
#define _OMC_LIT218 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT218)
#define _OMC_LIT219_data "The default value of %s causes a cyclic dependency."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT219,51,_OMC_LIT219_data);
#define _OMC_LIT219 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT219)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT220,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT219}};
#define _OMC_LIT220 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT220)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT221,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(267)),_OMC_LIT218,_OMC_LIT1,_OMC_LIT220}};
#define _OMC_LIT221 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT221)
#define _OMC_LIT222_data "Function parameter %s was not given by the function call, and does not have a default value."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT222,92,_OMC_LIT222_data);
#define _OMC_LIT222 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT222)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT223,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT222}};
#define _OMC_LIT223 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT223)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT224,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(203)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT223}};
#define _OMC_LIT224 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT224)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT225,1,3) {&Util_Status_SUCCESS__desc,}};
#define _OMC_LIT225 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT225)
#define _OMC_LIT226_data "Failed to instantiate function %s in scope %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT226,46,_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(145)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT227}};
#define _OMC_LIT228 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT228)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT229,1,4) {&Util_Status_FAILURE__desc,}};
#define _OMC_LIT229 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT229)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT230,1,3) {&Static_ForceFunctionInst_FORCE__FUNCTION__INST__desc,}};
#define _OMC_LIT230 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT230)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT231,1,4) {&Static_ForceFunctionInst_NORMAL__FUNCTION__INST__desc,}};
#define _OMC_LIT231 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT231)
#define _OMC_LIT232_data "The called uniontype record (%s) contains a member (%s) that has a uniontype record as its type instead of a uniontype."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT232,119,_OMC_LIT232_data);
#define _OMC_LIT232 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT232)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT233,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT232}};
#define _OMC_LIT233 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT233)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT234,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(168)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT233}};
#define _OMC_LIT234 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT234)
#define _OMC_LIT235_data "Failed to match types:\n    actual:   "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT235,37,_OMC_LIT235_data);
#define _OMC_LIT235 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT235)
#define _OMC_LIT236_data "\n    expected: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT236,15,_OMC_LIT236_data);
#define _OMC_LIT236 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT236)
#define _OMC_LIT237_data "In record constructor %s: %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT237,28,_OMC_LIT237_data);
#define _OMC_LIT237 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT237)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT238,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT237}};
#define _OMC_LIT238 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT238)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT239,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5011)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT238}};
#define _OMC_LIT239 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT239)
#define _OMC_LIT240_data "Failed to elaborate arguments "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT240,30,_OMC_LIT240_data);
#define _OMC_LIT240 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT240)
#define _OMC_LIT241_data "$foriter loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT241,20,_OMC_LIT241_data);
#define _OMC_LIT241 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT241)
#define _OMC_LIT242_data "$pafor loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT242,18,_OMC_LIT242_data);
#define _OMC_LIT242 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT242)
#define _OMC_LIT243_data "$parforiter loop scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT243,23,_OMC_LIT243_data);
#define _OMC_LIT243 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT243)
#define _OMC_LIT244_data "$match scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT244,13,_OMC_LIT244_data);
#define _OMC_LIT244 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT244)
#define _OMC_LIT245_data "$case scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT245,12,_OMC_LIT245_data);
#define _OMC_LIT245 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT245)
#define _OMC_LIT246_data "$pattern type scope$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT246,20,_OMC_LIT246_data);
#define _OMC_LIT246 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT246)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT247,2,1) {_OMC_LIT246,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT247 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT247)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT248,2,1) {_OMC_LIT245,_OMC_LIT247}};
#define _OMC_LIT248 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT248)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT249,2,1) {_OMC_LIT244,_OMC_LIT248}};
#define _OMC_LIT249 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT249)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT250,2,1) {_OMC_LIT243,_OMC_LIT249}};
#define _OMC_LIT250 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT250)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT251,2,1) {_OMC_LIT242,_OMC_LIT250}};
#define _OMC_LIT251 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT251)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT252,2,1) {_OMC_LIT241,_OMC_LIT251}};
#define _OMC_LIT252 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT252)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT253,2,1) {_OMC_LIT196,_OMC_LIT252}};
#define _OMC_LIT253 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT253)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT254,1,4) {&FCore_ScopeType_CLASS__SCOPE__desc,}};
#define _OMC_LIT254 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT254)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT255,1,1) {_OMC_LIT254}};
#define _OMC_LIT255 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT255)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT256,1,3) {&FCore_ScopeType_FUNCTION__SCOPE__desc,}};
#define _OMC_LIT256 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT256)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT257,1,1) {_OMC_LIT256}};
#define _OMC_LIT257 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT257)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT258,1,5) {&FCore_ScopeType_PARALLEL__SCOPE__desc,}};
#define _OMC_LIT258 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT258)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT259,1,1) {_OMC_LIT258}};
#define _OMC_LIT259 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT259)
#define _OMC_LIT260_data "\n- Non-Parallel function '"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT260,26,_OMC_LIT260_data);
#define _OMC_LIT260 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT260)
#define _OMC_LIT261_data "' can not be called from a parallel scope."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT261,42,_OMC_LIT261_data);
#define _OMC_LIT261 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT261)
#define _OMC_LIT262_data "- Here called from :"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT262,20,_OMC_LIT262_data);
#define _OMC_LIT262 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT262)
#define _OMC_LIT263_data "- Please declare the function as parallel function."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT263,51,_OMC_LIT263_data);
#define _OMC_LIT263 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT263)
#define _OMC_LIT264_data "ParModelica: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT264,16,_OMC_LIT264_data);
#define _OMC_LIT264 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT264)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT265,2,4) {&Gettext_TranslatableContent_notrans__desc,_OMC_LIT264}};
#define _OMC_LIT265 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT265)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT266,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(7005)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT265}};
#define _OMC_LIT266 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT266)
#define _OMC_LIT267_data "\n- Parallel function '"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT267,22,_OMC_LIT267_data);
#define _OMC_LIT267 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT267)
#define _OMC_LIT268_data "' can not call itself. Recurrsion is not allowed for parallel functions currently."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT268,82,_OMC_LIT268_data);
#define _OMC_LIT268 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT268)
#define _OMC_LIT269_data "- Parallel functions can only be called from: 'kernel' functions,"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT269,65,_OMC_LIT269_data);
#define _OMC_LIT269 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT269)
#define _OMC_LIT270_data " OTHER 'parallel' functions (no recurrsion) or from a body of a"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT270,63,_OMC_LIT270_data);
#define _OMC_LIT270 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT270)
#define _OMC_LIT271_data " 'parfor' loop"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT271,14,_OMC_LIT271_data);
#define _OMC_LIT271 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT271)
#define _OMC_LIT272_data "' can not be called from a non parallel scope '"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT272,47,_OMC_LIT272_data);
#define _OMC_LIT272 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT272)
#define _OMC_LIT273_data "'.\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT273,3,_OMC_LIT273_data);
#define _OMC_LIT273 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT273)
#define _OMC_LIT274_data " other 'parallel' functions (no recurrsion) or from a body of a"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT274,63,_OMC_LIT274_data);
#define _OMC_LIT274 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT274)
#define _OMC_LIT275_data "\n- Kernel function '"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT275,20,_OMC_LIT275_data);
#define _OMC_LIT275 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT275)
#define _OMC_LIT276_data "' can not call itself. "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT276,23,_OMC_LIT276_data);
#define _OMC_LIT276 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT276)
#define _OMC_LIT277_data "- Recurrsion is not allowed for Kernel functions. "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT277,50,_OMC_LIT277_data);
#define _OMC_LIT277 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT277)
#define _OMC_LIT278_data "' can not be called from a parallel scope '"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT278,43,_OMC_LIT278_data);
#define _OMC_LIT278 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT278)
#define _OMC_LIT279_data "- Kernel functions CAN NOT be called from: 'kernel' functions,"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT279,62,_OMC_LIT279_data);
#define _OMC_LIT279 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT279)
#define _OMC_LIT280_data " 'parallel' functions or from a body of a"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT280,41,_OMC_LIT280_data);
#define _OMC_LIT280 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT280)
#define _OMC_LIT281_data "' can not be called from inside parallel for (parfor) loop body."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT281,64,_OMC_LIT281_data);
#define _OMC_LIT281 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT281)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT282,1,4) {&DAE_InlineType_BUILTIN__EARLY__INLINE__desc,}};
#define _OMC_LIT282 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT282)
#define _OMC_LIT283_data "rml"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT283,3,_OMC_LIT283_data);
#define _OMC_LIT283 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT283)
#define _OMC_LIT284_data "Converts Modelica-style arrays to lists."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT284,40,_OMC_LIT284_data);
#define _OMC_LIT284 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT284)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT285,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT284}};
#define _OMC_LIT285 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT285)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT286,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(18)),_OMC_LIT283,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT285}};
#define _OMC_LIT286 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT286)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT287,1,3) {&DAE_TailCall_NO__TAIL__desc,}};
#define _OMC_LIT287 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT287)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT288,1,5) {&DAE_InlineType_EARLY__INLINE__desc,}};
#define _OMC_LIT288 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT288)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT289,2,1) {_OMC_LIT288,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT289 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT289)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT290,2,1) {_OMC_LIT282,_OMC_LIT289}};
#define _OMC_LIT290 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT290)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT291,1,4) {&DAE_ComponentPrefix_NOCOMPPRE__desc,}};
#define _OMC_LIT291 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT291)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT292,8,3) {&DAE_ElementSource_SOURCE__desc,_OMC_LIT9,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT291,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT292 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT292)
#define _OMC_LIT293_data "GraphicalAnnotationsProgram____"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT293,31,_OMC_LIT293_data);
#define _OMC_LIT293 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT293)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT294,1,7) {&DAE_InlineType_NO__INLINE__desc,}};
#define _OMC_LIT294 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT294)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT295,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT42,_OMC_LIT60}};
#define _OMC_LIT295 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT295)
#define _OMC_LIT296_data "RecordConstructor"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT296,17,_OMC_LIT296_data);
#define _OMC_LIT296 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT296)
#define _OMC_LIT297_data "'constructor'"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT297,13,_OMC_LIT297_data);
#define _OMC_LIT297 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT297)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT298,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT297}};
#define _OMC_LIT298 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT298)
#define _OMC_LIT299_data "elabCallArgs2FunctionLookup"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT299,27,_OMC_LIT299_data);
#define _OMC_LIT299 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT299)
#define _OMC_LIT300_data "("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT300,1,_OMC_LIT300_data);
#define _OMC_LIT300 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT300)
#define _OMC_LIT301_data ")\nof type\n  "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT301,12,_OMC_LIT301_data);
#define _OMC_LIT301 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT301)
#define _OMC_LIT302_data "\n  "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT302,3,_OMC_LIT302_data);
#define _OMC_LIT302 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT302)
#define _OMC_LIT303_data "No matching function found for %s in component %s\ncandidates are %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT303,67,_OMC_LIT303_data);
#define _OMC_LIT303 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT303)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT304,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT303}};
#define _OMC_LIT304 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT304)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT305,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(76)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT304}};
#define _OMC_LIT305 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT305)
#define _OMC_LIT306_data "Looking for a function %s but found a %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT306,41,_OMC_LIT306_data);
#define _OMC_LIT306 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT306)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT307,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT306}};
#define _OMC_LIT307 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT307)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT308,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(148)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT307}};
#define _OMC_LIT308 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT308)
#define _OMC_LIT309_data "\n -"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT309,3,_OMC_LIT309_data);
#define _OMC_LIT309 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT309)
#define _OMC_LIT310_data " (looking for a function or record)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT310,35,_OMC_LIT310_data);
#define _OMC_LIT310 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT310)
#define _OMC_LIT311_data "Class %s not found in scope %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT311,31,_OMC_LIT311_data);
#define _OMC_LIT311 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT311)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT312,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT311}};
#define _OMC_LIT312 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT312)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT313,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(3)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT312}};
#define _OMC_LIT313 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT313)
#define _OMC_LIT314_data " in component "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT314,14,_OMC_LIT314_data);
#define _OMC_LIT314 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT314)
#define _OMC_LIT315_data "No matching function found for %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(77)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT316}};
#define _OMC_LIT317 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT317)
#define _OMC_LIT318_data "- Static.elabCallArgs failed on: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT318,33,_OMC_LIT318_data);
#define _OMC_LIT318 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT318)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT319,1,5) {&DAE_VarParallelism_NON__PARALLEL__desc,}};
#define _OMC_LIT319 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT319)
#define _OMC_LIT320_data "Connections"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT320,11,_OMC_LIT320_data);
#define _OMC_LIT320 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT320)
#define _OMC_LIT321_data "isRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT321,6,_OMC_LIT321_data);
#define _OMC_LIT321 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT321)
#define _OMC_LIT322_data "uniqueRootIndices"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT322,17,_OMC_LIT322_data);
#define _OMC_LIT322 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT322)
#define _OMC_LIT323_data "rooted"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT323,6,_OMC_LIT323_data);
#define _OMC_LIT323 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT323)
#define _OMC_LIT324_data ").\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT324,3,_OMC_LIT324_data);
#define _OMC_LIT324 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT324)
#define _OMC_LIT325_data "Wrong type or wrong number of arguments to %s (in component %s)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT325,64,_OMC_LIT325_data);
#define _OMC_LIT325 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT325)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT326,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT325}};
#define _OMC_LIT326 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT326)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT327,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(68)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT326}};
#define _OMC_LIT327 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT327)
#define _OMC_LIT328_data "elabCall_InteractiveFunction"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT328,28,_OMC_LIT328_data);
#define _OMC_LIT328 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT328)
#define _OMC_LIT329_data "- Static.elabCall failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT329,25,_OMC_LIT329_data);
#define _OMC_LIT329 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT329)
#define _OMC_LIT330_data " function: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT330,11,_OMC_LIT330_data);
#define _OMC_LIT330 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT330)
#define _OMC_LIT331_data "   posargs: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT331,12,_OMC_LIT331_data);
#define _OMC_LIT331 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT331)
#define _OMC_LIT332_data " prefix: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT332,9,_OMC_LIT332_data);
#define _OMC_LIT332 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT332)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT333,1,5) {&ErrorTypes_Severity_WARNING__desc,}};
#define _OMC_LIT333 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT333)
#define _OMC_LIT334_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_STRUCT334,147,_OMC_LIT334_data);
#define _OMC_LIT334 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT334)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT335,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT334}};
#define _OMC_LIT335 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT335)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT336,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(547)),_OMC_LIT0,_OMC_LIT333,_OMC_LIT335}};
#define _OMC_LIT336 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT336)
#define _OMC_LIT337_data "Connections.uniqueRootIndices"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT337,29,_OMC_LIT337_data);
#define _OMC_LIT337 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT337)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT338,2,1) {_OMC_LIT337,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT338 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT338)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT339,3,4) {&DAE_FunctionBuiltin_FUNCTION__BUILTIN__desc,MMC_REFSTRUCTLIT(mmc_none),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT339 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT339)
#define _OMC_LIT340_data "smooth"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT340,6,_OMC_LIT340_data);
#define _OMC_LIT340 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT340)
#define _OMC_LIT341_data "ndims"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT341,5,_OMC_LIT341_data);
#define _OMC_LIT341 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT341)
#define _OMC_LIT342_data "zeros"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT342,5,_OMC_LIT342_data);
#define _OMC_LIT342 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT342)
#define _OMC_LIT343_data "ones"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT343,4,_OMC_LIT343_data);
#define _OMC_LIT343 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT343)
#define _OMC_LIT344_data "fill"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT344,4,_OMC_LIT344_data);
#define _OMC_LIT344 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT344)
#define _OMC_LIT345_data "max"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT345,3,_OMC_LIT345_data);
#define _OMC_LIT345 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT345)
#define _OMC_LIT346_data "min"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT346,3,_OMC_LIT346_data);
#define _OMC_LIT346 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT346)
#define _OMC_LIT347_data "transpose"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT347,9,_OMC_LIT347_data);
#define _OMC_LIT347 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT347)
#define _OMC_LIT348_data "symmetric"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT348,9,_OMC_LIT348_data);
#define _OMC_LIT348 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT348)
#define _OMC_LIT349_data "sum"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT349,3,_OMC_LIT349_data);
#define _OMC_LIT349 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT349)
#define _OMC_LIT350_data "product"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT350,7,_OMC_LIT350_data);
#define _OMC_LIT350 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT350)
#define _OMC_LIT351_data "pre"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT351,3,_OMC_LIT351_data);
#define _OMC_LIT351 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT351)
#define _OMC_LIT352_data "firstTick"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT352,9,_OMC_LIT352_data);
#define _OMC_LIT352 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT352)
#define _OMC_LIT353_data "interval"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT353,8,_OMC_LIT353_data);
#define _OMC_LIT353 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT353)
#define _OMC_LIT354_data "boolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT354,7,_OMC_LIT354_data);
#define _OMC_LIT354 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT354)
#define _OMC_LIT355_data "noEvent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT355,7,_OMC_LIT355_data);
#define _OMC_LIT355 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT355)
#define _OMC_LIT356_data "edge"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT356,4,_OMC_LIT356_data);
#define _OMC_LIT356 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT356)
#define _OMC_LIT357_data "change"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT357,6,_OMC_LIT357_data);
#define _OMC_LIT357 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT357)
#define _OMC_LIT358_data "cat"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT358,3,_OMC_LIT358_data);
#define _OMC_LIT358 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT358)
#define _OMC_LIT359_data "identity"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT359,8,_OMC_LIT359_data);
#define _OMC_LIT359 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT359)
#define _OMC_LIT360_data "vector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT360,6,_OMC_LIT360_data);
#define _OMC_LIT360 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT360)
#define _OMC_LIT361_data "matrix"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT361,6,_OMC_LIT361_data);
#define _OMC_LIT361 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT361)
#define _OMC_LIT362_data "scalar"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT362,6,_OMC_LIT362_data);
#define _OMC_LIT362 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT362)
#define _OMC_LIT363_data "String"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT363,6,_OMC_LIT363_data);
#define _OMC_LIT363 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT363)
#define _OMC_LIT364_data "EnumToInteger"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT364,13,_OMC_LIT364_data);
#define _OMC_LIT364 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT364)
#define _OMC_LIT365_data "inStream"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT365,8,_OMC_LIT365_data);
#define _OMC_LIT365 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT365)
#define _OMC_LIT366_data "actualStream"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT366,12,_OMC_LIT366_data);
#define _OMC_LIT366 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT366)
#define _OMC_LIT367_data "getInstanceName"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT367,15,_OMC_LIT367_data);
#define _OMC_LIT367 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT367)
#define _OMC_LIT368_data "classDirectory"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT368,14,_OMC_LIT368_data);
#define _OMC_LIT368 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT368)
#define _OMC_LIT369_data "sample"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT369,6,_OMC_LIT369_data);
#define _OMC_LIT369 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT369)
#define _OMC_LIT370_data "cardinality"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT370,11,_OMC_LIT370_data);
#define _OMC_LIT370 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT370)
#define _OMC_LIT371_data "homotopy"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT371,8,_OMC_LIT371_data);
#define _OMC_LIT371 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT371)
#define _OMC_LIT372_data "DynamicSelect"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT372,13,_OMC_LIT372_data);
#define _OMC_LIT372 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT372)
#define _OMC_LIT373_data "Clock"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT373,5,_OMC_LIT373_data);
#define _OMC_LIT373 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT373)
#define _OMC_LIT374_data "hold"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT374,4,_OMC_LIT374_data);
#define _OMC_LIT374 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT374)
#define _OMC_LIT375_data "shiftSample"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT375,11,_OMC_LIT375_data);
#define _OMC_LIT375 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT375)
#define _OMC_LIT376_data "backSample"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT376,10,_OMC_LIT376_data);
#define _OMC_LIT376 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT376)
#define _OMC_LIT377_data "noClock"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT377,7,_OMC_LIT377_data);
#define _OMC_LIT377 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT377)
#define _OMC_LIT378_data "transition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT378,10,_OMC_LIT378_data);
#define _OMC_LIT378 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT378)
#define _OMC_LIT379_data "initialState"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT379,12,_OMC_LIT379_data);
#define _OMC_LIT379 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT379)
#define _OMC_LIT380_data "activeState"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT380,11,_OMC_LIT380_data);
#define _OMC_LIT380 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT380)
#define _OMC_LIT381_data "ticksInState"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT381,12,_OMC_LIT381_data);
#define _OMC_LIT381 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT381)
#define _OMC_LIT382_data "timeInState"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT382,11,_OMC_LIT382_data);
#define _OMC_LIT382 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT382)
#define _OMC_LIT383_data "sourceInfo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT383,10,_OMC_LIT383_data);
#define _OMC_LIT383 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT383)
#define _OMC_LIT384_data "SOME"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT384,4,_OMC_LIT384_data);
#define _OMC_LIT384 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT384)
#define _OMC_LIT385_data "isPresent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT385,9,_OMC_LIT385_data);
#define _OMC_LIT385 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT385)
#define _OMC_LIT386_data "Invalid dimension %s of argument to %s, expected dimension size %s but got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT386,78,_OMC_LIT386_data);
#define _OMC_LIT386 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT386)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT387,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT386}};
#define _OMC_LIT387 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT387)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT388,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(196)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT387}};
#define _OMC_LIT388 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT388)
#define _OMC_LIT389_data "1"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT389,1,_OMC_LIT389_data);
#define _OMC_LIT389 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT389)
#define _OMC_LIT390_data "vector("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT390,7,_OMC_LIT390_data);
#define _OMC_LIT390 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT390)
#define _OMC_LIT391_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT391,1,_OMC_LIT391_data);
#define _OMC_LIT391 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT391)
#define _OMC_LIT392_data "In scope %s, in component %s: Invalid dimensions %s in %s, no more than one dimension may have size > 1."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT392,104,_OMC_LIT392_data);
#define _OMC_LIT392 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT392)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT393,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT392}};
#define _OMC_LIT393 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT393)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT394,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(123)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT393}};
#define _OMC_LIT394 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT394)
#define _OMC_LIT395_data "isPresent needs to be called from a function scope, got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT395,59,_OMC_LIT395_data);
#define _OMC_LIT395 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT395)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT396,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT395}};
#define _OMC_LIT396 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT396)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT397,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5040)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT396}};
#define _OMC_LIT397 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT397)
#define _OMC_LIT398_data "isPresent needs to be called on an input or output formal parameter."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT398,68,_OMC_LIT398_data);
#define _OMC_LIT398 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT398)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT399,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT398}};
#define _OMC_LIT399 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT399)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT400,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5041)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT399}};
#define _OMC_LIT400 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT400)
#define _OMC_LIT401_data "isPresent needs to be called on an input or output formal parameter, but got a non-identifier expression: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT401,109,_OMC_LIT401_data);
#define _OMC_LIT401 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT401)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT402,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT401}};
#define _OMC_LIT402 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT402)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT403,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5042)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT402}};
#define _OMC_LIT403 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT403)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT404,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT56,_OMC_LIT52}};
#define _OMC_LIT404 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT404)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT405,2,5) {&DAE_Type_T__STRING__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT405 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT405)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT406,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT405,_OMC_LIT60}};
#define _OMC_LIT406 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT406)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT407,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT363,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT407 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT407)
#define _OMC_LIT408_data "x"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT408,1,_OMC_LIT408_data);
#define _OMC_LIT408 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT408)
#define _OMC_LIT409_data "minimumLength"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT409,13,_OMC_LIT409_data);
#define _OMC_LIT409 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT409)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT410,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT409,_OMC_LIT89,_OMC_LIT52,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT410 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT410)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT411,2,3) {&DAE_Exp_ICONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT411 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT411)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT412,1,1) {_OMC_LIT411}};
#define _OMC_LIT412 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT412)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT413,7,3) {&Static_Slot_SLOT__desc,_OMC_LIT410,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT412,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT413 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT413)
#define _OMC_LIT414_data "leftJustified"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT414,13,_OMC_LIT414_data);
#define _OMC_LIT414 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT414)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT415,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT414,_OMC_LIT56,_OMC_LIT52,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT415 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT415)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT416,1,1) {_OMC_LIT123}};
#define _OMC_LIT416 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT416)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT417,7,3) {&Static_Slot_SLOT__desc,_OMC_LIT415,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT416,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT417 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT417)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT418,2,1) {_OMC_LIT417,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT418 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT418)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT419,2,1) {_OMC_LIT413,_OMC_LIT418}};
#define _OMC_LIT419 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT419)
#define _OMC_LIT420_data "significantDigits"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT420,17,_OMC_LIT420_data);
#define _OMC_LIT420 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT420)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT421,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT420,_OMC_LIT89,_OMC_LIT52,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT421 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT421)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT422,2,3) {&DAE_Exp_ICONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(6))}};
#define _OMC_LIT422 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT422)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT423,1,1) {_OMC_LIT422}};
#define _OMC_LIT423 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT423)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT424,7,3) {&Static_Slot_SLOT__desc,_OMC_LIT421,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT423,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(4)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT424 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT424)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT425,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT363}};
#define _OMC_LIT425 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT425)
#define _OMC_LIT426_data "s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT426,1,_OMC_LIT426_data);
#define _OMC_LIT426 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT426)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT427,2,5) {&DAE_Exp_SCONST__desc,_OMC_LIT426}};
#define _OMC_LIT427 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT427)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT428,1,1) {_OMC_LIT427}};
#define _OMC_LIT428 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT428)
#define _OMC_LIT429_data "d"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT429,1,_OMC_LIT429_data);
#define _OMC_LIT429 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT429)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT430,2,5) {&DAE_Exp_SCONST__desc,_OMC_LIT429}};
#define _OMC_LIT430 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT430)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT431,1,1) {_OMC_LIT430}};
#define _OMC_LIT431 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT431)
#define _OMC_LIT432_data "f"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT432,1,_OMC_LIT432_data);
#define _OMC_LIT432 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT432)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT433,2,5) {&DAE_Exp_SCONST__desc,_OMC_LIT432}};
#define _OMC_LIT433 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT433)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT434,1,1) {_OMC_LIT433}};
#define _OMC_LIT434 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT434)
#define _OMC_LIT435_data "format"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT435,6,_OMC_LIT435_data);
#define _OMC_LIT435 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT435)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT436,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT435,_OMC_LIT405,_OMC_LIT52,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT436 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT436)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT437,2,5) {&DAE_Exp_SCONST__desc,_OMC_LIT7}};
#define _OMC_LIT437 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT437)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT438,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT322}};
#define _OMC_LIT438 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT438)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT439,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT320,_OMC_LIT438}};
#define _OMC_LIT439 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT439)
#define _OMC_LIT440_data "message"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT440,7,_OMC_LIT440_data);
#define _OMC_LIT440 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT440)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT441,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT323}};
#define _OMC_LIT441 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT441)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT442,8,3) {&DAE_CallAttributes_CALL__ATTR__desc,_OMC_LIT56,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT294,_OMC_LIT287}};
#define _OMC_LIT442 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT442)
#define _OMC_LIT443_data "Connections.isRoot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT443,18,_OMC_LIT443_data);
#define _OMC_LIT443 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT443)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT444,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT321}};
#define _OMC_LIT444 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT444)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT445,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT320,_OMC_LIT444}};
#define _OMC_LIT445 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT445)
#define _OMC_LIT446_data "Returning false from overconstrained operator applied to array components having size zero: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT446,95,_OMC_LIT446_data);
#define _OMC_LIT446 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT446)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT447,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT446}};
#define _OMC_LIT447 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT447)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT448,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(552)),_OMC_LIT0,_OMC_LIT333,_OMC_LIT447}};
#define _OMC_LIT448 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT448)
#define _OMC_LIT449_data "%s argument to %s in component %s must be Integer expression."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT449,61,_OMC_LIT449_data);
#define _OMC_LIT449 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT449)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT450,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT449}};
#define _OMC_LIT450 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT450)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT451,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(72)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT450}};
#define _OMC_LIT451 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT451)
#define _OMC_LIT452_data "First"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT452,5,_OMC_LIT452_data);
#define _OMC_LIT452 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT452)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT453,2,1) {_OMC_LIT358,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT453 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT453)
#define _OMC_LIT454_data "cat("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT454,4,_OMC_LIT454_data);
#define _OMC_LIT454 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT454)
#define _OMC_LIT455_data "Different dimension sizes in arguments to %s in component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT455,61,_OMC_LIT455_data);
#define _OMC_LIT455 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT455)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT456,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT455}};
#define _OMC_LIT456 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT456)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT457,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(69)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT456}};
#define _OMC_LIT457 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT457)
#define _OMC_LIT458_data "%s argument to %s in component %s must be a variable."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT458,53,_OMC_LIT458_data);
#define _OMC_LIT458 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT458)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT459,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT458}};
#define _OMC_LIT459 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT459)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT460,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(75)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT459}};
#define _OMC_LIT460 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT460)
#define _OMC_LIT461_data "Type in %s must be simple type in component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT461,47,_OMC_LIT461_data);
#define _OMC_LIT461 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT461)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT462,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT461}};
#define _OMC_LIT462 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT462)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT463,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(74)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT462}};
#define _OMC_LIT463 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT463)
#define _OMC_LIT464_data "operand to change"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT464,17,_OMC_LIT464_data);
#define _OMC_LIT464 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT464)
#define _OMC_LIT465_data "%s argument to %s in component %s must be discrete variable."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT465,60,_OMC_LIT465_data);
#define _OMC_LIT465 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT465)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT466,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT465}};
#define _OMC_LIT466 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT466)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT467,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(73)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT466}};
#define _OMC_LIT467 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT467)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT468,1,4) {&SCode_Variability_DISCRETE__desc,}};
#define _OMC_LIT468 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT468)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT469,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT56,_OMC_LIT60}};
#define _OMC_LIT469 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT469)
#define _OMC_LIT470_data "The der() operator is not allowed in function context (possible solutions: pass the derivative as an explicit input; use a block instead of function)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT470,150,_OMC_LIT470_data);
#define _OMC_LIT470 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT470)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT471,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT470}};
#define _OMC_LIT471 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT471)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT472,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(280)),_OMC_LIT218,_OMC_LIT1,_OMC_LIT471}};
#define _OMC_LIT472 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT472)
#define _OMC_LIT473_data "Argument '%s' to der has illegal type %s, must be a subtype of Real."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT473,68,_OMC_LIT473_data);
#define _OMC_LIT473 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT473)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT474,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT473}};
#define _OMC_LIT474 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT474)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT475,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(514)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT474}};
#define _OMC_LIT475 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT475)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT476,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT50}};
#define _OMC_LIT476 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT476)
#define _OMC_LIT477_data "edge("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT477,5,_OMC_LIT477_data);
#define _OMC_LIT477 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT477)
#define _OMC_LIT478_data "Wrong type on %s, expected %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT478,30,_OMC_LIT478_data);
#define _OMC_LIT478 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT478)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT479,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT478}};
#define _OMC_LIT479 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT479)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT480,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(53)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT479}};
#define _OMC_LIT480 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT480)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT481,1,3) {&DAE_FunctionParallelism_FP__NON__PARALLEL__desc,}};
#define _OMC_LIT481 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT481)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT482,7,3) {&DAE_FunctionAttributes_FUNCTION__ATTRIBUTES__desc,_OMC_LIT294,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT339,_OMC_LIT481}};
#define _OMC_LIT482 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT482)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT483,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT382}};
#define _OMC_LIT483 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT483)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT484,5,14) {&DAE_Type_T__FUNCTION__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT131,_OMC_LIT482,_OMC_LIT483}};
#define _OMC_LIT484 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT484)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT485,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT381}};
#define _OMC_LIT485 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT485)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT486,5,14) {&DAE_Type_T__FUNCTION__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT89,_OMC_LIT482,_OMC_LIT485}};
#define _OMC_LIT486 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT486)
#define _OMC_LIT487_data "activeState("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT487,12,_OMC_LIT487_data);
#define _OMC_LIT487 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT487)
#define _OMC_LIT488_data "), Argument needs to be a block instance."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT488,41,_OMC_LIT488_data);
#define _OMC_LIT488 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT488)
#define _OMC_LIT489_data "state"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT489,5,_OMC_LIT489_data);
#define _OMC_LIT489 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT489)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT490,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT380}};
#define _OMC_LIT490 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT490)
#define _OMC_LIT491_data "initialState("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT491,13,_OMC_LIT491_data);
#define _OMC_LIT491 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT491)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT492,1,10) {&DAE_Type_T__NORETCALL__desc,}};
#define _OMC_LIT492 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT492)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT493,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT379}};
#define _OMC_LIT493 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT493)
#define _OMC_LIT494_data "from"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT494,4,_OMC_LIT494_data);
#define _OMC_LIT494 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT494)
#define _OMC_LIT495_data "to"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT495,2,_OMC_LIT495_data);
#define _OMC_LIT495 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT495)
#define _OMC_LIT496_data "first"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT496,5,_OMC_LIT496_data);
#define _OMC_LIT496 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT496)
#define _OMC_LIT497_data "second"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT497,6,_OMC_LIT497_data);
#define _OMC_LIT497 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT497)
#define _OMC_LIT498_data ", named argument \""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT498,18,_OMC_LIT498_data);
#define _OMC_LIT498 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT498)
#define _OMC_LIT499_data "\" already has a value."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT499,22,_OMC_LIT499_data);
#define _OMC_LIT499 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT499)
#define _OMC_LIT500_data ", missing value for "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT500,20,_OMC_LIT500_data);
#define _OMC_LIT500 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT500)
#define _OMC_LIT501_data " argument \""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT501,11,_OMC_LIT501_data);
#define _OMC_LIT501 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT501)
#define _OMC_LIT502_data "\"."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT502,2,_OMC_LIT502_data);
#define _OMC_LIT502 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT502)
#define _OMC_LIT503_data "argument needs to be a block instance."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT503,38,_OMC_LIT503_data);
#define _OMC_LIT503 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT503)
#define _OMC_LIT504_data "transition("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT504,11,_OMC_LIT504_data);
#define _OMC_LIT504 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT504)
#define _OMC_LIT505_data "condition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT505,9,_OMC_LIT505_data);
#define _OMC_LIT505 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT505)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT506,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT505,_OMC_LIT56,_OMC_LIT52,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT506 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT506)
#define _OMC_LIT507_data "immediate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT507,9,_OMC_LIT507_data);
#define _OMC_LIT507 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT507)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT508,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT507,_OMC_LIT56,_OMC_LIT101,_OMC_LIT319,_OMC_LIT416}};
#define _OMC_LIT508 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT508)
#define _OMC_LIT509_data "reset"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT509,5,_OMC_LIT509_data);
#define _OMC_LIT509 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT509)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT510,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT509,_OMC_LIT56,_OMC_LIT101,_OMC_LIT319,_OMC_LIT416}};
#define _OMC_LIT510 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT510)
#define _OMC_LIT511_data "synchronize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT511,11,_OMC_LIT511_data);
#define _OMC_LIT511 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT511)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT512,1,1) {_OMC_LIT122}};
#define _OMC_LIT512 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT512)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT513,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT511,_OMC_LIT56,_OMC_LIT101,_OMC_LIT319,_OMC_LIT512}};
#define _OMC_LIT513 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT513)
#define _OMC_LIT514_data "priority"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT514,8,_OMC_LIT514_data);
#define _OMC_LIT514 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT514)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT515,2,3) {&DAE_Exp_ICONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT515 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT515)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT516,1,1) {_OMC_LIT515}};
#define _OMC_LIT516 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT516)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT517,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT514,_OMC_LIT89,_OMC_LIT101,_OMC_LIT319,_OMC_LIT516}};
#define _OMC_LIT517 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT517)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT518,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT378}};
#define _OMC_LIT518 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT518)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT519,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT353}};
#define _OMC_LIT519 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT519)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT520,5,14) {&DAE_Type_T__FUNCTION__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT131,_OMC_LIT482,_OMC_LIT519}};
#define _OMC_LIT520 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT520)
#define _OMC_LIT521_data "u"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT521,1,_OMC_LIT521_data);
#define _OMC_LIT521 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT521)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT522,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT352}};
#define _OMC_LIT522 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT522)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT523,5,14) {&DAE_Type_T__FUNCTION__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT56,_OMC_LIT482,_OMC_LIT522}};
#define _OMC_LIT523 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT523)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT524,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT377}};
#define _OMC_LIT524 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT524)
#define _OMC_LIT525_data "Wrong value of argument to %s: %s = %s %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT525,42,_OMC_LIT525_data);
#define _OMC_LIT525 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT525)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT526,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT525}};
#define _OMC_LIT526 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT526)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT527,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(576)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT526}};
#define _OMC_LIT527 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT527)
#define _OMC_LIT528_data "backCounter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT528,11,_OMC_LIT528_data);
#define _OMC_LIT528 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT528)
#define _OMC_LIT529_data ">= 0"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT529,4,_OMC_LIT529_data);
#define _OMC_LIT529 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT529)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT530,2,3) {&Absyn_Exp_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT530 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT530)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT531,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT528,_OMC_LIT89,_OMC_LIT101,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT531 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT531)
#define _OMC_LIT532_data "resolution"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT532,10,_OMC_LIT532_data);
#define _OMC_LIT532 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT532)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT533,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT532,_OMC_LIT89,_OMC_LIT101,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT533 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT533)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT534,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT376}};
#define _OMC_LIT534 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT534)
#define _OMC_LIT535_data ">= 1"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT535,4,_OMC_LIT535_data);
#define _OMC_LIT535 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT535)
#define _OMC_LIT536_data "shiftCounter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT536,12,_OMC_LIT536_data);
#define _OMC_LIT536 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT536)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT537,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT536,_OMC_LIT89,_OMC_LIT101,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT537 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT537)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT538,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT375}};
#define _OMC_LIT538 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT538)
#define _OMC_LIT539_data "start"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT539,5,_OMC_LIT539_data);
#define _OMC_LIT539 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT539)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT540,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT539,_OMC_LIT131,_OMC_LIT101,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT540 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT540)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT541,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT353,_OMC_LIT131,_OMC_LIT101,_OMC_LIT319,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT541 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT541)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT542,2,1) {_OMC_LIT541,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT542 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT542)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT543,2,1) {_OMC_LIT540,_OMC_LIT542}};
#define _OMC_LIT543 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT543)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT544,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT369}};
#define _OMC_LIT544 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT544)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT545,5,14) {&DAE_Type_T__FUNCTION__desc,_OMC_LIT543,_OMC_LIT56,_OMC_LIT482,_OMC_LIT544}};
#define _OMC_LIT545 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT545)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT546,2,7) {&DAE_Type_T__CLOCK__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT546 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT546)
#define _OMC_LIT547_data "c"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT547,1,_OMC_LIT547_data);
#define _OMC_LIT547 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT547)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT548,1,3) {&DAE_ClockKind_INFERRED__CLOCK__desc,}};
#define _OMC_LIT548 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT548)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT549,2,7) {&DAE_Exp_CLKCONST__desc,_OMC_LIT548}};
#define _OMC_LIT549 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT549)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT550,1,1) {_OMC_LIT549}};
#define _OMC_LIT550 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT550)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT551,6,3) {&DAE_FuncArg_FUNCARG__desc,_OMC_LIT547,_OMC_LIT546,_OMC_LIT52,_OMC_LIT319,_OMC_LIT550}};
#define _OMC_LIT551 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT551)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT552,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT374}};
#define _OMC_LIT552 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT552)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT553,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT546,_OMC_LIT52}};
#define _OMC_LIT553 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT553)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT554,2,4) {&DAE_Exp_RCONST__desc,_OMC_LIT8}};
#define _OMC_LIT554 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT554)
#define _OMC_LIT555_data "solverMethod"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT555,12,_OMC_LIT555_data);
#define _OMC_LIT555 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT555)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT556,2,3) {&Absyn_Exp_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT556 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT556)
#define _OMC_LIT557_data "Operand ‘%s‘ to operator ‘%s‘ is not a stream variable."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT557,63,_OMC_LIT557_data);
#define _OMC_LIT557 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT557)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT558,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT557}};
#define _OMC_LIT558 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT558)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT559,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(149)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT558}};
#define _OMC_LIT559 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT559)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT560,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT366}};
#define _OMC_LIT560 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT560)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT561,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT365}};
#define _OMC_LIT561 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT561)
#define _OMC_LIT562_data "Operand of %s in component %s must be builtin-type in %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT562,57,_OMC_LIT562_data);
#define _OMC_LIT562 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT562)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT563,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT562}};
#define _OMC_LIT563 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT563)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT564,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(67)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT563}};
#define _OMC_LIT564 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT564)
#define _OMC_LIT565_data "product("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT565,8,_OMC_LIT565_data);
#define _OMC_LIT565 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT565)
#define _OMC_LIT566_data "Function \"product\" has scalar as argument in %s in component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT566,64,_OMC_LIT566_data);
#define _OMC_LIT566 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT566)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT567,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT566}};
#define _OMC_LIT567 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT567)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT568,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(502)),_OMC_LIT0,_OMC_LIT333,_OMC_LIT567}};
#define _OMC_LIT568 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT568)
#define _OMC_LIT569_data "In sum(%s), the expression is of type %s, but is required to be of builtin array type (of any number of dimensions)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT569,116,_OMC_LIT569_data);
#define _OMC_LIT569 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT569)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT570,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT569}};
#define _OMC_LIT570 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT570)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT571,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(219)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT570}};
#define _OMC_LIT571 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT571)
#define _OMC_LIT572_data ", expected DynamicSelect(staticExp, dynamicExp)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT572,47,_OMC_LIT572_data);
#define _OMC_LIT572 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT572)
#define _OMC_LIT573_data "+replaceHomotopy: homotopy called with wrong arguments: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT573,56,_OMC_LIT573_data);
#define _OMC_LIT573 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT573)
#define _OMC_LIT574_data "actual"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT574,6,_OMC_LIT574_data);
#define _OMC_LIT574 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT574)
#define _OMC_LIT575_data "simplified"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT575,10,_OMC_LIT575_data);
#define _OMC_LIT575 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT575)
#define _OMC_LIT576_data "replaceHomotopy"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT576,15,_OMC_LIT576_data);
#define _OMC_LIT576 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT576)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT577,1,4) {&Flags_FlagVisibility_EXTERNAL__desc,}};
#define _OMC_LIT577 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT577)
#define _OMC_LIT578_data "none"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT578,4,_OMC_LIT578_data);
#define _OMC_LIT578 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT578)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT579,2,8) {&Flags_FlagData_STRING__FLAG__desc,_OMC_LIT578}};
#define _OMC_LIT579 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT579)
#define _OMC_LIT580_data "Default, do not replace homotopy."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT580,33,_OMC_LIT580_data);
#define _OMC_LIT580 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT580)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT581,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT580}};
#define _OMC_LIT581 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT581)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT582,2,0) {_OMC_LIT578,_OMC_LIT581}};
#define _OMC_LIT582 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT582)
#define _OMC_LIT583_data "Replace homotopy(actual, simplified) with actual."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT583,49,_OMC_LIT583_data);
#define _OMC_LIT583 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT583)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT584,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT583}};
#define _OMC_LIT584 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT584)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT585,2,0) {_OMC_LIT574,_OMC_LIT584}};
#define _OMC_LIT585 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT585)
#define _OMC_LIT586_data "Replace homotopy(actual, simplified) with simplified."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT586,53,_OMC_LIT586_data);
#define _OMC_LIT586 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT586)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT587,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT586}};
#define _OMC_LIT587 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT587)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT588,2,0) {_OMC_LIT575,_OMC_LIT587}};
#define _OMC_LIT588 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT588)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT589,2,1) {_OMC_LIT588,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT589 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT589)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT590,2,1) {_OMC_LIT585,_OMC_LIT589}};
#define _OMC_LIT590 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT590)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT591,2,1) {_OMC_LIT582,_OMC_LIT590}};
#define _OMC_LIT591 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT591)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT592,2,4) {&Flags_ValidOptions_STRING__DESC__OPTION__desc,_OMC_LIT591}};
#define _OMC_LIT592 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT592)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT593,1,1) {_OMC_LIT592}};
#define _OMC_LIT593 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT593)
#define _OMC_LIT594_data "Replaces homotopy(actual, simplified) with the actual expression or the simplified expression. Good for debugging models which use homotopy. The default is to not replace homotopy."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT594,180,_OMC_LIT594_data);
#define _OMC_LIT594 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT594)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT595,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT594}};
#define _OMC_LIT595 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT595)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT596,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(53)),_OMC_LIT576,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT577,_OMC_LIT579,_OMC_LIT593,_OMC_LIT595}};
#define _OMC_LIT596 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT596)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT597,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT371}};
#define _OMC_LIT597 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT597)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT598,2,34) {&DAE_Exp_META__OPTION__desc,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT598 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT598)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT599,2,22) {&DAE_Type_T__METAOPTION__desc,_OMC_LIT42}};
#define _OMC_LIT599 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT599)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT600,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT599,_OMC_LIT60}};
#define _OMC_LIT600 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT600)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT601,2,1) {_OMC_LIT7,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT601 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT601)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT602,2,1) {_OMC_LIT147,_OMC_LIT601}};
#define _OMC_LIT602 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT602)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT603,2,26) {&DAE_Type_T__METABOXED__desc,_OMC_LIT42}};
#define _OMC_LIT603 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT603)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT604,2,1) {_OMC_LIT384,_OMC_LIT601}};
#define _OMC_LIT604 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT604)
#define _OMC_LIT605_data "SourceInfo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT605,10,_OMC_LIT605_data);
#define _OMC_LIT605 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT605)
#define _OMC_LIT606_data "SOURCEINFO"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT606,10,_OMC_LIT606_data);
#define _OMC_LIT606 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT606)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT607,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT606}};
#define _OMC_LIT607 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT607)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT608,3,3) {&Absyn_Path_QUALIFIED__desc,_OMC_LIT605,_OMC_LIT607}};
#define _OMC_LIT608 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT608)
#define _OMC_LIT609_data "fileName"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT609,8,_OMC_LIT609_data);
#define _OMC_LIT609 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT609)
#define _OMC_LIT610_data "isReadOnly"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT610,10,_OMC_LIT610_data);
#define _OMC_LIT610 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT610)
#define _OMC_LIT611_data "lineNumberStart"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT611,15,_OMC_LIT611_data);
#define _OMC_LIT611 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT611)
#define _OMC_LIT612_data "columnNumberStart"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT612,17,_OMC_LIT612_data);
#define _OMC_LIT612 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT612)
#define _OMC_LIT613_data "lineNumberEnd"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT613,13,_OMC_LIT613_data);
#define _OMC_LIT613 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT613)
#define _OMC_LIT614_data "columnNumberEnd"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT614,15,_OMC_LIT614_data);
#define _OMC_LIT614 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT614)
#define _OMC_LIT615_data "lastEditTime"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT615,12,_OMC_LIT615_data);
#define _OMC_LIT615 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT615)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT616,2,1) {_OMC_LIT615,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT616 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT616)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT617,2,1) {_OMC_LIT614,_OMC_LIT616}};
#define _OMC_LIT617 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT617)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT618,2,1) {_OMC_LIT613,_OMC_LIT617}};
#define _OMC_LIT618 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT618)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT619,2,1) {_OMC_LIT612,_OMC_LIT618}};
#define _OMC_LIT619 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT619)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT620,2,1) {_OMC_LIT611,_OMC_LIT619}};
#define _OMC_LIT620 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT620)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT621,2,1) {_OMC_LIT610,_OMC_LIT620}};
#define _OMC_LIT621 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT621)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT622,2,1) {_OMC_LIT609,_OMC_LIT621}};
#define _OMC_LIT622 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT622)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT623,2,1) {_OMC_LIT608,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT623 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT623)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT624,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT605}};
#define _OMC_LIT624 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT624)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT625,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT609,_OMC_LIT121,_OMC_LIT405,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT625 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT625)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT626,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT610,_OMC_LIT121,_OMC_LIT56,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT626 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT626)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT627,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT611,_OMC_LIT121,_OMC_LIT89,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT627 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT627)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT628,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT612,_OMC_LIT121,_OMC_LIT89,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT628 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT628)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT629,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT613,_OMC_LIT121,_OMC_LIT89,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT629 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT629)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT630,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT614,_OMC_LIT121,_OMC_LIT89,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT630 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT630)
#define _OMC_LIT631_data "lastModification"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT631,16,_OMC_LIT631_data);
#define _OMC_LIT631 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT631)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT632,7,3) {&DAE_Var_TYPES__VAR__desc,_OMC_LIT631,_OMC_LIT121,_OMC_LIT131,_OMC_LIT182,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT632 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT632)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT633,2,1) {_OMC_LIT632,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT633 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT633)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT634,2,1) {_OMC_LIT630,_OMC_LIT633}};
#define _OMC_LIT634 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT634)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT635,2,1) {_OMC_LIT629,_OMC_LIT634}};
#define _OMC_LIT635 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT635)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT636,2,1) {_OMC_LIT628,_OMC_LIT635}};
#define _OMC_LIT636 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT636)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT637,2,1) {_OMC_LIT627,_OMC_LIT636}};
#define _OMC_LIT637 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT637)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT638,2,1) {_OMC_LIT626,_OMC_LIT637}};
#define _OMC_LIT638 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT638)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT639,2,1) {_OMC_LIT625,_OMC_LIT638}};
#define _OMC_LIT639 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT639)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT640,7,24) {&DAE_Type_T__METARECORD__desc,_OMC_LIT608,_OMC_LIT624,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT639,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT640 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT640)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT641,2,4) {&DAE_EvaluateSingletonType_EVAL__SINGLETON__KNOWN__TYPE__desc,_OMC_LIT640}};
#define _OMC_LIT641 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT641)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT642,6,23) {&DAE_Type_T__METAUNIONTYPE__desc,_OMC_LIT623,MMC_REFSTRUCTLIT(mmc_nil),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT641,_OMC_LIT624}};
#define _OMC_LIT642 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT642)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT643,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT642,_OMC_LIT60}};
#define _OMC_LIT643 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT643)
#define _OMC_LIT644_data "/"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT644,1,_OMC_LIT644_data);
#define _OMC_LIT644 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT644)
#define _OMC_LIT645_data "classDirectory() is a non-standard operator that was replaced by Modelica.Utilities.Files.loadResource(uri) before it was added to the language specification."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT645,158,_OMC_LIT645_data);
#define _OMC_LIT645 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT645)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT646,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT645}};
#define _OMC_LIT646 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT646)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT647,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(539)),_OMC_LIT0,_OMC_LIT333,_OMC_LIT646}};
#define _OMC_LIT647 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT647)
#define _OMC_LIT648_data "Static.elabBuiltinFill2 failed in component"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT648,43,_OMC_LIT648_data);
#define _OMC_LIT648 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT648)
#define _OMC_LIT649_data " and scope: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT649,12,_OMC_LIT649_data);
#define _OMC_LIT649 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT649)
#define _OMC_LIT650_data " for expression: fill("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT650,22,_OMC_LIT650_data);
#define _OMC_LIT650 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT650)
#define _OMC_LIT651_data "Static.elabBuiltinFill failed in component"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT651,42,_OMC_LIT651_data);
#define _OMC_LIT651 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT651)
#define _OMC_LIT652_data "- Static.elabBuiltinFill: Couldn't elaborate fill(): "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT652,53,_OMC_LIT652_data);
#define _OMC_LIT652 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT652)
#define _OMC_LIT653_data "true"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT653,4,_OMC_LIT653_data);
#define _OMC_LIT653 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT653)
#define _OMC_LIT654_data "false"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT654,5,_OMC_LIT654_data);
#define _OMC_LIT654 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT654)
#define _OMC_LIT655_data " impl="
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT655,6,_OMC_LIT655_data);
#define _OMC_LIT655 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT655)
#define _OMC_LIT656_data ", in component: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT656,16,_OMC_LIT656_data);
#define _OMC_LIT656 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT656)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT657,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT89,_OMC_LIT60}};
#define _OMC_LIT657 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT657)
#define _OMC_LIT658_data "- Static.elabBuiltinNdims failed for: ndims("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT658,44,_OMC_LIT658_data);
#define _OMC_LIT658 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT658)
#define _OMC_LIT659_data " in component: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT659,15,_OMC_LIT659_data);
#define _OMC_LIT659 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT659)
#define _OMC_LIT660_data "size("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT660,5,_OMC_LIT660_data);
#define _OMC_LIT660 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT660)
#define _OMC_LIT661_data "The first argument of %s must be an array expression."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT661,53,_OMC_LIT661_data);
#define _OMC_LIT661 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT661)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT662,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT661}};
#define _OMC_LIT662 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT662)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT663,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(229)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT662}};
#define _OMC_LIT663 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT663)
#define _OMC_LIT664_data "Invalid index %s in call to size of %s, valid index interval is [1,%s]."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT664,71,_OMC_LIT664_data);
#define _OMC_LIT664 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT664)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT665,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT664}};
#define _OMC_LIT665 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT665)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT666,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(186)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT665}};
#define _OMC_LIT666 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT666)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT667,2,1) {_OMC_LIT20,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT667 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT667)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT668,3,9) {&DAE_Type_T__ARRAY__desc,_OMC_LIT89,_OMC_LIT667}};
#define _OMC_LIT668 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT668)
#define _OMC_LIT669_data ", expected smooth(p, expr)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT669,26,_OMC_LIT669_data);
#define _OMC_LIT669 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT669)
#define _OMC_LIT670_data ", first argument must be a constant or parameter expression of type Integer"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT670,75,_OMC_LIT670_data);
#define _OMC_LIT670 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT670)
#define _OMC_LIT671_data ", second argument must be a Real, array of Reals or record only containing Reals"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT671,80,_OMC_LIT671_data);
#define _OMC_LIT671 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT671)
#define _OMC_LIT672_data "{"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT672,1,_OMC_LIT672_data);
#define _OMC_LIT672 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT672)
#define _OMC_LIT673_data "}"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT673,1,_OMC_LIT673_data);
#define _OMC_LIT673 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT673)
#define _OMC_LIT674_data "Incompatible row length in matrix expression in component %s. %s is a row of size %s, the rest of the matrix rows are of size %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT674,129,_OMC_LIT674_data);
#define _OMC_LIT674 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT674)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT675,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT674}};
#define _OMC_LIT675 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT675)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT676,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(66)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT675}};
#define _OMC_LIT676 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT676)
#define _OMC_LIT677_data "Type mismatch in matrix rows in component %s. %s is a row of %s, the rest of the matrix is of type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT677,102,_OMC_LIT677_data);
#define _OMC_LIT677 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT677)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT678,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT677}};
#define _OMC_LIT678 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT678)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT679,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(65)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT678}};
#define _OMC_LIT679 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT679)
#define _OMC_LIT680_data "- Static.promoteExp failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT680,26,_OMC_LIT680_data);
#define _OMC_LIT680 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT680)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT681,2,3) {&DAE_Exp_ICONST__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT681 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT681)
#define _OMC_LIT682_data "- Static.elabMatrixCatTwoExp failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT682,35,_OMC_LIT682_data);
#define _OMC_LIT682 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT682)
#define _OMC_LIT683_data "Arguments of concatenation comma operator have different sizes for the first dimension: %s has dimension %s and %s has dimension %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT683,132,_OMC_LIT683_data);
#define _OMC_LIT683 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT683)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT684,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT683}};
#define _OMC_LIT684 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT684)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT685,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(591)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT684}};
#define _OMC_LIT685 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT685)
#define _OMC_LIT686_data "- Static.elabMatrixComma failed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT686,31,_OMC_LIT686_data);
#define _OMC_LIT686 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT686)
#define _OMC_LIT687_data "Array constructor may not be empty."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT687,35,_OMC_LIT687_data);
#define _OMC_LIT687 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT687)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT688,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT687}};
#define _OMC_LIT688 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT688)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT689,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(182)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT688}};
#define _OMC_LIT689 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT689)
#define _OMC_LIT690_data ","
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT690,1,_OMC_LIT690_data);
#define _OMC_LIT690 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT690)
#define _OMC_LIT691_data "Type mismatch in array expression in component %s. %s is of type %s while the elements %s are of type %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT691,105,_OMC_LIT691_data);
#define _OMC_LIT691 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT691)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT692,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT691}};
#define _OMC_LIT692 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT692)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT693,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(64)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT692}};
#define _OMC_LIT693 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT693)
#define _OMC_LIT694_data "- Static.stripExtraArgsFromType failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT694,39,_OMC_LIT694_data);
#define _OMC_LIT694 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT694)
#define _OMC_LIT695_data "Tuple expressions may only occur on the left side of an assignment or equation with a single function call on the right side. Got the following expression: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT695,159,_OMC_LIT695_data);
#define _OMC_LIT695 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT695)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT696,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT695}};
#define _OMC_LIT696 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT696)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT697,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(291)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT696}};
#define _OMC_LIT697 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT697)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT698,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT603,_OMC_LIT60}};
#define _OMC_LIT698 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT698)
#define _OMC_LIT699_data "Cannot resolve type of expression %s. The operands have types %s in component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT699,81,_OMC_LIT699_data);
#define _OMC_LIT699 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT699)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT700,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT699}};
#define _OMC_LIT700 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT700)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT701,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(84)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT700}};
#define _OMC_LIT701 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT701)
#define _OMC_LIT702_data ":"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT702,1,_OMC_LIT702_data);
#define _OMC_LIT702 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT702)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT703,2,1) {_OMC_LIT131,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT703 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT703)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT704,2,1) {_OMC_LIT131,_OMC_LIT703}};
#define _OMC_LIT704 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT704)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT705,2,1) {_OMC_LIT131,_OMC_LIT704}};
#define _OMC_LIT705 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT705)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT706,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT131,_OMC_LIT60}};
#define _OMC_LIT706 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT706)
#define _OMC_LIT707_data "- Inst.elabGraphicsExp failed: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT707,31,_OMC_LIT707_data);
#define _OMC_LIT707 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT707)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT708,1,6) {&DAE_CodeType_C__TYPENAME__desc,}};
#define _OMC_LIT708 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT708)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT709,2,18) {&DAE_Type_T__CODE__desc,_OMC_LIT708}};
#define _OMC_LIT709 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT709)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT710,2,18) {&DAE_Type_T__CODE__desc,_OMC_LIT43}};
#define _OMC_LIT710 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT710)
#define _OMC_LIT711_data "EquationSection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT711,15,_OMC_LIT711_data);
#define _OMC_LIT711 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT711)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT712,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT711}};
#define _OMC_LIT712 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT712)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT713,2,3) {&ClassInf_State_UNKNOWN__desc,_OMC_LIT712}};
#define _OMC_LIT713 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT713)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT714,4,12) {&DAE_Type_T__COMPLEX__desc,_OMC_LIT713,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT714 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT714)
#define _OMC_LIT715_data "AlgorithmSection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT715,16,_OMC_LIT715_data);
#define _OMC_LIT715 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT715)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT716,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT715}};
#define _OMC_LIT716 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT716)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT717,2,3) {&ClassInf_State_UNKNOWN__desc,_OMC_LIT716}};
#define _OMC_LIT717 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT717)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT718,4,12) {&DAE_Type_T__COMPLEX__desc,_OMC_LIT717,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT718 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT718)
#define _OMC_LIT719_data "Element"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT719,7,_OMC_LIT719_data);
#define _OMC_LIT719 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT719)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT720,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT719}};
#define _OMC_LIT720 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT720)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT721,2,3) {&ClassInf_State_UNKNOWN__desc,_OMC_LIT720}};
#define _OMC_LIT721 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT721)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT722,4,12) {&DAE_Type_T__COMPLEX__desc,_OMC_LIT721,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT722 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT722)
#define _OMC_LIT723_data "Expression"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT723,10,_OMC_LIT723_data);
#define _OMC_LIT723 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT723)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT724,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT723}};
#define _OMC_LIT724 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT724)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT725,2,3) {&ClassInf_State_UNKNOWN__desc,_OMC_LIT724}};
#define _OMC_LIT725 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT725)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT726,4,12) {&DAE_Type_T__COMPLEX__desc,_OMC_LIT725,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT726 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT726)
#define _OMC_LIT727_data "Modification"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT727,12,_OMC_LIT727_data);
#define _OMC_LIT727 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT727)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT728,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT727}};
#define _OMC_LIT728 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT728)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT729,2,3) {&ClassInf_State_UNKNOWN__desc,_OMC_LIT728}};
#define _OMC_LIT729 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT729)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT730,4,12) {&DAE_Type_T__COMPLEX__desc,_OMC_LIT729,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT730 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT730)
#define _OMC_LIT731_data "- Static.constToVariability failed on DAE.C_UNKNOWN()\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT731,54,_OMC_LIT731_data);
#define _OMC_LIT731 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT731)
#define _OMC_LIT732_data "Reductions require the types of the %s and %s to be %s, but got: %s and %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT732,75,_OMC_LIT732_data);
#define _OMC_LIT732 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT732)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT733,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT732}};
#define _OMC_LIT733 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT733)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT734,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5030)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT733}};
#define _OMC_LIT734 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT734)
#define _OMC_LIT735_data "second argument"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT735,15,_OMC_LIT735_data);
#define _OMC_LIT735 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT735)
#define _OMC_LIT736_data "result-type"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT736,11,_OMC_LIT736_data);
#define _OMC_LIT736 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT736)
#define _OMC_LIT737_data "identical"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT737,9,_OMC_LIT737_data);
#define _OMC_LIT737 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT737)
#define _OMC_LIT738_data "second arguments"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT738,16,_OMC_LIT738_data);
#define _OMC_LIT738 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT738)
#define _OMC_LIT739_data "reduction expression"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT739,20,_OMC_LIT739_data);
#define _OMC_LIT739 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT739)
#define _OMC_LIT740_data "first argument"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT740,14,_OMC_LIT740_data);
#define _OMC_LIT740 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT740)
#define _OMC_LIT741_data "compatible"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT741,10,_OMC_LIT741_data);
#define _OMC_LIT741 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT741)
#define _OMC_LIT742_data "Function %s not found in scope %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT742,34,_OMC_LIT742_data);
#define _OMC_LIT742 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT742)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT743,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT742}};
#define _OMC_LIT743 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT743)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT744,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(165)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT743}};
#define _OMC_LIT744 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT744)
#define _OMC_LIT745_data "Expected a reduction function with type signature ('A,'B) => 'B, but got %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT745,76,_OMC_LIT745_data);
#define _OMC_LIT745 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT745)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT746,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT745}};
#define _OMC_LIT746 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT746)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT747,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5031)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT746}};
#define _OMC_LIT747 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT747)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT748,2,9) {&Values_Value_LIST__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT748 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT748)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT749,1,1) {_OMC_LIT748}};
#define _OMC_LIT749 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT749)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT750,2,6) {&Values_Value_BOOL__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT750 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT750)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT751,6,8) {&DAE_Type_T__ENUMERATION__desc,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT79,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT751 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT751)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT752,2,6) {&Values_Value_BOOL__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT752 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT752)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT753,2,5) {&Values_Value_STRING__desc,_OMC_LIT7}};
#define _OMC_LIT753 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT753)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT754,2,4) {&Values_Value_REAL__desc,_OMC_LIT8}};
#define _OMC_LIT754 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT754)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT755,2,3) {&Values_Value_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT755 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT755)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT756,1.0);
#define _OMC_LIT756 MMC_REFREALLIT(_OMC_LIT_STRUCT756)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT757,2,4) {&Values_Value_REAL__desc,_OMC_LIT756}};
#define _OMC_LIT757 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT757)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT758,2,3) {&Values_Value_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT758 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT758)
#define _OMC_LIT759_data "product reduction not defined for String"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT759,40,_OMC_LIT759_data);
#define _OMC_LIT759 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT759)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT760,2,1) {_OMC_LIT759,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT760 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT760)
#define _OMC_LIT761_data "$result"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT761,7,_OMC_LIT761_data);
#define _OMC_LIT761 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT761)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT762,4,4) {&DAE_ComponentRef_CREF__IDENT__desc,_OMC_LIT761,_OMC_LIT115,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT762 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT762)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT763,3,9) {&DAE_Exp_CREF__desc,_OMC_LIT762,_OMC_LIT115}};
#define _OMC_LIT763 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT763)
#define _OMC_LIT764_data "experimentalReductions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT764,22,_OMC_LIT764_data);
#define _OMC_LIT764 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT764)
#define _OMC_LIT765_data "Turns on custom reduction functions (OpenModelica extension)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT765,61,_OMC_LIT765_data);
#define _OMC_LIT765 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT765)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT766,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT765}};
#define _OMC_LIT766 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT766)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT767,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(25)),_OMC_LIT764,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT766}};
#define _OMC_LIT767 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT767)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT768,1,6) {&ErrorTypes_Severity_NOTIFICATION__desc,}};
#define _OMC_LIT768 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT768)
#define _OMC_LIT769_data "%s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT769,2,_OMC_LIT769_data);
#define _OMC_LIT769 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT769)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT770,2,4) {&Gettext_TranslatableContent_notrans__desc,_OMC_LIT769}};
#define _OMC_LIT770 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT770)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT771,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(6001)),_OMC_LIT0,_OMC_LIT768,_OMC_LIT770}};
#define _OMC_LIT771 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT771)
#define _OMC_LIT772_data "Custom reduction functions are an OpenModelica extension to the Modelica Specification. Do not use them if you need your model to compile using other tools or if you are concerned about using experimental features. Use -d=experimentalReductions to disable this message."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT772,269,_OMC_LIT772_data);
#define _OMC_LIT772 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT772)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT773,2,1) {_OMC_LIT772,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT773 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT773)
#define _OMC_LIT774_data "$array"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT774,6,_OMC_LIT774_data);
#define _OMC_LIT774 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT774)
#define _OMC_LIT775_data "list"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT775,4,_OMC_LIT775_data);
#define _OMC_LIT775 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT775)
#define _OMC_LIT776_data "listReverse"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT776,11,_OMC_LIT776_data);
#define _OMC_LIT776 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT776)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT777,1,1) {_OMC_LIT52}};
#define _OMC_LIT777 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT777)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT778,1,3) {&Absyn_Operator_ADD__desc,}};
#define _OMC_LIT778 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT778)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT779,1,5) {&Absyn_Operator_MUL__desc,}};
#define _OMC_LIT779 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT779)
#define _OMC_LIT780_data "Identifier %s of implicit for iterator must be present as array subscript in the loop body."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT780,91,_OMC_LIT780_data);
#define _OMC_LIT780 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT780)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT781,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT780}};
#define _OMC_LIT781 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT781)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT782,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(110)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT781}};
#define _OMC_LIT782 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT782)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT783,3,9) {&DAE_Type_T__ARRAY__desc,_OMC_LIT42,_OMC_LIT91}};
#define _OMC_LIT783 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT783)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT784,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT783,_OMC_LIT51}};
#define _OMC_LIT784 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT784)
#define _OMC_LIT785_data "Dimension %s of %s and %s of %s differs when trying to deduce implicit iteration range."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT785,87,_OMC_LIT785_data);
#define _OMC_LIT785 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT785)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT786,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT785}};
#define _OMC_LIT786 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT786)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT787,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(138)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT786}};
#define _OMC_LIT787 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT787)
#define _OMC_LIT788_data "Static.elabCallReduction - failed!"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT788,34,_OMC_LIT788_data);
#define _OMC_LIT788 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT788)
#define _OMC_LIT789_data "Reductions using multiple iterators is not yet implemented. Try rewriting the expression using nested reductions (e.g. array(i+j for i, j) => array(array(i+j for i) for j)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT789,172,_OMC_LIT789_data);
#define _OMC_LIT789 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT789)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT790,2,1) {_OMC_LIT789,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT790 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT790)
#define _OMC_LIT791_data "fail"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT791,4,_OMC_LIT791_data);
#define _OMC_LIT791 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT791)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT792,3,5) {&Absyn_ComponentRef_CREF__IDENT__desc,_OMC_LIT791,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT792 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT792)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT793,3,3) {&Absyn_FunctionArgs_FUNCTIONARGS__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT793 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT793)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT794,3,9) {&Absyn_Algorithm_ALG__NORETCALL__desc,_OMC_LIT792,_OMC_LIT793}};
#define _OMC_LIT794 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT794)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT795,1,19) {&Absyn_Operator_NOT__desc,}};
#define _OMC_LIT795 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT795)
#define _OMC_LIT796_data "Match expression equation sections forbid the use of %s-equations."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT796,66,_OMC_LIT796_data);
#define _OMC_LIT796 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT796)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT797,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT796}};
#define _OMC_LIT797 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT797)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT798,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5004)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT797}};
#define _OMC_LIT798 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT798)
#define _OMC_LIT799_data "Static.fromEquationsToAlgAssignments: Unknown classPart in match expression:\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT799,77,_OMC_LIT799_data);
#define _OMC_LIT799 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT799)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT800_6,0.0);
#define _OMC_LIT800_6 MMC_REFREALLIT(_OMC_LIT_STRUCT800_6)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT800,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT172,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1121)),MMC_IMMEDIATE(MMC_TAGFIXNUM(9)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1121)),MMC_IMMEDIATE(MMC_TAGFIXNUM(133)),_OMC_LIT800_6}};
#define _OMC_LIT800 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT800)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT801,2,31) {&DAE_Exp_LIST__desc,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT801 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT801)
#define _OMC_LIT802_data "- Static.elabListExp failed, non-matching args in list constructor?"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT802,67,_OMC_LIT802_data);
#define _OMC_LIT802 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT802)
#define _OMC_LIT803_data "Failed to elaborate expression: %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT803,35,_OMC_LIT803_data);
#define _OMC_LIT803 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT803)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT804,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT803}};
#define _OMC_LIT804 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT804)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT805,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(159)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT804}};
#define _OMC_LIT805 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT805)
#define _OMC_LIT806_data "cevalEquation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT806,13,_OMC_LIT806_data);
#define _OMC_LIT806 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT806)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT807,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT807 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT807)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT808,2,4) {&Gettext_TranslatableContent_notrans__desc,_OMC_LIT7}};
#define _OMC_LIT808 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT808)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT809,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(32)),_OMC_LIT806,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT15,_OMC_LIT807,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT808}};
#define _OMC_LIT809 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT809)
#define _OMC_LIT810_data "Trying to assign to %s component %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT810,36,_OMC_LIT810_data);
#define _OMC_LIT810 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT810)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT811,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT810}};
#define _OMC_LIT811 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT811)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT812,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(8)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT811}};
#define _OMC_LIT812 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT812)
#define _OMC_LIT813_data "input"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT813,5,_OMC_LIT813_data);
#define _OMC_LIT813 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT813)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT814,2,20) {&DAE_Type_T__METALIST__desc,_OMC_LIT42}};
#define _OMC_LIT814 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT814)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT815,3,3) {&DAE_Properties_PROP__desc,_OMC_LIT814,_OMC_LIT60}};
#define _OMC_LIT815 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT815)
#define _OMC_LIT816_data "Failed to match types of cons expression %s. The head has type %s and the tail %s."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT816,82,_OMC_LIT816_data);
#define _OMC_LIT816 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT816)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT817,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT816}};
#define _OMC_LIT817 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT817)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT818,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5015)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT817}};
#define _OMC_LIT818 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT818)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT819,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(5999)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT770}};
#define _OMC_LIT819 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT819)
#define _OMC_LIT820_data "Dot operator is only allowed when indexing using a single simple name, got: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT820,76,_OMC_LIT820_data);
#define _OMC_LIT820 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT820)
#define _OMC_LIT821_data "Dot operator could not find "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT821,28,_OMC_LIT821_data);
#define _OMC_LIT821 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT821)
#define _OMC_LIT822_data " in "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT822,4,_OMC_LIT822_data);
#define _OMC_LIT822 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT822)
#define _OMC_LIT823_data "Dot operator is only allowed when the expression returns a named tuple. Got expression: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT823,88,_OMC_LIT823_data);
#define _OMC_LIT823 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT823)
#define _OMC_LIT824_data " with type "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT824,11,_OMC_LIT824_data);
#define _OMC_LIT824 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT824)
#define _OMC_LIT825_data "Static.elabExp:IFEXP"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT825,20,_OMC_LIT825_data);
#define _OMC_LIT825 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT825)
#define _OMC_LIT826_data "Static.elabExp:IFEXP:HACK"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT826,25,_OMC_LIT826_data);
#define _OMC_LIT826 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT826)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT827,1,8) {&Absyn_Operator_UPLUS__desc,}};
#define _OMC_LIT827 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT827)
#define _OMC_LIT828_data "'end' can not be used outside array subscripts."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT828,47,_OMC_LIT828_data);
#define _OMC_LIT828 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT828)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT829,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT828}};
#define _OMC_LIT829 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT829)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT830,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(14)),_OMC_LIT0,_OMC_LIT1,_OMC_LIT829}};
#define _OMC_LIT830 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT830)
#include "util/modelica.h"
#include "Static_includes.h"
#if !defined(PROTECTED_FUNCTION_STATIC)
#define PROTECTED_FUNCTION_STATIC
#endif
PROTECTED_FUNCTION_STATIC void omc_Static_checkBuiltinCallArgs(threadData_t *threadData, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_integer _inExpectedArgs, modelica_string _inFnName, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC void boxptr_Static_checkBuiltinCallArgs(threadData_t *threadData, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inExpectedArgs, modelica_metatype _inFnName, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkBuiltinCallArgs,2,0) {(void*) boxptr_Static_checkBuiltinCallArgs,0}};
#define boxvar_Static_checkBuiltinCallArgs MMC_REFSTRUCTLIT(boxvar_lit_Static_checkBuiltinCallArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fixTupleMetaModelica(threadData_t *threadData, modelica_metatype _exps, modelica_metatype _types, modelica_metatype _consts, modelica_metatype *out_prop);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fixTupleMetaModelica,2,0) {(void*) boxptr_Static_fixTupleMetaModelica,0}};
#define boxvar_Static_fixTupleMetaModelica MMC_REFSTRUCTLIT(boxvar_lit_Static_fixTupleMetaModelica)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEndTraverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inTuple);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_replaceEndTraverser,2,0) {(void*) boxptr_Static_replaceEndTraverser,0}};
#define boxvar_Static_replaceEndTraverser MMC_REFSTRUCTLIT(boxvar_lit_Static_replaceEndTraverser)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEndInSub(threadData_t *threadData, modelica_metatype _inSubscript, modelica_integer _inDimIndex, modelica_metatype _inCref);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_replaceEndInSub(threadData_t *threadData, modelica_metatype _inSubscript, modelica_metatype _inDimIndex, modelica_metatype _inCref);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_replaceEndInSub,2,0) {(void*) boxptr_Static_replaceEndInSub,0}};
#define boxvar_Static_replaceEndInSub MMC_REFSTRUCTLIT(boxvar_lit_Static_replaceEndInSub)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEndInSubs(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inSubscripts);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_replaceEndInSubs,2,0) {(void*) boxptr_Static_replaceEndInSubs,0}};
#define boxvar_Static_replaceEndInSubs MMC_REFSTRUCTLIT(boxvar_lit_Static_replaceEndInSubs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEnd(threadData_t *threadData, modelica_metatype _inCref);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_replaceEnd,2,0) {(void*) boxptr_Static_replaceEnd,0}};
#define boxvar_Static_replaceEnd MMC_REFSTRUCTLIT(boxvar_lit_Static_replaceEnd)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_consStrippedCref(threadData_t *threadData, modelica_metatype _e, modelica_metatype _es);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_consStrippedCref,2,0) {(void*) boxptr_Static_consStrippedCref,0}};
#define boxvar_Static_consStrippedCref MMC_REFSTRUCTLIT(boxvar_lit_Static_consStrippedCref)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayDim2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_boolean _inImpl, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayDim2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype _inImpl, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArrayDim2,2,0) {(void*) boxptr_Static_elabArrayDim2,0}};
#define boxvar_Static_elabArrayDim2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArrayDim2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayDim(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimension, modelica_boolean _inImpl, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayDim(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimension, modelica_metatype _inImpl, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArrayDim,2,0) {(void*) boxptr_Static_elabArrayDim,0}};
#define boxvar_Static_elabArrayDim MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArrayDim)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimensions, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inElaboratedDims, modelica_metatype *out_outDimensions);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimensions, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inElaboratedDims, modelica_metatype *out_outDimensions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArrayDims2,2,0) {(void*) boxptr_Static_elabArrayDims2,0}};
#define boxvar_Static_elabArrayDims2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArrayDims2)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_slotAnd(threadData_t *threadData, modelica_metatype _s, modelica_boolean _b);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_slotAnd(threadData_t *threadData, modelica_metatype _s, modelica_metatype _b);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_slotAnd,2,0) {(void*) boxptr_Static_slotAnd,0}};
#define boxvar_Static_slotAnd MMC_REFSTRUCTLIT(boxvar_lit_Static_slotAnd)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_unevaluatedFunctionVariability(threadData_t *threadData, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_unevaluatedFunctionVariability,2,0) {(void*) boxptr_Static_unevaluatedFunctionVariability,0}};
#define boxvar_Static_unevaluatedFunctionVariability MMC_REFSTRUCTLIT(boxvar_lit_Static_unevaluatedFunctionVariability)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_canonCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inPrefixCref, modelica_boolean _inBoolean, modelica_metatype *out_outComponentRef);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_canonCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inPrefixCref, modelica_metatype _inBoolean, modelica_metatype *out_outComponentRef);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_canonCref2,2,0) {(void*) boxptr_Static_canonCref2,0}};
#define boxvar_Static_canonCref2 MMC_REFSTRUCTLIT(boxvar_lit_Static_canonCref2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeIfExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCondition, modelica_metatype _inCondProp, modelica_metatype _inTrueBranch, modelica_metatype _inTrueProp, modelica_metatype _inFalseBranch, modelica_metatype _inFalseProp, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_makeIfExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCondition, modelica_metatype _inCondProp, modelica_metatype _inTrueBranch, modelica_metatype _inTrueProp, modelica_metatype _inFalseBranch, modelica_metatype _inFalseProp, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makeIfExp,2,0) {(void*) boxptr_Static_makeIfExp,0}};
#define boxvar_Static_makeIfExp MMC_REFSTRUCTLIT(boxvar_lit_Static_makeIfExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_subscriptType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inExpSubscriptLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_subscriptType,2,0) {(void*) boxptr_Static_subscriptType,0}};
#define boxvar_Static_subscriptType MMC_REFSTRUCTLIT(boxvar_lit_Static_subscriptType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_subscriptCrefType2(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_subscriptCrefType2,2,0) {(void*) boxptr_Static_subscriptCrefType2,0}};
#define boxvar_Static_subscriptCrefType2 MMC_REFSTRUCTLIT(boxvar_lit_Static_subscriptCrefType2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_subscriptCrefType(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_subscriptCrefType,2,0) {(void*) boxptr_Static_subscriptCrefType,0}};
#define boxvar_Static_subscriptCrefType MMC_REFSTRUCTLIT(boxvar_lit_Static_subscriptCrefType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscriptType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inAbsynExp, modelica_metatype _inDaeExp, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabSubscriptType,2,0) {(void*) boxptr_Static_elabSubscriptType,0}};
#define boxvar_Static_elabSubscriptType MMC_REFSTRUCTLIT(boxvar_lit_Static_elabSubscriptType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscript(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outSubscript, modelica_metatype *out_outConst, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabSubscript(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outSubscript, modelica_metatype *out_outConst, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabSubscript,2,0) {(void*) boxptr_Static_elabSubscript,0}};
#define boxvar_Static_elabSubscript MMC_REFSTRUCTLIT(boxvar_lit_Static_elabSubscript)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscriptsDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_metatype _inDimension, modelica_metatype _inConst, modelica_metatype _inProperties, modelica_boolean _inImpl, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubscript);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabSubscriptsDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_metatype _inDimension, modelica_metatype _inConst, modelica_metatype _inProperties, modelica_metatype _inImpl, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubscript);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabSubscriptsDims2,2,0) {(void*) boxptr_Static_elabSubscriptsDims2,0}};
#define boxvar_Static_elabSubscriptsDims2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabSubscriptsDims2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscriptsDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscripts, modelica_metatype _inDimensions, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubs, modelica_metatype *out_outConst);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabSubscriptsDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscripts, modelica_metatype _inDimensions, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubs, modelica_metatype *out_outConst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabSubscriptsDims,2,0) {(void*) boxptr_Static_elabSubscriptsDims,0}};
#define boxvar_Static_elabSubscriptsDims MMC_REFSTRUCTLIT(boxvar_lit_Static_elabSubscriptsDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCrefSubs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inCrefEnv, modelica_metatype _inSubsEnv, modelica_metatype _inComponentRef, modelica_metatype _inTopPrefix, modelica_metatype _inCrefPrefix, modelica_boolean _inBoolean, modelica_boolean _inHasZeroSizeDim, modelica_metatype _info, modelica_metatype *out_outComponentRef, modelica_metatype *out_outConst, modelica_boolean *out_outHasZeroSizeDim);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCrefSubs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inCrefEnv, modelica_metatype _inSubsEnv, modelica_metatype _inComponentRef, modelica_metatype _inTopPrefix, modelica_metatype _inCrefPrefix, modelica_metatype _inBoolean, modelica_metatype _inHasZeroSizeDim, modelica_metatype _info, modelica_metatype *out_outComponentRef, modelica_metatype *out_outConst, modelica_metatype *out_outHasZeroSizeDim);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCrefSubs,2,0) {(void*) boxptr_Static_elabCrefSubs,0}};
#define boxvar_Static_elabCrefSubs MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCrefSubs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createCrefArray2d(threadData_t *threadData, modelica_metatype _inCref, modelica_integer _inIndex, modelica_integer _inDim1, modelica_integer _inDim2, modelica_metatype _inType5, modelica_metatype _inType6, modelica_metatype _crefIdType);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_createCrefArray2d(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inIndex, modelica_metatype _inDim1, modelica_metatype _inDim2, modelica_metatype _inType5, modelica_metatype _inType6, modelica_metatype _crefIdType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_createCrefArray2d,2,0) {(void*) boxptr_Static_createCrefArray2d,0}};
#define boxvar_Static_createCrefArray2d MMC_REFSTRUCTLIT(boxvar_lit_Static_createCrefArray2d)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createCrefArray(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_integer _inInteger2, modelica_integer _inInteger3, modelica_metatype _inType4, modelica_metatype _inType5, modelica_metatype _crefIdType);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_createCrefArray(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inInteger2, modelica_metatype _inInteger3, modelica_metatype _inType4, modelica_metatype _inType5, modelica_metatype _crefIdType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_createCrefArray,2,0) {(void*) boxptr_Static_createCrefArray,0}};
#define boxvar_Static_createCrefArray MMC_REFSTRUCTLIT(boxvar_lit_Static_createCrefArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_callVectorize(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inExpExpLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_callVectorize,2,0) {(void*) boxptr_Static_callVectorize,0}};
#define boxvar_Static_callVectorize MMC_REFSTRUCTLIT(boxvar_lit_Static_callVectorize)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_applySubscript3(threadData_t *threadData, modelica_metatype _inSubs, modelica_metatype _inSub, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_applySubscript3,2,0) {(void*) boxptr_Static_applySubscript3,0}};
#define boxvar_Static_applySubscript3 MMC_REFSTRUCTLIT(boxvar_lit_Static_applySubscript3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_applySubscript2(threadData_t *threadData, modelica_metatype _inSub, modelica_metatype _inSubs, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_applySubscript2,2,0) {(void*) boxptr_Static_applySubscript2,0}};
#define boxvar_Static_applySubscript2 MMC_REFSTRUCTLIT(boxvar_lit_Static_applySubscript2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_applySubscript(threadData_t *threadData, modelica_metatype _inSub, modelica_metatype _inSubs, modelica_string _name, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_applySubscript,2,0) {(void*) boxptr_Static_applySubscript,0}};
#define boxvar_Static_applySubscript MMC_REFSTRUCTLIT(boxvar_lit_Static_applySubscript)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_removeDoubleEmptyArrays(threadData_t *threadData, modelica_metatype _inArr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_removeDoubleEmptyArrays,2,0) {(void*) boxptr_Static_removeDoubleEmptyArrays,0}};
#define boxvar_Static_removeDoubleEmptyArrays MMC_REFSTRUCTLIT(boxvar_lit_Static_removeDoubleEmptyArrays)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_flattenSubscript3(threadData_t *threadData, modelica_metatype _inSubscripts, modelica_string _inName, modelica_metatype _inType, modelica_metatype _inExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_flattenSubscript3,2,0) {(void*) boxptr_Static_flattenSubscript3,0}};
#define boxvar_Static_flattenSubscript3 MMC_REFSTRUCTLIT(boxvar_lit_Static_flattenSubscript3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_flattenSubscript(threadData_t *threadData, modelica_metatype _inSubs, modelica_string _name, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_flattenSubscript,2,0) {(void*) boxptr_Static_flattenSubscript,0}};
#define boxvar_Static_flattenSubscript MMC_REFSTRUCTLIT(boxvar_lit_Static_flattenSubscript)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_mergeQualWithRest2(threadData_t *threadData, modelica_metatype _rest, modelica_metatype _qual);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_mergeQualWithRest2,2,0) {(void*) boxptr_Static_mergeQualWithRest2,0}};
#define boxvar_Static_mergeQualWithRest2 MMC_REFSTRUCTLIT(boxvar_lit_Static_mergeQualWithRest2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_mergeQualWithRest(threadData_t *threadData, modelica_metatype _qual, modelica_metatype _rest, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_mergeQualWithRest,2,0) {(void*) boxptr_Static_mergeQualWithRest,0}};
#define boxvar_Static_mergeQualWithRest MMC_REFSTRUCTLIT(boxvar_lit_Static_mergeQualWithRest)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCrefSlice(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCrefSlice,2,0) {(void*) boxptr_Static_elabCrefSlice,0}};
#define boxvar_Static_elabCrefSlice MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCrefSlice)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_extractDimensionOfChild(threadData_t *threadData, modelica_metatype _inExp, modelica_boolean *out_isScalar);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_extractDimensionOfChild(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype *out_isScalar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_extractDimensionOfChild,2,0) {(void*) boxptr_Static_extractDimensionOfChild,0}};
#define boxvar_Static_extractDimensionOfChild MMC_REFSTRUCTLIT(boxvar_lit_Static_extractDimensionOfChild)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inAttributes, modelica_metatype _constSubs, modelica_metatype _inIteratorConst, modelica_metatype _inType, modelica_metatype _inBinding, modelica_boolean _inVectorize, modelica_metatype _splicedExpData, modelica_metatype _inPrefix, modelica_boolean _evalCref, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outConst, modelica_metatype *out_outAttributes);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inAttributes, modelica_metatype _constSubs, modelica_metatype _inIteratorConst, modelica_metatype _inType, modelica_metatype _inBinding, modelica_metatype _inVectorize, modelica_metatype _splicedExpData, modelica_metatype _inPrefix, modelica_metatype _evalCref, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outConst, modelica_metatype *out_outAttributes);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCref2,2,0) {(void*) boxptr_Static_elabCref2,0}};
#define boxvar_Static_elabCref2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCref2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillSubscripts(threadData_t *threadData, modelica_metatype _inExpSubscriptLst, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fillSubscripts,2,0) {(void*) boxptr_Static_fillSubscripts,0}};
#define boxvar_Static_fillSubscripts MMC_REFSTRUCTLIT(boxvar_lit_Static_fillSubscripts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_stripPrefixType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inPrefixType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_stripPrefixType,2,0) {(void*) boxptr_Static_stripPrefixType,0}};
#define boxvar_Static_stripPrefixType MMC_REFSTRUCTLIT(boxvar_lit_Static_stripPrefixType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillCrefSubscripts(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fillCrefSubscripts,2,0) {(void*) boxptr_Static_fillCrefSubscripts,0}};
#define boxvar_Static_fillCrefSubscripts MMC_REFSTRUCTLIT(boxvar_lit_Static_fillCrefSubscripts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateEmptyVariable(threadData_t *threadData, modelica_boolean _hasZeroSizeDim, modelica_metatype _inExp, modelica_metatype _ty, modelica_metatype _c, modelica_metatype *out_oc);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_evaluateEmptyVariable(threadData_t *threadData, modelica_metatype _hasZeroSizeDim, modelica_metatype _inExp, modelica_metatype _ty, modelica_metatype _c, modelica_metatype *out_oc);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateEmptyVariable,2,0) {(void*) boxptr_Static_evaluateEmptyVariable,0}};
#define boxvar_Static_evaluateEmptyVariable MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateEmptyVariable)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_lookupFunctionsInEnvNoError(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inInfo, modelica_metatype *out_outTypesTypeLst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_lookupFunctionsInEnvNoError,2,0) {(void*) boxptr_Static_lookupFunctionsInEnvNoError,0}};
#define boxvar_Static_lookupFunctionsInEnvNoError MMC_REFSTRUCTLIT(boxvar_lit_Static_lookupFunctionsInEnvNoError)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isValidTimeScope(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isValidTimeScope(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isValidTimeScope,2,0) {(void*) boxptr_Static_isValidTimeScope,0}};
#define boxvar_Static_isValidTimeScope MMC_REFSTRUCTLIT(boxvar_lit_Static_isValidTimeScope)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCrefArraySubscripts(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _e, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _pre, modelica_boolean _evalCref, modelica_boolean _impl, modelica_metatype _info, modelica_metatype *out_res);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCrefArraySubscripts(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _e, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _pre, modelica_metatype _evalCref, modelica_metatype _impl, modelica_metatype _info, modelica_metatype *out_res);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCrefArraySubscripts,2,0) {(void*) boxptr_Static_elabCrefArraySubscripts,0}};
#define boxvar_Static_elabCrefArraySubscripts MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCrefArraySubscripts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCref1(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_boolean _inImplicit, modelica_boolean _performVectorization, modelica_metatype _inPrefix, modelica_boolean _evalCref, modelica_metatype _info, modelica_metatype *out_res);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCref1(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inImplicit, modelica_metatype _performVectorization, modelica_metatype _inPrefix, modelica_metatype _evalCref, modelica_metatype _info, modelica_metatype *out_res);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCref1,2,0) {(void*) boxptr_Static_elabCref1,0}};
#define boxvar_Static_elabCref1 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCref1)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillSlot(threadData_t *threadData, modelica_metatype _inFuncArg, modelica_metatype _inExp, modelica_metatype _inDims, modelica_metatype _inSlotLst, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _fn);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fillSlot,2,0) {(void*) boxptr_Static_fillSlot,0}};
#define boxvar_Static_fillSlot MMC_REFSTRUCTLIT(boxvar_lit_Static_fillSlot)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_findNamedArgParallelism(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_findNamedArgParallelism,2,0) {(void*) boxptr_Static_findNamedArgParallelism,0}};
#define boxvar_Static_findNamedArgParallelism MMC_REFSTRUCTLIT(boxvar_lit_Static_findNamedArgParallelism)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_findNamedArgType(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_findNamedArgType,2,0) {(void*) boxptr_Static_findNamedArgType,0}};
#define boxvar_Static_findNamedArgType MMC_REFSTRUCTLIT(boxvar_lit_Static_findNamedArgType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_findNamedArg(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_findNamedArg,2,0) {(void*) boxptr_Static_findNamedArg,0}};
#define boxvar_Static_findNamedArg MMC_REFSTRUCTLIT(boxvar_lit_Static_findNamedArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabNamedInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inNamedArg, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_boolean _onlyOneFunction, modelica_boolean _checkTypes, modelica_boolean _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_integer _numErrors, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabNamedInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inNamedArg, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_metatype _onlyOneFunction, modelica_metatype _checkTypes, modelica_metatype _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_metatype _numErrors, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabNamedInputArg,2,0) {(void*) boxptr_Static_elabNamedInputArg,0}};
#define boxvar_Static_elabNamedInputArg MMC_REFSTRUCTLIT(boxvar_lit_Static_elabNamedInputArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabNamedInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_boolean _onlyOneFunction, modelica_boolean _checkTypes, modelica_boolean _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabNamedInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_metatype _onlyOneFunction, modelica_metatype _checkTypes, modelica_metatype _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabNamedInputArgs,2,0) {(void*) boxptr_Static_elabNamedInputArgs,0}};
#define boxvar_Static_elabNamedInputArgs MMC_REFSTRUCTLIT(boxvar_lit_Static_elabNamedInputArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabPositionalInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _farg, modelica_integer _position, modelica_metatype _inSlotLst, modelica_boolean _onlyOneFunction, modelica_boolean _checkTypes, modelica_boolean _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outConst, modelica_metatype *out_outPolymorphicBindings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabPositionalInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _farg, modelica_metatype _position, modelica_metatype _inSlotLst, modelica_metatype _onlyOneFunction, modelica_metatype _checkTypes, modelica_metatype _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outConst, modelica_metatype *out_outPolymorphicBindings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabPositionalInputArg,2,0) {(void*) boxptr_Static_elabPositionalInputArg,0}};
#define boxvar_Static_elabPositionalInputArg MMC_REFSTRUCTLIT(boxvar_lit_Static_elabPositionalInputArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabPositionalInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inFuncArgs, modelica_metatype _inSlots, modelica_boolean _inOnlyOneFunction, modelica_boolean _inCheckTypes, modelica_boolean _inImplicit, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inPath, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabPositionalInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inFuncArgs, modelica_metatype _inSlots, modelica_metatype _inOnlyOneFunction, modelica_metatype _inCheckTypes, modelica_metatype _inImplicit, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inPath, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabPositionalInputArgs,2,0) {(void*) boxptr_Static_elabPositionalInputArgs,0}};
#define boxvar_Static_elabPositionalInputArgs MMC_REFSTRUCTLIT(boxvar_lit_Static_elabPositionalInputArgs)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isFreeParameterExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isFreeParameterExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isFreeParameterExp,2,0) {(void*) boxptr_Static_isFreeParameterExp,0}};
#define boxvar_Static_isFreeParameterExp MMC_REFSTRUCTLIT(boxvar_lit_Static_isFreeParameterExp)
PROTECTED_FUNCTION_STATIC modelica_string omc_Static_printSlotsStr(threadData_t *threadData, modelica_metatype _inSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_printSlotsStr,2,0) {(void*) boxptr_Static_printSlotsStr,0}};
#define boxvar_Static_printSlotsStr MMC_REFSTRUCTLIT(boxvar_lit_Static_printSlotsStr)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillGraphicsDefaultSlots(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inSlots, modelica_metatype _inClass, modelica_metatype _inEnv, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_fillGraphicsDefaultSlots(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inSlots, modelica_metatype _inClass, modelica_metatype _inEnv, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fillGraphicsDefaultSlots,2,0) {(void*) boxptr_Static_fillGraphicsDefaultSlots,0}};
#define boxvar_Static_fillGraphicsDefaultSlots MMC_REFSTRUCTLIT(boxvar_lit_Static_fillGraphicsDefaultSlots)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_slotArg(threadData_t *threadData, modelica_metatype _inSlot);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_slotArg,2,0) {(void*) boxptr_Static_slotArg,0}};
#define boxvar_Static_slotArg MMC_REFSTRUCTLIT(boxvar_lit_Static_slotArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_slotListArgs(threadData_t *threadData, modelica_metatype _inSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_slotListArgs,2,0) {(void*) boxptr_Static_slotListArgs,0}};
#define boxvar_Static_slotListArgs MMC_REFSTRUCTLIT(boxvar_lit_Static_slotListArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_complexTypeFromSlots(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _complexClassType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_complexTypeFromSlots,2,0) {(void*) boxptr_Static_complexTypeFromSlots,0}};
#define boxvar_Static_complexTypeFromSlots MMC_REFSTRUCTLIT(boxvar_lit_Static_complexTypeFromSlots)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_funcArgFromSlot(threadData_t *threadData, modelica_metatype _inSlot);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_funcArgFromSlot,2,0) {(void*) boxptr_Static_funcArgFromSlot,0}};
#define boxvar_Static_funcArgFromSlot MMC_REFSTRUCTLIT(boxvar_lit_Static_funcArgFromSlot)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_funcArgsFromSlots(threadData_t *threadData, modelica_metatype _inSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_funcArgsFromSlots,2,0) {(void*) boxptr_Static_funcArgsFromSlots,0}};
#define boxvar_Static_funcArgsFromSlots MMC_REFSTRUCTLIT(boxvar_lit_Static_funcArgsFromSlots)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeEmptySlot(threadData_t *threadData, modelica_metatype _inArg, modelica_integer _inIndex, modelica_integer *out_outIndex);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_makeEmptySlot(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inIndex, modelica_metatype *out_outIndex);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makeEmptySlot,2,0) {(void*) boxptr_Static_makeEmptySlot,0}};
#define boxvar_Static_makeEmptySlot MMC_REFSTRUCTLIT(boxvar_lit_Static_makeEmptySlot)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeEmptySlots(threadData_t *threadData, modelica_metatype _inArgs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makeEmptySlots,2,0) {(void*) boxptr_Static_makeEmptySlots,0}};
#define boxvar_Static_makeEmptySlots MMC_REFSTRUCTLIT(boxvar_lit_Static_makeEmptySlots)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inSlots, modelica_boolean _inOnlyOneFunction, modelica_boolean _inCheckTypes, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inFuncType, modelica_metatype _inPath, modelica_boolean _isGraphicsExp, modelica_metatype *out_outExps, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inSlots, modelica_metatype _inOnlyOneFunction, modelica_metatype _inCheckTypes, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inFuncType, modelica_metatype _inPath, modelica_metatype _isGraphicsExp, modelica_metatype *out_outExps, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabInputArgs,2,0) {(void*) boxptr_Static_elabInputArgs,0}};
#define boxvar_Static_elabInputArgs MMC_REFSTRUCTLIT(boxvar_lit_Static_elabInputArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getTypes(threadData_t *threadData, modelica_metatype _farg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_getTypes,2,0) {(void*) boxptr_Static_getTypes,0}};
#define boxvar_Static_getTypes MMC_REFSTRUCTLIT(boxvar_lit_Static_getTypes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_splitProps(threadData_t *threadData, modelica_metatype _inProperties, modelica_metatype *out_outConsts);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_splitProps,2,0) {(void*) boxptr_Static_splitProps,0}};
#define boxvar_Static_splitProps MMC_REFSTRUCTLIT(boxvar_lit_Static_splitProps)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkConst(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _c);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkConst,2,0) {(void*) boxptr_Static_checkConst,0}};
#define boxvar_Static_checkConst MMC_REFSTRUCTLIT(boxvar_lit_Static_checkConst)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkConsts(threadData_t *threadData, modelica_metatype _inTypes, modelica_metatype _inConst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkConsts,2,0) {(void*) boxptr_Static_checkConsts,0}};
#define boxvar_Static_checkConsts MMC_REFSTRUCTLIT(boxvar_lit_Static_checkConsts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabConsts(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inConst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabConsts,2,0) {(void*) boxptr_Static_elabConsts,0}};
#define boxvar_Static_elabConsts MMC_REFSTRUCTLIT(boxvar_lit_Static_elabConsts)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getProperties(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inTupleConst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_getProperties,2,0) {(void*) boxptr_Static_getProperties,0}};
#define boxvar_Static_getProperties MMC_REFSTRUCTLIT(boxvar_lit_Static_getProperties)
PROTECTED_FUNCTION_STATIC void omc_Static_sameArraydimLst(threadData_t *threadData, modelica_metatype _inDims1, modelica_string _name1, modelica_metatype _exp1, modelica_metatype _inDims2, modelica_string _name2, modelica_metatype _exp2, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_sameArraydimLst,2,0) {(void*) boxptr_Static_sameArraydimLst,0}};
#define boxvar_Static_sameArraydimLst MMC_REFSTRUCTLIT(boxvar_lit_Static_sameArraydimLst)
PROTECTED_FUNCTION_STATIC void omc_Static_sameSlotsVectorizable(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inDims, modelica_string _name, modelica_metatype _exp, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_sameSlotsVectorizable,2,0) {(void*) boxptr_Static_sameSlotsVectorizable,0}};
#define boxvar_Static_sameSlotsVectorizable MMC_REFSTRUCTLIT(boxvar_lit_Static_sameSlotsVectorizable)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_slotsVectorizable(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_slotsVectorizable,2,0) {(void*) boxptr_Static_slotsVectorizable,0}};
#define boxvar_Static_slotsVectorizable MMC_REFSTRUCTLIT(boxvar_lit_Static_slotsVectorizable)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createActualFunctype(threadData_t *threadData, modelica_metatype _tp, modelica_metatype _slots, modelica_boolean _checkTypes);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_createActualFunctype(threadData_t *threadData, modelica_metatype _tp, modelica_metatype _slots, modelica_metatype _checkTypes);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_createActualFunctype,2,0) {(void*) boxptr_Static_createActualFunctype,0}};
#define boxvar_Static_createActualFunctype MMC_REFSTRUCTLIT(boxvar_lit_Static_createActualFunctype)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateFuncArgTypeDims(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inEnv, modelica_metatype _inCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateFuncArgTypeDims,2,0) {(void*) boxptr_Static_evaluateFuncArgTypeDims,0}};
#define boxvar_Static_evaluateFuncArgTypeDims MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateFuncArgTypeDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateFuncParamDimAndMatchTypes(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inParam, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateFuncParamDimAndMatchTypes,2,0) {(void*) boxptr_Static_evaluateFuncParamDimAndMatchTypes,0}};
#define boxvar_Static_evaluateFuncParamDimAndMatchTypes MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateFuncParamDimAndMatchTypes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeDummyFuncEnv(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inVars, modelica_metatype _inDummyVar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makeDummyFuncEnv,2,0) {(void*) boxptr_Static_makeDummyFuncEnv,0}};
#define boxvar_Static_makeDummyFuncEnv MMC_REFSTRUCTLIT(boxvar_lit_Static_makeDummyFuncEnv)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateStructuralSlots(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSlots, modelica_metatype _funcType, modelica_metatype *out_slots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateStructuralSlots,2,0) {(void*) boxptr_Static_evaluateStructuralSlots,0}};
#define boxvar_Static_evaluateStructuralSlots MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateStructuralSlots)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateStructuralSlots2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSlots, modelica_metatype _usedSlots, modelica_metatype _acc, modelica_metatype *out_slots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateStructuralSlots2,2,0) {(void*) boxptr_Static_evaluateStructuralSlots2,0}};
#define boxvar_Static_evaluateStructuralSlots2 MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateStructuralSlots2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeVarFromSlot(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inEnv, modelica_metatype _inCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makeVarFromSlot,2,0) {(void*) boxptr_Static_makeVarFromSlot,0}};
#define boxvar_Static_makeVarFromSlot MMC_REFSTRUCTLIT(boxvar_lit_Static_makeVarFromSlot)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isSlotUsed(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inUsedNames);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isSlotUsed(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inUsedNames);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isSlotUsed,2,0) {(void*) boxptr_Static_isSlotUsed,0}};
#define boxvar_Static_isSlotUsed MMC_REFSTRUCTLIT(boxvar_lit_Static_isSlotUsed)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_extractNamesFromDims2(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inAccumNames);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_extractNamesFromDims2,2,0) {(void*) boxptr_Static_extractNamesFromDims2,0}};
#define boxvar_Static_extractNamesFromDims2 MMC_REFSTRUCTLIT(boxvar_lit_Static_extractNamesFromDims2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_extractNamesFromDims(threadData_t *threadData, modelica_metatype _inDimensions, modelica_metatype _inAccumNames);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_extractNamesFromDims,2,0) {(void*) boxptr_Static_extractNamesFromDims,0}};
#define boxvar_Static_extractNamesFromDims MMC_REFSTRUCTLIT(boxvar_lit_Static_extractNamesFromDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getAllOutputDimensions(threadData_t *threadData, modelica_metatype _inOutputType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_getAllOutputDimensions,2,0) {(void*) boxptr_Static_getAllOutputDimensions,0}};
#define boxvar_Static_getAllOutputDimensions MMC_REFSTRUCTLIT(boxvar_lit_Static_getAllOutputDimensions)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_applyArgTypesToFuncType(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inParameters, modelica_metatype _inResultType, modelica_metatype _inEnv, modelica_boolean _checkTypes, modelica_metatype _inInfo, modelica_metatype *out_outResultType);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_applyArgTypesToFuncType(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inParameters, modelica_metatype _inResultType, modelica_metatype _inEnv, modelica_metatype _checkTypes, modelica_metatype _inInfo, modelica_metatype *out_outResultType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_applyArgTypesToFuncType,2,0) {(void*) boxptr_Static_applyArgTypesToFuncType,0}};
#define boxvar_Static_applyArgTypesToFuncType MMC_REFSTRUCTLIT(boxvar_lit_Static_applyArgTypesToFuncType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_addPolymorphicTypeVars(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _typeVars, modelica_metatype _funcTy, modelica_metatype __omcQ_24in_5Fpb, modelica_metatype _fnPath, modelica_metatype _info, modelica_metatype *out_pb);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_addPolymorphicTypeVars,2,0) {(void*) boxptr_Static_addPolymorphicTypeVars,0}};
#define boxvar_Static_addPolymorphicTypeVars MMC_REFSTRUCTLIT(boxvar_lit_Static_addPolymorphicTypeVars)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabTypes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _typeVars, modelica_metatype _inTypes, modelica_boolean _inOnlyOneFunction, modelica_boolean _inCheckTypes, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outArgs, modelica_metatype *out_outConsts, modelica_metatype *out_outResultType, modelica_metatype *out_outFunctionType, modelica_metatype *out_outDimensions, modelica_metatype *out_outSlots);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabTypes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _typeVars, modelica_metatype _inTypes, modelica_metatype _inOnlyOneFunction, modelica_metatype _inCheckTypes, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outArgs, modelica_metatype *out_outConsts, modelica_metatype *out_outResultType, modelica_metatype *out_outFunctionType, modelica_metatype *out_outDimensions, modelica_metatype *out_outSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabTypes,2,0) {(void*) boxptr_Static_elabTypes,0}};
#define boxvar_Static_elabTypes MMC_REFSTRUCTLIT(boxvar_lit_Static_elabTypes)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deoverloadFuncname(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inType, modelica_metatype _inEnv, modelica_metatype *out_outType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_deoverloadFuncname,2,0) {(void*) boxptr_Static_deoverloadFuncname,0}};
#define boxvar_Static_deoverloadFuncname MMC_REFSTRUCTLIT(boxvar_lit_Static_deoverloadFuncname)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallScalar3(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inSlots, modelica_integer _inIndex);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallScalar3(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inSlots, modelica_metatype _inIndex);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCallScalar3,2,0) {(void*) boxptr_Static_vectorizeCallScalar3,0}};
#define boxvar_Static_vectorizeCallScalar3 MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCallScalar3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallScalar2(threadData_t *threadData, modelica_metatype _fn, modelica_metatype _exps, modelica_metatype _attr, modelica_metatype _slots, modelica_integer _dim);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallScalar2(threadData_t *threadData, modelica_metatype _fn, modelica_metatype _exps, modelica_metatype _attr, modelica_metatype _slots, modelica_metatype _dim);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCallScalar2,2,0) {(void*) boxptr_Static_vectorizeCallScalar2,0}};
#define boxvar_Static_vectorizeCallScalar2 MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCallScalar2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallScalar(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _ty, modelica_integer _dim, modelica_metatype _slots);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallScalar(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _ty, modelica_metatype _dim, modelica_metatype _slots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCallScalar,2,0) {(void*) boxptr_Static_vectorizeCallScalar,0}};
#define boxvar_Static_vectorizeCallScalar MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCallScalar)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inType, modelica_integer _inDim, modelica_metatype _inSlots);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inType, modelica_metatype _inDim, modelica_metatype _inSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCallArray2,2,0) {(void*) boxptr_Static_vectorizeCallArray2,0}};
#define boxvar_Static_vectorizeCallArray2 MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCallArray2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallArray(threadData_t *threadData, modelica_metatype _inExp, modelica_integer _inDim, modelica_metatype _inSlots);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallArray(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDim, modelica_metatype _inSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCallArray,2,0) {(void*) boxptr_Static_vectorizeCallArray,0}};
#define boxvar_Static_vectorizeCallArray MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCallArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallUnknownDimension(threadData_t *threadData, modelica_metatype _inEs, modelica_metatype _inSlots, modelica_metatype _info, modelica_metatype *out_ofound);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCallUnknownDimension,2,0) {(void*) boxptr_Static_vectorizeCallUnknownDimension,0}};
#define boxvar_Static_vectorizeCallUnknownDimension MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCallUnknownDimension)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCall(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDims, modelica_metatype _inSlots, modelica_metatype _inProperties, modelica_metatype _info, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_vectorizeCall,2,0) {(void*) boxptr_Static_vectorizeCall,0}};
#define boxvar_Static_vectorizeCall MMC_REFSTRUCTLIT(boxvar_lit_Static_vectorizeCall)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_determineConstSpecialFunc(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inConst, modelica_metatype _inFuncName, modelica_metatype *out_outConst);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_determineConstSpecialFunc,2,0) {(void*) boxptr_Static_determineConstSpecialFunc,0}};
#define boxvar_Static_determineConstSpecialFunc MMC_REFSTRUCTLIT(boxvar_lit_Static_determineConstSpecialFunc)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getOptSlotDefaultExp(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inSlots, modelica_metatype _inInfo, modelica_metatype _inOrigExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_getOptSlotDefaultExp,2,0) {(void*) boxptr_Static_getOptSlotDefaultExp,0}};
#define boxvar_Static_getOptSlotDefaultExp MMC_REFSTRUCTLIT(boxvar_lit_Static_getOptSlotDefaultExp)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isSlotNamed(threadData_t *threadData, modelica_string _inName, modelica_metatype _inSlot);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isSlotNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inSlot);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isSlotNamed,2,0) {(void*) boxptr_Static_isSlotNamed,0}};
#define boxvar_Static_isSlotNamed MMC_REFSTRUCTLIT(boxvar_lit_Static_isSlotNamed)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_lookupSlotInArray(threadData_t *threadData, modelica_string _inSlotName, modelica_metatype _inSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_lookupSlotInArray,2,0) {(void*) boxptr_Static_lookupSlotInArray,0}};
#define boxvar_Static_lookupSlotInArray MMC_REFSTRUCTLIT(boxvar_lit_Static_lookupSlotInArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateSlotExp__traverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inTuple, modelica_metatype *out_outTuple);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateSlotExp__traverser,2,0) {(void*) boxptr_Static_evaluateSlotExp__traverser,0}};
#define boxvar_Static_evaluateSlotExp__traverser MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateSlotExp__traverser)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateSlotExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inSlotArray, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_evaluateSlotExp,2,0) {(void*) boxptr_Static_evaluateSlotExp,0}};
#define boxvar_Static_evaluateSlotExp MMC_REFSTRUCTLIT(boxvar_lit_Static_evaluateSlotExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillDefaultSlot2(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inSlotArray, modelica_metatype _inInfo, modelica_metatype *out_outSlot);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fillDefaultSlot2,2,0) {(void*) boxptr_Static_fillDefaultSlot2,0}};
#define boxvar_Static_fillDefaultSlot2 MMC_REFSTRUCTLIT(boxvar_lit_Static_fillDefaultSlot2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillDefaultSlot(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inSlotArray, modelica_metatype _inInfo, modelica_metatype *out_outSlot);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fillDefaultSlot,2,0) {(void*) boxptr_Static_fillDefaultSlot,0}};
#define boxvar_Static_fillDefaultSlot MMC_REFSTRUCTLIT(boxvar_lit_Static_fillDefaultSlot)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_addDefaultArgs(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inInfo, modelica_metatype *out_outSlots);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_addDefaultArgs,2,0) {(void*) boxptr_Static_addDefaultArgs,0}};
#define boxvar_Static_addDefaultArgs MMC_REFSTRUCTLIT(boxvar_lit_Static_addDefaultArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_instantiateImplicitRecordConstructors(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_instantiateImplicitRecordConstructors,2,0) {(void*) boxptr_Static_instantiateImplicitRecordConstructors,0}};
#define boxvar_Static_instantiateImplicitRecordConstructors MMC_REFSTRUCTLIT(boxvar_lit_Static_instantiateImplicitRecordConstructors)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_lookupAndFullyQualify(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFunctionName, modelica_metatype *out_outEnv, modelica_metatype *out_outClass, modelica_metatype *out_outFunctionName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_lookupAndFullyQualify,2,0) {(void*) boxptr_Static_lookupAndFullyQualify,0}};
#define boxvar_Static_lookupAndFullyQualify MMC_REFSTRUCTLIT(boxvar_lit_Static_lookupAndFullyQualify)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_instantiateDaeFunction2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inName, modelica_boolean _builtin, modelica_metatype _clOpt, modelica_boolean _printErrorMsg, modelica_metatype _forceFunctionInst, modelica_metatype *out_status);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_instantiateDaeFunction2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inName, modelica_metatype _builtin, modelica_metatype _clOpt, modelica_metatype _printErrorMsg, modelica_metatype _forceFunctionInst, modelica_metatype *out_status);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_instantiateDaeFunction2,2,0) {(void*) boxptr_Static_instantiateDaeFunction2,0}};
#define boxvar_Static_instantiateDaeFunction2 MMC_REFSTRUCTLIT(boxvar_lit_Static_instantiateDaeFunction2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsMetarecord(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_expProps);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallArgsMetarecord(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_expProps);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallArgsMetarecord,2,0) {(void*) boxptr_Static_elabCallArgsMetarecord,0}};
#define boxvar_Static_elabCallArgsMetarecord MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallArgsMetarecord)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isValidWRTParallelScope__dispatch(threadData_t *threadData, modelica_metatype _inFn, modelica_boolean _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inScope, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isValidWRTParallelScope__dispatch(threadData_t *threadData, modelica_metatype _inFn, modelica_metatype _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inScope, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isValidWRTParallelScope__dispatch,2,0) {(void*) boxptr_Static_isValidWRTParallelScope__dispatch,0}};
#define boxvar_Static_isValidWRTParallelScope__dispatch MMC_REFSTRUCTLIT(boxvar_lit_Static_isValidWRTParallelScope__dispatch)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isValidWRTParallelScope(threadData_t *threadData, modelica_metatype _inFn, modelica_boolean _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inEnv, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isValidWRTParallelScope(threadData_t *threadData, modelica_metatype _inFn, modelica_metatype _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inEnv, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isValidWRTParallelScope,2,0) {(void*) boxptr_Static_isValidWRTParallelScope,0}};
#define boxvar_Static_isValidWRTParallelScope MMC_REFSTRUCTLIT(boxvar_lit_Static_isValidWRTParallelScope)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgs2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inAbsynExpLst, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _typeVars, modelica_boolean _inBoolean, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _info, modelica_integer _numErrors, modelica_metatype *out_expProps);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallArgs2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inAbsynExpLst, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _typeVars, modelica_metatype _inBoolean, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _numErrors, modelica_metatype *out_expProps);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallArgs2,2,0) {(void*) boxptr_Static_elabCallArgs2,0}};
#define boxvar_Static_elabCallArgs2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallArgs2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createInputVariableReplacements(threadData_t *threadData, modelica_metatype _inSlotLst, modelica_metatype _inVarsRepl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_createInputVariableReplacements,2,0) {(void*) boxptr_Static_createInputVariableReplacements,0}};
#define boxvar_Static_createInputVariableReplacements MMC_REFSTRUCTLIT(boxvar_lit_Static_createInputVariableReplacements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsEvaluateArrayLength3(threadData_t *threadData, modelica_metatype _inDim, modelica_metatype _inTpl, modelica_metatype *out_outTpl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallArgsEvaluateArrayLength3,2,0) {(void*) boxptr_Static_elabCallArgsEvaluateArrayLength3,0}};
#define boxvar_Static_elabCallArgsEvaluateArrayLength3 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallArgsEvaluateArrayLength3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsEvaluateArrayLength2(threadData_t *threadData, modelica_metatype _ty, modelica_metatype _inTpl, modelica_metatype *out_outTpl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallArgsEvaluateArrayLength2,2,0) {(void*) boxptr_Static_elabCallArgsEvaluateArrayLength2,0}};
#define boxvar_Static_elabCallArgsEvaluateArrayLength2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallArgsEvaluateArrayLength2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsEvaluateArrayLength(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _inProperties, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallArgsEvaluateArrayLength,2,0) {(void*) boxptr_Static_elabCallArgsEvaluateArrayLength,0}};
#define boxvar_Static_elabCallArgsEvaluateArrayLength MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallArgsEvaluateArrayLength)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createDummyFarg(threadData_t *threadData, modelica_string _name);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_createDummyFarg,2,0) {(void*) boxptr_Static_createDummyFarg,0}};
#define boxvar_Static_createDummyFarg MMC_REFSTRUCTLIT(boxvar_lit_Static_createDummyFarg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_absynExpListToDaeExpList(threadData_t *threadData, modelica_metatype _absynExpList);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_absynExpListToDaeExpList,2,0) {(void*) boxptr_Static_absynExpListToDaeExpList,0}};
#define boxvar_Static_absynExpListToDaeExpList MMC_REFSTRUCTLIT(boxvar_lit_Static_absynExpListToDaeExpList)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_hasBuiltInHandler(threadData_t *threadData, modelica_metatype _fn);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_hasBuiltInHandler(threadData_t *threadData, modelica_metatype _fn);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_hasBuiltInHandler,2,0) {(void*) boxptr_Static_hasBuiltInHandler,0}};
#define boxvar_Static_hasBuiltInHandler MMC_REFSTRUCTLIT(boxvar_lit_Static_hasBuiltInHandler)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCall(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _fn, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _typeVars, modelica_boolean _impl, modelica_metatype _pre, modelica_metatype _info, modelica_metatype *out_e, modelica_metatype *out_prop);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCall(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _fn, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _typeVars, modelica_metatype _impl, modelica_metatype _pre, modelica_metatype _info, modelica_metatype *out_e, modelica_metatype *out_prop);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCall,2,0) {(void*) boxptr_Static_elabCall,0}};
#define boxvar_Static_elabCall MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCall)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallBuiltin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnName, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallBuiltin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnName, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallBuiltin,2,0) {(void*) boxptr_Static_elabCallBuiltin,0}};
#define boxvar_Static_elabCallBuiltin MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallBuiltin)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_arrayScalar(threadData_t *threadData, modelica_metatype _inExp, modelica_integer _inDim, modelica_string _inOperator, modelica_metatype _inInfo);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_arrayScalar(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDim, modelica_metatype _inOperator, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_arrayScalar,2,0) {(void*) boxptr_Static_arrayScalar,0}};
#define boxvar_Static_arrayScalar MMC_REFSTRUCTLIT(boxvar_lit_Static_arrayScalar)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMatrix3(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMatrix3,2,0) {(void*) boxptr_Static_elabBuiltinMatrix3,0}};
#define boxvar_Static_elabBuiltinMatrix3 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMatrix3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMatrix2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArg, modelica_metatype _inProperties, modelica_metatype _inType, modelica_metatype _inInfo, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMatrix2,2,0) {(void*) boxptr_Static_elabBuiltinMatrix2,0}};
#define boxvar_Static_elabBuiltinMatrix2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMatrix2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_flattenArray(threadData_t *threadData, modelica_metatype _arr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_flattenArray,2,0) {(void*) boxptr_Static_flattenArray,0}};
#define boxvar_Static_flattenArray MMC_REFSTRUCTLIT(boxvar_lit_Static_flattenArray)
PROTECTED_FUNCTION_STATIC void omc_Static_checkBuiltinVectorDims(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inPrefix, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkBuiltinVectorDims,2,0) {(void*) boxptr_Static_checkBuiltinVectorDims,0}};
#define boxvar_Static_checkBuiltinVectorDims MMC_REFSTRUCTLIT(boxvar_lit_Static_checkBuiltinVectorDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinVector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinVector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinVector,2,0) {(void*) boxptr_Static_elabBuiltinVector,0}};
#define boxvar_Static_elabBuiltinVector MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinVector)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIsPresent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIsPresent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIsPresent,2,0) {(void*) boxptr_Static_elabBuiltinIsPresent,0}};
#define boxvar_Static_elabBuiltinIsPresent MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIsPresent)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinGetInstanceName(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinGetInstanceName(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinGetInstanceName,2,0) {(void*) boxptr_Static_elabBuiltinGetInstanceName,0}};
#define boxvar_Static_elabBuiltinGetInstanceName MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinGetInstanceName)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinString(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinString(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinString,2,0) {(void*) boxptr_Static_elabBuiltinString,0}};
#define boxvar_Static_elabBuiltinString MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinString)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinScalar(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinScalar(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinScalar,2,0) {(void*) boxptr_Static_elabBuiltinScalar,0}};
#define boxvar_Static_elabBuiltinScalar MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinScalar)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinUniqueRootIndices(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinUniqueRootIndices(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinUniqueRootIndices,2,0) {(void*) boxptr_Static_elabBuiltinUniqueRootIndices,0}};
#define boxvar_Static_elabBuiltinUniqueRootIndices MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinUniqueRootIndices)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinRooted(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinRooted(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinRooted,2,0) {(void*) boxptr_Static_elabBuiltinRooted,0}};
#define boxvar_Static_elabBuiltinRooted MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinRooted)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIsRoot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIsRoot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIsRoot,2,0) {(void*) boxptr_Static_elabBuiltinIsRoot,0}};
#define boxvar_Static_elabBuiltinIsRoot MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIsRoot)
PROTECTED_FUNCTION_STATIC void omc_Static_zeroSizeOverconstrainedOperator(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inFExp, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_zeroSizeOverconstrainedOperator,2,0) {(void*) boxptr_Static_zeroSizeOverconstrainedOperator,0}};
#define boxvar_Static_zeroSizeOverconstrainedOperator MMC_REFSTRUCTLIT(boxvar_lit_Static_zeroSizeOverconstrainedOperator)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIdentity(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIdentity(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIdentity,2,0) {(void*) boxptr_Static_elabBuiltinIdentity,0}};
#define boxvar_Static_elabBuiltinIdentity MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIdentity)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinCat(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinCat(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinCat,2,0) {(void*) boxptr_Static_elabBuiltinCat,0}};
#define boxvar_Static_elabBuiltinCat MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinCat)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinChange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinChange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinChange,2,0) {(void*) boxptr_Static_elabBuiltinChange,0}};
#define boxvar_Static_elabBuiltinChange MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinChange)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinDer(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinDer(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinDer,2,0) {(void*) boxptr_Static_elabBuiltinDer,0}};
#define boxvar_Static_elabBuiltinDer MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinDer)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinEdge(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinEdge(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinEdge,2,0) {(void*) boxptr_Static_elabBuiltinEdge,0}};
#define boxvar_Static_elabBuiltinEdge MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinEdge)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNoevent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNoevent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNoevent,2,0) {(void*) boxptr_Static_elabBuiltinNoevent,0}};
#define boxvar_Static_elabBuiltinNoevent MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNoevent)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIntegerEnum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIntegerEnum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIntegerEnum,2,0) {(void*) boxptr_Static_elabBuiltinIntegerEnum,0}};
#define boxvar_Static_elabBuiltinIntegerEnum MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinIntegerEnum)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinBoolean(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinBoolean(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinBoolean,2,0) {(void*) boxptr_Static_elabBuiltinBoolean,0}};
#define boxvar_Static_elabBuiltinBoolean MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinBoolean)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTimeInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTimeInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTimeInState,2,0) {(void*) boxptr_Static_elabBuiltinTimeInState,0}};
#define boxvar_Static_elabBuiltinTimeInState MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTimeInState)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTicksInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTicksInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTicksInState,2,0) {(void*) boxptr_Static_elabBuiltinTicksInState,0}};
#define boxvar_Static_elabBuiltinTicksInState MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTicksInState)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinActiveState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinActiveState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinActiveState,2,0) {(void*) boxptr_Static_elabBuiltinActiveState,0}};
#define boxvar_Static_elabBuiltinActiveState MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinActiveState)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinInitialState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinInitialState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinInitialState,2,0) {(void*) boxptr_Static_elabBuiltinInitialState,0}};
#define boxvar_Static_elabBuiltinInitialState MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinInitialState)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition5(threadData_t *threadData, modelica_string _argName, modelica_boolean _getAsNamedArg, modelica_metatype _args, modelica_metatype _nargs);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition5(threadData_t *threadData, modelica_metatype _argName, modelica_metatype _getAsNamedArg, modelica_metatype _args, modelica_metatype _nargs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition5,2,0) {(void*) boxptr_Static_elabBuiltinTransition5,0}};
#define boxvar_Static_elabBuiltinTransition5 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition5)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition4(threadData_t *threadData, modelica_metatype _inElement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition4,2,0) {(void*) boxptr_Static_elabBuiltinTransition4,0}};
#define boxvar_Static_elabBuiltinTransition4 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition4)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_elabBuiltinTransition3(threadData_t *threadData, modelica_string _name, modelica_metatype _namedArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition3(threadData_t *threadData, modelica_metatype _name, modelica_metatype _namedArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition3,2,0) {(void*) boxptr_Static_elabBuiltinTransition3,0}};
#define boxvar_Static_elabBuiltinTransition3 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_string _argName, modelica_integer _n, modelica_string _strMsg0, modelica_string _strPre);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _argName, modelica_metatype _n, modelica_metatype _strMsg0, modelica_metatype _strPre);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition2,2,0) {(void*) boxptr_Static_elabBuiltinTransition2,0}};
#define boxvar_Static_elabBuiltinTransition2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition,2,0) {(void*) boxptr_Static_elabBuiltinTransition,0}};
#define boxvar_Static_elabBuiltinTransition MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTransition)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isBlockTypeWorkaround(threadData_t *threadData, modelica_metatype _ity);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isBlockTypeWorkaround(threadData_t *threadData, modelica_metatype _ity);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_isBlockTypeWorkaround,2,0) {(void*) boxptr_Static_isBlockTypeWorkaround,0}};
#define boxvar_Static_isBlockTypeWorkaround MMC_REFSTRUCTLIT(boxvar_lit_Static_isBlockTypeWorkaround)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinInterval(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinInterval(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinInterval,2,0) {(void*) boxptr_Static_elabBuiltinInterval,0}};
#define boxvar_Static_elabBuiltinInterval MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinInterval)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinFirstTick(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinFirstTick(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinFirstTick,2,0) {(void*) boxptr_Static_elabBuiltinFirstTick,0}};
#define boxvar_Static_elabBuiltinFirstTick MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinFirstTick)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNoClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNoClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNoClock,2,0) {(void*) boxptr_Static_elabBuiltinNoClock,0}};
#define boxvar_Static_elabBuiltinNoClock MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNoClock)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinBackSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinBackSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinBackSample,2,0) {(void*) boxptr_Static_elabBuiltinBackSample,0}};
#define boxvar_Static_elabBuiltinBackSample MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinBackSample)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinShiftSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinShiftSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinShiftSample,2,0) {(void*) boxptr_Static_elabBuiltinShiftSample,0}};
#define boxvar_Static_elabBuiltinShiftSample MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinShiftSample)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSample,2,0) {(void*) boxptr_Static_elabBuiltinSample,0}};
#define boxvar_Static_elabBuiltinSample MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSample)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinHold(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinHold(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinHold,2,0) {(void*) boxptr_Static_elabBuiltinHold,0}};
#define boxvar_Static_elabBuiltinHold MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinHold)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinClock,2,0) {(void*) boxptr_Static_elabBuiltinClock,0}};
#define boxvar_Static_elabBuiltinClock MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinClock)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMinMaxCommon(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_string _inFnName, modelica_metatype _inFnArgs, modelica_boolean _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinMinMaxCommon(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _inFnName, modelica_metatype _inFnArgs, modelica_metatype _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMinMaxCommon,2,0) {(void*) boxptr_Static_elabBuiltinMinMaxCommon,0}};
#define boxvar_Static_elabBuiltinMinMaxCommon MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMinMaxCommon)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinMin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMin,2,0) {(void*) boxptr_Static_elabBuiltinMin,0}};
#define boxvar_Static_elabBuiltinMin MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMin)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMax(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinMax(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMax,2,0) {(void*) boxptr_Static_elabBuiltinMax,0}};
#define boxvar_Static_elabBuiltinMax MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinMax)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinOnes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinOnes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinOnes,2,0) {(void*) boxptr_Static_elabBuiltinOnes,0}};
#define boxvar_Static_elabBuiltinOnes MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinOnes)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensions3(threadData_t *threadData, modelica_metatype _inDims);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensions3(threadData_t *threadData, modelica_metatype _inDims);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_sameDimensions3,2,0) {(void*) boxptr_Static_sameDimensions3,0}};
#define boxvar_Static_sameDimensions3 MMC_REFSTRUCTLIT(boxvar_lit_Static_sameDimensions3)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensions2(threadData_t *threadData, modelica_metatype _inDimensions);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensions2(threadData_t *threadData, modelica_metatype _inDimensions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_sameDimensions2,2,0) {(void*) boxptr_Static_sameDimensions2,0}};
#define boxvar_Static_sameDimensions2 MMC_REFSTRUCTLIT(boxvar_lit_Static_sameDimensions2)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensionsExceptionDimX(threadData_t *threadData, modelica_metatype _inProps, modelica_integer _dimException);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensionsExceptionDimX(threadData_t *threadData, modelica_metatype _inProps, modelica_metatype _dimException);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_sameDimensionsExceptionDimX,2,0) {(void*) boxptr_Static_sameDimensionsExceptionDimX,0}};
#define boxvar_Static_sameDimensionsExceptionDimX MMC_REFSTRUCTLIT(boxvar_lit_Static_sameDimensionsExceptionDimX)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensions(threadData_t *threadData, modelica_metatype _inProps);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensions(threadData_t *threadData, modelica_metatype _inProps);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_sameDimensions,2,0) {(void*) boxptr_Static_sameDimensions,0}};
#define boxvar_Static_sameDimensions MMC_REFSTRUCTLIT(boxvar_lit_Static_sameDimensions)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinZeros(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinZeros(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinZeros,2,0) {(void*) boxptr_Static_elabBuiltinZeros,0}};
#define boxvar_Static_elabBuiltinZeros MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinZeros)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinArray3(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inPropertiesLst, modelica_metatype _inProperties, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinArray3,2,0) {(void*) boxptr_Static_elabBuiltinArray3,0}};
#define boxvar_Static_elabBuiltinArray3 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinArray3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProperties, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinArray2,2,0) {(void*) boxptr_Static_elabBuiltinArray2,0}};
#define boxvar_Static_elabBuiltinArray2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinArray2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinArray,2,0) {(void*) boxptr_Static_elabBuiltinArray,0}};
#define boxvar_Static_elabBuiltinArray MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinPreMatrix(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinPreMatrix,2,0) {(void*) boxptr_Static_elabBuiltinPreMatrix,0}};
#define boxvar_Static_elabBuiltinPreMatrix MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinPreMatrix)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makePreLst(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makePreLst,2,0) {(void*) boxptr_Static_makePreLst,0}};
#define boxvar_Static_makePreLst MMC_REFSTRUCTLIT(boxvar_lit_Static_makePreLst)
PROTECTED_FUNCTION_STATIC void omc_Static_validateBuiltinStreamOperator(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inOperand, modelica_metatype _inType, modelica_string _inOperator, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_validateBuiltinStreamOperator,2,0) {(void*) boxptr_Static_validateBuiltinStreamOperator,0}};
#define boxvar_Static_validateBuiltinStreamOperator MMC_REFSTRUCTLIT(boxvar_lit_Static_validateBuiltinStreamOperator)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinStreamOperator(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_string _inOperator, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinStreamOperator,2,0) {(void*) boxptr_Static_elabBuiltinStreamOperator,0}};
#define boxvar_Static_elabBuiltinStreamOperator MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinStreamOperator)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinActualStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinActualStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinActualStream,2,0) {(void*) boxptr_Static_elabBuiltinActualStream,0}};
#define boxvar_Static_elabBuiltinActualStream MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinActualStream)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinInStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinInStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinInStream,2,0) {(void*) boxptr_Static_elabBuiltinInStream,0}};
#define boxvar_Static_elabBuiltinInStream MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinInStream)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinPre2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType, modelica_boolean *out_outScalar);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinPre2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype *out_outScalar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinPre2,2,0) {(void*) boxptr_Static_elabBuiltinPre2,0}};
#define boxvar_Static_elabBuiltinPre2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinPre2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinPre(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinPre(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinPre,2,0) {(void*) boxptr_Static_elabBuiltinPre,0}};
#define boxvar_Static_elabBuiltinPre MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinPre)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinProduct2(threadData_t *threadData, modelica_metatype _inExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinProduct2,2,0) {(void*) boxptr_Static_elabBuiltinProduct2,0}};
#define boxvar_Static_elabBuiltinProduct2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinProduct2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinProduct(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinProduct(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinProduct,2,0) {(void*) boxptr_Static_elabBuiltinProduct,0}};
#define boxvar_Static_elabBuiltinProduct MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinProduct)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSum,2,0) {(void*) boxptr_Static_elabBuiltinSum,0}};
#define boxvar_Static_elabBuiltinSum MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSum)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTranspose(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTranspose(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTranspose,2,0) {(void*) boxptr_Static_elabBuiltinTranspose,0}};
#define boxvar_Static_elabBuiltinTranspose MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinTranspose)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinDynamicSelect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinDynamicSelect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinDynamicSelect,2,0) {(void*) boxptr_Static_elabBuiltinDynamicSelect,0}};
#define boxvar_Static_elabBuiltinDynamicSelect MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinDynamicSelect)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getHomotopyArguments(threadData_t *threadData, modelica_metatype _args, modelica_metatype _nargs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_getHomotopyArguments,2,0) {(void*) boxptr_Static_getHomotopyArguments,0}};
#define boxvar_Static_getHomotopyArguments MMC_REFSTRUCTLIT(boxvar_lit_Static_getHomotopyArguments)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinHomotopy(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinHomotopy(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinHomotopy,2,0) {(void*) boxptr_Static_elabBuiltinHomotopy,0}};
#define boxvar_Static_elabBuiltinHomotopy MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinHomotopy)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNone(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNone(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNone,2,0) {(void*) boxptr_Static_elabBuiltinNone,0}};
#define boxvar_Static_elabBuiltinNone MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNone)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSome(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSome(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSome,2,0) {(void*) boxptr_Static_elabBuiltinSome,0}};
#define boxvar_Static_elabBuiltinSome MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSome)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSourceInfo(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSourceInfo(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSourceInfo,2,0) {(void*) boxptr_Static_elabBuiltinSourceInfo,0}};
#define boxvar_Static_elabBuiltinSourceInfo MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSourceInfo)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinClassDirectory(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinClassDirectory(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinClassDirectory,2,0) {(void*) boxptr_Static_elabBuiltinClassDirectory,0}};
#define boxvar_Static_elabBuiltinClassDirectory MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinClassDirectory)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSymmetric(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSymmetric(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSymmetric,2,0) {(void*) boxptr_Static_elabBuiltinSymmetric,0}};
#define boxvar_Static_elabBuiltinSymmetric MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSymmetric)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinFill(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinFill(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinFill,2,0) {(void*) boxptr_Static_elabBuiltinFill,0}};
#define boxvar_Static_elabBuiltinFill MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinFill)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNDims,2,0) {(void*) boxptr_Static_elabBuiltinNDims,0}};
#define boxvar_Static_elabBuiltinNDims MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinNDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSizeIndex(threadData_t *threadData, modelica_metatype _inArrayExp, modelica_metatype _inArrayProp, modelica_metatype _inArrayType, modelica_metatype _inIndexExp, modelica_metatype _inDimensions, modelica_metatype _inEnv, modelica_metatype _inInfo, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSizeIndex,2,0) {(void*) boxptr_Static_elabBuiltinSizeIndex,0}};
#define boxvar_Static_elabBuiltinSizeIndex MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSizeIndex)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSizeNoIndex(threadData_t *threadData, modelica_metatype _inArrayExp, modelica_metatype _inArrayExpType, modelica_metatype _inDimensions, modelica_metatype _inArrayType, modelica_metatype _inInfo, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSizeNoIndex,2,0) {(void*) boxptr_Static_elabBuiltinSizeNoIndex,0}};
#define boxvar_Static_elabBuiltinSizeNoIndex MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSizeNoIndex)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSize(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSize(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSize,2,0) {(void*) boxptr_Static_elabBuiltinSize,0}};
#define boxvar_Static_elabBuiltinSize MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSize)
PROTECTED_FUNCTION_STATIC void omc_Static_printBuiltinFnArgError(threadData_t *threadData, modelica_string _inFnName, modelica_string _inMsg, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inPrefix, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_printBuiltinFnArgError,2,0) {(void*) boxptr_Static_printBuiltinFnArgError,0}};
#define boxvar_Static_printBuiltinFnArgError MMC_REFSTRUCTLIT(boxvar_lit_Static_printBuiltinFnArgError)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSmooth(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSmooth(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSmooth,2,0) {(void*) boxptr_Static_elabBuiltinSmooth,0}};
#define boxvar_Static_elabBuiltinSmooth MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinSmooth)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinCardinality(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinCardinality(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabBuiltinCardinality,2,0) {(void*) boxptr_Static_elabBuiltinCardinality,0}};
#define boxvar_Static_elabBuiltinCardinality MMC_REFSTRUCTLIT(boxvar_lit_Static_elabBuiltinCardinality)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_verifyBuiltInHandlerType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_fnptr _inTypeChecker, modelica_string _inFnName, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_verifyBuiltInHandlerType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_fnptr _inTypeChecker, modelica_metatype _inFnName, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_verifyBuiltInHandlerType,2,0) {(void*) boxptr_Static_verifyBuiltInHandlerType,0}};
#define boxvar_Static_verifyBuiltInHandlerType MMC_REFSTRUCTLIT(boxvar_lit_Static_verifyBuiltInHandlerType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixSemi(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inMatrix, modelica_metatype _inProperties, modelica_boolean _inImpl, modelica_boolean _inHaveReal, modelica_integer _inDims, modelica_boolean _inDoVectorization, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabMatrixSemi(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inMatrix, modelica_metatype _inProperties, modelica_metatype _inImpl, modelica_metatype _inHaveReal, modelica_metatype _inDims, modelica_metatype _inDoVectorization, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixSemi,2,0) {(void*) boxptr_Static_elabMatrixSemi,0}};
#define boxvar_Static_elabMatrixSemi MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixSemi)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_promoteExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_integer _inDims, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_promoteExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype _inDims, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_promoteExp,2,0) {(void*) boxptr_Static_promoteExp,0}};
#define boxvar_Static_promoteExp MMC_REFSTRUCTLIT(boxvar_lit_Static_promoteExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatOne2(threadData_t *threadData, modelica_metatype _inArray1, modelica_metatype _inArray2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatOne2,2,0) {(void*) boxptr_Static_elabMatrixCatOne2,0}};
#define boxvar_Static_elabMatrixCatOne2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatOne2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatOne(threadData_t *threadData, modelica_metatype _inExpl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatOne,2,0) {(void*) boxptr_Static_elabMatrixCatOne,0}};
#define boxvar_Static_elabMatrixCatOne MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatOne)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwo3(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwo3,2,0) {(void*) boxptr_Static_elabMatrixCatTwo3,0}};
#define boxvar_Static_elabMatrixCatTwo3 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwo3)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwo2(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwo2,2,0) {(void*) boxptr_Static_elabMatrixCatTwo2,0}};
#define boxvar_Static_elabMatrixCatTwo2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwo2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwo(threadData_t *threadData, modelica_metatype _inExpl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwo,2,0) {(void*) boxptr_Static_elabMatrixCatTwo,0}};
#define boxvar_Static_elabMatrixCatTwo MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwo)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwoExp(threadData_t *threadData, modelica_metatype _inExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwoExp,2,0) {(void*) boxptr_Static_elabMatrixCatTwoExp,0}};
#define boxvar_Static_elabMatrixCatTwoExp MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixCatTwoExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixComma(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProps, modelica_boolean _inHaveReal, modelica_integer _inDims, modelica_metatype _inInfo, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabMatrixComma(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProps, modelica_metatype _inHaveReal, modelica_metatype _inDims, modelica_metatype _inInfo, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixComma,2,0) {(void*) boxptr_Static_elabMatrixComma,0}};
#define boxvar_Static_elabMatrixComma MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixComma)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabGraphicsArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabGraphicsArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabGraphicsArray,2,0) {(void*) boxptr_Static_elabGraphicsArray,0}};
#define boxvar_Static_elabGraphicsArray MMC_REFSTRUCTLIT(boxvar_lit_Static_elabGraphicsArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inTypes, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArray2,2,0) {(void*) boxptr_Static_elabArray2,0}};
#define boxvar_Static_elabArray2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArray2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayReal2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inTypes, modelica_metatype _inExpectedType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArrayReal2,2,0) {(void*) boxptr_Static_elabArrayReal2,0}};
#define boxvar_Static_elabArrayReal2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArrayReal2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayConst(threadData_t *threadData, modelica_metatype _inProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArrayConst,2,0) {(void*) boxptr_Static_elabArrayConst,0}};
#define boxvar_Static_elabArrayConst MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArrayConst)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayHasMixedIntReals(threadData_t *threadData, modelica_metatype _inTypes, modelica_boolean *out_outIsMixed);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayHasMixedIntReals(threadData_t *threadData, modelica_metatype _inTypes, modelica_metatype *out_outIsMixed);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArrayHasMixedIntReals,2,0) {(void*) boxptr_Static_elabArrayHasMixedIntReals,0}};
#define boxvar_Static_elabArrayHasMixedIntReals MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArrayHasMixedIntReals)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArray(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProps, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabArray,2,0) {(void*) boxptr_Static_elabArray,0}};
#define boxvar_Static_elabArray MMC_REFSTRUCTLIT(boxvar_lit_Static_elabArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_stripExtraArgsFromType2(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inType, modelica_metatype _inAccumType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_stripExtraArgsFromType2,2,0) {(void*) boxptr_Static_stripExtraArgsFromType2,0}};
#define boxvar_Static_stripExtraArgsFromType2 MMC_REFSTRUCTLIT(boxvar_lit_Static_stripExtraArgsFromType2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_stripExtraArgsFromType(threadData_t *threadData, modelica_metatype _slots, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_stripExtraArgsFromType,2,0) {(void*) boxptr_Static_stripExtraArgsFromType,0}};
#define boxvar_Static_stripExtraArgsFromType MMC_REFSTRUCTLIT(boxvar_lit_Static_stripExtraArgsFromType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabTuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_boolean _isLhs, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabTuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _isLhs, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabTuple,2,0) {(void*) boxptr_Static_elabTuple,0}};
#define boxvar_Static_elabTuple MMC_REFSTRUCTLIT(boxvar_lit_Static_elabTuple)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Static_elabRangeSize(threadData_t *threadData, modelica_metatype _inStartValue, modelica_metatype _inStepValue, modelica_metatype _inStopValue);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabRangeSize(threadData_t *threadData, modelica_metatype _inStartValue, modelica_metatype _inStepValue, modelica_metatype _inStopValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabRangeSize,2,0) {(void*) boxptr_Static_elabRangeSize,0}};
#define boxvar_Static_elabRangeSize MMC_REFSTRUCTLIT(boxvar_lit_Static_elabRangeSize)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabRangeType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inStart, modelica_metatype _inStep, modelica_metatype _inStop, modelica_metatype _inType, modelica_metatype _inExpType, modelica_metatype _co, modelica_boolean _inImpl, modelica_metatype *out_outType);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabRangeType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inStart, modelica_metatype _inStep, modelica_metatype _inStop, modelica_metatype _inType, modelica_metatype _inExpType, modelica_metatype _co, modelica_metatype _inImpl, modelica_metatype *out_outType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabRangeType,2,0) {(void*) boxptr_Static_elabRangeType,0}};
#define boxvar_Static_elabRangeType MMC_REFSTRUCTLIT(boxvar_lit_Static_elabRangeType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deoverloadRange(threadData_t *threadData, modelica_metatype _inStartExp, modelica_metatype _inStartType, modelica_metatype _inStepExp, modelica_metatype _inStepType, modelica_metatype _inStopExp, modelica_metatype _inStopType, modelica_metatype _inInfo, modelica_metatype *out_outStep, modelica_metatype *out_outStop, modelica_metatype *out_outRangeType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_deoverloadRange,2,0) {(void*) boxptr_Static_deoverloadRange,0}};
#define boxvar_Static_deoverloadRange MMC_REFSTRUCTLIT(boxvar_lit_Static_deoverloadRange)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCodeType(threadData_t *threadData, modelica_metatype _inCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCodeType,2,0) {(void*) boxptr_Static_elabCodeType,0}};
#define boxvar_Static_elabCodeType MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCodeType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_constructArrayType(threadData_t *threadData, modelica_metatype _arrayType, modelica_metatype _expType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_constructArrayType,2,0) {(void*) boxptr_Static_constructArrayType,0}};
#define boxvar_Static_constructArrayType MMC_REFSTRUCTLIT(boxvar_lit_Static_constructArrayType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_constToVariability(threadData_t *threadData, modelica_metatype _const);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_constToVariability,2,0) {(void*) boxptr_Static_constToVariability,0}};
#define boxvar_Static_constToVariability MMC_REFSTRUCTLIT(boxvar_lit_Static_constToVariability)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkReductionType2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _expType, modelica_metatype _typeA, modelica_metatype _typeB, modelica_metatype _typeC, modelica_boolean _equivAB, modelica_boolean _equivBC, modelica_metatype _info, modelica_metatype *out_outTy);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_checkReductionType2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _expType, modelica_metatype _typeA, modelica_metatype _typeB, modelica_metatype _typeC, modelica_metatype _equivAB, modelica_metatype _equivBC, modelica_metatype _info, modelica_metatype *out_outTy);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkReductionType2,2,0) {(void*) boxptr_Static_checkReductionType2,0}};
#define boxvar_Static_checkReductionType2 MMC_REFSTRUCTLIT(boxvar_lit_Static_checkReductionType2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkReductionType1(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _fnTypes, modelica_metatype _info, modelica_metatype *out_typeB, modelica_metatype *out_resType, modelica_metatype *out_startValue, modelica_metatype *out_outPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkReductionType1,2,0) {(void*) boxptr_Static_checkReductionType1,0}};
#define boxvar_Static_checkReductionType1 MMC_REFSTRUCTLIT(boxvar_lit_Static_checkReductionType1)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_reductionType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFn, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _unboxedType, modelica_metatype _dims, modelica_boolean _hasGuardExp, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outType, modelica_metatype *out_resultType, modelica_metatype *out_defaultValue, modelica_metatype *out_outPath);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_reductionType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFn, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _unboxedType, modelica_metatype _dims, modelica_metatype _hasGuardExp, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outType, modelica_metatype *out_resultType, modelica_metatype *out_defaultValue, modelica_metatype *out_outPath);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_reductionType,2,0) {(void*) boxptr_Static_reductionType,0}};
#define boxvar_Static_reductionType MMC_REFSTRUCTLIT(boxvar_lit_Static_reductionType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeReductionFoldExp(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _path, modelica_metatype _expty, modelica_metatype _resultTy, modelica_string _foldId, modelica_string _resultId, modelica_metatype *out_afoldExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_makeReductionFoldExp,2,0) {(void*) boxptr_Static_makeReductionFoldExp,0}};
#define boxvar_Static_makeReductionFoldExp MMC_REFSTRUCTLIT(boxvar_lit_Static_makeReductionFoldExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deduceReductionIterationRange2(threadData_t *threadData, modelica_metatype _inDimension, modelica_metatype _inCref, modelica_metatype _inType, modelica_integer _inIndex, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_deduceReductionIterationRange2(threadData_t *threadData, modelica_metatype _inDimension, modelica_metatype _inCref, modelica_metatype _inType, modelica_metatype _inIndex, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_deduceReductionIterationRange2,2,0) {(void*) boxptr_Static_deduceReductionIterationRange2,0}};
#define boxvar_Static_deduceReductionIterationRange2 MMC_REFSTRUCTLIT(boxvar_lit_Static_deduceReductionIterationRange2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getIteratorIndexedCrefs(threadData_t *threadData, modelica_metatype _inCref, modelica_string _inIterator, modelica_metatype _inCrefs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_getIteratorIndexedCrefs,2,0) {(void*) boxptr_Static_getIteratorIndexedCrefs,0}};
#define boxvar_Static_getIteratorIndexedCrefs MMC_REFSTRUCTLIT(boxvar_lit_Static_getIteratorIndexedCrefs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deduceReductionIterationRange__traverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCrefs, modelica_string _inIterator, modelica_metatype *out_outCrefs);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_deduceReductionIterationRange__traverser,2,0) {(void*) boxptr_Static_deduceReductionIterationRange__traverser,0}};
#define boxvar_Static_deduceReductionIterationRange__traverser MMC_REFSTRUCTLIT(boxvar_lit_Static_deduceReductionIterationRange__traverser)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_iteratorIndexedCrefsEqual(threadData_t *threadData, modelica_metatype _inCref1, modelica_metatype _inCref2);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_iteratorIndexedCrefsEqual(threadData_t *threadData, modelica_metatype _inCref1, modelica_metatype _inCref2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_iteratorIndexedCrefsEqual,2,0) {(void*) boxptr_Static_iteratorIndexedCrefsEqual,0}};
#define boxvar_Static_iteratorIndexedCrefsEqual MMC_REFSTRUCTLIT(boxvar_lit_Static_iteratorIndexedCrefsEqual)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallReductionIterators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIterators, modelica_metatype _inReductionExp, modelica_boolean _inImpl, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outIteratorsEnv, modelica_metatype *out_outIterators, modelica_metatype *out_outDims, modelica_metatype *out_outConst, modelica_boolean *out_outHasGuard);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallReductionIterators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIterators, modelica_metatype _inReductionExp, modelica_metatype _inImpl, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outIteratorsEnv, modelica_metatype *out_outIterators, modelica_metatype *out_outDims, modelica_metatype *out_outConst, modelica_metatype *out_outHasGuard);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallReductionIterators,2,0) {(void*) boxptr_Static_elabCallReductionIterators,0}};
#define boxvar_Static_elabCallReductionIterators MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallReductionIterators)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fixDimsIterType(threadData_t *threadData, modelica_metatype _iterType, modelica_metatype _dims);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fixDimsIterType,2,0) {(void*) boxptr_Static_fixDimsIterType,0}};
#define boxvar_Static_fixDimsIterType MMC_REFSTRUCTLIT(boxvar_lit_Static_fixDimsIterType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallReduction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inReductionFn, modelica_metatype _inReductionExp, modelica_metatype _inIterType, modelica_metatype _inIterators, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallReduction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inReductionFn, modelica_metatype _inReductionExp, modelica_metatype _inIterType, modelica_metatype _inIterators, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabCallReduction,2,0) {(void*) boxptr_Static_elabCallReduction,0}};
#define boxvar_Static_elabCallReduction MMC_REFSTRUCTLIT(boxvar_lit_Static_elabCallReduction)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Static_matrixConstrMaxDim(threadData_t *threadData, modelica_metatype _inTypes);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_matrixConstrMaxDim(threadData_t *threadData, modelica_metatype _inTypes);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_matrixConstrMaxDim,2,0) {(void*) boxptr_Static_matrixConstrMaxDim,0}};
#define boxvar_Static_matrixConstrMaxDim MMC_REFSTRUCTLIT(boxvar_lit_Static_matrixConstrMaxDim)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixToMatrixExp(threadData_t *threadData, modelica_metatype _inExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabMatrixToMatrixExp,2,0) {(void*) boxptr_Static_elabMatrixToMatrixExp,0}};
#define boxvar_Static_elabMatrixToMatrixExp MMC_REFSTRUCTLIT(boxvar_lit_Static_elabMatrixToMatrixExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fromEquationToAlgAssignment(threadData_t *threadData, modelica_metatype _eq, modelica_metatype _comment, modelica_metatype _info);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fromEquationToAlgAssignment,2,0) {(void*) boxptr_Static_fromEquationToAlgAssignment,0}};
#define boxvar_Static_fromEquationToAlgAssignment MMC_REFSTRUCTLIT(boxvar_lit_Static_fromEquationToAlgAssignment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fromEquationBranchesToAlgBranches(threadData_t *threadData, modelica_metatype _eqsIn);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fromEquationBranchesToAlgBranches,2,0) {(void*) boxptr_Static_fromEquationBranchesToAlgBranches,0}};
#define boxvar_Static_fromEquationBranchesToAlgBranches MMC_REFSTRUCTLIT(boxvar_lit_Static_fromEquationBranchesToAlgBranches)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fromEquationsToAlgAssignmentsWork(threadData_t *threadData, modelica_metatype _eqsIn);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_fromEquationsToAlgAssignmentsWork,2,0) {(void*) boxptr_Static_fromEquationsToAlgAssignmentsWork,0}};
#define boxvar_Static_fromEquationsToAlgAssignmentsWork MMC_REFSTRUCTLIT(boxvar_lit_Static_fromEquationsToAlgAssignmentsWork)
PROTECTED_FUNCTION_STATIC void omc_Static_checkAssignmentToInput2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inAttributes, modelica_metatype _inInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_checkAssignmentToInput2,2,0) {(void*) boxptr_Static_checkAssignmentToInput2,0}};
#define boxvar_Static_checkAssignmentToInput2 MMC_REFSTRUCTLIT(boxvar_lit_Static_checkAssignmentToInput2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExpInExpression2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExpInExpression2,2,0) {(void*) boxptr_Static_elabExpInExpression2,0}};
#define boxvar_Static_elabExpInExpression2 MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExpInExpression2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__List(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__List(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__List,2,0) {(void*) boxptr_Static_elabExp__List,0}};
#define boxvar_Static_elabExp__List MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__List)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Cons(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Cons(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Cons,2,0) {(void*) boxptr_Static_elabExp__Cons,0}};
#define boxvar_Static_elabExp__Cons MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Cons)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Code(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Code(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Code,2,0) {(void*) boxptr_Static_elabExp__Code,0}};
#define boxvar_Static_elabExp__Code MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Code)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Matrix__realCast(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Matrix__realCast,2,0) {(void*) boxptr_Static_elabExp__Matrix__realCast,0}};
#define boxvar_Static_elabExp__Matrix__realCast MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Matrix__realCast)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Matrix(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Matrix(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Matrix,2,0) {(void*) boxptr_Static_elabExp__Matrix,0}};
#define boxvar_Static_elabExp__Matrix MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Matrix)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Array(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Array(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Array,2,0) {(void*) boxptr_Static_elabExp__Array,0}};
#define boxvar_Static_elabExp__Array MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Array)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Range(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Range(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Range,2,0) {(void*) boxptr_Static_elabExp__Range,0}};
#define boxvar_Static_elabExp__Range MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Range)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Tuple__LHS__RHS(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_boolean _isLhs, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Tuple__LHS__RHS(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _isLhs, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Tuple__LHS__RHS,2,0) {(void*) boxptr_Static_elabExp__Tuple__LHS__RHS,0}};
#define boxvar_Static_elabExp__Tuple__LHS__RHS MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Tuple__LHS__RHS)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Tuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Tuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Tuple,2,0) {(void*) boxptr_Static_elabExp__Tuple,0}};
#define boxvar_Static_elabExp__Tuple MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Tuple)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__PartEvalFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__PartEvalFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__PartEvalFunction,2,0) {(void*) boxptr_Static_elabExp__PartEvalFunction,0}};
#define boxvar_Static_elabExp__PartEvalFunction MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__PartEvalFunction)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Comment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Comment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Comment,2,0) {(void*) boxptr_Static_elabExp__Comment,0}};
#define boxvar_Static_elabExp__Comment MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Comment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Dot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Dot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Dot,2,0) {(void*) boxptr_Static_elabExp__Dot,0}};
#define boxvar_Static_elabExp__Dot MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Dot)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Call(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Call(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Call,2,0) {(void*) boxptr_Static_elabExp__Call,0}};
#define boxvar_Static_elabExp__Call MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Call)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__If(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__If(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__If,2,0) {(void*) boxptr_Static_elabExp__If,0}};
#define boxvar_Static_elabExp__If MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__If)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__LUnary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__LUnary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__LUnary,2,0) {(void*) boxptr_Static_elabExp__LUnary,0}};
#define boxvar_Static_elabExp__LUnary MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__LUnary)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Unary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Unary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Unary,2,0) {(void*) boxptr_Static_elabExp__Unary,0}};
#define boxvar_Static_elabExp__Unary MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Unary)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Binary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Binary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Binary,2,0) {(void*) boxptr_Static_elabExp__Binary,0}};
#define boxvar_Static_elabExp__Binary MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Binary)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Cref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Cref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__Cref,2,0) {(void*) boxptr_Static_elabExp__Cref,0}};
#define boxvar_Static_elabExp__Cref MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__Cref)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__BuiltinType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__BuiltinType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExp__BuiltinType,2,0) {(void*) boxptr_Static_elabExp__BuiltinType,0}};
#define boxvar_Static_elabExp__BuiltinType MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExp__BuiltinType)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExpOptAndMatchType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inDefaultType, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExpOptAndMatchType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inDefaultType, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExpOptAndMatchType,2,0) {(void*) boxptr_Static_elabExpOptAndMatchType,0}};
#define boxvar_Static_elabExpOptAndMatchType MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExpOptAndMatchType)
PROTECTED_FUNCTION_STATIC modelica_integer omc_Static_elabExpList__enum(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inLastType);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExpList__enum(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inLastType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_Static_elabExpList__enum,2,0) {(void*) boxptr_Static_elabExpList__enum,0}};
#define boxvar_Static_elabExpList__enum MMC_REFSTRUCTLIT(boxvar_lit_Static_elabExpList__enum)
PROTECTED_FUNCTION_STATIC void omc_Static_checkBuiltinCallArgs(threadData_t *threadData, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_integer _inExpectedArgs, modelica_string _inFnName, modelica_metatype _inInfo)
{
modelica_string _args_str = NULL;
modelica_string _msg_str = NULL;
modelica_metatype _pos_args = NULL;
modelica_metatype _named_args = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(((listLength(_inPosArgs) != _inExpectedArgs) || (!listEmpty(_inNamedArgs))))
{
tmpMeta1 = mmc_mk_cons(_inFnName, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT4, tmpMeta1, _inInfo);
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void boxptr_Static_checkBuiltinCallArgs(threadData_t *threadData, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inExpectedArgs, modelica_metatype _inFnName, modelica_metatype _inInfo)
{
modelica_integer tmp1;
tmp1 = mmc_unbox_integer(_inExpectedArgs);
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, tmp1, _inFnName, _inInfo);
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fixTupleMetaModelica(threadData_t *threadData, modelica_metatype _exps, modelica_metatype _types, modelica_metatype _consts, modelica_metatype *out_prop)
{
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _c = NULL;
modelica_metatype _tys2 = NULL;
modelica_metatype _exps2 = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_Config_acceptMetaModelicaGrammar(threadData))
{
_c = omc_Types_tupleConstListToConst(threadData, _consts);
{
modelica_metatype __omcQ_24tmpVar13;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar12;
modelica_integer tmp4;
modelica_metatype _ty_loopVar = 0;
modelica_metatype _ty;
_ty_loopVar = _types;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar13 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar13;
while(1) {
tmp4 = 1;
if (!listEmpty(_ty_loopVar)) {
_ty = MMC_CAR(_ty_loopVar);
_ty_loopVar = MMC_CDR(_ty_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar12 = omc_Types_boxIfUnboxedType(threadData, _ty);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar12,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar13;
}
_tys2 = tmpMeta1;
_exps2 = omc_Types_matchTypeTuple(threadData, _exps, _types, _tys2, 0 ,&_tys2);
tmpMeta5 = mmc_mk_box2(33, &DAE_Exp_META__TUPLE__desc, _exps2);
_exp = tmpMeta5;
tmpMeta6 = mmc_mk_box2(21, &DAE_Type_T__METATUPLE__desc, _tys2);
tmpMeta7 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta6, _c);
_prop = tmpMeta7;
}
else
{
tmpMeta8 = mmc_mk_box2(22, &DAE_Exp_TUPLE__desc, _exps);
_exp = tmpMeta8;
tmpMeta9 = mmc_mk_box3(17, &DAE_Type_T__TUPLE__desc, _types, mmc_mk_none());
tmpMeta10 = mmc_mk_box2(4, &DAE_TupleConst_TUPLE__CONST__desc, _consts);
tmpMeta11 = mmc_mk_box3(4, &DAE_Properties_PROP__TUPLE__desc, tmpMeta9, tmpMeta10);
_prop = tmpMeta11;
}
_return: OMC_LABEL_UNUSED
if (out_prop) { *out_prop = _prop; }
return _exp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEndTraverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inTuple)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _cr = NULL;
modelica_integer _i;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 20: {
modelica_metatype tmpMeta5;
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;
tmpMeta5 = _inTuple;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
_cr = tmpMeta6;
_i = tmp8;
tmpMeta10 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr);
tmpMeta11 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(_i));
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_LIT6, tmpMeta13, tmpMeta14);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta16;
tmpMeta16 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, omc_Static_replaceEnd(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 2)))));
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
tmpMeta1 = omc_AbsynUtil_traverseExpShallow(threadData, _inExp, _inTuple, boxvar_Static_replaceEndTraverser);
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_Static_replaceEndInSub(threadData_t *threadData, modelica_metatype _inSubscript, modelica_integer _inDimIndex, modelica_metatype _inCref)
{
modelica_metatype _outSubscript = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inSubscript;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta6 = mmc_mk_box2(0, _inCref, mmc_mk_integer(_inDimIndex));
tmpMeta7 = mmc_mk_box2(4, &Absyn_Subscript_SUBSCRIPT__desc, omc_Static_replaceEndTraverser(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inSubscript), 2))), tmpMeta6));
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inSubscript;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outSubscript = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outSubscript;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_replaceEndInSub(threadData_t *threadData, modelica_metatype _inSubscript, modelica_metatype _inDimIndex, modelica_metatype _inCref)
{
modelica_integer tmp1;
modelica_metatype _outSubscript = NULL;
tmp1 = mmc_unbox_integer(_inDimIndex);
_outSubscript = omc_Static_replaceEndInSub(threadData, _inSubscript, tmp1, _inCref);
return _outSubscript;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEndInSubs(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inSubscripts)
{
modelica_metatype _outCref = NULL;
modelica_metatype _subs = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _new_sub = NULL;
modelica_integer _i;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCref = _inCref;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_subs = tmpMeta1;
_i = ((modelica_integer) 1);
if(listEmpty(_inSubscripts))
{
goto _return;
}
{
modelica_metatype _sub;
for (tmpMeta2 = _inSubscripts; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_sub = MMC_CAR(tmpMeta2);
_new_sub = omc_Static_replaceEndInSub(threadData, _sub, _i, _inCref);
tmpMeta3 = mmc_mk_cons(_new_sub, _subs);
_subs = tmpMeta3;
_i = ((modelica_integer) 1) + _i;
}
}
_outCref = omc_AbsynUtil_crefSetLastSubs(threadData, _outCref, listReverse(_subs));
_return: OMC_LABEL_UNUSED
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_replaceEnd(threadData_t *threadData, modelica_metatype _inCref)
{
modelica_metatype _outCref = NULL;
modelica_metatype _cr_parts = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr_no_subs = 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
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta2 = omc_AbsynUtil_crefExplode(threadData, _inCref, tmpMeta1);
if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_CAR(tmpMeta2);
tmpMeta4 = MMC_CDR(tmpMeta2);
_outCref = tmpMeta3;
_cr_parts = tmpMeta4;
if((!omc_AbsynUtil_crefIsIdent(threadData, _outCref)))
{
_outCref = _inCref;
goto _return;
}
if(omc_AbsynUtil_crefIsFullyQualified(threadData, _inCref))
{
_outCref = omc_AbsynUtil_crefMakeFullyQualified(threadData, _outCref);
}
_outCref = omc_Static_replaceEndInSubs(threadData, omc_AbsynUtil_crefStripLastSubs(threadData, _outCref), omc_AbsynUtil_crefLastSubs(threadData, _outCref));
{
modelica_metatype _cr;
for (tmpMeta5 = _cr_parts; !listEmpty(tmpMeta5); tmpMeta5=MMC_CDR(tmpMeta5))
{
_cr = MMC_CAR(tmpMeta5);
_cr_no_subs = omc_AbsynUtil_crefStripLastSubs(threadData, _cr);
_outCref = omc_AbsynUtil_joinCrefs(threadData, _outCref, _cr_no_subs);
_outCref = omc_Static_replaceEndInSubs(threadData, _outCref, omc_AbsynUtil_crefLastSubs(threadData, _cr));
}
}
_return: OMC_LABEL_UNUSED
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_consStrippedCref(threadData_t *threadData, modelica_metatype _e, modelica_metatype _es)
{
modelica_metatype _oes = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _e;
{
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta6;
_cr = omc_AbsynUtil_crefStripLastSubs(threadData, _cr);
tmpMeta8 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr);
tmpMeta7 = mmc_mk_cons(tmpMeta8, _es);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _es;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_oes = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _oes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayDim2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_boolean _inImpl, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outDimension = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_boolean tmp4_2;
tmp4_1 = _inProperties;
tmp4_2 = _inImpl;
{
modelica_metatype _cnst = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _e = NULL;
modelica_metatype _ty = NULL;
modelica_string _e_str = NULL;
modelica_string _t_str = NULL;
modelica_string _a_str = NULL;
modelica_integer _i;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
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 (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cnst = tmpMeta7;
tmp8 = omc_Types_isParameterOrConstant(threadData, _cnst);
if (1 != tmp8) goto goto_2;
tmpMeta12 = omc_Ceval_ceval(threadData, _inCache, _inEnv, _inExp, _inImpl, _OMC_LIT10, ((modelica_integer) 0), &tmpMeta9);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
_i = tmp11;
tmpMeta13 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_i));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta13);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,0,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,1,0) == 0) goto tmp3_end;
tmp4 += 1;
tmp16 = omc_Config_splitArrays(threadData);
if (0 != tmp16) goto goto_2;
tmpMeta17 = mmc_mk_box2(6, &DAE_Dimension_DIM__EXP__desc, _inExp);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta17);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (0 != tmp4_2) goto tmp3_end;
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 (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,0,1) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,2,0) == 0) goto tmp3_end;
tmp4 += 1;
_e_str = omc_ExpressionDump_printExpStr(threadData, _inExp);
tmpMeta20 = mmc_mk_cons(_e_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT13, tmpMeta20, _inInfo);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (1 != tmp4_2) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,0,1) == 0) goto tmp3_end;
_cache = omc_Ceval_cevalIfConstant(threadData, _inCache, _inEnv, _inExp, _inProperties, _inImpl, _inInfo ,&_e ,NULL);
tmpMeta22 = mmc_mk_box2(6, &DAE_Dimension_DIM__EXP__desc, _e);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta22);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta24 = omc_Ceval_cevalIfConstant(threadData, _inCache, _inEnv, _inExp, _inProperties, _inImpl, _inInfo, &tmpMeta23, NULL);
_cache = tmpMeta24;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,24,2) == 0) goto goto_2;
_e = tmpMeta23;
tmpMeta25 = mmc_mk_box2(6, &DAE_Dimension_DIM__EXP__desc, _e);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta25);
goto tmp3_done;
}
case 5: {
modelica_boolean tmp26;
tmp26 = omc_Flags_getConfigBool(threadData, _OMC_LIT19);
if (1 != tmp26) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT21;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_boolean tmp29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,0,1) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cnst = tmpMeta28;
tmp29 = omc_Types_isParameterOrConstant(threadData, _cnst);
if (1 != tmp29) goto goto_2;
_e_str = omc_ExpressionDump_printExpStr(threadData, _inExp);
tmpMeta30 = stringAppend(omc_Dump_printComponentRefStr(threadData, _inCref),_OMC_LIT22);
tmpMeta31 = stringAppend(tmpMeta30,_e_str);
tmpMeta32 = stringAppend(tmpMeta31,_OMC_LIT23);
_a_str = tmpMeta32;
tmpMeta33 = mmc_mk_cons(_e_str, mmc_mk_cons(_a_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT26, tmpMeta33, _inInfo);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_ty = tmpMeta34;
_e_str = omc_ExpressionDump_printExpStr(threadData, _inExp);
_t_str = omc_Types_unparseType(threadData, _ty);
omc_Types_typeErrorSanityCheck(threadData, _t_str, _OMC_LIT27, _inInfo);
tmpMeta35 = mmc_mk_cons(_e_str, mmc_mk_cons(_t_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT30, tmpMeta35, _inInfo);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_none();
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];
_outDimension = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outDimension) { *out_outDimension = _outDimension; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayDim2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype _inImpl, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabArrayDim2(threadData, _inCache, _inEnv, _inCref, _inExp, _inProperties, tmp1, tmp2, _inPrefix, _inInfo, out_outDimension);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayDim(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimension, modelica_boolean _inImpl, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outDimension = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inCache;
tmp4_2 = _inDimension;
{
modelica_metatype _cr = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _type_path = NULL;
modelica_metatype _sub = NULL;
modelica_metatype _cr_exp = NULL;
modelica_metatype _e = NULL;
modelica_metatype _dim_exp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _size_arg = NULL;
modelica_metatype _t = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
tmp4 += 5;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT20;
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_boolean tmp16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 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,2,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT5), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (listEmpty(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmpMeta10);
tmpMeta12 = MMC_CDR(tmpMeta10);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta12);
tmpMeta15 = MMC_CDR(tmpMeta12);
if (!listEmpty(tmpMeta15)) goto tmp3_end;
_cr_exp = tmpMeta11;
_cr = tmpMeta13;
_size_arg = tmpMeta14;
tmp4 += 3;
tmp16 = omc_AbsynUtil_crefEqual(threadData, _inCref, _cr);
if (1 != tmp16) goto goto_2;
_cache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _cr_exp, _inImpl, _inDoVect, _inPrefix, _inInfo ,&_e ,NULL);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _inEnv, _size_arg, _inImpl, _inDoVect, _inPrefix, _inInfo ,&_dim_exp ,NULL);
tmpMeta17 = mmc_mk_box3(27, &DAE_Exp_SIZE__desc, _e, mmc_mk_some(_dim_exp));
tmpMeta18 = mmc_mk_box2(6, &DAE_Dimension_DIM__EXP__desc, tmpMeta17);
_dim = tmpMeta18;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _dim;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,2,1) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,2,2) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
if (7 != MMC_STRLEN(tmpMeta21) || strcmp(MMC_STRINGDATA(_OMC_LIT37), MMC_STRINGDATA(tmpMeta21)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT31;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,2,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
_cr = tmpMeta23;
_cache = tmp4_1;
tmp4 += 1;
_type_path = omc_AbsynUtil_crefToPath(threadData, _cr);
_cache = omc_Lookup_lookupClass(threadData, _cache, _inEnv, _type_path, mmc_mk_none(), NULL, NULL);
_cache = omc_Lookup_lookupType(threadData, _cache, _inEnv, _type_path, mmc_mk_none() ,&_t, NULL);
{
modelica_metatype tmp27_1;
tmp27_1 = _t;
{
volatile mmc_switch_type tmp27;
int tmp28;
tmp27 = 0;
for (; tmp27 < 2; tmp27++) {
switch (MMC_SWITCH_CAST(tmp27)) {
case 0: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp27_1,5,5) == 0) goto tmp26_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp27_1), 2));
if (!optionNone(tmpMeta29)) goto tmp26_end;
tmpMeta30 = mmc_mk_box4(5, &DAE_Dimension_DIM__ENUM__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_t), 3))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_t), 4))), mmc_mk_integer(listLength((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_t), 4))))));
tmpMeta24 = tmpMeta30;
goto tmp26_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp27_1,3,1) == 0) goto tmp26_end;
tmpMeta24 = _OMC_LIT31;
goto tmp26_done;
}
}
goto tmp26_end;
tmp26_end: ;
}
goto goto_25;
goto_25:;
goto goto_2;
goto tmp26_done;
tmp26_done:;
}
}
_dim = tmpMeta24;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _dim;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta31,24,3) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 3));
_sub = tmpMeta32;
tmpMeta33 = mmc_mk_box2(4, &Absyn_Subscript_SUBSCRIPT__desc, _sub);
tmpMeta[0+0] = omc_Static_elabArrayDim(threadData, _inCache, _inEnv, _inCref, tmpMeta33, _inImpl, _inDoVect, _inPrefix, _inInfo, &tmpMeta[0+1]);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_sub = tmpMeta34;
_cache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _sub, _inImpl, _inDoVect, _inPrefix, _inInfo ,&_e ,&_prop);
tmpMeta37 = omc_Static_elabArrayDim2(threadData, _cache, _inEnv, _inCref, _e, _prop, _inImpl, _inDoVect, _inPrefix, _inInfo, &tmpMeta35);
_cache = tmpMeta37;
if (optionNone(tmpMeta35)) goto goto_2;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta35), 1));
_dim = tmpMeta36;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _dim;
goto tmp3_done;
}
case 6: {
modelica_boolean tmp38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
tmp38 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp38) goto goto_2;
tmpMeta39 = stringAppend(_OMC_LIT36,omc_Dump_printComponentRefStr(threadData, _inCref));
tmpMeta40 = mmc_mk_cons(_inDimension, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta41 = stringAppend(tmpMeta39,omc_Dump_printArraydimStr(threadData, tmpMeta40));
omc_Debug_traceln(threadData, tmpMeta41);
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 < 7) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outDimension = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outDimension) { *out_outDimension = _outDimension; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayDim(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimension, modelica_metatype _inImpl, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimension)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabArrayDim(threadData, _inCache, _inEnv, _inCref, _inDimension, tmp1, tmp2, _inPrefix, _inInfo, out_outDimension);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimensions, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inElaboratedDims, modelica_metatype *out_outDimensions)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outDimensions = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inDimensions;
{
modelica_metatype _cache = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _rest_dims = NULL;
modelica_metatype _elab_dim = NULL;
modelica_metatype _elab_dims = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = listReverse(_inElaboratedDims);
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);
_dim = tmpMeta6;
_rest_dims = tmpMeta7;
_cache = omc_Static_elabArrayDim(threadData, _inCache, _inEnv, _inCref, _dim, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_elab_dim);
tmpMeta8 = mmc_mk_cons(_elab_dim, _inElaboratedDims);
_elab_dims = tmpMeta8;
_inCache = _cache;
_inDimensions = _rest_dims;
_inElaboratedDims = _elab_dims;
goto _tailrecursive;
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];
_outDimensions = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outDimensions) { *out_outDimensions = _outDimensions; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inDimensions, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inElaboratedDims, modelica_metatype *out_outDimensions)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabArrayDims2(threadData, _inCache, _inEnv, _inCref, _inDimensions, tmp1, tmp2, _inPrefix, _inInfo, _inElaboratedDims, out_outDimensions);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabArrayDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inDimensions, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimensions)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outDimensions = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabArrayDims2(threadData, _inCache, _inEnv, _inComponentRef, _inDimensions, _inImplicit, _inDoVect, _inPrefix, _inInfo, tmpMeta1 ,&_outDimensions);
_return: OMC_LABEL_UNUSED
if (out_outDimensions) { *out_outDimensions = _outDimensions; }
return _outCache;
}
modelica_metatype boxptr_Static_elabArrayDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inDimensions, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outDimensions)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabArrayDims(threadData, _inCache, _inEnv, _inComponentRef, _inDimensions, tmp1, tmp2, _inPrefix, _inInfo, out_outDimensions);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabCodeExp__dispatch(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _cache, modelica_metatype _env, modelica_metatype _ct, modelica_metatype _info)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _exp;
{
modelica_metatype _cr = NULL;
modelica_metatype _dexp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _ct2 = NULL;
modelica_string _id = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_boolean tmp16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta6;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT38);
_id = omc_AbsynUtil_crefFirstIdent(threadData, _cr);
{
{
volatile mmc_switch_type tmp9;
int tmp10;
tmp9 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp8_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp9 < 2; tmp9++) {
switch (MMC_SWITCH_CAST(tmp9)) {
case 0: {
modelica_boolean tmp11;
tmp11 = (stringEqual(_id, _OMC_LIT39));
if (1 != tmp11) goto goto_7;
omc_Static_elabExpInExpression(threadData, _cache, _env, _exp, 0, 0, _OMC_LIT40, _info ,&_dexp ,&_prop);
goto tmp8_done;
}
case 1: {
modelica_boolean tmp12;
tmp12 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_Lookup_lookupClassIdent(threadData, _cache, _env, _id, mmc_mk_none(), NULL, NULL);
tmp12 = 1;
goto goto_13;
goto_13:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp12) {goto goto_7;}
omc_Static_elabExpInExpression(threadData, _cache, _env, _exp, 0, 0, _OMC_LIT40, _info ,&_dexp ,&_prop);
goto tmp8_done;
}
}
goto tmp8_end;
tmp8_end: ;
}
goto goto_7;
tmp8_done:
(void)tmp9;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp8_done2;
goto_7:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp9 < 2) {
goto tmp8_top;
}
goto goto_2;
tmp8_done2:;
}
}
;
tmpMeta14 = omc_Types_getPropType(threadData, _prop);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,15,1) == 0) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
_ct2 = tmpMeta15;
tmp16 = valueEq(_ct, _ct2);
if (1 != tmp16) goto goto_2;
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT38);
tmpMeta1 = _dexp;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
omc_ErrorExt_rollBack(threadData, _OMC_LIT38);
goto goto_2;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_boolean tmp20;
tmp17 = omc_AbsynUtil_isCref(threadData, _exp);
if (0 != tmp17) goto goto_2;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT41);
omc_Static_elabExpInExpression(threadData, _cache, _env, _exp, 0, 0, _OMC_LIT40, _info ,&_dexp ,&_prop);
tmpMeta18 = omc_Types_getPropType(threadData, _prop);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,15,1) == 0) goto goto_2;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
_ct2 = tmpMeta19;
tmp20 = valueEq(_ct, _ct2);
if (1 != tmp20) goto goto_2;
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT41);
tmpMeta1 = _dexp;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp21;
tmp21 = omc_AbsynUtil_isCref(threadData, _exp);
if (0 != tmp21) goto goto_2;
omc_ErrorExt_rollBack(threadData, _OMC_LIT41);
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 = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
DLLExport
modelica_metatype omc_Static_elabCodeExp(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _cache, modelica_metatype _env, modelica_metatype _ct, modelica_metatype _info)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _exp;
tmp4_2 = _ct;
{
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _path = NULL;
modelica_metatype _es_1 = NULL;
modelica_metatype _es = NULL;
modelica_metatype _et = NULL;
modelica_integer _i;
modelica_metatype _dexp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 11; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
tmpMeta1 = omc_Static_elabCodeExp__dispatch(threadData, _exp, _cache, _env, _ct, _info);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,18,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,7,1) == 0) goto tmp3_end;
tmp4 += 2;
tmpMeta7 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 2))), _OMC_LIT42);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,18,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,6,1) == 0) goto tmp3_end;
tmpMeta9 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 2))), _OMC_LIT42);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
tmp4 += 6;
tmpMeta10 = mmc_mk_box2(9, &Absyn_CodeNode_C__EXPRESSION__desc, _exp);
tmpMeta11 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta10, _OMC_LIT42);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
tmp4 += 5;
tmpMeta12 = mmc_mk_box2(9, &Absyn_CodeNode_C__EXPRESSION__desc, _exp);
tmpMeta13 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta12, _OMC_LIT42);
tmpMeta1 = tmpMeta13;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,0) == 0) goto tmp3_end;
_cr = tmpMeta14;
tmp4 += 4;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
tmpMeta15 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, _path);
tmpMeta16 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta15, _OMC_LIT42);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,0) == 0) goto tmp3_end;
_es = tmpMeta17;
_es_1 = omc_List_map4(threadData, _es, boxvar_Static_elabCodeExp, _cache, _env, _OMC_LIT43, _info);
_i = listLength(_es);
tmpMeta19 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_i));
tmpMeta18 = mmc_mk_cons(tmpMeta19, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta20 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT42, tmpMeta18);
_et = tmpMeta20;
tmpMeta21 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(0), _es_1);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,0) == 0) goto tmp3_end;
tmp4 += 2;
_et = _OMC_LIT46;
_dexp = omc_Static_elabCodeExp(threadData, _exp, _cache, _env, _OMC_LIT43, _info);
tmpMeta22 = mmc_mk_cons(_dexp, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta23 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(0), tmpMeta22);
tmpMeta1 = tmpMeta23;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,4,0) == 0) goto tmp3_end;
_cr = tmpMeta24;
tmp4 += 1;
tmpMeta25 = mmc_mk_box2(4, &Absyn_CodeNode_C__VARIABLENAME__desc, _cr);
tmpMeta26 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta25, _OMC_LIT42);
tmpMeta1 = tmpMeta26;
goto tmp3_done;
}
case 9: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,4,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,3) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,2,2) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
if (3 != MMC_STRLEN(tmpMeta28) || strcmp(MMC_STRINGDATA(_OMC_LIT50), 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(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,0,2) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
if (listEmpty(tmpMeta31)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,2,1) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta33)) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 3));
if (!listEmpty(tmpMeta34)) goto tmp3_end;
tmpMeta35 = mmc_mk_box2(9, &Absyn_CodeNode_C__EXPRESSION__desc, _exp);
tmpMeta36 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta35, _OMC_LIT42);
tmpMeta1 = tmpMeta36;
goto tmp3_done;
}
case 10: {
modelica_boolean tmp37;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
tmp37 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta39 = _ct;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta39,5,0) == 0) goto goto_38;
tmp37 = 1;
goto goto_38;
goto_38:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp37) {goto goto_2;}
_s1 = omc_Dump_printExpStr(threadData, _exp);
_s2 = omc_Types_printCodeTypeStr(threadData, _ct);
tmpMeta40 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT49, tmpMeta40, _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 < 11) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_slotAnd(threadData_t *threadData, modelica_metatype _s, modelica_boolean _b)
{
modelica_boolean _res;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_integer tmp3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _s;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
tmp3 = mmc_unbox_integer(tmpMeta2);
_res = tmp3;
_res = (_b && _res);
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_slotAnd(threadData_t *threadData, modelica_metatype _s, modelica_metatype _b)
{
modelica_integer tmp1;
modelica_boolean _res;
modelica_metatype out_res;
tmp1 = mmc_unbox_integer(_b);
_res = omc_Static_slotAnd(threadData, _s, tmp1);
out_res = mmc_mk_icon(_res);
return out_res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_unevaluatedFunctionVariability(threadData_t *threadData, modelica_metatype _inEnv)
{
modelica_metatype _outConst = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_FGraph_inFunctionScope(threadData, _inEnv))
{
_outConst = _OMC_LIT52;
}
else
{
if((omc_Flags_getConfigBool(threadData, _OMC_LIT19) || omc_Config_splitArrays(threadData)))
{
_outConst = _OMC_LIT51;
}
else
{
MMC_THROW_INTERNAL();
}
}
_return: OMC_LABEL_UNUSED
return _outConst;
}
DLLExport
modelica_metatype omc_Static_canonCref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_boolean _inBoolean, modelica_metatype *out_outComponentRef)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outComponentRef = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inComponentRef;
tmp4_4 = _inBoolean;
{
modelica_metatype _t = NULL;
modelica_metatype _sl = NULL;
modelica_metatype _ss_1 = NULL;
modelica_metatype _ss = NULL;
modelica_metatype _env = NULL;
modelica_metatype _componentEnv = NULL;
modelica_string _n = NULL;
modelica_boolean _impl;
modelica_metatype _c_1 = NULL;
modelica_metatype _c = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _ty2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,0) == 0) goto tmp3_end;
_cache = tmp4_1;
tmp4 += 2;
tmp6 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp6) goto goto_2;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _OMC_LIT53;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_n = tmpMeta7;
_ss = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
tmp4 += 1;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_Lookup_lookupVarIdent(threadData, _cache, _env, _n, tmpMeta9 ,NULL ,&_t ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL);
_sl = omc_Types_getDimensionSizes(threadData, _t);
_cache = omc_Ceval_cevalSubscripts(threadData, _cache, _env, _ss, _sl, _impl, _OMC_LIT54, ((modelica_integer) 0) ,&_ss_1);
_ty2 = omc_Types_simplifyType(threadData, _t);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefIdent(threadData, _n, _ty2, _ss_1);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,4) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 5));
_n = tmpMeta10;
_ss = tmpMeta11;
_c = tmpMeta12;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_Lookup_lookupVarIdent(threadData, _cache, _env, _n, tmpMeta13 ,NULL ,&_t ,NULL ,NULL ,NULL ,NULL ,&_componentEnv ,NULL);
_ty2 = omc_Types_simplifyType(threadData, _t);
_sl = omc_Types_getDimensionSizes(threadData, _t);
_cache = omc_Ceval_cevalSubscripts(threadData, _cache, _env, _ss, _sl, _impl, _OMC_LIT54, ((modelica_integer) 0) ,&_ss_1);
_cache = omc_Static_canonCref(threadData, _cache, _componentEnv, _c, _impl ,&_c_1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefQual(threadData, _n, _ty2, _ss_1, _c_1);
goto tmp3_done;
}
case 3: {
modelica_boolean tmp14;
_cr = tmp4_3;
tmp14 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp14) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT55);
omc_Debug_traceln(threadData, omc_ComponentReference_printComponentRefStr(threadData, _cr));
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:;
}
}
_outCache = tmpMeta[0+0];
_outComponentRef = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outComponentRef) { *out_outComponentRef = _outComponentRef; }
return _outCache;
}
modelica_metatype boxptr_Static_canonCref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inBoolean, modelica_metatype *out_outComponentRef)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_canonCref(threadData, _inCache, _inEnv, _inComponentRef, tmp1, out_outComponentRef);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_canonCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inPrefixCref, modelica_boolean _inBoolean, modelica_metatype *out_outComponentRef)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outComponentRef = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inComponentRef;
tmp4_4 = _inPrefixCref;
tmp4_5 = _inBoolean;
{
modelica_metatype _ss_1 = NULL;
modelica_metatype _ss = NULL;
modelica_metatype _env = NULL;
modelica_string _n = NULL;
modelica_boolean _impl;
modelica_metatype _cache = NULL;
modelica_metatype _prefixCr = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _sl = NULL;
modelica_metatype _t = NULL;
modelica_metatype _ty2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_n = tmpMeta6;
_ty2 = tmpMeta7;
_ss = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_prefixCr = tmp4_4;
_impl = tmp4_5;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
_cr = omc_ComponentReference_crefPrependIdent(threadData, _prefixCr, _n, tmpMeta9, _ty2);
_cache = omc_Lookup_lookupVar(threadData, _cache, _env, _cr ,NULL ,&_t, NULL, NULL, NULL, NULL, NULL, NULL);
_sl = omc_Types_getDimensionSizes(threadData, _t);
_cache = omc_Ceval_cevalSubscripts(threadData, _cache, _env, _ss, _sl, _impl, _OMC_LIT54, ((modelica_integer) 0) ,&_ss_1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefIdent(threadData, _n, _ty2, _ss_1);
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];
_outComponentRef = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outComponentRef) { *out_outComponentRef = _outComponentRef; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_canonCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inPrefixCref, modelica_metatype _inBoolean, modelica_metatype *out_outComponentRef)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_canonCref2(threadData, _inCache, _inEnv, _inComponentRef, _inPrefixCref, tmp1, out_outComponentRef);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeIfExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCondition, modelica_metatype _inCondProp, modelica_metatype _inTrueBranch, modelica_metatype _inTrueProp, modelica_metatype _inFalseBranch, modelica_metatype _inFalseProp, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_boolean _ty_match;
modelica_boolean _cond;
modelica_metatype _cond_ty = NULL;
modelica_metatype _true_ty = NULL;
modelica_metatype _false_ty = NULL;
modelica_metatype _true_ty2 = NULL;
modelica_metatype _false_ty2 = NULL;
modelica_metatype _exp_ty = NULL;
modelica_metatype _cond_c = NULL;
modelica_metatype _true_c = NULL;
modelica_metatype _false_c = NULL;
modelica_metatype _exp_c = NULL;
modelica_string _cond_str = NULL;
modelica_string _cond_ty_str = NULL;
modelica_string _e1_str = NULL;
modelica_string _e2_str = NULL;
modelica_string _ty1_str = NULL;
modelica_string _ty2_str = NULL;
modelica_string _pre_str = NULL;
modelica_metatype _cond_exp = NULL;
modelica_metatype _true_exp = NULL;
modelica_metatype _false_exp = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inCondProp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_cond_ty = tmpMeta2;
_cond_c = tmpMeta3;
_cond_exp = omc_Types_matchTypeNoFail(threadData, _inCondition, _cond_ty, _OMC_LIT56 ,NULL ,&_ty_match);
if((!_ty_match))
{
_cond_str = omc_ExpressionDump_printExpStr(threadData, _inCondition);
_cond_ty_str = omc_Types_unparseTypeNoAttr(threadData, _cond_ty);
tmpMeta4 = mmc_mk_cons(_cond_str, mmc_mk_cons(_cond_ty_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT59, tmpMeta4, _inInfo);
}
tmpMeta5 = _inTrueProp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
_true_ty = tmpMeta6;
_true_c = tmpMeta7;
tmpMeta8 = _inFalseProp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
_false_ty = tmpMeta9;
_false_c = tmpMeta10;
_true_exp = omc_Types_checkTypeCompat(threadData, _inTrueBranch, _true_ty, _inFalseBranch, _false_ty, 0 ,&_false_exp ,&_exp_ty ,&_ty_match);
if((omc_Types_arrayHasUnknownDims(threadData, _exp_ty) && (!omc_FGraph_inFunctionScope(threadData, _inEnv))))
{
if(omc_Types_isParameterOrConstant(threadData, _cond_c))
{
_cond_c = _OMC_LIT60;
}
else
{
_ty_match = 0;
}
}
if(((!_ty_match) && (!omc_Config_getGraphicsExpMode(threadData))))
{
_e1_str = omc_ExpressionDump_printExpStr(threadData, _inTrueBranch);
_e2_str = omc_ExpressionDump_printExpStr(threadData, _inFalseBranch);
_ty1_str = omc_Types_unparseTypeNoAttr(threadData, _true_ty);
_ty2_str = omc_Types_unparseTypeNoAttr(threadData, _false_ty);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta11 = mmc_mk_cons(_pre_str, mmc_mk_cons(_e1_str, mmc_mk_cons(_ty1_str, mmc_mk_cons(_e2_str, mmc_mk_cons(_ty2_str, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT63, tmpMeta11, _inInfo);
}
if(omc_Types_isConstant(threadData, _cond_c))
{
{
{
volatile mmc_switch_type tmp14;
int tmp15;
tmp14 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp13_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp14 < 2; tmp14++) {
switch (MMC_SWITCH_CAST(tmp14)) {
case 0: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_integer tmp18;
modelica_metatype tmpMeta19;
tmpMeta19 = omc_Ceval_ceval(threadData, _inCache, _inEnv, _cond_exp, _inImplicit, _OMC_LIT54, ((modelica_integer) 0), &tmpMeta16);
_outCache = tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,3,1) == 0) goto goto_12;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmp18 = mmc_unbox_integer(tmpMeta17);
_cond = tmp18;
if(_cond)
{
_outExp = _true_exp;
_outProperties = _inTrueProp;
}
else
{
_outExp = _false_exp;
_outProperties = _inFalseProp;
}
goto _return;
goto tmp13_done;
}
case 1: {
goto tmp13_done;
}
}
goto tmp13_end;
tmp13_end: ;
}
goto goto_12;
tmp13_done:
(void)tmp14;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp13_done2;
goto_12:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp14 < 2) {
goto tmp13_top;
}
MMC_THROW_INTERNAL();
tmp13_done2:;
}
}
;
}
{
modelica_integer tmp20;
modelica_metatype __omcQ_24tmpVar15;
modelica_metatype __omcQ_24tmpVar14;
modelica_integer tmp22;
modelica_metatype _c_loopVar = 0;
modelica_metatype tmpMeta23;
modelica_metatype _c;
tmpMeta23 = mmc_mk_cons(_cond_c, mmc_mk_cons(_false_c, mmc_mk_cons(_true_c, MMC_REFSTRUCTLIT(mmc_nil))));
_c_loopVar = tmpMeta23;
tmp20 = 0;
while(1) {
tmp22 = 1;
if (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
tmp22--;
}
if (tmp22 == 0) {
__omcQ_24tmpVar14 = _c;
if (tmp20)
{
__omcQ_24tmpVar15 = omc_Types_constAnd(threadData, __omcQ_24tmpVar14, __omcQ_24tmpVar15);
}
else
{
__omcQ_24tmpVar15 = __omcQ_24tmpVar14;
tmp20 = 1;
}
} else if (tmp22 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
if (!tmp20) MMC_THROW_INTERNAL();
tmpMeta21 = __omcQ_24tmpVar15;
}
_exp_c = tmpMeta21;
tmpMeta24 = mmc_mk_box4(15, &DAE_Exp_IFEXP__desc, _cond_exp, _true_exp, _false_exp);
_outExp = tmpMeta24;
tmpMeta25 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _exp_ty, _exp_c);
_outProperties = tmpMeta25;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
threadData->mmc_jumper = old_mmc_jumper;
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_makeIfExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCondition, modelica_metatype _inCondProp, modelica_metatype _inTrueBranch, modelica_metatype _inTrueProp, modelica_metatype _inFalseBranch, modelica_metatype _inFalseProp, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_makeIfExp(threadData, _inCache, _inEnv, _inCondition, _inCondProp, _inTrueBranch, _inTrueProp, _inFalseBranch, _inFalseProp, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_subscriptType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inExpSubscriptLst)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inType;
tmp4_2 = _inExpSubscriptLst;
{
modelica_metatype _t = NULL;
modelica_metatype _t_1 = NULL;
modelica_metatype _subs = NULL;
modelica_metatype _dim = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_t = tmp4_1;
tmp4 += 3;
tmpMeta1 = _t;
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_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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,1) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta11)) goto tmp3_end;
_subs = tmpMeta7;
_t = tmpMeta8;
tmp4 += 2;
tmpMeta1 = omc_Static_subscriptType(threadData, _t, _subs);
goto tmp3_done;
}
case 2: {
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_2)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_2);
tmpMeta13 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta15)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (!listEmpty(tmpMeta17)) goto tmp3_end;
_subs = tmpMeta13;
_t = tmpMeta14;
_dim = tmpMeta16;
tmp4 += 1;
_t_1 = omc_Static_subscriptType(threadData, _t, _subs);
tmpMeta18 = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta19 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _t_1, tmpMeta18);
tmpMeta1 = tmpMeta19;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_2);
tmpMeta21 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,0,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmpMeta23);
tmpMeta25 = MMC_CDR(tmpMeta23);
if (!listEmpty(tmpMeta25)) goto tmp3_end;
_subs = tmpMeta21;
_t = tmpMeta22;
_dim = tmpMeta24;
_t_1 = omc_Static_subscriptType(threadData, _t, _subs);
tmpMeta26 = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta27 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _t_1, tmpMeta26);
tmpMeta1 = tmpMeta27;
goto tmp3_done;
}
case 4: {
_t = tmp4_1;
omc_Print_printBuf(threadData, _OMC_LIT64);
omc_Print_printBuf(threadData, omc_Types_printTypeStr(threadData, _t));
omc_Print_printBuf(threadData, _OMC_LIT65);
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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_subscriptCrefType2(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inType;
{
modelica_metatype _t = NULL;
modelica_metatype _subs = NULL;
modelica_metatype _c = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
_t = tmp4_2;
tmpMeta1 = _t;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_subs = tmpMeta7;
_t = tmp4_2;
tmpMeta1 = omc_Static_subscriptType(threadData, _t, _subs);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_c = tmpMeta8;
_t = tmp4_2;
_inComponentRef = _c;
_inType = _t;
goto _tailrecursive;
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_Static_subscriptCrefType(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inType;
{
modelica_metatype _t = NULL;
modelica_metatype _c = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_c = tmpMeta6;
_t = tmp4_2;
tmpMeta1 = omc_Static_subscriptCrefType2(threadData, _c, _t);
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inType;
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:;
}
}
_outType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscriptType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inAbsynExp, modelica_metatype _inDaeExp, modelica_metatype _inInfo)
{
modelica_metatype _outSubscript = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
modelica_string _e_str = NULL;
modelica_string _t_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta6 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _inDaeExp);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,5) == 0) goto tmp3_end;
tmpMeta7 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _inDaeExp);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta8 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _inDaeExp);
tmpMeta1 = tmpMeta8;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto tmp3_end;
tmpMeta10 = mmc_mk_box2(4, &DAE_Subscript_SLICE__desc, _inDaeExp);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,5,5) == 0) goto tmp3_end;
tmpMeta12 = mmc_mk_box2(4, &DAE_Subscript_SLICE__desc, _inDaeExp);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,3,1) == 0) goto tmp3_end;
tmpMeta14 = mmc_mk_box2(4, &DAE_Subscript_SLICE__desc, _inDaeExp);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,23,1) == 0) goto tmp3_end;
_inType = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 2)));
goto _tailrecursive;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta15;
_e_str = omc_Dump_printExpStr(threadData, _inAbsynExp);
_t_str = omc_Types_unparseType(threadData, _inType);
tmpMeta15 = mmc_mk_cons(_e_str, mmc_mk_cons(_t_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT68, tmpMeta15, _inInfo);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outSubscript = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outSubscript;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscript(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outSubscript, modelica_metatype *out_outConst, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSubscript = NULL;
modelica_metatype _outConst = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inSubscript;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_boolean _impl;
modelica_metatype _sub_1 = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _const = NULL;
modelica_metatype _sub_2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _sub = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _pre = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
_cache = tmp4_1;
tmp4 += 1;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _OMC_LIT69;
tmpMeta[0+2] = _OMC_LIT60;
tmpMeta[0+3] = mmc_mk_none();
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_sub = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta10 = omc_Static_elabExpInExpression(threadData, _cache, _env, _sub, _impl, 1, _pre, _info, &tmpMeta7, &tmpMeta8);
_cache = tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
_sub_1 = tmpMeta7;
_prop = tmpMeta8;
_const = tmpMeta9;
tmpMeta14 = omc_Ceval_cevalIfConstant(threadData, _cache, _env, _sub_1, _prop, _impl, _info, &tmpMeta11, &tmpMeta12);
_cache = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,2) == 0) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_sub_1 = tmpMeta11;
_prop = tmpMeta12;
_ty = tmpMeta13;
_sub_2 = omc_Static_elabSubscriptType(threadData, _ty, _sub, _sub_1, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _sub_2;
tmpMeta[0+2] = _const;
tmpMeta[0+3] = mmc_mk_some(_prop);
goto tmp3_done;
}
case 2: {
modelica_boolean tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
tmp15 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp15) goto goto_2;
tmpMeta16 = stringAppend(_OMC_LIT70,omc_Dump_printSubscriptStr(threadData, _inSubscript));
tmpMeta17 = stringAppend(tmpMeta16,_OMC_LIT71);
tmpMeta18 = stringAppend(tmpMeta17,omc_FGraph_printGraphPathStr(threadData, _inEnv));
omc_Debug_traceln(threadData, tmpMeta18);
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];
_outSubscript = tmpMeta[0+1];
_outConst = tmpMeta[0+2];
_outProperties = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outSubscript) { *out_outSubscript = _outSubscript; }
if (out_outConst) { *out_outConst = _outConst; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabSubscript(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outSubscript, modelica_metatype *out_outConst, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabSubscript(threadData, _inCache, _inEnv, _inSubscript, tmp1, _inPrefix, _info, out_outSubscript, out_outConst, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscriptsDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_metatype _inDimension, modelica_metatype _inConst, modelica_metatype _inProperties, modelica_boolean _inImpl, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubscript)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSubscript = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inDimension;
tmp4_2 = _inProperties;
{
modelica_integer _int_dim;
modelica_metatype _prop = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _e = NULL;
modelica_string _sub_str = NULL;
modelica_string _dim_str = NULL;
modelica_string _cref_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 9; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_boolean tmp7;
tmp6 = omc_FGraph_inForOrParforIterLoopScope(threadData, _inEnv);
if (1 != tmp6) goto goto_2;
tmp7 = omc_Expression_dimensionKnown(threadData, _inDimension);
if (1 != tmp7) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSubscript;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
modelica_boolean tmp10;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_prop = tmpMeta8;
tmp9 = omc_Types_isParameter(threadData, _inConst);
if (1 != tmp9) goto goto_2;
_ty = omc_Types_getPropType(threadData, _prop);
tmp10 = omc_Types_getFixedVarAttributeParameterOrConstant(threadData, _ty);
if (0 != tmp10) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSubscript;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp11;
modelica_metatype tmpMeta12;
_int_dim = omc_Expression_dimensionSize(threadData, _inDimension);
tmp11 = omc_Types_isParameterOrConstant(threadData, _inConst);
if (1 != tmp11) goto goto_2;
tmpMeta12 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta[0+0] = omc_Ceval_cevalSubscript(threadData, _inCache, _inEnv, _inSubscript, _int_dim, _inImpl, tmpMeta12, ((modelica_integer) 0), &tmpMeta[0+1]);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_e = tmpMeta13;
tmp14 = omc_Types_isParameterOrConstant(threadData, _inConst);
if (1 != tmp14) goto goto_2;
tmpMeta18 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
omc_Ceval_ceval(threadData, _inCache, _inEnv, _e, 1, tmpMeta18, ((modelica_integer) 0), &tmpMeta15);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmp17 = mmc_unbox_integer(tmpMeta16);
_int_dim = tmp17;
tmpMeta19 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta[0+0] = omc_Ceval_cevalSubscript(threadData, _inCache, _inEnv, _inSubscript, _int_dim, _inImpl, tmpMeta19, ((modelica_integer) 0), &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
modelica_boolean tmp20;
modelica_boolean tmp21;
tmp20 = omc_Flags_getConfigBool(threadData, _OMC_LIT19);
if (1 != tmp20) goto goto_2;
tmp21 = omc_Types_isParameterOrConstant(threadData, _inConst);
if (1 != tmp21) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSubscript;
goto tmp3_done;
}
case 5: {
modelica_boolean tmp22;
modelica_boolean tmp23;
tmp22 = omc_Expression_dimensionKnown(threadData, _inDimension);
if (1 != tmp22) goto goto_2;
tmp23 = (omc_Types_isConstant(threadData, _inConst) || (omc_Types_isParameter(threadData, _inConst) && (!omc_FGraph_inForLoopScope(threadData, _inEnv))));
if (0 != tmp23) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSubscript;
goto tmp3_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,0) == 0) goto tmp3_end;
tmp4 += 1;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSubscript;
goto tmp3_done;
}
case 7: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSubscript;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta24;
_sub_str = omc_ExpressionDump_printSubscriptStr(threadData, _inSubscript);
_dim_str = omc_ExpressionDump_dimensionString(threadData, _inDimension);
_cref_str = omc_Dump_printComponentRefStr(threadData, _inCref);
tmpMeta24 = mmc_mk_cons(_sub_str, mmc_mk_cons(_dim_str, mmc_mk_cons(_cref_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessage(threadData, _OMC_LIT74, tmpMeta24, _inInfo);
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 < 9) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outSubscript = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outSubscript) { *out_outSubscript = _outSubscript; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabSubscriptsDims2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscript, modelica_metatype _inDimension, modelica_metatype _inConst, modelica_metatype _inProperties, modelica_metatype _inImpl, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubscript)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_Static_elabSubscriptsDims2(threadData, _inCache, _inEnv, _inSubscript, _inDimension, _inConst, _inProperties, tmp1, _inCref, _inInfo, out_outSubscript);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabSubscriptsDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscripts, modelica_metatype _inDimensions, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubs, modelica_metatype *out_outConst)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSubs = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outConst = NULL;
modelica_metatype _rest_dims = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _dsub = NULL;
modelica_metatype _const = NULL;
modelica_metatype _prop = NULL;
modelica_string _subl_str = NULL;
modelica_string _diml_str = NULL;
modelica_string _cref_str = NULL;
modelica_integer _nrdims;
modelica_integer _nrsubs;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outSubs = tmpMeta1;
_outConst = _OMC_LIT60;
_rest_dims = _inDimensions;
{
modelica_metatype _asub;
for (tmpMeta2 = _inSubscripts; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_asub = MMC_CAR(tmpMeta2);
if(listEmpty(_rest_dims))
{
_cref_str = omc_Dump_printComponentRefStr(threadData, _inCref);
_subl_str = intString(listLength(_inSubscripts));
_diml_str = intString(listLength(_inDimensions));
tmpMeta3 = mmc_mk_cons(_cref_str, mmc_mk_cons(_subl_str, mmc_mk_cons(_diml_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT77, tmpMeta3, _inInfo);
}
else
{
tmpMeta4 = _rest_dims;
if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_CAR(tmpMeta4);
tmpMeta6 = MMC_CDR(tmpMeta4);
_dim = tmpMeta5;
_rest_dims = tmpMeta6;
}
_outCache = omc_Static_elabSubscript(threadData, _outCache, _inEnv, _asub, _inImpl, _inPrefix, _inInfo ,&_dsub ,&_const ,&_prop);
_outConst = omc_Types_constAnd(threadData, _const, _outConst);
_outCache = omc_Static_elabSubscriptsDims2(threadData, _outCache, _inEnv, _dsub, _dim, _outConst, _prop, _inImpl, _inCref, _inInfo ,&_dsub);
tmpMeta7 = mmc_mk_cons(_dsub, _outSubs);
_outSubs = tmpMeta7;
}
}
_nrsubs = listLength(_outSubs);
if((_nrsubs > ((modelica_integer) 0)))
{
_nrdims = listLength(_inDimensions);
while(1)
{
if(!(_nrsubs < _nrdims)) break;
tmpMeta9 = mmc_mk_cons(_OMC_LIT69, _outSubs);
_outSubs = tmpMeta9;
_nrsubs = ((modelica_integer) 1) + _nrsubs;
}
}
_outSubs = listReverse(_outSubs);
_return: OMC_LABEL_UNUSED
if (out_outSubs) { *out_outSubs = _outSubs; }
if (out_outConst) { *out_outConst = _outConst; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabSubscriptsDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSubscripts, modelica_metatype _inDimensions, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _inCref, modelica_metatype _inInfo, modelica_metatype *out_outSubs, modelica_metatype *out_outConst)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_Static_elabSubscriptsDims(threadData, _inCache, _inEnv, _inSubscripts, _inDimensions, tmp1, _inPrefix, _inCref, _inInfo, out_outSubs, out_outConst);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabSubscripts(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynSubscriptLst, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExpSubscriptLst, modelica_metatype *out_outConst)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExpSubscriptLst = NULL;
modelica_metatype _outConst = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_boolean tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynSubscriptLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _sub_1 = NULL;
modelica_metatype _const1 = NULL;
modelica_metatype _const2 = NULL;
modelica_metatype _const = NULL;
modelica_metatype _subs_1 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _sub = NULL;
modelica_metatype _subs = NULL;
modelica_boolean _impl;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_3)) goto tmp3_end;
_cache = tmp4_1;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta6;
tmpMeta[0+2] = _OMC_LIT60;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_3);
tmpMeta8 = MMC_CDR(tmp4_3);
_sub = tmpMeta7;
_subs = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
_cache = omc_Static_elabSubscript(threadData, _cache, _env, _sub, _impl, _pre, _info ,&_sub_1 ,&_const1 ,NULL);
_cache = omc_Static_elabSubscripts(threadData, _cache, _env, _subs, _impl, _pre, _info ,&_subs_1 ,&_const2);
_const = omc_Types_constAnd(threadData, _const1, _const2);
tmpMeta9 = mmc_mk_cons(_sub_1, _subs_1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta9;
tmpMeta[0+2] = _const;
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];
_outExpSubscriptLst = tmpMeta[0+1];
_outConst = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExpSubscriptLst) { *out_outExpSubscriptLst = _outExpSubscriptLst; }
if (out_outConst) { *out_outConst = _outConst; }
return _outCache;
}
modelica_metatype boxptr_Static_elabSubscripts(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynSubscriptLst, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExpSubscriptLst, modelica_metatype *out_outConst)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabSubscripts(threadData, _inCache, _inEnv, _inAbsynSubscriptLst, tmp1, _inPrefix, _info, out_outExpSubscriptLst, out_outConst);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCrefSubs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inCrefEnv, modelica_metatype _inSubsEnv, modelica_metatype _inComponentRef, modelica_metatype _inTopPrefix, modelica_metatype _inCrefPrefix, modelica_boolean _inBoolean, modelica_boolean _inHasZeroSizeDim, modelica_metatype _info, modelica_metatype *out_outComponentRef, modelica_metatype *out_outConst, modelica_boolean *out_outHasZeroSizeDim)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outComponentRef = NULL;
modelica_metatype _outConst = NULL;
modelica_boolean _outHasZeroSizeDim;
modelica_boolean tmp1_c3 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_boolean tmp4_8;
tmp4_1 = _inCache;
tmp4_2 = _inCrefEnv;
tmp4_3 = _inSubsEnv;
tmp4_4 = _inComponentRef;
tmp4_5 = _inTopPrefix;
tmp4_6 = _inCrefPrefix;
tmp4_7 = _inBoolean;
tmp4_8 = _inHasZeroSizeDim;
{
modelica_metatype _t = NULL;
modelica_metatype _sl = NULL;
modelica_metatype _const = NULL;
modelica_metatype _const1 = NULL;
modelica_metatype _const2 = NULL;
modelica_metatype _crefEnv = NULL;
modelica_metatype _crefSubs = NULL;
modelica_string _id = NULL;
modelica_metatype _ss = NULL;
modelica_boolean _impl;
modelica_boolean _hasZeroSizeDim;
modelica_metatype _cr = NULL;
modelica_metatype _absynCr = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _id_ty = NULL;
modelica_metatype _ss_1 = NULL;
modelica_metatype _restCref = NULL;
modelica_metatype _absynCref = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _vt = NULL;
modelica_metatype _crefPrefix = NULL;
modelica_metatype _topPrefix = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_id = tmpMeta6;
_ss = tmpMeta7;
_cache = tmp4_1;
_crefEnv = tmp4_2;
_crefSubs = tmp4_3;
_topPrefix = tmp4_5;
_crefPrefix = tmp4_6;
_impl = tmp4_7;
_hasZeroSizeDim = tmp4_8;
tmp4 += 4;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _crefEnv, tmpMeta8, _crefPrefix, omc_ComponentReference_makeCrefIdent(threadData, _id, _OMC_LIT42, tmpMeta9) ,&_cr);
tmpMeta12 = omc_Lookup_lookupVar(threadData, _cache, _crefEnv, _cr, NULL, NULL, NULL, NULL, &tmpMeta10, NULL, NULL, NULL);
_cache = tmpMeta12;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
_id_ty = tmpMeta11;
_id_ty = omc_Types_simplifyType(threadData, _id_ty);
_hasZeroSizeDim = omc_Types_isZeroLengthArray(threadData, _id_ty);
_sl = omc_Types_getDimensions(threadData, _id_ty);
_cache = omc_Static_elabSubscriptsDims(threadData, _cache, _crefSubs, _ss, _sl, _impl, _topPrefix, _inComponentRef, _info ,&_ss_1 ,&_const);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefIdent(threadData, _id, _id_ty, _ss_1);
tmpMeta[0+2] = _const;
tmp1_c3 = _hasZeroSizeDim;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,3) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
if (!listEmpty(tmpMeta14)) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 4));
_id = tmpMeta13;
_restCref = tmpMeta15;
_cache = tmp4_1;
_crefEnv = tmp4_2;
_crefSubs = tmp4_3;
_topPrefix = tmp4_5;
_crefPrefix = tmp4_6;
_impl = tmp4_7;
_hasZeroSizeDim = tmp4_8;
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _crefEnv, tmpMeta16, _crefPrefix, omc_ComponentReference_makeCrefIdent(threadData, _id, _OMC_LIT42, tmpMeta17) ,&_cr);
_cache = omc_Lookup_lookupVar(threadData, _cache, _crefEnv, _cr ,NULL ,&_t ,NULL ,NULL ,NULL ,NULL ,NULL ,NULL);
_ty = omc_Types_simplifyType(threadData, _t);
_sl = omc_Types_getDimensions(threadData, _ty);
tmpMeta18 = MMC_REFSTRUCTLIT(mmc_nil);
_crefPrefix = omc_PrefixUtil_prefixAdd(threadData, _id, _sl, tmpMeta18, _crefPrefix, _OMC_LIT78, _OMC_LIT80, _info);
_cache = omc_Static_elabCrefSubs(threadData, _cache, _crefEnv, _crefSubs, _restCref, _topPrefix, _crefPrefix, _impl, _hasZeroSizeDim, _info ,&_cr ,&_const ,&_hasZeroSizeDim);
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefQual(threadData, _id, _ty, tmpMeta19, _cr);
tmpMeta[0+2] = _const;
tmp1_c3 = _hasZeroSizeDim;
goto tmp3_done;
}
case 2: {
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_4,1,3) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
if (!listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 4));
_id = tmpMeta20;
_restCref = tmpMeta22;
_cache = tmp4_1;
_crefEnv = tmp4_2;
_crefSubs = tmp4_3;
_topPrefix = tmp4_5;
_crefPrefix = tmp4_6;
_impl = tmp4_7;
_hasZeroSizeDim = tmp4_8;
tmp4 += 2;
tmpMeta23 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
_crefPrefix = omc_PrefixUtil_prefixAdd(threadData, _id, tmpMeta23, tmpMeta24, _crefPrefix, _OMC_LIT78, _OMC_LIT80, _info);
_cache = omc_Static_elabCrefSubs(threadData, _cache, _crefEnv, _crefSubs, _restCref, _topPrefix, _crefPrefix, _impl, _hasZeroSizeDim, _info ,&_cr ,&_const ,&_hasZeroSizeDim);
tmpMeta25 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefQual(threadData, _id, _OMC_LIT81, tmpMeta25, _cr);
tmpMeta[0+2] = _const;
tmp1_c3 = _hasZeroSizeDim;
goto tmp3_done;
}
case 3: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,3) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
if (listEmpty(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_CAR(tmpMeta27);
tmpMeta29 = MMC_CDR(tmpMeta27);
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 4));
_id = tmpMeta26;
_ss = tmpMeta27;
_restCref = tmpMeta30;
_cache = tmp4_1;
_crefEnv = tmp4_2;
_crefSubs = tmp4_3;
_topPrefix = tmp4_5;
_crefPrefix = tmp4_6;
_impl = tmp4_7;
_hasZeroSizeDim = tmp4_8;
tmp4 += 1;
tmpMeta31 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta32 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_PrefixUtil_prefixCref(threadData, _cache, _crefEnv, tmpMeta31, _crefPrefix, omc_ComponentReference_makeCrefIdent(threadData, _id, _OMC_LIT42, tmpMeta32) ,&_cr);
tmpMeta38 = omc_Lookup_lookupVar(threadData, _cache, _crefEnv, _cr, &tmpMeta33, &tmpMeta35, NULL, NULL, &tmpMeta36, NULL, NULL, NULL);
_cache = tmpMeta38;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 4));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta36), 3));
_vt = tmpMeta34;
_t = tmpMeta35;
_id_ty = tmpMeta37;
_ty = omc_Types_simplifyType(threadData, _t);
_id_ty = omc_Types_simplifyType(threadData, _id_ty);
_sl = omc_Types_getDimensions(threadData, _id_ty);
_cache = omc_Static_elabSubscriptsDims(threadData, _cache, _crefSubs, _ss, _sl, _impl, _topPrefix, _inComponentRef, _info ,&_ss_1 ,&_const1);
_crefPrefix = omc_PrefixUtil_prefixAdd(threadData, _id, _sl, _ss_1, _crefPrefix, _vt, _OMC_LIT80, _info);
_cache = omc_Static_elabCrefSubs(threadData, _cache, _crefEnv, _crefSubs, _restCref, _topPrefix, _crefPrefix, _impl, _hasZeroSizeDim, _info ,&_cr ,&_const2 ,&_hasZeroSizeDim);
_const = omc_Types_constAnd(threadData, _const1, _const2);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = omc_ComponentReference_makeCrefQual(threadData, _id, _ty, _ss_1, _cr);
tmpMeta[0+2] = _const;
tmp1_c3 = _hasZeroSizeDim;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,0,1) == 0) goto tmp3_end;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
_absynCr = tmpMeta39;
_cache = tmp4_1;
_crefEnv = tmp4_2;
_crefSubs = tmp4_3;
_topPrefix = tmp4_5;
_crefPrefix = tmp4_6;
_impl = tmp4_7;
_hasZeroSizeDim = tmp4_8;
_crefEnv = omc_FGraph_topScope(threadData, _crefEnv);
tmpMeta[0+0] = omc_Static_elabCrefSubs(threadData, _cache, _crefEnv, _crefSubs, _absynCr, _topPrefix, _crefPrefix, _impl, _hasZeroSizeDim, _info, &tmpMeta[0+1], &tmpMeta[0+2], &tmp1_c3);
goto tmp3_done;
}
case 5: {
modelica_boolean tmp40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
_crefEnv = tmp4_2;
_absynCref = tmp4_4;
_topPrefix = tmp4_5;
_crefPrefix = tmp4_6;
tmp40 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp40) goto goto_2;
tmpMeta41 = stringAppend(_OMC_LIT82,omc_PrefixUtil_printPrefixStr(threadData, _topPrefix));
tmpMeta42 = stringAppend(tmpMeta41,_OMC_LIT83);
tmpMeta43 = stringAppend(tmpMeta42,omc_PrefixUtil_printPrefixStr(threadData, _crefPrefix));
tmpMeta44 = stringAppend(tmpMeta43,_OMC_LIT84);
tmpMeta45 = stringAppend(tmpMeta44,omc_Dump_printComponentRefStr(threadData, _absynCref));
tmpMeta46 = stringAppend(tmpMeta45,_OMC_LIT85);
tmpMeta47 = stringAppend(tmpMeta46,omc_FGraph_printGraphPathStr(threadData, _crefEnv));
omc_Debug_traceln(threadData, tmpMeta47);
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];
_outComponentRef = tmpMeta[0+1];
_outConst = tmpMeta[0+2];
_outHasZeroSizeDim = tmp1_c3;
_return: OMC_LABEL_UNUSED
if (out_outComponentRef) { *out_outComponentRef = _outComponentRef; }
if (out_outConst) { *out_outConst = _outConst; }
if (out_outHasZeroSizeDim) { *out_outHasZeroSizeDim = _outHasZeroSizeDim; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCrefSubs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inCrefEnv, modelica_metatype _inSubsEnv, modelica_metatype _inComponentRef, modelica_metatype _inTopPrefix, modelica_metatype _inCrefPrefix, modelica_metatype _inBoolean, modelica_metatype _inHasZeroSizeDim, modelica_metatype _info, modelica_metatype *out_outComponentRef, modelica_metatype *out_outConst, modelica_metatype *out_outHasZeroSizeDim)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_boolean _outHasZeroSizeDim;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
tmp2 = mmc_unbox_integer(_inHasZeroSizeDim);
_outCache = omc_Static_elabCrefSubs(threadData, _inCache, _inCrefEnv, _inSubsEnv, _inComponentRef, _inTopPrefix, _inCrefPrefix, tmp1, tmp2, _info, out_outComponentRef, out_outConst, &_outHasZeroSizeDim);
if (out_outHasZeroSizeDim) { *out_outHasZeroSizeDim = mmc_mk_icon(_outHasZeroSizeDim); }
return _outCache;
}
DLLExport
modelica_metatype omc_Static_absynCrefToComponentReference(threadData_t *threadData, modelica_metatype _inComponentRef)
{
modelica_metatype _outComponentRef = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inComponentRef;
{
modelica_string _i = NULL;
modelica_metatype _c = NULL;
modelica_metatype _cref = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 5: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,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));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
_i = tmpMeta5;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = omc_ComponentReference_makeCrefIdent(threadData, _i, _OMC_LIT42, tmpMeta7);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_i = tmpMeta8;
_c = tmpMeta10;
_cref = omc_Static_absynCrefToComponentReference(threadData, _c);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = omc_ComponentReference_makeCrefQual(threadData, _i, _OMC_LIT42, tmpMeta11, _cref);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_c = tmpMeta12;
_inComponentRef = _c;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outComponentRef = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentRef;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createCrefArray2d(threadData_t *threadData, modelica_metatype _inCref, modelica_integer _inIndex, modelica_integer _inDim1, modelica_integer _inDim2, modelica_metatype _inType5, modelica_metatype _inType6, modelica_metatype _crefIdType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_integer tmp4_2;volatile modelica_integer tmp4_3;volatile modelica_integer tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;
tmp4_1 = _inCref;
tmp4_2 = _inIndex;
tmp4_3 = _inDim1;
tmp4_4 = _inDim2;
tmp4_5 = _inType5;
tmp4_6 = _inType6;
{
modelica_metatype _cr = NULL;
modelica_metatype _cr_1 = NULL;
modelica_integer _indx;
modelica_integer _ds;
modelica_integer _ds2;
modelica_integer _indx_1;
modelica_metatype _et = NULL;
modelica_metatype _elt_tp = NULL;
modelica_metatype _t = NULL;
modelica_metatype _ms = NULL;
modelica_metatype _expl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_indx = tmp4_2;
_ds = tmp4_3;
_et = tmp4_5;
if((!(_indx > _ds)))
{
goto goto_2;
}
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = mmc_mk_box4(20, &DAE_Exp_MATRIX__desc, _et, mmc_mk_integer(((modelica_integer) 0)), tmpMeta6);
tmpMeta1 = 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_metatype tmpMeta14;
modelica_integer tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
_cr = tmp4_1;
_indx = tmp4_2;
_ds = tmp4_3;
_ds2 = tmp4_4;
_et = tmp4_5;
_t = tmp4_6;
_indx_1 = ((modelica_integer) 1) + _indx;
tmpMeta8 = omc_Static_createCrefArray2d(threadData, _cr, _indx_1, _ds, _ds2, _et, _t, _crefIdType);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,17,3) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
_ms = tmpMeta9;
tmpMeta11 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_indx));
tmpMeta12 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, tmpMeta11);
tmpMeta10 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
_cr_1 = omc_ComponentReference_subscriptCref(threadData, _cr, tmpMeta10);
_elt_tp = omc_Expression_unliftArray(threadData, _et);
tmpMeta13 = omc_Static_crefVectorize(threadData, 1, omc_Expression_makeCrefExp(threadData, _cr_1, _elt_tp), _t, mmc_mk_none(), _crefIdType);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,16,3) == 0) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
tmp15 = mmc_unbox_integer(tmpMeta14);
if (1 != tmp15) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
_expl = tmpMeta16;
tmpMeta17 = mmc_mk_cons(_expl, _ms);
tmpMeta18 = mmc_mk_box4(20, &DAE_Exp_MATRIX__desc, _et, mmc_mk_integer(_ds), tmpMeta17);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp19;
modelica_metatype tmpMeta20;
_cr = tmp4_1;
tmp19 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp19) goto goto_2;
tmpMeta20 = stringAppend(_OMC_LIT86,omc_ComponentReference_printComponentRefStr(threadData, _cr));
omc_Debug_traceln(threadData, tmpMeta20);
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:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_createCrefArray2d(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inIndex, modelica_metatype _inDim1, modelica_metatype _inDim2, modelica_metatype _inType5, modelica_metatype _inType6, modelica_metatype _crefIdType)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inIndex);
tmp2 = mmc_unbox_integer(_inDim1);
tmp3 = mmc_unbox_integer(_inDim2);
_outExp = omc_Static_createCrefArray2d(threadData, _inCref, tmp1, tmp2, tmp3, _inType5, _inType6, _crefIdType);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createCrefArray(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_integer _inInteger2, modelica_integer _inInteger3, modelica_metatype _inType4, modelica_metatype _inType5, modelica_metatype _crefIdType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_integer tmp4_2;volatile modelica_integer tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inComponentRef1;
tmp4_2 = _inInteger2;
tmp4_3 = _inInteger3;
tmp4_4 = _inType4;
tmp4_5 = _inType5;
{
modelica_metatype _cr = NULL;
modelica_metatype _cr_1 = NULL;
modelica_integer _indx;
modelica_integer _ds;
modelica_integer _indx_1;
modelica_metatype _et = NULL;
modelica_metatype _elt_tp = NULL;
modelica_metatype _t = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _e_1 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
_indx = tmp4_2;
_ds = tmp4_3;
_et = tmp4_4;
if((!(_indx > _ds)))
{
goto goto_2;
}
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(1), tmpMeta6);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
_cr = tmp4_1;
_indx = tmp4_2;
_ds = tmp4_3;
_et = tmp4_4;
_t = tmp4_5;
_indx_1 = ((modelica_integer) 1) + _indx;
_cr_1 = omc_ComponentReference_replaceWholeDimSubscript(threadData, _cr, _indx);
tmpMeta8 = omc_Static_createCrefArray(threadData, _cr, _indx_1, _ds, _et, _t, _crefIdType);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,16,3) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
_expl = tmpMeta9;
_elt_tp = omc_Expression_unliftArray(threadData, _et);
_e_1 = omc_Static_crefVectorize(threadData, 1, omc_Expression_makeCrefExp(threadData, _cr_1, _elt_tp), _t, mmc_mk_none(), _crefIdType);
tmpMeta10 = mmc_mk_cons(_e_1, _expl);
tmpMeta11 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(1), tmpMeta10);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
_cr = tmp4_1;
_indx = tmp4_2;
_ds = tmp4_3;
_et = tmp4_4;
_t = tmp4_5;
_indx_1 = ((modelica_integer) 1) + _indx;
tmpMeta12 = omc_Static_createCrefArray(threadData, _cr, _indx_1, _ds, _et, _t, _crefIdType);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,16,3) == 0) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 4));
_expl = tmpMeta13;
tmpMeta15 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_indx));
tmpMeta14 = mmc_mk_cons(tmpMeta15, MMC_REFSTRUCTLIT(mmc_nil));
_e_1 = omc_Expression_makeASUB(threadData, omc_Expression_makeCrefExp(threadData, _cr, _et), tmpMeta14);
_e_1 = omc_ExpressionSimplify_simplify(threadData, _e_1, NULL);
_e_1 = omc_Static_crefVectorize(threadData, 1, _e_1, _t, mmc_mk_none(), _crefIdType);
tmpMeta16 = mmc_mk_cons(_e_1, _expl);
tmpMeta17 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(1), tmpMeta16);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp18;
modelica_metatype tmpMeta19;
_cr = tmp4_1;
tmp18 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp18) goto goto_2;
tmpMeta19 = stringAppend(_OMC_LIT87,omc_ComponentReference_printComponentRefStr(threadData, _cr));
omc_Debug_trace(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 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_createCrefArray(threadData_t *threadData, modelica_metatype _inComponentRef1, modelica_metatype _inInteger2, modelica_metatype _inInteger3, modelica_metatype _inType4, modelica_metatype _inType5, modelica_metatype _crefIdType)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inInteger2);
tmp2 = mmc_unbox_integer(_inInteger3);
_outExp = omc_Static_createCrefArray(threadData, _inComponentRef1, tmp1, tmp2, _inType4, _inType5, _crefIdType);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_callVectorize(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inExpExpLst)
{
modelica_metatype _outExpExpLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inExpExpLst;
{
modelica_metatype _e = NULL;
modelica_metatype _callexp = NULL;
modelica_metatype _es_1 = NULL;
modelica_metatype _args = NULL;
modelica_metatype _es = NULL;
modelica_metatype _fn = NULL;
modelica_metatype _attr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmp4 += 1;
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;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_2);
tmpMeta11 = MMC_CDR(tmp4_2);
_callexp = tmp4_1;
_fn = tmpMeta7;
_args = tmpMeta8;
_attr = tmpMeta9;
_e = tmpMeta10;
_es = tmpMeta11;
_es_1 = omc_Static_callVectorize(threadData, _callexp, _es);
tmpMeta13 = mmc_mk_cons(_e, _args);
tmpMeta14 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fn, tmpMeta13, _attr);
tmpMeta12 = mmc_mk_cons(tmpMeta14, _es_1);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp15;
tmp15 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp15) 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 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExpExpLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExpExpLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_applySubscript3(threadData_t *threadData, modelica_metatype _inSubs, modelica_metatype _inSub, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inSubs;
tmp4_2 = _inSub;
tmp4_3 = _inType;
{
modelica_string _id = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _subs = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _crty = NULL;
modelica_metatype _iLst = NULL;
modelica_boolean _scalar;
modelica_metatype _cref_ = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
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,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_id = tmpMeta7;
_ty2 = tmpMeta8;
_subs = tmpMeta9;
_exp1 = tmp4_2;
tmpMeta11 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _exp1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _subs);
_crty = omc_Expression_unliftArrayTypeWithSubs(threadData, tmpMeta10, _ty2);
tmpMeta13 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _exp1);
tmpMeta12 = mmc_mk_cons(tmpMeta13, _subs);
_cref_ = omc_ComponentReference_makeCrefIdent(threadData, _id, _ty2, tmpMeta12);
tmpMeta1 = omc_Expression_makeCrefExp(threadData, _cref_, _crty);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_expl1 = tmpMeta14;
_exp1 = tmp4_2;
_ety = tmp4_3;
_expl1 = omc_List_map2(threadData, _expl1, boxvar_Static_applySubscript3, _exp1, _ety);
tmpMeta15 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _OMC_LIT89, mmc_mk_boolean(0), _expl1);
_exp2 = tmpMeta15;
_iLst = omc_Static_extractDimensionOfChild(threadData, _exp2 ,&_scalar);
_ety = omc_Expression_arrayEltType(threadData, _ety);
tmpMeta16 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, _iLst);
tmpMeta17 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta16, mmc_mk_boolean(_scalar), _expl1);
tmpMeta1 = tmpMeta17;
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_Static_applySubscript2(threadData_t *threadData, modelica_metatype _inSub, modelica_metatype _inSubs, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inSub;
tmp4_2 = _inSubs;
tmp4_3 = _inType;
{
modelica_string _id = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _subs = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _crty = NULL;
modelica_metatype _iLst = NULL;
modelica_boolean _scalar;
modelica_metatype _cref_ = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_id = tmpMeta7;
_ty2 = tmpMeta8;
_subs = tmpMeta9;
_exp1 = tmp4_1;
tmpMeta11 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _exp1);
tmpMeta10 = mmc_mk_cons(tmpMeta11, _subs);
_crty = omc_Expression_unliftArrayTypeWithSubs(threadData, tmpMeta10, _ty2);
tmpMeta13 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _exp1);
tmpMeta12 = mmc_mk_cons(tmpMeta13, _subs);
_cref_ = omc_ComponentReference_makeCrefIdent(threadData, _id, _ty2, tmpMeta12);
tmpMeta1 = omc_Expression_makeCrefExp(threadData, _cref_, _crty);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,3) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
_expl1 = tmpMeta14;
_exp1 = tmp4_1;
_ety = tmp4_3;
_expl1 = omc_List_map2(threadData, _expl1, boxvar_Static_applySubscript3, _exp1, _ety);
tmpMeta15 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _OMC_LIT89, mmc_mk_boolean(0), _expl1);
_exp2 = tmpMeta15;
_iLst = omc_Static_extractDimensionOfChild(threadData, _exp2 ,&_scalar);
_ety = omc_Expression_arrayEltType(threadData, _ety);
tmpMeta16 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, _iLst);
tmpMeta17 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta16, mmc_mk_boolean(_scalar), _expl1);
tmpMeta1 = tmpMeta17;
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_Static_applySubscript(threadData_t *threadData, modelica_metatype _inSub, modelica_metatype _inSubs, modelica_string _name, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_string tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _inSub;
tmp4_2 = _inSubs;
tmp4_3 = _name;
tmp4_4 = _inType;
{
modelica_string _id = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _crty = NULL;
modelica_metatype _arrDim = NULL;
modelica_metatype _cref_ = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_exp1 = tmp4_2;
_arrDim = tmpMeta7;
tmp9 = omc_Expression_arrayContainZeroDimension(threadData, _arrDim);
if (1 != tmp9) goto goto_2;
tmpMeta1 = _exp1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_integer tmp11;
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,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
if (0 != tmp11) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,6,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
_arrDim = tmpMeta13;
_ety = tmp4_4;
_ety = omc_Expression_arrayEltType(threadData, _ety);
tmpMeta14 = mmc_mk_cons(_OMC_LIT90, _arrDim);
tmpMeta15 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, tmpMeta14);
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta17 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta15, mmc_mk_boolean(1), tmpMeta16);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_integer tmp19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp19 = mmc_unbox_integer(tmpMeta18);
if (0 != tmp19) goto tmp3_end;
_ety = tmp4_4;
_ety = omc_Expression_arrayEltType(threadData, _ety);
tmpMeta20 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, _OMC_LIT91);
tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta22 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta20, mmc_mk_boolean(1), tmpMeta21);
tmpMeta1 = tmpMeta22;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta23;
modelica_boolean tmp24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,3) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
if (!listEmpty(tmpMeta23)) goto tmp3_end;
_exp1 = tmp4_1;
_id = tmp4_3;
_ety = tmp4_4;
tmp24 = omc_Expression_isValidSubscript(threadData, _exp1);
if (1 != tmp24) goto goto_2;
_crty = omc_Expression_unliftArray(threadData, _ety);
tmpMeta26 = mmc_mk_box2(5, &DAE_Subscript_INDEX__desc, _exp1);
tmpMeta25 = mmc_mk_cons(tmpMeta26, MMC_REFSTRUCTLIT(mmc_nil));
_cref_ = omc_ComponentReference_makeCrefIdent(threadData, _id, _ety, tmpMeta25);
tmpMeta1 = omc_Expression_makeCrefExp(threadData, _cref_, _crty);
goto tmp3_done;
}
case 4: {
modelica_boolean tmp27;
_exp1 = tmp4_1;
_exp2 = tmp4_2;
_ety = tmp4_4;
tmp27 = omc_Expression_isValidSubscript(threadData, _exp1);
if (1 != tmp27) goto goto_2;
tmpMeta1 = omc_Static_applySubscript2(threadData, _exp1, _exp2, _ety);
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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_removeDoubleEmptyArrays(threadData_t *threadData, modelica_metatype _inArr)
{
modelica_metatype _outArr = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inArr;
{
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _expl3 = NULL;
modelica_metatype _ty1 = NULL;
modelica_boolean _sc;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
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,16,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (!listEmpty(tmpMeta9)) goto tmp3_end;
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_exp2 = tmpMeta7;
tmpMeta1 = _exp2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp12 = mmc_unbox_integer(tmpMeta11);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,16,3) == 0) goto tmp3_end;
_ty1 = tmpMeta10;
_sc = tmp12;
_expl1 = tmpMeta13;
_expl3 = tmpMeta15;
_expl3 = omc_List_map(threadData, _expl1, boxvar_Static_removeDoubleEmptyArrays);
tmpMeta16 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ty1, mmc_mk_boolean(_sc), _expl3);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
case 2: {
_exp1 = tmp4_1;
tmpMeta1 = _exp1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
_exp1 = tmp4_1;
tmpMeta17 = stringAppend(_OMC_LIT92,omc_ExpressionDump_printExpStr(threadData, _exp1));
tmpMeta18 = stringAppend(tmpMeta17,_OMC_LIT93);
fputs(MMC_STRINGDATA(tmpMeta18),stdout);
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:;
}
}
_outArr = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outArr;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_flattenSubscript3(threadData_t *threadData, modelica_metatype _inSubscripts, modelica_string _inName, modelica_metatype _inType, modelica_metatype _inExp)
{
modelica_metatype _outExp = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _dims = NULL;
modelica_boolean _scalar;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar17;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar16;
modelica_integer tmp4;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _inSubscripts;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar17 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar17;
while(1) {
tmp4 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar16 = omc_Static_applySubscript(threadData, _e, _inExp, _inName, _inType);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar16,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar17;
}
_expl = tmpMeta1;
tmpMeta5 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _OMC_LIT89, mmc_mk_boolean(0), _expl);
_outExp = tmpMeta5;
_dims = omc_Static_extractDimensionOfChild(threadData, _outExp ,&_scalar);
_ty = omc_Expression_arrayEltType(threadData, _inType);
tmpMeta6 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, _dims);
tmpMeta7 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta6, mmc_mk_boolean(_scalar), _expl);
_outExp = tmpMeta7;
_return: OMC_LABEL_UNUSED
return _outExp;
}
DLLExport
modelica_metatype omc_Static_flattenSubscript2(threadData_t *threadData, modelica_metatype _inSubs, modelica_string _name, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inSubs;
tmp4_2 = _name;
tmp4_3 = _inType;
{
modelica_string _id = NULL;
modelica_metatype _sub1 = NULL;
modelica_metatype _subs1 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _expl2 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _ety = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 4;
tmpMeta1 = _OMC_LIT94;
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);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
_exp1 = tmpMeta8;
_subs1 = tmpMeta7;
_id = tmp4_2;
_ety = tmp4_3;
tmp4 += 3;
_exp2 = omc_Static_flattenSubscript2(threadData, _subs1, _id, _ety);
tmpMeta1 = omc_Static_applySubscript(threadData, _exp1, _exp2, _id, omc_Expression_unliftArray(threadData, _ety));
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_integer tmp16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,16,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 4));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmp16 = mmc_unbox_integer(tmpMeta15);
if (0 != tmp16) goto tmp3_end;
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_expl1 = tmpMeta12;
_subs1 = tmpMeta10;
_id = tmp4_2;
_ety = tmp4_3;
_exp2 = omc_Static_flattenSubscript2(threadData, _subs1, _id, _ety);
_expl2 = omc_List_map3(threadData, _expl1, boxvar_Static_applySubscript, _exp2, _id, _ety);
tmpMeta1 = listHead(_expl2);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,1,1) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,16,3) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 4));
_expl1 = tmpMeta20;
_subs1 = tmpMeta18;
_id = tmp4_2;
_ety = tmp4_3;
tmp4 += 1;
_exp2 = omc_Static_flattenSubscript2(threadData, _subs1, _id, _ety);
tmpMeta1 = omc_Static_flattenSubscript3(threadData, _expl1, _id, _ety, _exp2);
goto tmp3_done;
}
case 4: {
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,1,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,18,4) == 0) goto tmp3_end;
_sub1 = tmpMeta21;
_subs1 = tmpMeta22;
_id = tmp4_2;
_ety = tmp4_3;
_expl1 = omc_Expression_expandRange(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_sub1), 2))));
_exp2 = omc_Static_flattenSubscript2(threadData, _subs1, _id, _ety);
tmpMeta1 = omc_Static_flattenSubscript3(threadData, _expl1, _id, _ety, _exp2);
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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_flattenSubscript(threadData_t *threadData, modelica_metatype _inSubs, modelica_string _name, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_string tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inSubs;
tmp4_2 = _name;
tmp4_3 = _inType;
{
modelica_string _id = NULL;
modelica_metatype _subs1 = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _cref_ = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
_id = tmp4_2;
_ety = tmp4_3;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
_cref_ = omc_ComponentReference_makeCrefIdent(threadData, _id, _ety, tmpMeta6);
tmpMeta1 = omc_Expression_makeCrefExp(threadData, _cref_, _ety);
goto tmp3_done;
}
case 1: {
_subs1 = tmp4_1;
_id = tmp4_2;
_ety = tmp4_3;
tmpMeta1 = omc_Static_flattenSubscript2(threadData, _subs1, _id, _ety);
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:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_mergeQualWithRest2(threadData_t *threadData, modelica_metatype _rest, modelica_metatype _qual)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _rest;
tmp4_2 = _qual;
{
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _ssl = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _cref_2 = NULL;
modelica_string _id = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _ty2 = NULL;
modelica_boolean _scalar;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,1,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 4));
_cref = tmpMeta6;
_ety = tmpMeta7;
_id = tmpMeta9;
_ty2 = tmpMeta10;
_ssl = tmpMeta11;
_cref_2 = omc_ComponentReference_makeCrefQual(threadData, _id, _ty2, _ssl, _cref);
tmpMeta1 = omc_Expression_makeCrefExp(threadData, _cref_2, _ety);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,1,3) == 0) goto tmp3_end;
_exp1 = tmp4_1;
_ety = tmpMeta12;
_expl1 = tmpMeta13;
_exp2 = tmp4_2;
_expl1 = omc_List_map1(threadData, _expl1, boxvar_Static_mergeQualWithRest2, _exp2);
tmpMeta15 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _OMC_LIT89, mmc_mk_boolean(0), _expl1);
_exp1 = tmpMeta15;
omc_Static_extractDimensionOfChild(threadData, _exp1 ,&_scalar);
tmpMeta16 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ety, mmc_mk_boolean(_scalar), _expl1);
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_Static_mergeQualWithRest(threadData_t *threadData, modelica_metatype _qual, modelica_metatype _rest, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _qual;
tmp4_2 = _rest;
tmp4_3 = _inType;
{
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _iLst = NULL;
modelica_boolean _scalar;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
_exp1 = tmp4_1;
_exp2 = tmp4_2;
tmpMeta1 = omc_Static_mergeQualWithRest2(threadData, _exp2, _exp1);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_expl1 = tmpMeta6;
_exp2 = tmp4_2;
_ety = tmp4_3;
_expl1 = omc_List_map2(threadData, _expl1, boxvar_Static_mergeQualWithRest, _exp2, _ety);
tmpMeta7 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _OMC_LIT89, mmc_mk_boolean(0), _expl1);
_exp2 = tmpMeta7;
_iLst = omc_Static_extractDimensionOfChild(threadData, _exp2 ,&_scalar);
_ety = omc_Expression_arrayEltType(threadData, _ety);
tmpMeta8 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, _iLst);
tmpMeta9 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta8, mmc_mk_boolean(_scalar), _expl1);
tmpMeta1 = tmpMeta9;
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_Static_elabCrefSlice(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inType)
{
modelica_metatype _outCref = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inCref;
tmp4_2 = _inType;
{
modelica_metatype _ssl = NULL;
modelica_string _id = NULL;
modelica_metatype _child = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _childExp = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _prety = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_id = tmpMeta6;
_ssl = tmpMeta7;
_ety = tmp4_2;
tmpMeta1 = omc_Static_flattenSubscript(threadData, _ssl, _id, _ety);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,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));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_id = tmpMeta8;
_prety = tmpMeta9;
_ssl = tmpMeta10;
_child = tmpMeta11;
_ety = tmp4_2;
_childExp = omc_Static_elabCrefSlice(threadData, _child, _ety);
_exp1 = omc_Static_flattenSubscript(threadData, _ssl, _id, _prety);
tmpMeta1 = omc_Static_mergeQualWithRest(threadData, _exp1, _childExp, _ety);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCref = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_extractDimensionOfChild(threadData_t *threadData, modelica_metatype _inExp, modelica_boolean *out_isScalar)
{
modelica_metatype _outExp = NULL;
modelica_boolean _isScalar;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _exp2 = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _tl = NULL;
modelica_integer _x;
modelica_boolean _sc;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_integer tmp9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,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), 3));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp9 = mmc_unbox_integer(tmpMeta8);
_tl = tmpMeta7;
_sc = tmp9;
tmpMeta[0+0] = _tl;
tmp1_c1 = _sc;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (listEmpty(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmpMeta10);
tmpMeta12 = MMC_CDR(tmpMeta10);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,16,3) == 0) goto tmp3_end;
_expl1 = tmpMeta10;
_exp2 = tmpMeta11;
_tl = omc_Static_extractDimensionOfChild(threadData, _exp2, NULL);
_x = listLength(_expl1);
tmpMeta14 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_x));
tmpMeta13 = mmc_mk_cons(tmpMeta14, _tl);
tmpMeta[0+0] = tmpMeta13;
tmp1_c1 = 0;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_expl1 = tmpMeta15;
tmp4 += 1;
_x = listLength(_expl1);
tmpMeta17 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_x));
tmpMeta16 = mmc_mk_cons(tmpMeta17, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = tmpMeta16;
tmp1_c1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta18 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = tmpMeta18;
tmp1_c1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta[0+0];
_isScalar = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_isScalar) { *out_isScalar = _isScalar; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_extractDimensionOfChild(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype *out_isScalar)
{
modelica_boolean _isScalar;
modelica_metatype _outExp = NULL;
_outExp = omc_Static_extractDimensionOfChild(threadData, _inExp, &_isScalar);
if (out_isScalar) { *out_isScalar = mmc_mk_icon(_isScalar); }
return _outExp;
}
DLLExport
modelica_metatype omc_Static_crefVectorize(threadData_t *threadData, modelica_boolean _performVectorization, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _splicedExp, modelica_metatype _crefIdType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_boolean tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _performVectorization;
tmp4_2 = _inExp;
tmp4_3 = _inType;
tmp4_4 = _splicedExp;
{
modelica_boolean _b1;
modelica_boolean _b2;
modelica_metatype _exptp = NULL;
modelica_metatype _e = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _t = NULL;
modelica_metatype _d1 = NULL;
modelica_metatype _d2 = NULL;
modelica_integer _ds;
modelica_integer _ds2;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != tmp4_1) goto tmp3_end;
_e = tmp4_2;
tmpMeta1 = _e;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,10,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_t = tmpMeta6;
_e = tmp4_2;
tmp4 += 4;
tmpMeta1 = omc_Static_crefVectorize(threadData, 1, _e, _t, mmc_mk_none(), _crefIdType);
goto tmp3_done;
}
case 2: {
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_boolean tmp16;
if (optionNone(tmp4_4)) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,6,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,6,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
if (listEmpty(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmpMeta10);
tmpMeta12 = MMC_CDR(tmpMeta10);
if (!listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (!listEmpty(tmpMeta15)) goto tmp3_end;
_cr = tmpMeta8;
_d2 = tmpMeta11;
_d1 = tmpMeta14;
_b1 = (omc_Expression_dimensionSize(threadData, _d1) < omc_Config_vectorizationLimit(threadData));
_b2 = (omc_Expression_dimensionSize(threadData, _d2) < omc_Config_vectorizationLimit(threadData));
tmp16 = ((_b1 && _b2) || (omc_Config_vectorizationLimit(threadData) == ((modelica_integer) 0)));
if (1 != tmp16) goto goto_2;
_e = omc_Static_elabCrefSlice(threadData, _cr, _crefIdType);
tmpMeta1 = omc_Static_elabMatrixToMatrixExp(threadData, _e);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_boolean tmp23;
modelica_boolean tmp24;
if (optionNone(tmp4_4)) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,6,2) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmpMeta20);
tmpMeta22 = MMC_CDR(tmpMeta20);
if (!listEmpty(tmpMeta22)) goto tmp3_end;
_cr = tmpMeta18;
_t = tmpMeta19;
_d1 = tmpMeta21;
tmp23 = omc_Types_isArray(threadData, _t);
if (0 != tmp23) goto goto_2;
tmp24 = ((omc_Expression_dimensionSize(threadData, _d1) < omc_Config_vectorizationLimit(threadData)) || (omc_Config_vectorizationLimit(threadData) == ((modelica_integer) 0)));
if (1 != tmp24) goto goto_2;
tmpMeta1 = omc_Static_elabCrefSlice(threadData, _cr, _crefIdType);
goto tmp3_done;
}
case 4: {
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_boolean tmp34;
modelica_boolean tmp35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,6,2) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 3));
if (listEmpty(tmpMeta28)) goto tmp3_end;
tmpMeta29 = MMC_CAR(tmpMeta28);
tmpMeta30 = MMC_CDR(tmpMeta28);
if (!listEmpty(tmpMeta30)) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (listEmpty(tmpMeta31)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (!listEmpty(tmpMeta33)) goto tmp3_end;
_cr = tmpMeta25;
_exptp = tmpMeta26;
_t = tmpMeta27;
_d2 = tmpMeta29;
_d1 = tmpMeta32;
_ds = omc_Expression_dimensionSize(threadData, _d1);
_ds2 = omc_Expression_dimensionSize(threadData, _d2);
_b1 = (_ds < omc_Config_vectorizationLimit(threadData));
_b2 = (_ds2 < omc_Config_vectorizationLimit(threadData));
tmp34 = ((_b1 && _b2) || (omc_Config_vectorizationLimit(threadData) == ((modelica_integer) 0)));
if (1 != tmp34) goto goto_2;
tmp35 = listEmpty(omc_ComponentReference_crefLastSubs(threadData, _cr));
if (1 != tmp35) goto goto_2;
tmpMeta1 = omc_Static_createCrefArray2d(threadData, _cr, ((modelica_integer) 1), _ds, _ds2, _exptp, _t, _crefIdType);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_boolean tmp42;
modelica_boolean tmp43;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (listEmpty(tmpMeta39)) goto tmp3_end;
tmpMeta40 = MMC_CAR(tmpMeta39);
tmpMeta41 = MMC_CDR(tmpMeta39);
if (!listEmpty(tmpMeta41)) goto tmp3_end;
_cr = tmpMeta36;
_exptp = tmpMeta37;
_t = tmpMeta38;
_d1 = tmpMeta40;
tmp42 = omc_Types_isArray(threadData, _t);
if (0 != tmp42) goto goto_2;
_ds = omc_Expression_dimensionSize(threadData, _d1);
tmp43 = ((_ds < omc_Config_vectorizationLimit(threadData)) || (omc_Config_vectorizationLimit(threadData) == ((modelica_integer) 0)));
if (1 != tmp43) goto goto_2;
tmpMeta1 = omc_Static_createCrefArray(threadData, _cr, ((modelica_integer) 1), _ds, _exptp, _t, _crefIdType);
goto tmp3_done;
}
case 6: {
tmpMeta1 = _inExp;
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:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
modelica_metatype boxptr_Static_crefVectorize(threadData_t *threadData, modelica_metatype _performVectorization, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _splicedExp, modelica_metatype _crefIdType)
{
modelica_integer tmp1;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_performVectorization);
_outExp = omc_Static_crefVectorize(threadData, tmp1, _inExp, _inType, _splicedExp, _crefIdType);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inAttributes, modelica_metatype _constSubs, modelica_metatype _inIteratorConst, modelica_metatype _inType, modelica_metatype _inBinding, modelica_boolean _inVectorize, modelica_metatype _splicedExpData, modelica_metatype _inPrefix, modelica_boolean _evalCref, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outConst, modelica_metatype *out_outAttributes)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outConst = NULL;
modelica_metatype _outAttributes = NULL;
modelica_metatype _var = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_var = omc_DAEUtil_getAttrVariability(threadData, _inAttributes);
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _var;
tmp4_2 = _inType;
tmp4_3 = _inBinding;
tmp4_4 = _splicedExpData;
{
modelica_metatype _expTy = NULL;
modelica_metatype _idTy = NULL;
modelica_metatype _expIdTy = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _subCr1 = NULL;
modelica_metatype _subCr2 = NULL;
modelica_metatype _e = NULL;
modelica_metatype _index = NULL;
modelica_metatype _sexp = NULL;
modelica_metatype _v = NULL;
modelica_metatype _const = NULL;
modelica_string _s = NULL;
modelica_string _scope = NULL;
modelica_string _pre_str = NULL;
modelica_metatype _binding = NULL;
modelica_integer _i;
modelica_metatype _p = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _subsc = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 13; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,8,0) == 0) goto tmp3_end;
_expTy = omc_Types_simplifyType(threadData, _inType);
_const = omc_Types_variabilityToConst(threadData, _var);
tmpMeta6 = mmc_mk_box3(9, &DAE_Exp_CREF__desc, _inCref, _expTy);
tmpMeta[0+0] = tmpMeta6;
tmpMeta[0+1] = _const;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,4) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto tmp3_end;
tmp4 += 6;
tmp8 = omc_Types_getFixedVarAttributeParameterOrConstant(threadData, _inType);
if (1 != tmp8) goto goto_2;
_binding = omc_DAEUtil_setBindingSource(threadData, _inBinding, _OMC_LIT95);
_outCache = omc_Static_elabCref2(threadData, _outCache, _inEnv, _inCref, _inAttributes, _constSubs, _inIteratorConst, _inType, _binding, _inVectorize, _splicedExpData, _inPrefix, _evalCref, _info ,&_e ,&_const ,&_attr);
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _const;
tmpMeta[0+2] = _attr;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (optionNone(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmp11 = mmc_unbox_integer(tmpMeta10);
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_i = tmp11;
_p = tmpMeta12;
if (!_evalCref) goto tmp3_end;
_p = omc_AbsynUtil_joinPaths(threadData, _p, omc_ComponentReference_crefLastPath(threadData, _inCref));
tmpMeta13 = mmc_mk_box3(8, &DAE_Exp_ENUM__LITERAL__desc, _p, mmc_mk_integer(_i));
tmpMeta[0+0] = tmpMeta13;
tmpMeta[0+1] = _OMC_LIT60;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (!(!_evalCref)) goto tmp3_end;
_expTy = omc_Types_simplifyType(threadData, _inType);
tmpMeta[0+0] = omc_Expression_makeCrefExp(threadData, _inCref, _expTy);
tmpMeta[0+1] = _OMC_LIT60;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (!omc_Types_isVar(threadData, _constSubs)) goto tmp3_end;
_cr = omc_ComponentReference_crefStripLastSubs(threadData, _inCref);
_subsc = omc_ComponentReference_crefLastSubs(threadData, _inCref);
tmpMeta14 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_outCache = omc_Ceval_cevalCref(threadData, _outCache, _inEnv, _cr, 0, tmpMeta14, ((modelica_integer) 0) ,&_v);
_e = omc_ValuesUtil_valueExp(threadData, _v, mmc_mk_none());
{
modelica_metatype __omcQ_24tmpVar19;
modelica_metatype* tmp16;
modelica_metatype tmpMeta17;
modelica_metatype __omcQ_24tmpVar18;
modelica_integer tmp18;
modelica_metatype _sub_loopVar = 0;
modelica_metatype _sub;
_sub_loopVar = _subsc;
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar19 = tmpMeta17;
tmp16 = &__omcQ_24tmpVar19;
while(1) {
tmp18 = 1;
if (!listEmpty(_sub_loopVar)) {
_sub = MMC_CAR(_sub_loopVar);
_sub_loopVar = MMC_CDR(_sub_loopVar);
tmp18--;
}
if (tmp18 == 0) {
__omcQ_24tmpVar18 = omc_Expression_getSubscriptExp(threadData, _sub);
*tmp16 = mmc_mk_cons(__omcQ_24tmpVar18,0);
tmp16 = &MMC_CDR(*tmp16);
} else if (tmp18 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp16 = mmc_mk_nil();
tmpMeta15 = __omcQ_24tmpVar19;
}
_e = omc_Expression_makeASUB(threadData, _e, tmpMeta15);
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _OMC_LIT52;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta19;
modelica_boolean tmp20;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_binding = tmp4_3;
_idTy = tmpMeta19;
tmp20 = omc_Types_equivtypes(threadData, _inType, _idTy);
if (1 != tmp20) goto goto_2;
{
{
volatile mmc_switch_type tmp23;
int tmp24;
tmp23 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp22_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp23 < 2; tmp23++) {
switch (MMC_SWITCH_CAST(tmp23)) {
case 0: {
modelica_metatype tmpMeta25;
tmpMeta25 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_outCache = omc_Ceval_cevalCrefBinding(threadData, _outCache, _inEnv, _inCref, _binding, 0, tmpMeta25, ((modelica_integer) 0) ,&_v);
_e = omc_ValuesUtil_valueExp(threadData, _v, mmc_mk_none());
goto tmp22_done;
}
case 1: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
tmpMeta26 = omc_DAEUtil_bindingExp(threadData, _binding);
if (optionNone(tmpMeta26)) goto goto_21;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 1));
_e = tmpMeta27;
{
modelica_metatype __omcQ_24tmpVar21;
modelica_metatype* tmp29;
modelica_metatype tmpMeta30;
modelica_metatype __omcQ_24tmpVar20;
modelica_integer tmp31;
modelica_metatype _sub_loopVar = 0;
modelica_metatype _sub;
_sub_loopVar = omc_ComponentReference_crefLastSubs(threadData, _inCref);
tmpMeta30 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar21 = tmpMeta30;
tmp29 = &__omcQ_24tmpVar21;
while(1) {
tmp31 = 1;
if (!listEmpty(_sub_loopVar)) {
_sub = MMC_CAR(_sub_loopVar);
_sub_loopVar = MMC_CDR(_sub_loopVar);
tmp31--;
}
if (tmp31 == 0) {
__omcQ_24tmpVar20 = omc_Expression_getSubscriptExp(threadData, _sub);
*tmp29 = mmc_mk_cons(__omcQ_24tmpVar20,0);
tmp29 = &MMC_CDR(*tmp29);
} else if (tmp31 == 1) {
break;
} else {
goto goto_21;
}
}
*tmp29 = mmc_mk_nil();
tmpMeta28 = __omcQ_24tmpVar21;
}
_e = omc_Expression_makeASUB(threadData, _e, tmpMeta28);
goto tmp22_done;
}
}
goto tmp22_end;
tmp22_end: ;
}
goto goto_21;
tmp22_done:
(void)tmp23;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp22_done2;
goto_21:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp23 < 2) {
goto tmp22_top;
}
goto goto_2;
tmp22_done2:;
}
}
;
_const = _OMC_LIT60;
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _const;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (!isSome(_inIteratorConst)) goto tmp3_end;
_expTy = omc_Types_simplifyType(threadData, _inType);
tmpMeta[0+0] = omc_Expression_makeCrefExp(threadData, _inCref, _expTy);
tmpMeta[0+1] = _OMC_LIT60;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,4) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,0,0) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_sexp = tmpMeta33;
_idTy = tmpMeta34;
tmp4 += 1;
_expTy = omc_Types_simplifyType(threadData, _inType);
_expIdTy = omc_Types_simplifyType(threadData, _idTy);
_cr = omc_Static_fillCrefSubscripts(threadData, _inCref, _inType);
_e = omc_Expression_makeCrefExp(threadData, _cr, _expTy);
_e = omc_Static_crefVectorize(threadData, _inVectorize, _e, _inType, _sexp, _expIdTy);
tmpMeta35 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_outCache = omc_Ceval_ceval(threadData, _outCache, _inEnv, _e, 0, tmpMeta35, ((modelica_integer) 0) ,&_v);
_e = omc_ValuesUtil_valueExp(threadData, _v, mmc_mk_some(_e));
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _OMC_LIT60;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_boolean tmp38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,0) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_sexp = tmpMeta36;
_idTy = tmpMeta37;
tmp4 += 2;
if (!omc_DAEUtil_isBound(threadData, _inBinding)) goto tmp3_end;
tmp38 = (omc_Flags_isSet(threadData, _OMC_LIT99) || omc_Config_getEvaluateParametersInAnnotations(threadData));
if (1 != tmp38) goto goto_2;
_attr = omc_DAEUtil_setAttrVariability(threadData, _inAttributes, _OMC_LIT100);
_expTy = omc_Types_simplifyType(threadData, _inType);
_expIdTy = omc_Types_simplifyType(threadData, _idTy);
_cr = omc_Static_fillCrefSubscripts(threadData, _inCref, _inType);
_e = omc_Static_crefVectorize(threadData, _inVectorize, omc_Expression_makeCrefExp(threadData, _cr, _expTy), _inType, _sexp, _expIdTy);
tmpMeta39 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_outCache = omc_Ceval_ceval(threadData, _outCache, _inEnv, _e, 0, tmpMeta39, ((modelica_integer) 0) ,&_v);
_e = omc_ValuesUtil_valueExp(threadData, _v, mmc_mk_some(_e));
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _OMC_LIT101;
tmpMeta[0+2] = _attr;
goto tmp3_done;
}
case 9: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
if (optionNone(tmpMeta40)) goto tmp3_end;
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta41,6,2) == 0) goto tmp3_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta41), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,4) == 0) goto tmp3_end;
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (optionNone(tmpMeta43)) goto tmp3_end;
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 1));
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta45,0,0) == 0) goto tmp3_end;
_cr = tmpMeta42;
_v = tmpMeta44;
tmp4 += 1;
tmpMeta46 = omc_ComponentReference_crefLastSubs(threadData, _cr);
if (listEmpty(tmpMeta46)) goto goto_2;
tmpMeta47 = MMC_CAR(tmpMeta46);
tmpMeta48 = MMC_CDR(tmpMeta46);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta47,2,1) == 0) goto goto_2;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta49,6,2) == 0) goto goto_2;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta49), 2));
if (listEmpty(tmpMeta48)) goto goto_2;
tmpMeta51 = MMC_CAR(tmpMeta48);
tmpMeta52 = MMC_CDR(tmpMeta48);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta51,1,1) == 0) goto goto_2;
tmpMeta53 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta51), 2));
if (!listEmpty(tmpMeta52)) goto goto_2;
_subCr2 = tmpMeta50;
_e = tmpMeta53;
tmpMeta54 = omc_ComponentReference_crefLastSubs(threadData, _inCref);
if (listEmpty(tmpMeta54)) goto goto_2;
tmpMeta55 = MMC_CAR(tmpMeta54);
tmpMeta56 = MMC_CDR(tmpMeta54);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta55,2,1) == 0) goto goto_2;
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta55), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,6,2) == 0) goto goto_2;
tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta57), 2));
if (!listEmpty(tmpMeta56)) goto goto_2;
_index = tmpMeta57;
_subCr1 = tmpMeta58;
tmp59 = omc_ComponentReference_crefEqual(threadData, _subCr1, _subCr2);
if (1 != tmp59) goto goto_2;
tmp60 = (omc_Expression_isArray(threadData, _e) || omc_Expression_isRange(threadData, _e));
if (1 != tmp60) goto goto_2;
_e = omc_ValuesUtil_valueExp(threadData, _v, mmc_mk_some(_e));
tmpMeta61 = mmc_mk_cons(_index, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta62 = mmc_mk_box3(24, &DAE_Exp_ASUB__desc, _e, tmpMeta61);
_e = tmpMeta62;
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _OMC_LIT60;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
if (!isNone(_inIteratorConst)) goto tmp3_end;
if(omc_Flags_isSet(threadData, _OMC_LIT107))
{
_s = omc_ComponentReference_printComponentRefStr(threadData, _inCref);
_scope = omc_FGraph_printGraphPathStr(threadData, _inEnv);
_pre_str = omc_PrefixUtil_printPrefixStr2(threadData, _inPrefix);
tmpMeta63 = stringAppend(_pre_str,_s);
_s = tmpMeta63;
tmpMeta64 = stringAppend(_OMC_LIT102,_pre_str);
tmpMeta65 = stringAppend(tmpMeta64,_s);
tmpMeta66 = stringAppend(tmpMeta65,_OMC_LIT103);
tmpMeta67 = stringAppend(tmpMeta66,_scope);
omc_Debug_traceln(threadData, tmpMeta67);
}
_expTy = omc_Types_simplifyType(threadData, _inType);
_cr = omc_Static_fillCrefSubscripts(threadData, _inCref, _inType);
_e = omc_Expression_makeCrefExp(threadData, _cr, _expTy);
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _OMC_LIT60;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
tmpMeta68 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta69 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_sexp = tmpMeta68;
_idTy = tmpMeta69;
_expTy = omc_Types_simplifyType(threadData, _inType);
_expIdTy = omc_Types_simplifyType(threadData, _idTy);
_cr = omc_Static_fillCrefSubscripts(threadData, _inCref, _inType);
_e = omc_Static_crefVectorize(threadData, _inVectorize, omc_Expression_makeCrefExp(threadData, _cr, _expTy), _inType, _sexp, _expIdTy);
_const = omc_Types_variabilityToConst(threadData, _var);
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _const;
tmpMeta[0+2] = _inAttributes;
goto tmp3_done;
}
case 12: {
modelica_boolean tmp70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
tmp70 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp70) goto goto_2;
_pre_str = omc_PrefixUtil_printPrefixStr2(threadData, _inPrefix);
tmpMeta71 = stringAppend(_OMC_LIT108,_pre_str);
tmpMeta72 = stringAppend(tmpMeta71,omc_ComponentReference_printComponentRefStr(threadData, _inCref));
tmpMeta73 = stringAppend(tmpMeta72,_OMC_LIT109);
tmpMeta74 = stringAppend(tmpMeta73,omc_FGraph_printGraphStr(threadData, _inEnv));
omc_Debug_traceln(threadData, tmpMeta74);
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 < 13) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta[0+0];
_outConst = tmpMeta[0+1];
_outAttributes = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outConst) { *out_outConst = _outConst; }
if (out_outAttributes) { *out_outAttributes = _outAttributes; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCref2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inAttributes, modelica_metatype _constSubs, modelica_metatype _inIteratorConst, modelica_metatype _inType, modelica_metatype _inBinding, modelica_metatype _inVectorize, modelica_metatype _splicedExpData, modelica_metatype _inPrefix, modelica_metatype _evalCref, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outConst, modelica_metatype *out_outAttributes)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inVectorize);
tmp2 = mmc_unbox_integer(_evalCref);
_outCache = omc_Static_elabCref2(threadData, _inCache, _inEnv, _inCref, _inAttributes, _constSubs, _inIteratorConst, _inType, _inBinding, tmp1, _splicedExpData, _inPrefix, tmp2, _info, out_outExp, out_outConst, out_outAttributes);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillSubscripts(threadData_t *threadData, modelica_metatype _inExpSubscriptLst, modelica_metatype _inType)
{
modelica_metatype _outExpSubscriptLst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
modelica_metatype _subs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
_subs = omc_List_fill(threadData, _OMC_LIT69, listLength(omc_Types_getDimensions(threadData, _inType)));
_subs = omc_List_stripN(threadData, _subs, listLength(_inExpSubscriptLst));
tmpMeta1 = listAppend(_inExpSubscriptLst, _subs);
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inExpSubscriptLst;
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:;
}
}
_outExpSubscriptLst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExpSubscriptLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_stripPrefixType(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inPrefixType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inType;
tmp4_2 = _inPrefixType;
{
modelica_metatype _t = NULL;
modelica_metatype _pt = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_t = tmpMeta6;
_pt = tmpMeta7;
_inType = _t;
_inPrefixType = _pt;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
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_Static_fillCrefSubscripts(threadData_t *threadData, modelica_metatype _inComponentRef, modelica_metatype _inType)
{
modelica_metatype _outComponentRef = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inComponentRef;
tmp4_2 = _inType;
{
modelica_metatype _e = NULL;
modelica_metatype _cref_1 = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _t = NULL;
modelica_metatype _subs_1 = NULL;
modelica_metatype _subs = NULL;
modelica_string _id = NULL;
modelica_metatype _ty2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
_e = tmp4_1;
tmpMeta1 = _e;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_id = tmpMeta7;
_ty2 = tmpMeta8;
_subs = tmpMeta9;
_t = tmp4_2;
tmp4 += 1;
_subs_1 = omc_Static_fillSubscripts(threadData, _subs, _t);
tmpMeta1 = omc_ComponentReference_makeCrefIdent(threadData, _id, _ty2, _subs_1);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,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));
_id = tmpMeta10;
_ty2 = tmpMeta11;
_subs = tmpMeta12;
_cref = tmpMeta13;
_t = tmp4_2;
_subs = omc_Static_fillSubscripts(threadData, _subs, _ty2);
_t = omc_Static_stripPrefixType(threadData, _t, _ty2);
_cref_1 = omc_Static_fillCrefSubscripts(threadData, _cref, _t);
tmpMeta1 = omc_ComponentReference_makeCrefQual(threadData, _id, _ty2, _subs, _cref_1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outComponentRef = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outComponentRef;
}
DLLExport
modelica_metatype omc_Static_makeEnumerationArray(threadData_t *threadData, modelica_metatype _enumTypeName, modelica_metatype _enumLiterals, modelica_metatype *out_enumArrayType)
{
modelica_metatype _enumArray = NULL;
modelica_metatype _enumArrayType = NULL;
modelica_metatype _enum_lit_expl = NULL;
modelica_integer _sz;
modelica_metatype _ety = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_enum_lit_expl = omc_Expression_makeEnumLiterals(threadData, _enumTypeName, _enumLiterals);
_sz = listLength(_enumLiterals);
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta3 = mmc_mk_box6(8, &DAE_Type_T__ENUMERATION__desc, mmc_mk_none(), _enumTypeName, _enumLiterals, tmpMeta1, tmpMeta2);
tmpMeta5 = mmc_mk_box4(5, &DAE_Dimension_DIM__ENUM__desc, _enumTypeName, _enumLiterals, mmc_mk_integer(_sz));
tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, tmpMeta3, tmpMeta4);
_ety = tmpMeta6;
tmpMeta7 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ety, mmc_mk_boolean(1), _enum_lit_expl);
_enumArray = tmpMeta7;
_enumArrayType = _ety;
_return: OMC_LABEL_UNUSED
if (out_enumArrayType) { *out_enumArrayType = _enumArrayType; }
return _enumArray;
}
DLLExport
modelica_metatype omc_Static_applySubscriptsVariability(threadData_t *threadData, modelica_metatype _inVariability, modelica_metatype _inSubsConst)
{
modelica_metatype _outVariability = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inVariability;
tmp4_2 = _inSubsConst;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT78;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT78;
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,0) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT110;
goto tmp3_done;
}
case 3: {
tmpMeta1 = _inVariability;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outVariability = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outVariability;
}
DLLExport
modelica_metatype omc_Static_fixEnumerationType(threadData_t *threadData, modelica_metatype _inType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
modelica_metatype _p = NULL;
modelica_metatype _n = NULL;
modelica_metatype _v = NULL;
modelica_metatype _al = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,5) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (optionNone(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_p = tmpMeta8;
_n = tmpMeta9;
_v = tmpMeta10;
_al = tmpMeta11;
tmpMeta12 = mmc_mk_box6(8, &DAE_Type_T__ENUMERATION__desc, mmc_mk_none(), _p, _n, _v, _al);
tmpMeta1 = tmpMeta12;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inType;
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:;
}
}
_outType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateEmptyVariable(threadData_t *threadData, modelica_boolean _hasZeroSizeDim, modelica_metatype _inExp, modelica_metatype _ty, modelica_metatype _c, modelica_metatype *out_oc)
{
modelica_metatype _oexp = NULL;
modelica_metatype _oc = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_boolean tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _hasZeroSizeDim;
tmp4_2 = _inExp;
{
modelica_boolean _sc;
modelica_boolean _a;
modelica_metatype _et = NULL;
modelica_metatype _ss = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _sub = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (1 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,21,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_sub = tmpMeta6;
tmp4 += 2;
_a = omc_Types_isArray(threadData, _ty);
_sc = (!_a);
_et = omc_Types_simplifyType(threadData, _ty);
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta8 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(_sc), tmpMeta7);
_exp = tmpMeta8;
_exp = omc_Expression_makeASUB(threadData, _exp, _sub);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _c;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (1 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_cr = tmpMeta9;
_a = omc_Types_isArray(threadData, _ty);
_sc = (!_a);
_et = omc_Types_simplifyType(threadData, _ty);
tmpMeta10 = omc_ComponentReference_crefLastSubs(threadData, _cr);
if (!listEmpty(tmpMeta10)) goto goto_2;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(_sc), tmpMeta11);
_exp = tmpMeta12;
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _c;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (1 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_cr = tmpMeta13;
_a = omc_Types_isArray(threadData, _ty);
_sc = (!_a);
_et = omc_Types_simplifyType(threadData, _ty);
tmpMeta14 = omc_ComponentReference_crefLastSubs(threadData, _cr);
if (listEmpty(tmpMeta14)) goto goto_2;
tmpMeta15 = MMC_CAR(tmpMeta14);
tmpMeta16 = MMC_CDR(tmpMeta14);
_ss = tmpMeta14;
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta18 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _et, mmc_mk_boolean(_sc), tmpMeta17);
_exp = tmpMeta18;
_exp = omc_Expression_makeASUB(threadData, _exp, omc_List_map(threadData, _ss, boxvar_Expression_getSubscriptExp));
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _c;
goto tmp3_done;
}
case 3: {
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _c;
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:;
}
}
_oexp = tmpMeta[0+0];
_oc = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_oc) { *out_oc = _oc; }
return _oexp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_evaluateEmptyVariable(threadData_t *threadData, modelica_metatype _hasZeroSizeDim, modelica_metatype _inExp, modelica_metatype _ty, modelica_metatype _c, modelica_metatype *out_oc)
{
modelica_integer tmp1;
modelica_metatype _oexp = NULL;
tmp1 = mmc_unbox_integer(_hasZeroSizeDim);
_oexp = omc_Static_evaluateEmptyVariable(threadData, tmp1, _inExp, _ty, _c, out_oc);
return _oexp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_lookupFunctionsInEnvNoError(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inInfo, modelica_metatype *out_outTypesTypeLst)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outTypesTypeLst = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
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: {
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT111);
_outCache = omc_Lookup_lookupFunctionsInEnv(threadData, _inCache, _inEnv, _inPath, _inInfo ,&_outTypesTypeLst);
omc_ErrorExt_rollBack(threadData, _OMC_LIT111);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = _outTypesTypeLst;
goto tmp3_done;
}
case 1: {
omc_ErrorExt_rollBack(threadData, _OMC_LIT111);
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];
_outTypesTypeLst = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outTypesTypeLst) { *out_outTypesTypeLst = _outTypesTypeLst; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isValidTimeScope(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inInfo)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_boolean _outIsValid;
modelica_metatype _res = NULL;
modelica_boolean tmp5 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
_res = omc_FGraph_lastScopeRestriction(threadData, _inEnv);
goto tmp2_done;
}
case 1: {
_outIsValid = 1;
goto _return;
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:;
}
}
;
{
modelica_metatype tmp8_1;
tmp8_1 = _res;
{
int tmp8;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp8_1))) {
case 3: {
tmp5 = 1;
goto tmp7_done;
}
case 4: {
tmp5 = 1;
goto tmp7_done;
}
case 5: {
tmp5 = 1;
goto tmp7_done;
}
case 7: {
tmp5 = 1;
goto tmp7_done;
}
default:
tmp7_default: OMC_LABEL_UNUSED; {
modelica_metatype tmpMeta9;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT114, tmpMeta9, _inInfo);
tmp5 = 0;
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
goto_6:;
MMC_THROW_INTERNAL();
goto tmp7_done;
tmp7_done:;
}
}
_outIsValid = tmp5;
_return: OMC_LABEL_UNUSED
threadData->mmc_jumper = old_mmc_jumper;
return _outIsValid;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isValidTimeScope(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inInfo)
{
modelica_boolean _outIsValid;
modelica_metatype out_outIsValid;
_outIsValid = omc_Static_isValidTimeScope(threadData, _inEnv, _inInfo);
out_outIsValid = mmc_mk_icon(_outIsValid);
return out_outIsValid;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCrefArraySubscripts(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _e, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _pre, modelica_boolean _evalCref, modelica_boolean _impl, modelica_metatype _info, modelica_metatype *out_res)
{
modelica_metatype _cache = NULL;
modelica_metatype _res = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _const = NULL;
modelica_metatype _const1 = NULL;
modelica_metatype _const2 = NULL;
modelica_metatype _t = NULL;
modelica_metatype _sub_ty = NULL;
modelica_metatype _attr = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_boolean tmp15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_cache = __omcQ_24in_5Fcache;
tmpMeta8 = omc_Static_elabCref1(threadData, _cache, _env, _cref, 0, 0, _pre, _evalCref, _info, &tmpMeta1);
_cache = tmpMeta8;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta4,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 3));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_exp1 = tmpMeta3;
_t = tmpMeta5;
_const1 = tmpMeta6;
_attr = tmpMeta7;
_t = omc_Types_metaArrayElementType(threadData, _t);
tmpMeta13 = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 0, _pre, _info, &tmpMeta9, &tmpMeta10);
_cache = tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
_exp2 = tmpMeta9;
_sub_ty = tmpMeta11;
_const2 = tmpMeta12;
if(omc_Types_isMetaBoxedType(threadData, _sub_ty))
{
_sub_ty = omc_Types_unboxedType(threadData, _sub_ty);
tmpMeta14 = mmc_mk_box3(38, &DAE_Exp_UNBOX__desc, _exp2, _sub_ty);
_exp2 = tmpMeta14;
}
tmp15 = omc_Types_isScalarInteger(threadData, _sub_ty);
if (1 != tmp15) MMC_THROW_INTERNAL();
_const = omc_Types_constAnd(threadData, _const1, _const2);
tmpMeta16 = mmc_mk_cons(_exp2, MMC_REFSTRUCTLIT(mmc_nil));
_exp = omc_Expression_makeASUB(threadData, _exp1, tmpMeta16);
tmpMeta17 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _const);
tmpMeta18 = mmc_mk_box3(0, _exp, tmpMeta17, _attr);
_res = mmc_mk_some(tmpMeta18);
_return: OMC_LABEL_UNUSED
if (out_res) { *out_res = _res; }
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCrefArraySubscripts(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _e, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _pre, modelica_metatype _evalCref, modelica_metatype _impl, modelica_metatype _info, modelica_metatype *out_res)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _cache = NULL;
tmp1 = mmc_unbox_integer(_evalCref);
tmp2 = mmc_unbox_integer(_impl);
_cache = omc_Static_elabCrefArraySubscripts(threadData, _cref, _e, __omcQ_24in_5Fcache, _env, _pre, tmp1, tmp2, _info, out_res);
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCref1(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_boolean _inImplicit, modelica_boolean _performVectorization, modelica_metatype _inPrefix, modelica_boolean _evalCref, modelica_metatype _info, modelica_metatype *out_res)
{
modelica_metatype _outCache = NULL;
modelica_metatype _res = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inComponentRef;
tmp4_4 = _inImplicit;
tmp4_5 = _inPrefix;
{
modelica_metatype _c_1 = NULL;
modelica_metatype _const = NULL;
modelica_metatype _constSubs = NULL;
modelica_metatype _t = NULL;
modelica_metatype _origt = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _crefExp = NULL;
modelica_metatype _env = NULL;
modelica_metatype _c = NULL;
modelica_metatype _cache = NULL;
modelica_boolean _impl;
modelica_boolean _isBuiltinFn;
modelica_boolean _isBuiltinFnOrInlineBuiltin;
modelica_boolean _hasZeroSizeDim;
modelica_metatype _et = NULL;
modelica_string _s = NULL;
modelica_string _scope = NULL;
modelica_metatype _splicedExpData = NULL;
modelica_metatype _path = NULL;
modelica_metatype _fpath = NULL;
modelica_metatype _enum_lit_strs = NULL;
modelica_string _typeStr = NULL;
modelica_string _id = NULL;
modelica_metatype _expCref = NULL;
modelica_metatype _forIteratorConstOpt = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _e = NULL;
modelica_metatype _cl = NULL;
modelica_metatype _isBuiltin = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _binding = NULL;
modelica_metatype _subscripts = NULL;
modelica_metatype _stripped_cref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 11; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,0) == 0) goto tmp3_end;
_cache = tmp4_1;
tmp4 += 4;
_t = _OMC_LIT115;
_et = omc_Types_simplifyType(threadData, _t);
_crefExp = omc_Expression_makeCrefExp(threadData, _OMC_LIT53, _et);
tmpMeta6 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _OMC_LIT52);
tmpMeta7 = mmc_mk_box3(0, _crefExp, tmpMeta6, _OMC_LIT121);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta7);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (7 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT37), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
_cache = tmp4_1;
tmp4 += 2;
_exp = omc_Expression_makeScalarArray(threadData, _OMC_LIT125, _OMC_LIT56);
_t = _OMC_LIT128;
tmpMeta9 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _OMC_LIT60);
tmpMeta10 = mmc_mk_box3(0, _exp, tmpMeta9, _OMC_LIT129);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta10);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (4 != MMC_STRLEN(tmpMeta11) || strcmp(MMC_STRINGDATA(_OMC_LIT130), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp3_end;
tmp4 += 1;
_res = (omc_Static_isValidTimeScope(threadData, _inEnv, _info)?_OMC_LIT138:mmc_mk_none());
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _res;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp12;
modelica_boolean tmp13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 1;
tmp12 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp12) goto goto_2;
tmp13 = omc_AbsynUtil_crefHasSubscripts(threadData, _inComponentRef);
if (1 != tmp13) goto goto_2;
_subscripts = omc_AbsynUtil_crefGetLastSubs(threadData, _inComponentRef);
_stripped_cref = omc_AbsynUtil_crefStripLastSubs(threadData, _inComponentRef);
tmp14 = ((!omc_AbsynUtil_crefHasSubscripts(threadData, _stripped_cref)) && (listLength(_subscripts) == ((modelica_integer) 1)));
if (1 != tmp14) goto goto_2;
tmpMeta15 = _subscripts;
if (listEmpty(tmpMeta15)) goto goto_2;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,1) == 0) goto goto_2;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (!listEmpty(tmpMeta17)) goto goto_2;
_e = tmpMeta18;
tmpMeta[0+0] = omc_Static_elabCrefArraySubscripts(threadData, _stripped_cref, _e, _cache, _env, _pre, _evalCref, _impl, _info, &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_boolean tmp24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,2) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (listEmpty(tmpMeta20)) goto tmp3_end;
tmpMeta21 = MMC_CAR(tmpMeta20);
tmpMeta22 = MMC_CDR(tmpMeta20);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,1,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
if (!listEmpty(tmpMeta22)) goto tmp3_end;
_id = tmpMeta19;
_e = tmpMeta23;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp24 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp24) goto goto_2;
tmpMeta25 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta26 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _id, tmpMeta25);
tmpMeta[0+0] = omc_Static_elabCrefArraySubscripts(threadData, tmpMeta26, _e, _cache, _env, _pre, _evalCref, _impl, _info, &tmpMeta[0+1]);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
_cache = tmp4_1;
_env = tmp4_2;
_c = tmp4_3;
_impl = tmp4_4;
_pre = tmp4_5;
_c = omc_Static_replaceEnd(threadData, _c);
_env = (omc_AbsynUtil_crefIsFullyQualified(threadData, _inComponentRef)?omc_FGraph_topScope(threadData, _inEnv):_inEnv);
_cache = omc_Static_elabCrefSubs(threadData, _cache, _env, _inEnv, _c, _pre, _OMC_LIT40, _impl, 0, _info ,&_c_1 ,&_constSubs ,&_hasZeroSizeDim);
_cache = omc_Lookup_lookupVar(threadData, _cache, _env, _c_1 ,&_attr ,&_t ,&_binding ,&_forIteratorConstOpt ,&_splicedExpData, NULL, NULL, NULL);
_cache = omc_Static_elabCref2(threadData, _cache, _env, _c_1, _attr, _constSubs, _forIteratorConstOpt, _t, _binding, _performVectorization, _splicedExpData, _pre, _evalCref, _info ,&_exp ,&_const ,&_attr);
_t = omc_Static_fixEnumerationType(threadData, _t);
_exp = omc_Static_evaluateEmptyVariable(threadData, (_hasZeroSizeDim && _evalCref), _exp, _t, _const ,&_const);
tmpMeta27 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _const);
tmpMeta28 = mmc_mk_box3(0, _exp, tmpMeta27, _attr);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta28);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
_cache = tmp4_1;
_env = tmp4_2;
_c = tmp4_3;
_c = omc_Static_replaceEnd(threadData, _c);
_path = omc_AbsynUtil_crefToPath(threadData, _c);
tmpMeta32 = omc_Lookup_lookupClass(threadData, _cache, _env, _path, mmc_mk_none(), &tmpMeta29, &tmpMeta31);
_cache = tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,2,8) == 0) goto goto_2;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,10,0) == 0) goto goto_2;
_cl = tmpMeta29;
_env = tmpMeta31;
_typeStr = omc_AbsynUtil_pathLastIdent(threadData, _path);
tmpMeta33 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _typeStr);
_path = omc_FGraph_joinScopePath(threadData, _env, tmpMeta33);
_enum_lit_strs = omc_SCodeUtil_componentNames(threadData, _cl);
_exp = omc_Static_makeEnumerationArray(threadData, _path, _enum_lit_strs ,&_t);
tmpMeta34 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _OMC_LIT60);
tmpMeta35 = mmc_mk_box3(0, _exp, tmpMeta34, _OMC_LIT129);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta35);
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
_cache = tmp4_1;
_env = tmp4_2;
_c = tmp4_3;
_path = omc_AbsynUtil_crefToPath(threadData, _c);
tmpMeta39 = omc_Static_lookupFunctionsInEnvNoError(threadData, _cache, _env, _path, _info, &tmpMeta36);
_cache = tmpMeta39;
if (listEmpty(tmpMeta36)) goto goto_2;
tmpMeta37 = MMC_CAR(tmpMeta36);
tmpMeta38 = MMC_CDR(tmpMeta36);
if (!listEmpty(tmpMeta38)) goto goto_2;
_t = tmpMeta37;
_isBuiltin = omc_Static_isBuiltinFunc(threadData, _path, _t ,&_isBuiltinFn ,&_path);
_isBuiltinFnOrInlineBuiltin = (!valueEq(_OMC_LIT139, _isBuiltin));
{
modelica_metatype tmp43_1;
tmp43_1 = _t;
{
volatile mmc_switch_type tmp43;
int tmp44;
tmp43 = 0;
for (; tmp43 < 1; tmp43++) {
switch (MMC_SWITCH_CAST(tmp43)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp43_1,11,4) == 0) goto tmp42_end;
tmpMeta40 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_t), 5)));
goto tmp42_done;
}
}
goto tmp42_end;
tmp42_end: ;
}
goto goto_41;
goto_41:;
goto goto_2;
goto tmp42_done;
tmp42_done:;
}
}
_fpath = tmpMeta40;
_origt = _t;
_t = omc_Types_makeFunctionPolymorphicReference(threadData, _t);
_c = omc_AbsynUtil_pathToCref(threadData, _fpath);
_expCref = omc_ComponentReference_toExpCref(threadData, _c);
tmpMeta45 = mmc_mk_box3(16, &DAE_Type_T__FUNCTION__REFERENCE__FUNC__desc, mmc_mk_boolean(_isBuiltinFnOrInlineBuiltin), _origt);
_exp = omc_Expression_makeCrefExp(threadData, _expCref, tmpMeta45);
tmpMeta47 = omc_Static_instantiateDaeFunction(threadData, _cache, _env, _path, _isBuiltinFn, mmc_mk_none(), 1, &tmpMeta46);
_cache = tmpMeta47;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,0,0) == 0) goto goto_2;
tmpMeta48 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _OMC_LIT52);
tmpMeta49 = mmc_mk_box3(0, _exp, tmpMeta48, _OMC_LIT129);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta49);
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_boolean tmp52;
modelica_metatype tmpMeta53;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,2) == 0) goto tmp3_end;
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (4 != MMC_STRLEN(tmpMeta50) || strcmp(MMC_STRINGDATA(_OMC_LIT147), MMC_STRINGDATA(tmpMeta50)) != 0) goto tmp3_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (!listEmpty(tmpMeta51)) goto tmp3_end;
_cache = tmp4_1;
tmp52 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp52) goto goto_2;
tmpMeta53 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT142, tmpMeta53, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 9: {
modelica_boolean tmp54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
_env = tmp4_2;
_c = tmp4_3;
tmp54 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp54) goto goto_2;
tmpMeta55 = stringAppend(_OMC_LIT143,omc_Dump_printComponentRefStr(threadData, _c));
tmpMeta56 = stringAppend(tmpMeta55,_OMC_LIT71);
tmpMeta57 = stringAppend(tmpMeta56,omc_FGraph_printGraphPathStr(threadData, _env));
omc_Debug_traceln(threadData, tmpMeta57);
goto goto_2;
goto tmp3_done;
}
case 10: {
modelica_boolean tmp58;
modelica_metatype tmpMeta60;
_cache = tmp4_1;
_env = tmp4_2;
_c = tmp4_3;
_impl = tmp4_4;
_pre = tmp4_5;
tmp58 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_Static_elabCrefSubs(threadData, _cache, _env, _env, _c, _pre, _OMC_LIT40, _impl, 0, _info, NULL, NULL, NULL);
tmp58 = 1;
goto goto_59;
goto_59:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp58) {goto goto_2;}
_s = omc_Dump_printComponentRefStr(threadData, _c);
_scope = omc_FGraph_printGraphPathStr(threadData, _env);
tmpMeta60 = mmc_mk_cons(_s, mmc_mk_cons(_scope, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT146, tmpMeta60, _info);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
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:;
}
}
_outCache = tmpMeta[0+0];
_res = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_res) { *out_res = _res; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCref1(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inImplicit, modelica_metatype _performVectorization, modelica_metatype _inPrefix, modelica_metatype _evalCref, modelica_metatype _info, modelica_metatype *out_res)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_performVectorization);
tmp3 = mmc_unbox_integer(_evalCref);
_outCache = omc_Static_elabCref1(threadData, _inCache, _inEnv, _inComponentRef, tmp1, tmp2, _inPrefix, tmp3, _info, out_res);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabCrefNoEval(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_boolean _inImplicit, modelica_boolean _performVectorization, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties, modelica_metatype *out_outAttributes)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _outAttributes = 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
tmpMeta6 = omc_Static_elabCref1(threadData, _inCache, _inEnv, _inComponentRef, _inImplicit, _performVectorization, _inPrefix, 0, _info, &tmpMeta1);
_outCache = tmpMeta6;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_outExp = tmpMeta3;
_outProperties = tmpMeta4;
_outAttributes = tmpMeta5;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
if (out_outAttributes) { *out_outAttributes = _outAttributes; }
return _outCache;
}
modelica_metatype boxptr_Static_elabCrefNoEval(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inImplicit, modelica_metatype _performVectorization, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties, modelica_metatype *out_outAttributes)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_performVectorization);
_outCache = omc_Static_elabCrefNoEval(threadData, _inCache, _inEnv, _inComponentRef, tmp1, tmp2, _inPrefix, _info, out_outExp, out_outProperties, out_outAttributes);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabCref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_boolean _inImplicit, modelica_boolean _performVectorization, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_res)
{
modelica_metatype _outCache = NULL;
modelica_metatype _res = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_elabCref1(threadData, _inCache, _inEnv, _inComponentRef, _inImplicit, _performVectorization, _inPrefix, 1, _info ,&_res);
_return: OMC_LABEL_UNUSED
if (out_res) { *out_res = _res; }
return _outCache;
}
modelica_metatype boxptr_Static_elabCref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inComponentRef, modelica_metatype _inImplicit, modelica_metatype _performVectorization, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_res)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_performVectorization);
_outCache = omc_Static_elabCref(threadData, _inCache, _inEnv, _inComponentRef, tmp1, tmp2, _inPrefix, _info, out_res);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillSlot(threadData_t *threadData, modelica_metatype _inFuncArg, modelica_metatype _inExp, modelica_metatype _inDims, modelica_metatype _inSlotLst, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _fn)
{
modelica_metatype _outSlotLst = NULL;
modelica_metatype tmpMeta1;
modelica_string _fa1 = NULL;
modelica_string _fa2 = NULL;
modelica_string _exp_str = NULL;
modelica_string _c_str = NULL;
modelica_string _pre_str = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _prl = NULL;
modelica_metatype _binding = NULL;
modelica_boolean _filled;
modelica_integer _idx;
modelica_integer _ses;
modelica_metatype _slot = NULL;
modelica_metatype _rest_slots = NULL;
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;
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_integer tmp19;
modelica_metatype tmpMeta20;
modelica_integer tmp21;
modelica_metatype tmpMeta22;
modelica_integer tmp23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outSlotLst = tmpMeta1;
_rest_slots = _inSlotLst;
tmpMeta2 = _inFuncArg;
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 4));
_fa1 = tmpMeta3;
_ty1 = tmpMeta4;
_c1 = tmpMeta5;
while(1)
{
if(!(!listEmpty(_rest_slots))) break;
tmpMeta6 = _rest_slots;
if (listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
_slot = tmpMeta7;
_rest_slots = tmpMeta8;
tmpMeta9 = _slot;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_fa2 = tmpMeta11;
tmpMeta12 = stringAppend(_OMC_LIT154,_fa1);
if(((stringEqual(_fa1, _fa2)) || (stringEqual(tmpMeta12, _fa2))))
{
tmpMeta13 = _slot;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
tmp19 = mmc_unbox_integer(tmpMeta18);
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 6));
tmp21 = mmc_unbox_integer(tmpMeta20);
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 7));
tmp23 = mmc_unbox_integer(tmpMeta22);
_c2 = tmpMeta15;
_prl = tmpMeta16;
_binding = tmpMeta17;
_filled = tmp19;
_idx = tmp21;
_ses = tmp23;
if(_filled)
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta24 = mmc_mk_cons(_fa2, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT150, tmpMeta24, _inInfo);
}
if((!omc_Types_constEqualOrHigher(threadData, _c1, _c2)))
{
_exp_str = omc_ExpressionDump_printExpStr(threadData, _inExp);
_c_str = omc_Types_unparseConst(threadData, _c2);
tmpMeta25 = mmc_mk_cons(_fa1, mmc_mk_cons(_exp_str, mmc_mk_cons(omc_AbsynUtil_pathStringNoQual(threadData, _fn, _OMC_LIT84, 0, 0), mmc_mk_cons(omc_Types_unparseConst(threadData, _c1), mmc_mk_cons(_c_str, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT153, tmpMeta25, _inInfo);
}
tmpMeta26 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _fa2, _ty1, _c2, _prl, _binding);
tmpMeta27 = mmc_mk_box7(3, &Static_Slot_SLOT__desc, tmpMeta26, mmc_mk_boolean(1), mmc_mk_some(_inExp), _inDims, mmc_mk_integer(_idx), mmc_mk_integer(_ses));
_slot = tmpMeta27;
tmpMeta28 = mmc_mk_cons(_slot, _rest_slots);
_outSlotLst = omc_List_append__reverse(threadData, _outSlotLst, tmpMeta28);
goto _return;
}
tmpMeta29 = mmc_mk_cons(_slot, _outSlotLst);
_outSlotLst = tmpMeta29;
}
tmpMeta30 = mmc_mk_cons(_OMC_LIT7, mmc_mk_cons(_fa1, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT157, tmpMeta30, _inInfo);
_return: OMC_LABEL_UNUSED
return _outSlotLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_findNamedArgParallelism(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inArgs)
{
modelica_metatype _outParallelism = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = omc_Static_findNamedArg(threadData, _inIdent, _inArgs);
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 5));
_outParallelism = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _outParallelism;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_findNamedArgType(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inArgs)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = omc_Static_findNamedArg(threadData, _inIdent, _inArgs);
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_outType = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_findNamedArg(threadData_t *threadData, modelica_string _inIdent, modelica_metatype _inArgs)
{
modelica_metatype _outArg = NULL;
modelica_string _id = NULL;
modelica_boolean _haveMM;
modelica_string _inIdent2 = NULL;
modelica_metatype tmpMeta1;
modelica_boolean tmp2;
modelica_string tmp3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_haveMM = omc_Config_acceptMetaModelicaGrammar(threadData);
tmp2 = (modelica_boolean)_haveMM;
if(tmp2)
{
tmpMeta1 = stringAppend(_OMC_LIT154,_inIdent);
tmp3 = tmpMeta1;
}
else
{
tmp3 = _OMC_LIT7;
}
_inIdent2 = tmp3;
{
modelica_metatype _arg;
for (tmpMeta4 = _inArgs; !listEmpty(tmpMeta4); tmpMeta4=MMC_CDR(tmpMeta4))
{
_arg = MMC_CAR(tmpMeta4);
tmpMeta5 = _arg;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
_id = tmpMeta6;
if(((stringEqual(_id, _inIdent)) || (_haveMM && (stringEqual(_id, _inIdent2)))))
{
_outArg = _arg;
goto _return;
}
}
}
MMC_THROW_INTERNAL();
_return: OMC_LABEL_UNUSED
return _outArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabNamedInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inNamedArg, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_boolean _onlyOneFunction, modelica_boolean _checkTypes, modelica_boolean _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_integer _numErrors, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSlotLst = NULL;
modelica_metatype _outTypesConstLst = NULL;
modelica_metatype _outPolymorphicBindings = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_boolean tmp4_7;volatile modelica_metatype tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inNamedArg;
tmp4_4 = _inTypesFuncArgLst;
tmp4_5 = _inSlotLst;
tmp4_6 = _onlyOneFunction;
tmp4_7 = _checkTypes;
tmp4_8 = _inPolymorphicBindings;
tmp4_9 = _inPrefix;
{
modelica_metatype _e_1 = NULL;
modelica_metatype _e_2 = NULL;
modelica_metatype _t = NULL;
modelica_metatype _vt = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _pr = NULL;
modelica_metatype _slots_1 = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _env = NULL;
modelica_string _id = NULL;
modelica_metatype _e = NULL;
modelica_metatype _farg = NULL;
modelica_metatype _ct = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _ds = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _polymorphicBindings = NULL;
modelica_metatype _prop = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_string _s3 = NULL;
modelica_string _s4 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (1 != tmp4_7) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_cache = tmp4_1;
_env = tmp4_2;
_id = tmpMeta6;
_e = tmpMeta7;
_farg = tmp4_4;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
tmpMeta8 = omc_Static_findNamedArgType(threadData, _id, _farg);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,15,1) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_vt = tmpMeta8;
_ct = tmpMeta9;
_pr = omc_Static_findNamedArgParallelism(threadData, _id, _farg);
_e_1 = omc_Static_elabCodeExp(threadData, _e, _cache, _env, _ct, _info);
tmpMeta10 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _OMC_LIT52, _pr, mmc_mk_none());
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta10, _e_1, tmpMeta11, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _OMC_LIT52;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 1: {
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;
if (1 != tmp4_7) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_cache = tmp4_1;
_env = tmp4_2;
_id = tmpMeta12;
_e = tmpMeta13;
_farg = tmp4_4;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
_vt = omc_Static_findNamedArgType(threadData, _id, _farg);
_pr = omc_Static_findNamedArgParallelism(threadData, _id, _farg);
tmpMeta18 = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info, &tmpMeta14, &tmpMeta15);
_cache = tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,2) == 0) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
_e_1 = tmpMeta14;
_t = tmpMeta16;
_c1 = tmpMeta17;
_e_2 = omc_Types_matchTypePolymorphic(threadData, _e_1, _t, _vt, omc_FGraph_getGraphPathNoImplicitScope(threadData, _env), _polymorphicBindings, 0 ,NULL ,&_polymorphicBindings);
tmpMeta19 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _c1, _pr, mmc_mk_none());
tmpMeta20 = MMC_REFSTRUCTLIT(mmc_nil);
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta19, _e_2, tmpMeta20, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _c1;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 2: {
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 (1 != tmp4_7) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_cache = tmp4_1;
_env = tmp4_2;
_id = tmpMeta21;
_e = tmpMeta22;
_farg = tmp4_4;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
tmp4 += 1;
_vt = omc_Static_findNamedArgType(threadData, _id, _farg);
_pr = omc_Static_findNamedArgParallelism(threadData, _id, _farg);
tmpMeta27 = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info, &tmpMeta23, &tmpMeta24);
_cache = tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,0,2) == 0) goto goto_2;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
_e_1 = tmpMeta23;
_t = tmpMeta25;
_c1 = tmpMeta26;
_e_2 = omc_Types_vectorizableType(threadData, _e_1, _t, _vt, omc_FGraph_getGraphPathNoImplicitScope(threadData, _env) ,NULL ,&_ds ,&_polymorphicBindings);
tmpMeta28 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _c1, _pr, mmc_mk_none());
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta28, _e_2, _ds, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _c1;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
if (0 != tmp4_7) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_cache = tmp4_1;
_env = tmp4_2;
_id = tmpMeta29;
_e = tmpMeta30;
_farg = tmp4_4;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
_vt = omc_Static_findNamedArgType(threadData, _id, _farg);
_pr = omc_Static_findNamedArgParallelism(threadData, _id, _farg);
tmpMeta34 = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info, &tmpMeta31, &tmpMeta32);
_cache = tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,0,2) == 0) goto goto_2;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 3));
_e_1 = tmpMeta31;
_c1 = tmpMeta33;
tmpMeta35 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _c1, _pr, mmc_mk_none());
tmpMeta36 = MMC_REFSTRUCTLIT(mmc_nil);
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta35, _e_1, tmpMeta36, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _c1;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta37;
modelica_boolean tmp38;
modelica_metatype tmpMeta40;
modelica_boolean tmp41;
if (1 != tmp4_6) goto tmp3_end;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_cache = tmp4_1;
_id = tmpMeta37;
_farg = tmp4_4;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
tmp38 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_Static_findNamedArgType(threadData, _id, _farg);
tmp38 = 1;
goto goto_39;
goto_39:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp38) {goto goto_2;}
_s1 = omc_AbsynUtil_pathStringNoQual(threadData, _path, _OMC_LIT84, 0, 0);
tmpMeta40 = mmc_mk_cons(_s1, mmc_mk_cons(_id, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT157, tmpMeta40, _info);
tmp41 = _isGraphicsExp;
if (1 != tmp41) goto goto_2;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots;
tmpMeta[0+2] = _OMC_LIT60;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_boolean tmp44;
modelica_metatype tmpMeta45;
if (1 != tmp4_6) goto tmp3_end;
if (1 != tmp4_7) goto tmp3_end;
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta43 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_cache = tmp4_1;
_env = tmp4_2;
_id = tmpMeta42;
_e = tmpMeta43;
_farg = tmp4_4;
_pre = tmp4_9;
tmp44 = (omc_Error_getNumErrorMessages(threadData) == _numErrors);
if (1 != tmp44) goto goto_2;
_vt = omc_Static_findNamedArgType(threadData, _id, _farg);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info ,&_e_1 ,&_prop);
_s1 = omc_AbsynUtil_pathStringNoQual(threadData, _path, _OMC_LIT84, 0, 0);
_s2 = omc_ExpressionDump_printExpStr(threadData, _e_1);
_s3 = omc_Types_unparseTypeNoAttr(threadData, omc_Types_getPropType(threadData, _prop));
_s4 = omc_Types_unparseTypeNoAttr(threadData, _vt);
tmpMeta45 = mmc_mk_cons(_s1, mmc_mk_cons(_id, mmc_mk_cons(_s2, mmc_mk_cons(_s3, mmc_mk_cons(_s4, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT160, tmpMeta45, _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 < 6) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outSlotLst = tmpMeta[0+1];
_outTypesConstLst = tmpMeta[0+2];
_outPolymorphicBindings = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outSlotLst) { *out_outSlotLst = _outSlotLst; }
if (out_outTypesConstLst) { *out_outTypesConstLst = _outTypesConstLst; }
if (out_outPolymorphicBindings) { *out_outPolymorphicBindings = _outPolymorphicBindings; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabNamedInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inNamedArg, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_metatype _onlyOneFunction, modelica_metatype _checkTypes, modelica_metatype _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_metatype _numErrors, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_integer tmp5;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_onlyOneFunction);
tmp2 = mmc_unbox_integer(_checkTypes);
tmp3 = mmc_unbox_integer(_impl);
tmp4 = mmc_unbox_integer(_numErrors);
tmp5 = mmc_unbox_integer(_isGraphicsExp);
_outCache = omc_Static_elabNamedInputArg(threadData, _inCache, _inEnv, _inNamedArg, _inTypesFuncArgLst, _inSlotLst, tmp1, tmp2, tmp3, _inPolymorphicBindings, _inPrefix, _info, _path, tmp4, tmp5, out_outSlotLst, out_outTypesConstLst, out_outPolymorphicBindings);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabNamedInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_boolean _onlyOneFunction, modelica_boolean _checkTypes, modelica_boolean _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSlotLst = NULL;
modelica_metatype _outTypesConstLst = NULL;
modelica_metatype _outPolymorphicBindings = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynNamedArgLst;
tmp4_4 = _inTypesFuncArgLst;
tmp4_5 = _inSlotLst;
tmp4_6 = _inPolymorphicBindings;
{
modelica_metatype _c1 = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _clist = NULL;
modelica_metatype _env = NULL;
modelica_metatype _na = NULL;
modelica_metatype _nas = NULL;
modelica_metatype _farg = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _polymorphicBindings = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_3)) goto tmp3_end;
_cache = tmp4_1;
_slots = tmp4_5;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots;
tmpMeta[0+2] = tmpMeta6;
tmpMeta[0+3] = _inPolymorphicBindings;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_3);
tmpMeta8 = MMC_CDR(tmp4_3);
_na = tmpMeta7;
_nas = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_farg = tmp4_4;
_slots = tmp4_5;
_polymorphicBindings = tmp4_6;
_cache = omc_Static_elabNamedInputArg(threadData, _cache, _env, _na, _farg, _slots, _onlyOneFunction, _checkTypes, _impl, _polymorphicBindings, _inPrefix, _info, _path, omc_Error_getNumErrorMessages(threadData), _isGraphicsExp ,&_slots ,&_c1 ,&_polymorphicBindings);
_cache = omc_Static_elabNamedInputArgs(threadData, _cache, _env, _nas, _farg, _slots, _onlyOneFunction, _checkTypes, _impl, _polymorphicBindings, _inPrefix, _info, _path, _isGraphicsExp ,&_slots ,&_clist ,&_polymorphicBindings);
tmpMeta9 = mmc_mk_cons(_c1, _clist);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots;
tmpMeta[0+2] = tmpMeta9;
tmpMeta[0+3] = _polymorphicBindings;
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];
_outSlotLst = tmpMeta[0+1];
_outTypesConstLst = tmpMeta[0+2];
_outPolymorphicBindings = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outSlotLst) { *out_outSlotLst = _outSlotLst; }
if (out_outTypesConstLst) { *out_outTypesConstLst = _outTypesConstLst; }
if (out_outPolymorphicBindings) { *out_outPolymorphicBindings = _outPolymorphicBindings; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabNamedInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _inTypesFuncArgLst, modelica_metatype _inSlotLst, modelica_metatype _onlyOneFunction, modelica_metatype _checkTypes, modelica_metatype _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outTypesConstLst, modelica_metatype *out_outPolymorphicBindings)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_onlyOneFunction);
tmp2 = mmc_unbox_integer(_checkTypes);
tmp3 = mmc_unbox_integer(_impl);
tmp4 = mmc_unbox_integer(_isGraphicsExp);
_outCache = omc_Static_elabNamedInputArgs(threadData, _inCache, _inEnv, _inAbsynNamedArgLst, _inTypesFuncArgLst, _inSlotLst, tmp1, tmp2, tmp3, _inPolymorphicBindings, _inPrefix, _info, _path, tmp4, out_outSlotLst, out_outTypesConstLst, out_outPolymorphicBindings);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabPositionalInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _farg, modelica_integer _position, modelica_metatype _inSlotLst, modelica_boolean _onlyOneFunction, modelica_boolean _checkTypes, modelica_boolean _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outConst, modelica_metatype *out_outPolymorphicBindings)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSlotLst = NULL;
modelica_metatype _outConst = NULL;
modelica_metatype _outPolymorphicBindings = NULL;
modelica_integer _numErrors;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_numErrors = omc_Error_getNumErrorMessages(threadData);
{
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;volatile modelica_boolean tmp4_7;volatile modelica_metatype tmp4_8;volatile modelica_metatype tmp4_9;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inExp;
tmp4_4 = _farg;
tmp4_5 = _inSlotLst;
tmp4_6 = _onlyOneFunction;
tmp4_7 = _checkTypes;
tmp4_8 = _inPolymorphicBindings;
tmp4_9 = _inPrefix;
{
modelica_metatype _slots = NULL;
modelica_metatype _slots_1 = NULL;
modelica_metatype _e_1 = NULL;
modelica_metatype _e_2 = NULL;
modelica_metatype _t = NULL;
modelica_metatype _vt = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _pr = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _env = NULL;
modelica_metatype _e = NULL;
modelica_metatype _ds = NULL;
modelica_metatype _cache = NULL;
modelica_string _id = NULL;
modelica_metatype _props = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _ct = NULL;
modelica_metatype _polymorphicBindings = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_string _s3 = NULL;
modelica_string _s4 = NULL;
modelica_string _s5 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; 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 (1 != tmp4_7) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,15,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 5));
_id = tmpMeta6;
_vt = tmpMeta7;
_ct = tmpMeta8;
_pr = tmpMeta9;
_cache = tmp4_1;
_env = tmp4_2;
_e = tmp4_3;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
_e_1 = omc_Static_elabCodeExp(threadData, _e, _cache, _env, _ct, _info);
tmpMeta10 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _OMC_LIT52, _pr, mmc_mk_none());
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta10, _e_1, tmpMeta11, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _OMC_LIT52;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (1 != tmp4_7) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 5));
_cache = tmp4_1;
_env = tmp4_2;
_e = tmp4_3;
_id = tmpMeta12;
_vt = tmpMeta13;
_pr = tmpMeta14;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info ,&_e_1 ,&_props);
_t = omc_Types_getPropType(threadData, _props);
_vt = omc_Types_traverseType(threadData, _vt, mmc_mk_integer(((modelica_integer) -1)), boxvar_Types_makeExpDimensionsUnknown, NULL);
_c1 = omc_Types_propAllConst(threadData, _props);
_e_2 = omc_Types_matchTypePolymorphic(threadData, _e_1, _t, _vt, omc_FGraph_getGraphPathNoImplicitScope(threadData, _env), _polymorphicBindings, 0 ,NULL ,&_polymorphicBindings);
tmpMeta15 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _c1, _pr, mmc_mk_none());
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta15, _e_2, tmpMeta16, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _c1;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (1 != tmp4_7) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 5));
_cache = tmp4_1;
_env = tmp4_2;
_e = tmp4_3;
_id = tmpMeta17;
_vt = tmpMeta18;
_pr = tmpMeta19;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
tmp4 += 1;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info ,&_e_1 ,&_props);
_t = omc_Types_getPropType(threadData, _props);
_vt = omc_Types_traverseType(threadData, _vt, mmc_mk_integer(((modelica_integer) -1)), boxvar_Types_makeExpDimensionsUnknown, NULL);
_c1 = omc_Types_propAllConst(threadData, _props);
_e_2 = omc_Types_vectorizableType(threadData, _e_1, _t, _vt, omc_FGraph_getGraphPathNoImplicitScope(threadData, _env) ,NULL ,&_ds ,&_polymorphicBindings);
tmpMeta20 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _vt, _c1, _pr, mmc_mk_none());
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta20, _e_2, _ds, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _c1;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (0 != tmp4_7) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 5));
_cache = tmp4_1;
_env = tmp4_2;
_e = tmp4_3;
_id = tmpMeta21;
_pr = tmpMeta22;
_slots = tmp4_5;
_polymorphicBindings = tmp4_8;
_pre = tmp4_9;
tmp4 += 1;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info ,&_e_1 ,&_props);
_t = omc_Types_getPropType(threadData, _props);
_c1 = omc_Types_propAllConst(threadData, _props);
tmpMeta23 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _id, _t, _c1, _pr, mmc_mk_none());
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
_slots_1 = omc_Static_fillSlot(threadData, tmpMeta23, _e_1, tmpMeta24, _slots, _pre, _info, _path);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _slots_1;
tmpMeta[0+2] = _c1;
tmpMeta[0+3] = _polymorphicBindings;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_boolean tmp27;
modelica_metatype tmpMeta28;
if (1 != tmp4_6) goto tmp3_end;
if (1 != tmp4_7) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 2));
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_4), 3));
_cache = tmp4_1;
_env = tmp4_2;
_e = tmp4_3;
_id = tmpMeta25;
_vt = tmpMeta26;
_pre = tmp4_9;
tmp27 = (omc_Error_getNumErrorMessages(threadData) == _numErrors);
if (1 != tmp27) goto goto_2;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _e, _impl, 1, _pre, _info ,&_e_1 ,&_prop);
_s1 = intString(_position);
_s2 = omc_AbsynUtil_pathStringNoQual(threadData, _path, _OMC_LIT84, 0, 0);
_s3 = omc_ExpressionDump_printExpStr(threadData, _e_1);
_s4 = omc_Types_unparseTypeNoAttr(threadData, omc_Types_getPropType(threadData, _prop));
_s5 = omc_Types_unparseTypeNoAttr(threadData, _vt);
tmpMeta28 = mmc_mk_cons(_s1, mmc_mk_cons(_s2, mmc_mk_cons(_id, mmc_mk_cons(_s3, mmc_mk_cons(_s4, mmc_mk_cons(_s5, MMC_REFSTRUCTLIT(mmc_nil)))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT163, tmpMeta28, _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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outSlotLst = tmpMeta[0+1];
_outConst = tmpMeta[0+2];
_outPolymorphicBindings = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outSlotLst) { *out_outSlotLst = _outSlotLst; }
if (out_outConst) { *out_outConst = _outConst; }
if (out_outPolymorphicBindings) { *out_outPolymorphicBindings = _outPolymorphicBindings; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabPositionalInputArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _farg, modelica_metatype _position, modelica_metatype _inSlotLst, modelica_metatype _onlyOneFunction, modelica_metatype _checkTypes, modelica_metatype _impl, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _path, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlotLst, modelica_metatype *out_outConst, modelica_metatype *out_outPolymorphicBindings)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_integer tmp5;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_position);
tmp2 = mmc_unbox_integer(_onlyOneFunction);
tmp3 = mmc_unbox_integer(_checkTypes);
tmp4 = mmc_unbox_integer(_impl);
tmp5 = mmc_unbox_integer(_isGraphicsExp);
_outCache = omc_Static_elabPositionalInputArg(threadData, _inCache, _inEnv, _inExp, _farg, tmp1, _inSlotLst, tmp2, tmp3, tmp4, _inPolymorphicBindings, _inPrefix, _info, _path, tmp5, out_outSlotLst, out_outConst, out_outPolymorphicBindings);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabPositionalInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inFuncArgs, modelica_metatype _inSlots, modelica_boolean _inOnlyOneFunction, modelica_boolean _inCheckTypes, modelica_boolean _inImplicit, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inPath, modelica_boolean _isGraphicsExp, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSlots = NULL;
modelica_metatype _outConsts = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outPolymorphicBindings = NULL;
modelica_metatype _farg = NULL;
modelica_metatype _farg_rest = NULL;
modelica_metatype _c = NULL;
modelica_integer _position;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outSlots = _inSlots;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outConsts = tmpMeta1;
_outPolymorphicBindings = _inPolymorphicBindings;
_farg_rest = _inFuncArgs;
_position = ((modelica_integer) 1);
{
modelica_metatype _arg;
for (tmpMeta2 = _inPosArgs; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_arg = MMC_CAR(tmpMeta2);
tmpMeta3 = _farg_rest;
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
_farg = tmpMeta4;
_farg_rest = tmpMeta5;
_outCache = omc_Static_elabPositionalInputArg(threadData, _outCache, _inEnv, _arg, _farg, _position, _outSlots, _inOnlyOneFunction, _inCheckTypes, _inImplicit, _outPolymorphicBindings, _inPrefix, _inInfo, _inPath, _isGraphicsExp ,&_outSlots ,&_c ,&_outPolymorphicBindings);
_position = ((modelica_integer) 1) + _position;
tmpMeta6 = mmc_mk_cons(_c, _outConsts);
_outConsts = tmpMeta6;
}
}
_outConsts = listReverse(_outConsts);
_return: OMC_LABEL_UNUSED
if (out_outSlots) { *out_outSlots = _outSlots; }
if (out_outConsts) { *out_outConsts = _outConsts; }
if (out_outPolymorphicBindings) { *out_outPolymorphicBindings = _outPolymorphicBindings; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabPositionalInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inFuncArgs, modelica_metatype _inSlots, modelica_metatype _inOnlyOneFunction, modelica_metatype _inCheckTypes, modelica_metatype _inImplicit, modelica_metatype _inPolymorphicBindings, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inPath, modelica_metatype _isGraphicsExp, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inOnlyOneFunction);
tmp2 = mmc_unbox_integer(_inCheckTypes);
tmp3 = mmc_unbox_integer(_inImplicit);
tmp4 = mmc_unbox_integer(_isGraphicsExp);
_outCache = omc_Static_elabPositionalInputArgs(threadData, _inCache, _inEnv, _inPosArgs, _inFuncArgs, _inSlots, tmp1, tmp2, tmp3, _inPolymorphicBindings, _inPrefix, _inInfo, _inPath, tmp4, out_outSlots, out_outConsts, out_outPolymorphicBindings);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isFreeParameterExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_boolean _isFree;
modelica_metatype _outCache = NULL;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _cr = NULL;
modelica_metatype _binding = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _exps = NULL;
modelica_metatype _mat = NULL;
modelica_boolean _isFree2;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
tmp1 = 1;
goto tmp3_done;
}
case 4: {
tmp1 = 1;
goto tmp3_done;
}
case 5: {
tmp1 = 1;
goto tmp3_done;
}
case 6: {
tmp1 = 1;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta5;
modelica_boolean tmp6 = 0;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta5;
_outCache = omc_Lookup_lookupVar(threadData, _inCache, _inEnv, _cr ,NULL ,NULL ,&_binding ,NULL ,NULL ,NULL ,NULL ,NULL);
{
modelica_metatype tmp9_1;
tmp9_1 = _binding;
{
volatile mmc_switch_type tmp9;
int tmp10;
tmp9 = 0;
for (; tmp9 < 3; tmp9++) {
switch (MMC_SWITCH_CAST(tmp9)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp9_1,2,2) == 0) goto tmp8_end;
tmp6 = 1;
goto tmp8_done;
}
case 1: {
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp9_1,1,4) == 0) goto tmp8_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp9_1), 2));
_exp1 = tmpMeta11;
if (!omc_Expression_isConst(threadData, _exp1)) goto tmp8_end;
tmp6 = 1;
goto tmp8_done;
}
case 2: {
tmp6 = 0;
goto tmp8_done;
}
}
goto tmp8_end;
tmp8_end: ;
}
goto goto_7;
goto_7:;
goto goto_2;
goto tmp8_done;
tmp8_done:;
}
}tmp1 = tmp6;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta12;
_exp2 = tmpMeta13;
_isFree = omc_Static_isFreeParameterExp(threadData, _exp1, _inCache, _inEnv ,&_outCache);
_isFree2 = omc_Static_isFreeParameterExp(threadData, _exp2, _outCache, _inEnv ,&_outCache);
tmp1 = (_isFree && _isFree2);
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,2) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exp1 = tmpMeta14;
_isFree = omc_Static_isFreeParameterExp(threadData, _exp1, _inCache, _inEnv ,&_outCache);
tmp1 = _isFree;
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exp1 = tmpMeta15;
_exp2 = tmpMeta16;
_isFree = omc_Static_isFreeParameterExp(threadData, _exp1, _inCache, _inEnv ,&_outCache);
_isFree2 = omc_Static_isFreeParameterExp(threadData, _exp2, _outCache, _inEnv ,&_outCache);
tmp1 = (_isFree && _isFree2);
goto tmp3_done;
}
case 13: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,10,2) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exp1 = tmpMeta17;
_isFree = omc_Static_isFreeParameterExp(threadData, _exp1, _inCache, _inEnv ,&_outCache);
tmp1 = _isFree;
goto tmp3_done;
}
case 16: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exps = tmpMeta18;
_outCache = _inCache;
_isFree = 1;
{
modelica_metatype _exp;
for (tmpMeta19 = _exps; !listEmpty(tmpMeta19); tmpMeta19=MMC_CDR(tmpMeta19))
{
_exp = MMC_CAR(tmpMeta19);
_isFree2 = omc_Static_isFreeParameterExp(threadData, _exp, _outCache, _inEnv ,&_outCache);
_isFree = (_isFree && _isFree2);
}
}
tmp1 = _isFree;
goto tmp3_done;
}
case 19: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_exps = tmpMeta21;
_outCache = _inCache;
_isFree = 1;
{
modelica_metatype _exp;
for (tmpMeta22 = _exps; !listEmpty(tmpMeta22); tmpMeta22=MMC_CDR(tmpMeta22))
{
_exp = MMC_CAR(tmpMeta22);
_isFree2 = omc_Static_isFreeParameterExp(threadData, _exp, _outCache, _inEnv ,&_outCache);
_isFree = (_isFree && _isFree2);
}
}
tmp1 = _isFree;
goto tmp3_done;
}
case 20: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,3) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_mat = tmpMeta24;
_outCache = _inCache;
_isFree = 1;
{
modelica_metatype _row;
for (tmpMeta25 = _mat; !listEmpty(tmpMeta25); tmpMeta25=MMC_CDR(tmpMeta25))
{
_row = MMC_CAR(tmpMeta25);
{
modelica_metatype _exp;
for (tmpMeta26 = _row; !listEmpty(tmpMeta26); tmpMeta26=MMC_CDR(tmpMeta26))
{
_exp = MMC_CAR(tmpMeta26);
_isFree2 = omc_Static_isFreeParameterExp(threadData, _exp, _outCache, _inEnv ,&_outCache);
_isFree = (_isFree && _isFree2);
}
}
}
}
tmp1 = _isFree;
goto tmp3_done;
}
case 23: {
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,20,2) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_exp1 = tmpMeta29;
_isFree = omc_Static_isFreeParameterExp(threadData, _exp1, _inCache, _inEnv ,&_outCache);
tmp1 = _isFree;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_isFree = tmp1;
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _isFree;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isFreeParameterExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_boolean _isFree;
modelica_metatype out_isFree;
_isFree = omc_Static_isFreeParameterExp(threadData, _inExp, _inCache, _inEnv, out_outCache);
out_isFree = mmc_mk_icon(_isFree);
return out_isFree;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_Static_printSlotsStr(threadData_t *threadData, modelica_metatype _inSlots)
{
modelica_string _outString = NULL;
modelica_string tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inSlots;
{
modelica_boolean _filled;
modelica_string _farg_str = NULL;
modelica_string _filledStr = NULL;
modelica_string _str = NULL;
modelica_string _s = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _str_lst = NULL;
modelica_metatype _farg = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ds = NULL;
modelica_metatype _xs = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmp10 = mmc_unbox_integer(tmpMeta9);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
_farg = tmpMeta8;
_filled = tmp10;
_exp = tmpMeta11;
_ds = tmpMeta12;
_xs = tmpMeta7;
_farg_str = omc_Types_printFargStr(threadData, _farg);
_filledStr = (_filled?_OMC_LIT164:_OMC_LIT165);
_str = omc_Dump_getOptionStr(threadData, _exp, boxvar_ExpressionDump_printExpStr);
_str_lst = omc_List_map(threadData, _ds, boxvar_ExpressionDump_dimensionString);
_s = stringDelimitList(_str_lst, _OMC_LIT166);
tmpMeta13 = mmc_mk_cons(_OMC_LIT167, mmc_mk_cons(_farg_str, mmc_mk_cons(_OMC_LIT166, mmc_mk_cons(_filledStr, mmc_mk_cons(_OMC_LIT166, mmc_mk_cons(_str, mmc_mk_cons(_OMC_LIT168, mmc_mk_cons(_s, mmc_mk_cons(_OMC_LIT169, MMC_REFSTRUCTLIT(mmc_nil))))))))));
_s1 = stringAppendList(tmpMeta13);
_s2 = omc_Static_printSlotsStr(threadData, _xs);
tmpMeta14 = stringAppend(_s1,_s2);
tmp1 = tmpMeta14;
goto tmp3_done;
}
case 1: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp1 = _OMC_LIT7;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outString = tmp1;
_return: OMC_LABEL_UNUSED
return _outString;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillGraphicsDefaultSlots(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inSlots, modelica_metatype _inClass, modelica_metatype _inEnv, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outSlots = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outConsts = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _outPolymorphicBindings = NULL;
modelica_metatype tmpMeta3;
modelica_boolean _filled;
modelica_metatype _e = NULL;
modelica_metatype _exp = NULL;
modelica_string _id = NULL;
modelica_metatype _defarg = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outSlots = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outConsts = tmpMeta2;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
_outPolymorphicBindings = tmpMeta3;
{
modelica_metatype _slot;
for (tmpMeta4 = _inSlots; !listEmpty(tmpMeta4); tmpMeta4=MMC_CDR(tmpMeta4))
{
_slot = MMC_CAR(tmpMeta4);
tmpMeta5 = _slot;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
tmp7 = mmc_unbox_integer(tmpMeta6);
_filled = tmp7;
if((!_filled))
{
{
volatile modelica_metatype tmp11_1;
tmp11_1 = _slot;
{
volatile mmc_switch_type tmp11;
int tmp12;
tmp11 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp10_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp11 < 2; 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_boolean tmp23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 2));
_defarg = tmpMeta13;
tmpMeta14 = omc_SCodeUtil_getElementNamed(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_defarg), 2))), _inClass);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,3,8) == 0) goto goto_9;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,5) == 0) goto goto_9;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
if (optionNone(tmpMeta16)) goto goto_9;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 1));
_e = tmpMeta17;
tmpMeta22 = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta18, &tmpMeta19);
_outCache = tmpMeta22;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,2) == 0) goto goto_9;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 3));
_exp = tmpMeta18;
_ty = tmpMeta20;
_c = tmpMeta21;
_exp = omc_Types_matchTypePolymorphic(threadData, _exp, _ty, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_defarg), 3))), omc_FGraph_getGraphPathNoImplicitScope(threadData, _inEnv), _outPolymorphicBindings, 0 ,NULL ,&_outPolymorphicBindings);
tmp23 = omc_Types_constEqualOrHigher(threadData, _c, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_defarg), 4))));
if (1 != tmp23) goto goto_9;
tmpMeta24 = mmc_mk_cons(_c, _outConsts);
_outConsts = tmpMeta24;
tmpMeta25 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta25), MMC_UNTAGPTR(_slot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta25))[3] = mmc_mk_boolean(1);
_slot = tmpMeta25;
tmpMeta26 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta26), MMC_UNTAGPTR(_slot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta26))[4] = mmc_mk_some(_exp);
_slot = tmpMeta26;
tmpMeta8 = _slot;
goto tmp10_done;
}
case 1: {
tmpMeta8 = _slot;
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 < 2) {
goto tmp10_top;
}
MMC_THROW_INTERNAL();
tmp10_done2:;
}
}
_slot = tmpMeta8;
}
tmpMeta27 = mmc_mk_cons(_slot, _outSlots);
_outSlots = tmpMeta27;
}
}
_outSlots = listReverse(_outSlots);
_outConsts = listReverse(_outConsts);
_return: OMC_LABEL_UNUSED
if (out_outSlots) { *out_outSlots = _outSlots; }
if (out_outConsts) { *out_outConsts = _outConsts; }
if (out_outPolymorphicBindings) { *out_outPolymorphicBindings = _outPolymorphicBindings; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_fillGraphicsDefaultSlots(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inSlots, modelica_metatype _inClass, modelica_metatype _inEnv, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_fillGraphicsDefaultSlots(threadData, _inCache, _inSlots, _inClass, _inEnv, tmp1, _inPrefix, _inInfo, out_outSlots, out_outConsts, out_outPolymorphicBindings);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_slotArg(threadData_t *threadData, modelica_metatype _inSlot)
{
modelica_metatype _outArg = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inSlot;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
if (optionNone(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
_outArg = tmpMeta3;
_return: OMC_LABEL_UNUSED
return _outArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_slotListArgs(threadData_t *threadData, modelica_metatype _inSlots)
{
modelica_metatype _outArgs = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outArgs = omc_List_filterMap(threadData, _inSlots, boxvar_Static_slotArg);
_return: OMC_LABEL_UNUSED
return _outArgs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_complexTypeFromSlots(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _complexClassType)
{
modelica_metatype _outType = NULL;
modelica_string _id = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _vars = 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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_vars = tmpMeta1;
{
modelica_metatype _slot;
for (tmpMeta2 = _inSlots; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_slot = MMC_CAR(tmpMeta2);
tmpMeta3 = _slot;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 3));
_id = tmpMeta5;
_ty = tmpMeta6;
tmpMeta7 = mmc_mk_cons(omc_Expression_makeVar(threadData, _id, omc_Types_simplifyType(threadData, _ty)), _vars);
_vars = tmpMeta7;
}
}
_vars = listReverse(_vars);
tmpMeta9 = mmc_mk_box4(12, &DAE_Type_T__COMPLEX__desc, _complexClassType, _vars, mmc_mk_none());
_outType = tmpMeta9;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_funcArgFromSlot(threadData_t *threadData, modelica_metatype _inSlot)
{
modelica_metatype _outFuncArg = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inSlot;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_outFuncArg = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _outFuncArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_funcArgsFromSlots(threadData_t *threadData, modelica_metatype _inSlots)
{
modelica_metatype _outFuncArgs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar23;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar22;
modelica_integer tmp4;
modelica_metatype _slot_loopVar = 0;
modelica_metatype _slot;
_slot_loopVar = _inSlots;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar23 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar23;
while(1) {
tmp4 = 1;
if (!listEmpty(_slot_loopVar)) {
_slot = MMC_CAR(_slot_loopVar);
_slot_loopVar = MMC_CDR(_slot_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar22 = omc_Static_funcArgFromSlot(threadData, _slot);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar22,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar23;
}
_outFuncArgs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outFuncArgs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeEmptySlot(threadData_t *threadData, modelica_metatype _inArg, modelica_integer _inIndex, modelica_integer *out_outIndex)
{
modelica_metatype _outSlot = NULL;
modelica_integer _outIndex;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta2 = mmc_mk_box7(3, &Static_Slot_SLOT__desc, _inArg, mmc_mk_boolean(0), mmc_mk_none(), tmpMeta1, mmc_mk_integer(_inIndex), mmc_mk_integer(((modelica_integer) 0)));
_outSlot = tmpMeta2;
_outIndex = ((modelica_integer) 1) + _inIndex;
_return: OMC_LABEL_UNUSED
if (out_outIndex) { *out_outIndex = _outIndex; }
return _outSlot;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_makeEmptySlot(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inIndex, modelica_metatype *out_outIndex)
{
modelica_integer tmp1;
modelica_integer _outIndex;
modelica_metatype _outSlot = NULL;
tmp1 = mmc_unbox_integer(_inIndex);
_outSlot = omc_Static_makeEmptySlot(threadData, _inArg, tmp1, &_outIndex);
if (out_outIndex) { *out_outIndex = mmc_mk_icon(_outIndex); }
return _outSlot;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeEmptySlots(threadData_t *threadData, modelica_metatype _inArgs)
{
modelica_metatype _outSlots = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outSlots = omc_List_mapFold(threadData, _inArgs, boxvar_Static_makeEmptySlot, mmc_mk_integer(((modelica_integer) 1)), NULL);
_return: OMC_LABEL_UNUSED
return _outSlots;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inSlots, modelica_boolean _inOnlyOneFunction, modelica_boolean _inCheckTypes, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inFuncType, modelica_metatype _inPath, modelica_boolean _isGraphicsExp, modelica_metatype *out_outExps, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExps = NULL;
modelica_metatype _outSlots = NULL;
modelica_metatype _outConsts = NULL;
modelica_metatype _outPolymorphicBindings = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _fargs = NULL;
modelica_metatype _consts1 = NULL;
modelica_metatype _consts2 = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outSlots = _inSlots;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outPolymorphicBindings = tmpMeta1;
if((listEmpty(_inPosArgs) && listEmpty(_inNamedArgs)))
{
_outConsts = _OMC_LIT170;
}
else
{
_fargs = omc_Static_funcArgsFromSlots(threadData, _inSlots);
_outCache = omc_Static_elabPositionalInputArgs(threadData, _outCache, _inEnv, _inPosArgs, _fargs, _outSlots, _inOnlyOneFunction, _inCheckTypes, _inImplicit, _outPolymorphicBindings, _inPrefix, _inInfo, _inPath, _isGraphicsExp ,&_outSlots ,&_consts1 ,&_outPolymorphicBindings);
_outCache = omc_Static_elabNamedInputArgs(threadData, _outCache, _inEnv, _inNamedArgs, _fargs, _outSlots, _inOnlyOneFunction, _inCheckTypes, _inImplicit, _outPolymorphicBindings, _inPrefix, _inInfo, _inPath, _isGraphicsExp ,&_outSlots ,&_consts2 ,&_outPolymorphicBindings);
_outConsts = listAppend(_consts1, _consts2);
}
_outCache = omc_Static_evaluateStructuralSlots(threadData, _outCache, _inEnv, _outSlots, _inFuncType ,&_outSlots);
_outExps = omc_Static_slotListArgs(threadData, _outSlots);
_return: OMC_LABEL_UNUSED
if (out_outExps) { *out_outExps = _outExps; }
if (out_outSlots) { *out_outSlots = _outSlots; }
if (out_outConsts) { *out_outConsts = _outConsts; }
if (out_outPolymorphicBindings) { *out_outPolymorphicBindings = _outPolymorphicBindings; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabInputArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inSlots, modelica_metatype _inOnlyOneFunction, modelica_metatype _inCheckTypes, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inFuncType, modelica_metatype _inPath, modelica_metatype _isGraphicsExp, modelica_metatype *out_outExps, modelica_metatype *out_outSlots, modelica_metatype *out_outConsts, modelica_metatype *out_outPolymorphicBindings)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inOnlyOneFunction);
tmp2 = mmc_unbox_integer(_inCheckTypes);
tmp3 = mmc_unbox_integer(_inImplicit);
tmp4 = mmc_unbox_integer(_isGraphicsExp);
_outCache = omc_Static_elabInputArgs(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _inSlots, tmp1, tmp2, tmp3, _inPrefix, _inInfo, _inFuncType, _inPath, tmp4, out_outExps, out_outSlots, out_outConsts, out_outPolymorphicBindings);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getTypes(threadData_t *threadData, modelica_metatype _farg)
{
modelica_metatype _outTypes = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar25;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar24;
modelica_integer tmp4;
modelica_metatype _arg_loopVar = 0;
modelica_metatype _arg;
_arg_loopVar = _farg;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar25 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar25;
while(1) {
tmp4 = 1;
if (!listEmpty(_arg_loopVar)) {
_arg = MMC_CAR(_arg_loopVar);
_arg_loopVar = MMC_CDR(_arg_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar24 = omc_Types_funcArgType(threadData, _arg);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar24,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar25;
}
_outTypes = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTypes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_splitProps(threadData_t *threadData, modelica_metatype _inProperties, modelica_metatype *out_outConsts)
{
modelica_metatype _outTypes = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outConsts = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _tc = NULL;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outTypes = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outConsts = tmpMeta2;
{
modelica_metatype _prop;
for (tmpMeta3 = listReverse(_inProperties); !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_prop = MMC_CAR(tmpMeta3);
{
modelica_metatype tmp7_1;
tmp7_1 = _prop;
{
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,0,2) == 0) goto tmp6_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 3));
_ty = tmpMeta9;
_c = tmpMeta10;
tmpMeta11 = mmc_mk_box2(3, &DAE_TupleConst_SINGLE__CONST__desc, _c);
tmpMeta4 = tmpMeta11;
goto tmp6_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,1,2) == 0) goto tmp6_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp7_1), 3));
_ty = tmpMeta12;
_tc = tmpMeta13;
tmpMeta4 = _tc;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
_tc = tmpMeta4;
tmpMeta14 = mmc_mk_cons(_ty, _outTypes);
_outTypes = tmpMeta14;
tmpMeta15 = mmc_mk_cons(_tc, _outConsts);
_outConsts = tmpMeta15;
}
}
_return: OMC_LABEL_UNUSED
if (out_outConsts) { *out_outConsts = _outConsts; }
return _outTypes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkConst(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _c)
{
modelica_metatype _outTupleConst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
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,14,2) == 0) goto tmp3_end;
omc_Error_addInternalError(threadData, _OMC_LIT171, _OMC_LIT173);
goto goto_2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
tmpMeta6 = mmc_mk_box2(3, &DAE_TupleConst_SINGLE__CONST__desc, _c);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outTupleConst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTupleConst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkConsts(threadData_t *threadData, modelica_metatype _inTypes, modelica_metatype _inConst)
{
modelica_metatype _outTupleConsts = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar27;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar26;
modelica_integer tmp4;
modelica_metatype _ty_loopVar = 0;
modelica_metatype _ty;
_ty_loopVar = _inTypes;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar27 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar27;
while(1) {
tmp4 = 1;
if (!listEmpty(_ty_loopVar)) {
_ty = MMC_CAR(_ty_loopVar);
_ty_loopVar = MMC_CDR(_ty_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar26 = omc_Static_checkConst(threadData, _ty, _inConst);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar26,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar27;
}
_outTupleConsts = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTupleConsts;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabConsts(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inConst)
{
modelica_metatype _outTupleConst = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inType;
tmp4_2 = _inConst;
{
modelica_metatype _consts = NULL;
modelica_metatype _tys = NULL;
modelica_metatype _c = NULL;
modelica_metatype _ty = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,14,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_tys = tmpMeta6;
_c = tmp4_2;
_consts = omc_Static_checkConsts(threadData, _tys, _c);
tmpMeta7 = mmc_mk_box2(4, &DAE_TupleConst_TUPLE__CONST__desc, _consts);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
_ty = tmp4_1;
_c = tmp4_2;
tmpMeta8 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
_consts = omc_Static_checkConsts(threadData, tmpMeta8, _c);
tmpMeta9 = mmc_mk_box2(4, &DAE_TupleConst_TUPLE__CONST__desc, _consts);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outTupleConst = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTupleConst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getProperties(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inTupleConst)
{
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inType;
tmp4_2 = _inTupleConst;
{
modelica_metatype _tt = NULL;
modelica_metatype _t = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _const = NULL;
modelica_metatype _b = NULL;
modelica_string _tystr = NULL;
modelica_string _conststr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,14,2) == 0) goto tmp3_end;
_tt = tmp4_1;
_const = tmp4_2;
tmpMeta6 = mmc_mk_box3(4, &DAE_Properties_PROP__TUPLE__desc, _tt, _const);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_b = tmpMeta10;
_t = tmp4_1;
tmpMeta11 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _b);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_b = tmpMeta15;
_t = tmp4_1;
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _b);
tmpMeta1 = tmpMeta16;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_b = tmpMeta17;
_t = tmp4_1;
tmpMeta18 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _b);
tmpMeta1 = tmpMeta18;
goto tmp3_done;
}
case 4: {
modelica_boolean tmp19;
_ty = tmp4_1;
_const = tmp4_2;
tmp19 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp19) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT174);
_tystr = omc_Types_unparseType(threadData, _ty);
_conststr = omc_Types_printTupleConstStr(threadData, _const);
omc_Debug_trace(threadData, _tystr);
omc_Debug_trace(threadData, _OMC_LIT166);
omc_Debug_traceln(threadData, _conststr);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outProperties = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outProperties;
}
PROTECTED_FUNCTION_STATIC void omc_Static_sameArraydimLst(threadData_t *threadData, modelica_metatype _inDims1, modelica_string _name1, modelica_metatype _exp1, modelica_metatype _inDims2, modelica_string _name2, modelica_metatype _exp2, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;volatile modelica_metatype tmp3_2;
tmp3_1 = _inDims2;
tmp3_2 = _inDims2;
{
modelica_integer _i1;
modelica_integer _i2;
modelica_metatype _ads1 = NULL;
modelica_metatype _ads2 = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _ad1 = NULL;
modelica_metatype _ad2 = NULL;
modelica_string _str1 = NULL;
modelica_string _str2 = NULL;
modelica_string _str3 = NULL;
modelica_string _str4 = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 5; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_boolean tmp13;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_CAR(tmp3_1);
tmpMeta6 = MMC_CDR(tmp3_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,1) == 0) goto tmp2_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
if (listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta9 = MMC_CAR(tmp3_2);
tmpMeta10 = MMC_CDR(tmp3_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto tmp2_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp12 = mmc_unbox_integer(tmpMeta11);
_i1 = tmp8;
_ads1 = tmpMeta6;
_i2 = tmp12;
_ads2 = tmpMeta10;
tmp3 += 3;
tmp13 = (_i1 == _i2);
if (1 != tmp13) goto goto_1;
omc_Static_sameArraydimLst(threadData, _ads1, _name1, _exp1, _ads2, _name2, _exp2, _info);
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta14 = MMC_CAR(tmp3_1);
tmpMeta15 = MMC_CDR(tmp3_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,4,0) == 0) goto tmp2_end;
if (listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta16 = MMC_CAR(tmp3_2);
tmpMeta17 = MMC_CDR(tmp3_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,4,0) == 0) goto tmp2_end;
_ads1 = tmpMeta15;
_ads2 = tmpMeta17;
tmp3 += 2;
omc_Static_sameArraydimLst(threadData, _ads1, _name1, _exp1, _ads2, _name2, _exp2, _info);
goto tmp2_done;
}
case 2: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_boolean tmp24;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta18 = MMC_CAR(tmp3_1);
tmpMeta19 = MMC_CDR(tmp3_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,3,1) == 0) goto tmp2_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
if (listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta21 = MMC_CAR(tmp3_2);
tmpMeta22 = MMC_CDR(tmp3_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,3,1) == 0) goto tmp2_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
_e1 = tmpMeta20;
_ads1 = tmpMeta19;
_e2 = tmpMeta23;
_ads2 = tmpMeta22;
tmp3 += 1;
tmp24 = omc_Expression_expEqual(threadData, _e1, _e2);
if (1 != tmp24) goto goto_1;
omc_Static_sameArraydimLst(threadData, _ads1, _name1, _exp1, _ads2, _name2, _exp2, _info);
goto tmp2_done;
}
case 3: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
if (!listEmpty(tmp3_2)) goto tmp2_end;
tmp3 += 1;
goto tmp2_done;
}
case 4: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta25 = MMC_CAR(tmp3_1);
tmpMeta26 = MMC_CDR(tmp3_1);
if (listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta27 = MMC_CAR(tmp3_2);
tmpMeta28 = MMC_CDR(tmp3_2);
_ad1 = tmpMeta25;
_ad2 = tmpMeta27;
_str1 = omc_ExpressionDump_printExpStr(threadData, _exp1);
_str2 = omc_ExpressionDump_printExpStr(threadData, _exp2);
_str3 = omc_ExpressionDump_dimensionString(threadData, _ad1);
_str4 = omc_ExpressionDump_dimensionString(threadData, _ad2);
tmpMeta29 = mmc_mk_cons(_name1, mmc_mk_cons(_str1, mmc_mk_cons(_name2, mmc_mk_cons(_str2, mmc_mk_cons(_str3, mmc_mk_cons(_str4, MMC_REFSTRUCTLIT(mmc_nil)))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT177, tmpMeta29, _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 < 5) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Static_sameSlotsVectorizable(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inDims, modelica_string _name, modelica_metatype _exp, modelica_metatype _info)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inSlots;
{
modelica_metatype _slot_ad = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _exp2 = NULL;
modelica_string _name2 = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
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;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta5 = MMC_CAR(tmp3_1);
tmpMeta6 = MMC_CDR(tmp3_1);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 4));
if (optionNone(tmpMeta9)) goto tmp2_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 1));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 5));
if (listEmpty(tmpMeta11)) goto tmp2_end;
tmpMeta12 = MMC_CAR(tmpMeta11);
tmpMeta13 = MMC_CDR(tmpMeta11);
_name2 = tmpMeta8;
_exp2 = tmpMeta10;
_slot_ad = tmpMeta11;
_rest = tmpMeta6;
omc_Static_sameArraydimLst(threadData, _inDims, _name, _exp, _slot_ad, _name2, _exp2, _info);
_inSlots = _rest;
goto _tailrecursive;
;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta14 = MMC_CAR(tmp3_1);
tmpMeta15 = MMC_CDR(tmp3_1);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 5));
if (!listEmpty(tmpMeta16)) goto tmp2_end;
_rest = tmpMeta15;
_inSlots = _rest;
goto _tailrecursive;
;
goto tmp2_done;
}
case 2: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
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_Static_slotsVectorizable(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _info)
{
modelica_metatype _outDims = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inSlots;
{
modelica_metatype _ad = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _exp = NULL;
modelica_string _name = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
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;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
_name = tmpMeta10;
_exp = tmpMeta12;
_ad = tmpMeta13;
_rest = tmpMeta8;
tmp4 += 1;
omc_Static_sameSlotsVectorizable(threadData, _rest, _ad, _name, _exp, _info);
tmpMeta1 = _ad;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_1);
tmpMeta17 = MMC_CDR(tmp4_1);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 5));
if (!listEmpty(tmpMeta18)) goto tmp3_end;
_rest = tmpMeta17;
tmpMeta1 = omc_Static_slotsVectorizable(threadData, _rest, _info);
goto tmp3_done;
}
case 3: {
modelica_boolean tmp19;
tmp19 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp19) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT178);
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:;
}
}
_outDims = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDims;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createActualFunctype(threadData_t *threadData, modelica_metatype _tp, modelica_metatype _slots, modelica_boolean _checkTypes)
{
modelica_metatype _outTp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outTp = _tp;
{
modelica_metatype tmp4_1;modelica_boolean tmp4_2;
tmp4_1 = _outTp;
tmp4_2 = _checkTypes;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (1 != tmp4_2) goto tmp3_end;
tmpMeta1 = _tp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(6));
memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_outTp), 6*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[2] = omc_Static_funcArgsFromSlots(threadData, _slots);
_outTp = tmpMeta6;
tmpMeta1 = _outTp;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outTp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outTp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_createActualFunctype(threadData_t *threadData, modelica_metatype _tp, modelica_metatype _slots, modelica_metatype _checkTypes)
{
modelica_integer tmp1;
modelica_metatype _outTp = NULL;
tmp1 = mmc_unbox_integer(_checkTypes);
_outTp = omc_Static_createActualFunctype(threadData, _tp, _slots, tmp1);
return _outTp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateFuncArgTypeDims(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inEnv, modelica_metatype _inCache)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
modelica_metatype _ty = NULL;
modelica_integer _n;
modelica_metatype _dim = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_ty = tmpMeta6;
_dim = tmpMeta8;
omc_Ceval_cevalDimension(threadData, _inCache, _inEnv, _dim, 0, _OMC_LIT54, ((modelica_integer) 0), &tmpMeta10);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,1) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmp12 = mmc_unbox_integer(tmpMeta11);
_n = tmp12;
_ty = omc_Static_evaluateFuncArgTypeDims(threadData, _ty, _inEnv, _inCache);
tmpMeta14 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_n));
tmpMeta13 = mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta15 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta13);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
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;
_ty = tmpMeta16;
_dim = tmpMeta18;
tmp4 += 1;
_ty = omc_Static_evaluateFuncArgTypeDims(threadData, _ty, _inEnv, _inCache);
tmpMeta20 = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta21 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta20);
tmpMeta1 = tmpMeta21;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta22;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,14,2) == 0) goto tmp3_end;
_ty = tmp4_1;
tmpMeta22 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta22), MMC_UNTAGPTR(_ty), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta22))[2] = omc_List_map2(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2))), boxvar_Static_evaluateFuncArgTypeDims, _inEnv, _inCache);
_ty = tmpMeta22;
tmpMeta1 = _ty;
goto tmp3_done;
}
case 3: {
tmpMeta1 = _inType;
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:;
}
}
_outType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateFuncParamDimAndMatchTypes(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inParam, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo)
{
modelica_metatype _outParam = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inSlot;
tmp4_2 = _inParam;
{
modelica_metatype _pty = NULL;
modelica_metatype _sty = NULL;
modelica_metatype _dims1 = NULL;
modelica_metatype _dims2 = NULL;
modelica_metatype _vdims = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,15,1) == 0) goto tmp3_end;
tmpMeta1 = _inParam;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,16,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_sty = tmpMeta9;
_vdims = tmpMeta10;
tmpMeta11 = _inParam;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_pty = tmpMeta12;
_pty = omc_Static_evaluateFuncArgTypeDims(threadData, _pty, _inEnv, _inCache);
_dims1 = omc_Types_getDimensions(threadData, _pty);
_dims1 = listAppend(_vdims, _dims1);
_dims2 = omc_Types_getDimensions(threadData, _sty);
tmp13 = omc_Expression_dimsEqual(threadData, _dims1, _dims2);
if (1 != tmp13) goto goto_2;
tmpMeta1 = omc_Types_setFuncArgType(threadData, _inParam, _pty);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_boolean tmp20;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta14)) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,17,3) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_sty = tmpMeta16;
_vdims = tmpMeta17;
tmpMeta18 = _inParam;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 3));
_pty = tmpMeta19;
_pty = omc_Static_evaluateFuncArgTypeDims(threadData, _pty, _inEnv, _inCache);
_dims1 = omc_Types_getDimensions(threadData, _pty);
_vdims = listAppend(_dims1, _vdims);
_dims2 = omc_Types_getDimensions(threadData, _sty);
tmp20 = omc_Expression_dimsEqual(threadData, _vdims, _dims2);
if (1 != tmp20) goto goto_2;
tmpMeta1 = omc_Types_setFuncArgType(threadData, _inParam, _pty);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
tmpMeta21 = _inParam;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
_pty = tmpMeta22;
_pty = omc_Static_evaluateFuncArgTypeDims(threadData, _pty, _inEnv, _inCache);
tmpMeta1 = omc_Types_setFuncArgType(threadData, _inParam, _pty);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outParam = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outParam;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeDummyFuncEnv(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inVars, modelica_metatype _inDummyVar)
{
modelica_metatype _outEnv = NULL;
modelica_metatype _dummy_var = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outEnv = _inEnv;
{
modelica_metatype _var;
for (tmpMeta1 = _inVars; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_var = MMC_CAR(tmpMeta1);
_dummy_var = omc_SCodeUtil_setComponentName(threadData, _inDummyVar, omc_DAEUtil_typeVarIdent(threadData, _var));
_outEnv = omc_FGraph_mkComponentNode(threadData, _outEnv, _var, _dummy_var, _OMC_LIT179, _OMC_LIT180, omc_FGraph_empty(threadData));
}
}
_return: OMC_LABEL_UNUSED
return _outEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateStructuralSlots(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSlots, modelica_metatype _funcType, modelica_metatype *out_slots)
{
modelica_metatype _cache = NULL;
modelica_metatype _slots = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _funcType;
{
modelica_metatype _tys = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _used_args = NULL;
modelica_metatype _funcArg = NULL;
modelica_metatype _funcResultType = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,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));
_funcArg = tmpMeta6;
_funcResultType = tmpMeta7;
{
modelica_metatype __omcQ_24tmpVar29;
modelica_metatype* tmp9;
modelica_metatype tmpMeta10;
modelica_metatype __omcQ_24tmpVar28;
modelica_integer tmp11;
modelica_metatype _arg_loopVar = 0;
modelica_metatype _arg;
_arg_loopVar = _funcArg;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar29 = tmpMeta10;
tmp9 = &__omcQ_24tmpVar29;
while(1) {
tmp11 = 1;
if (!listEmpty(_arg_loopVar)) {
_arg = MMC_CAR(_arg_loopVar);
_arg_loopVar = MMC_CDR(_arg_loopVar);
tmp11--;
}
if (tmp11 == 0) {
__omcQ_24tmpVar28 = omc_Types_funcArgType(threadData, _arg);
*tmp9 = mmc_mk_cons(__omcQ_24tmpVar28,0);
tmp9 = &MMC_CDR(*tmp9);
} else if (tmp11 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp9 = mmc_mk_nil();
tmpMeta8 = __omcQ_24tmpVar29;
}
_tys = tmpMeta8;
_dims = omc_Static_getAllOutputDimensions(threadData, _funcResultType);
_dims = listAppend(omc_List_mapFlat(threadData, _tys, boxvar_Types_getDimensions), _dims);
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
_used_args = omc_Static_extractNamesFromDims(threadData, _dims, tmpMeta12);
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = omc_Static_evaluateStructuralSlots2(threadData, _inCache, _inEnv, _inSlots, _used_args, tmpMeta13, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inSlots;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_cache = tmpMeta[0+0];
_slots = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_slots) { *out_slots = _slots; }
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateStructuralSlots2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inSlots, modelica_metatype _usedSlots, modelica_metatype _acc, modelica_metatype *out_slots)
{
modelica_metatype _cache = NULL;
modelica_metatype _slots = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inSlots;
{
modelica_metatype _exp = NULL;
modelica_metatype _slot = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _defaultArg = NULL;
modelica_metatype _dims = NULL;
modelica_integer _idx;
modelica_metatype _val = NULL;
modelica_integer _ses;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 3;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = listReverse(_acc);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
_slot = tmpMeta6;
_rest = tmpMeta7;
tmp8 = omc_Static_isSlotUsed(threadData, _slot, _usedSlots);
if (0 != tmp8) goto goto_2;
tmpMeta9 = mmc_mk_cons(_slot, _acc);
tmpMeta[0+0] = omc_Static_evaluateStructuralSlots2(threadData, _inCache, _inEnv, _rest, _usedSlots, tmpMeta9, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
modelica_metatype tmpMeta18;
modelica_integer tmp19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
if (optionNone(tmpMeta13)) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 1));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 5));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 6));
tmp17 = mmc_unbox_integer(tmpMeta16);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 7));
tmp19 = mmc_unbox_integer(tmpMeta18);
_defaultArg = tmpMeta12;
_exp = tmpMeta14;
_dims = tmpMeta15;
_idx = tmp17;
_ses = tmp19;
_rest = tmpMeta11;
_cache = omc_Ceval_ceval(threadData, _inCache, _inEnv, _exp, 0, _OMC_LIT54, ((modelica_integer) 0) ,&_val);
_exp = omc_ValuesUtil_valueExp(threadData, _val, mmc_mk_some(_exp));
tmpMeta20 = mmc_mk_box7(3, &Static_Slot_SLOT__desc, _defaultArg, mmc_mk_boolean(1), mmc_mk_some(_exp), _dims, mmc_mk_integer(_idx), mmc_mk_integer(_ses));
_slot = tmpMeta20;
tmpMeta21 = mmc_mk_cons(_slot, _acc);
tmpMeta[0+0] = omc_Static_evaluateStructuralSlots2(threadData, _cache, _inEnv, _rest, _usedSlots, tmpMeta21, &tmpMeta[0+1]);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_1);
tmpMeta23 = MMC_CDR(tmp4_1);
_slot = tmpMeta22;
_rest = tmpMeta23;
tmpMeta24 = mmc_mk_cons(_slot, _acc);
tmpMeta[0+0] = omc_Static_evaluateStructuralSlots2(threadData, _inCache, _inEnv, _rest, _usedSlots, tmpMeta24, &tmpMeta[0+1]);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_cache = tmpMeta[0+0];
_slots = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_slots) { *out_slots = _slots; }
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeVarFromSlot(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inEnv, modelica_metatype _inCache)
{
modelica_metatype _outVar = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inSlot;
{
modelica_string _name = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _binding = NULL;
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_boolean tmp11;
modelica_boolean tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
_name = tmpMeta7;
_exp = tmpMeta9;
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
tmp11 = omc_Expression_expHasCref(threadData, _exp, omc_ComponentReference_makeCrefIdent(threadData, _name, _OMC_LIT42, tmpMeta10));
if (0 != tmp11) goto goto_2;
_ty = omc_Expression_typeof(threadData, _exp);
tmp12 = omc_Types_dimensionsKnown(threadData, _ty);
if (1 != tmp12) goto goto_2;
tmpMeta13 = mmc_mk_box5(4, &DAE_Binding_EQBOUND__desc, _exp, mmc_mk_none(), _OMC_LIT60, _OMC_LIT95);
_binding = tmpMeta13;
tmpMeta14 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _name, _OMC_LIT181, _ty, _binding, mmc_mk_boolean(0), mmc_mk_none());
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta17)) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 1));
_name = tmpMeta16;
_exp = tmpMeta18;
omc_Ceval_ceval(threadData, _inCache, _inEnv, _exp, 0, _OMC_LIT54, ((modelica_integer) 0) ,&_val);
_exp = omc_ValuesUtil_valueExp(threadData, _val, mmc_mk_some(_exp));
_ty = omc_Expression_typeof(threadData, _exp);
tmpMeta19 = mmc_mk_box5(4, &DAE_Binding_EQBOUND__desc, _exp, mmc_mk_some(_val), _OMC_LIT60, _OMC_LIT95);
_binding = tmpMeta19;
tmpMeta20 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _name, _OMC_LIT181, _ty, _binding, mmc_mk_boolean(0), mmc_mk_none());
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
_name = tmpMeta22;
_ty = tmpMeta23;
tmpMeta24 = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _name, _OMC_LIT181, _ty, _OMC_LIT182, mmc_mk_boolean(0), mmc_mk_none());
tmpMeta1 = tmpMeta24;
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:;
}
}
_outVar = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outVar;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isSlotUsed(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inUsedNames)
{
modelica_boolean _outIsUsed;
modelica_string _slot_name = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inSlot;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
_slot_name = tmpMeta3;
_outIsUsed = omc_List_isMemberOnTrue(threadData, _slot_name, _inUsedNames, boxvar_stringEq);
_return: OMC_LABEL_UNUSED
return _outIsUsed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isSlotUsed(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inUsedNames)
{
modelica_boolean _outIsUsed;
modelica_metatype out_outIsUsed;
_outIsUsed = omc_Static_isSlotUsed(threadData, _inSlot, _inUsedNames);
out_outIsUsed = mmc_mk_icon(_outIsUsed);
return out_outIsUsed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_extractNamesFromDims2(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inAccumNames)
{
modelica_metatype _outNames = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inCref;
{
modelica_string _name = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_name = tmpMeta6;
tmp8 = (modelica_boolean)omc_List_isMemberOnTrue(threadData, _name, _inAccumNames, boxvar_stringEq);
if(tmp8)
{
tmpMeta9 = _inAccumNames;
}
else
{
tmpMeta7 = mmc_mk_cons(_name, _inAccumNames);
tmpMeta9 = tmpMeta7;
}
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inAccumNames;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outNames = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outNames;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_extractNamesFromDims(threadData_t *threadData, modelica_metatype _inDimensions, modelica_metatype _inAccumNames)
{
modelica_metatype _outNames = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inDimensions;
{
modelica_metatype _exp = NULL;
modelica_metatype _rest_dims = NULL;
modelica_metatype _crefs = NULL;
modelica_metatype _names = NULL;
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_metatype tmpMeta8;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_exp = tmpMeta8;
_rest_dims = tmpMeta7;
_crefs = omc_Expression_extractCrefsFromExp(threadData, _exp);
_names = omc_List_fold(threadData, _crefs, boxvar_Static_extractNamesFromDims2, _inAccumNames);
_inDimensions = _rest_dims;
_inAccumNames = _names;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_1);
tmpMeta10 = MMC_CDR(tmp4_1);
_rest_dims = tmpMeta10;
_inDimensions = _rest_dims;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta1 = _inAccumNames;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outNames = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outNames;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getAllOutputDimensions(threadData_t *threadData, modelica_metatype _inOutputType)
{
modelica_metatype _outDimensions = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inOutputType;
{
modelica_metatype _tys = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,14,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_tys = tmpMeta6;
tmpMeta1 = omc_List_mapFlat(threadData, _tys, boxvar_Types_getDimensions);
goto tmp3_done;
}
case 1: {
tmpMeta1 = omc_Types_getDimensions(threadData, _inOutputType);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDimensions = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDimensions;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_applyArgTypesToFuncType(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inParameters, modelica_metatype _inResultType, modelica_metatype _inEnv, modelica_boolean _checkTypes, modelica_metatype _inInfo, modelica_metatype *out_outResultType)
{
modelica_metatype _outParameters = NULL;
modelica_metatype _outResultType = NULL;
modelica_metatype _tys = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _used_args = NULL;
modelica_metatype _used_slots = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _vars = NULL;
modelica_metatype _dummy_var = NULL;
modelica_metatype _res_ty = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta14;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(((!_checkTypes) || listEmpty(_inParameters)))
{
_outParameters = _inParameters;
_outResultType = _inResultType;
goto _return;
}
{
modelica_metatype __omcQ_24tmpVar31;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar30;
modelica_integer tmp4;
modelica_metatype _param_loopVar = 0;
modelica_metatype _param;
_param_loopVar = _inParameters;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar31 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar31;
while(1) {
tmp4 = 1;
if (!listEmpty(_param_loopVar)) {
_param = MMC_CAR(_param_loopVar);
_param_loopVar = MMC_CDR(_param_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar30 = omc_Types_funcArgType(threadData, _param);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar30,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar31;
}
_tys = tmpMeta1;
_dims = omc_Static_getAllOutputDimensions(threadData, _inResultType);
_dims = listAppend(omc_List_mapFlat(threadData, _tys, boxvar_Types_getDimensions), _dims);
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
_used_args = omc_Static_extractNamesFromDims(threadData, _dims, tmpMeta5);
{
modelica_metatype __omcQ_24tmpVar33;
modelica_metatype* tmp7;
modelica_metatype tmpMeta8;
modelica_metatype __omcQ_24tmpVar32;
modelica_integer tmp9;
modelica_metatype _s_loopVar = 0;
modelica_metatype _s;
_s_loopVar = _inSlots;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar33 = tmpMeta8;
tmp7 = &__omcQ_24tmpVar33;
while(1) {
tmp9 = 1;
while (!listEmpty(_s_loopVar)) {
_s = MMC_CAR(_s_loopVar);
_s_loopVar = MMC_CDR(_s_loopVar);
if (omc_Static_isSlotUsed(threadData, _s, _used_args)) {
tmp9--;
break;
}
}
if (tmp9 == 0) {
__omcQ_24tmpVar32 = _s;
*tmp7 = mmc_mk_cons(__omcQ_24tmpVar32,0);
tmp7 = &MMC_CDR(*tmp7);
} else if (tmp9 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp7 = mmc_mk_nil();
tmpMeta6 = __omcQ_24tmpVar33;
}
_used_slots = tmpMeta6;
_cache = omc_FCore_noCache(threadData);
{
modelica_metatype __omcQ_24tmpVar35;
modelica_metatype* tmp11;
modelica_metatype tmpMeta12;
modelica_metatype __omcQ_24tmpVar34;
modelica_integer tmp13;
modelica_metatype _s_loopVar = 0;
modelica_metatype _s;
_s_loopVar = _used_slots;
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar35 = tmpMeta12;
tmp11 = &__omcQ_24tmpVar35;
while(1) {
tmp13 = 1;
if (!listEmpty(_s_loopVar)) {
_s = MMC_CAR(_s_loopVar);
_s_loopVar = MMC_CDR(_s_loopVar);
tmp13--;
}
if (tmp13 == 0) {
__omcQ_24tmpVar34 = omc_Static_makeVarFromSlot(threadData, _s, _inEnv, _cache);
*tmp11 = mmc_mk_cons(__omcQ_24tmpVar34,0);
tmp11 = &MMC_CDR(*tmp11);
} else if (tmp13 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp11 = mmc_mk_nil();
tmpMeta10 = __omcQ_24tmpVar35;
}
_vars = tmpMeta10;
_dummy_var = _OMC_LIT194;
_env = omc_FGraph_openScope(threadData, _inEnv, _OMC_LIT195, _OMC_LIT196, mmc_mk_none());
_env = omc_Static_makeDummyFuncEnv(threadData, _env, _vars, _dummy_var);
{
modelica_metatype __omcQ_24tmpVar37;
modelica_metatype* tmp15;
modelica_metatype tmpMeta16;
modelica_metatype __omcQ_24tmpVar36;
modelica_integer tmp17;
modelica_metatype _s_loopVar = 0;
modelica_metatype _s;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
_s_loopVar = _inSlots;
_p_loopVar = _inParameters;
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar37 = tmpMeta16;
tmp15 = &__omcQ_24tmpVar37;
while(1) {
tmp17 = 2;
if (!listEmpty(_s_loopVar)) {
_s = MMC_CAR(_s_loopVar);
_s_loopVar = MMC_CDR(_s_loopVar);
tmp17--;
}if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp17--;
}
if (tmp17 == 0) {
__omcQ_24tmpVar36 = omc_Static_evaluateFuncParamDimAndMatchTypes(threadData, _s, _p, _env, _cache, _inInfo);
*tmp15 = mmc_mk_cons(__omcQ_24tmpVar36,0);
tmp15 = &MMC_CDR(*tmp15);
} else if (tmp17 == 2) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp15 = mmc_mk_nil();
tmpMeta14 = __omcQ_24tmpVar37;
}
_outParameters = tmpMeta14;
_outResultType = omc_Static_evaluateFuncArgTypeDims(threadData, _inResultType, _env, _cache);
_return: OMC_LABEL_UNUSED
if (out_outResultType) { *out_outResultType = _outResultType; }
return _outParameters;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_applyArgTypesToFuncType(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inParameters, modelica_metatype _inResultType, modelica_metatype _inEnv, modelica_metatype _checkTypes, modelica_metatype _inInfo, modelica_metatype *out_outResultType)
{
modelica_integer tmp1;
modelica_metatype _outParameters = NULL;
tmp1 = mmc_unbox_integer(_checkTypes);
_outParameters = omc_Static_applyArgTypesToFuncType(threadData, _inSlots, _inParameters, _inResultType, _inEnv, tmp1, _inInfo, out_outResultType);
return _outParameters;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_addPolymorphicTypeVars(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _typeVars, modelica_metatype _funcTy, modelica_metatype __omcQ_24in_5Fpb, modelica_metatype _fnPath, modelica_metatype _info, modelica_metatype *out_pb)
{
modelica_metatype _cache = NULL;
modelica_metatype _pb = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _scope = NULL;
modelica_metatype _e = NULL;
modelica_metatype _poly_types = NULL;
modelica_string _ty_name = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_cache = __omcQ_24in_5Fcache;
_pb = __omcQ_24in_5Fpb;
if(listEmpty(_typeVars))
{
goto _return;
}
_cache = omc_Lookup_lookupClass(threadData, _cache, _env, _fnPath, mmc_mk_none() ,&_e ,NULL);
{
modelica_metatype __omcQ_24tmpVar39;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_string __omcQ_24tmpVar38;
modelica_integer tmp5;
modelica_metatype _c_loopVar = 0;
modelica_metatype _c;
_c_loopVar = omc_SCodeUtil_getClassElements(threadData, _e);
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar39 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar39;
while(1) {
tmp5 = 1;
while (!listEmpty(_c_loopVar)) {
_c = MMC_CAR(_c_loopVar);
_c_loopVar = MMC_CDR(_c_loopVar);
if (omc_SCodeUtil_isPolymorphicTypeVar(threadData, _c)) {
tmp5--;
break;
}
}
if (tmp5 == 0) {
tmpMeta4 = stringAppend(_OMC_LIT197,omc_SCodeUtil_getElementName(threadData, _c));
__omcQ_24tmpVar38 = tmpMeta4;
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar38,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp5 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar39;
}
_poly_types = tmpMeta1;
if((listLength(_typeVars) > listLength(_poly_types)))
{
tmpMeta6 = mmc_mk_cons(omc_AbsynUtil_pathString(threadData, _fnPath, _OMC_LIT84, 1, 0), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT200, tmpMeta6, _info);
MMC_THROW_INTERNAL();
}
{
modelica_metatype _tv;
for (tmpMeta7 = _typeVars; !listEmpty(tmpMeta7); tmpMeta7=MMC_CDR(tmpMeta7))
{
_tv = MMC_CAR(tmpMeta7);
tmpMeta8 = _poly_types;
if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
_ty_name = tmpMeta9;
_poly_types = tmpMeta10;
_cache = omc_Lookup_lookupClass(threadData, _cache, _env, _tv, mmc_mk_some(_info) ,&_e ,&_scope);
_cache = omc_Inst_instClassType(threadData, _cache, _scope, _e ,NULL ,&_ty);
_pb = omc_Types_addPolymorphicBinding(threadData, _ty_name, _ty, _pb);
}
}
_return: OMC_LABEL_UNUSED
if (out_pb) { *out_pb = _pb; }
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabTypes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _typeVars, modelica_metatype _inTypes, modelica_boolean _inOnlyOneFunction, modelica_boolean _inCheckTypes, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outArgs, modelica_metatype *out_outConsts, modelica_metatype *out_outResultType, modelica_metatype *out_outFunctionType, modelica_metatype *out_outDimensions, modelica_metatype *out_outSlots)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outArgs = NULL;
modelica_metatype _outConsts = NULL;
modelica_metatype _outResultType = NULL;
modelica_metatype _outFunctionType = NULL;
modelica_metatype _outDimensions = NULL;
modelica_metatype _outSlots = NULL;
modelica_metatype _params = NULL;
modelica_metatype _res_ty = NULL;
modelica_metatype _func_ty = NULL;
modelica_metatype _func_attr = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _pb = NULL;
modelica_metatype _path = NULL;
modelica_boolean _success;
modelica_metatype _rest_tys = NULL;
modelica_metatype _tys = NULL;
modelica_string _name = NULL;
modelica_metatype _arg = NULL;
modelica_integer _numArgs;
modelica_metatype _funcarg = NULL;
modelica_boolean _debug;
modelica_metatype tmpMeta1;
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 tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_success = 0;
_rest_tys = _inTypes;
_debug = 0;
if((listLength(_rest_tys) > ((modelica_integer) 1)))
{
_numArgs = listLength(_inPosArgs) + listLength(_inNamedArgs);
{
modelica_metatype __omcQ_24tmpVar43;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar42;
modelica_integer tmp4;
modelica_metatype _ty_loopVar = 0;
modelica_boolean tmp5 = 0;
modelica_metatype _ty;
_ty_loopVar = _rest_tys;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar43 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar43;
while(1) {
tmp4 = 1;
while (!listEmpty(_ty_loopVar)) {
_ty = MMC_CAR(_ty_loopVar);
_ty_loopVar = MMC_CDR(_ty_loopVar);
{
modelica_metatype tmp8_1;
tmp8_1 = _ty;
{
volatile mmc_switch_type tmp8;
int tmp9;
tmp8 = 0;
for (; tmp8 < 1; tmp8++) {
switch (MMC_SWITCH_CAST(tmp8)) {
case 0: {
modelica_integer tmp10;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,11,4) == 0) goto tmp7_end;
{
modelica_integer __omcQ_24tmpVar41;
modelica_integer __omcQ_24tmpVar40;
modelica_integer tmp11;
modelica_metatype _argument_loopVar = 0;
modelica_metatype _argument;
_argument_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2)));
__omcQ_24tmpVar41 = ((modelica_integer) 0);
while(1) {
tmp11 = 1;
if (!listEmpty(_argument_loopVar)) {
_argument = MMC_CAR(_argument_loopVar);
_argument_loopVar = MMC_CDR(_argument_loopVar);
tmp11--;
}
if (tmp11 == 0) {
__omcQ_24tmpVar40 = (isNone((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_argument), 6))))?((modelica_integer) 1):((modelica_integer) 0));
__omcQ_24tmpVar41 = __omcQ_24tmpVar41 + __omcQ_24tmpVar40;
} else if (tmp11 == 1) {
break;
} else {
goto goto_6;
}
}
tmp10 = __omcQ_24tmpVar41;
}
tmp5 = ((_numArgs <= listLength((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2))))) && (_numArgs >= tmp10));
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
goto_6:;
MMC_THROW_INTERNAL();
goto tmp7_done;
tmp7_done:;
}
}
if (tmp5) {
tmp4--;
break;
}
}
if (tmp4 == 0) {
__omcQ_24tmpVar42 = _ty;
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar42,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar43;
}
_tys = tmpMeta1;
if((!listEmpty(_tys)))
{
_rest_tys = _tys;
}
}
while(1)
{
if(!(!_success)) break;
tmpMeta12 = _rest_tys;
if (listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
_func_ty = tmpMeta13;
_rest_tys = tmpMeta14;
tmpMeta15 = _func_ty;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,11,4) == 0) MMC_THROW_INTERNAL();
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 4));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 5));
_params = tmpMeta16;
_res_ty = tmpMeta17;
_func_attr = tmpMeta18;
_path = tmpMeta19;
{
{
volatile mmc_switch_type tmp22;
int tmp23;
tmp22 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp21_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp22 < 2; tmp22++) {
switch (MMC_SWITCH_CAST(tmp22)) {
case 0: {
modelica_metatype tmpMeta53;
_slots = omc_Static_makeEmptySlots(threadData, _params);
_outCache = omc_Static_elabInputArgs(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _slots, _inOnlyOneFunction, _inCheckTypes, _inImplicit, _inPrefix, _inInfo, _func_ty, _path, 0 ,&_outArgs ,&_outSlots ,&_outConsts ,&_pb);
_outCache = omc_Static_addPolymorphicTypeVars(threadData, _outCache, _inEnv, _typeVars, _func_ty, _pb, _path, _inInfo ,&_pb);
_pb = omc_Types_solvePolymorphicBindings(threadData, _pb, _inInfo, _path);
_res_ty = omc_Types_fixPolymorphicRestype(threadData, _res_ty, _pb, _inInfo);
{
modelica_metatype tmp27_1;
tmp27_1 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_func_attr), 6)));
{
volatile mmc_switch_type tmp27;
int tmp28;
tmp27 = 0;
for (; tmp27 < 2; tmp27++) {
switch (MMC_SWITCH_CAST(tmp27)) {
case 0: {
modelica_metatype tmpMeta29;
modelica_integer tmp30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta43;
if (mmc__uniontype__metarecord__typedef__equal(tmp27_1,1,2) == 0) goto tmp26_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp27_1), 3));
tmp30 = mmc_unbox_integer(tmpMeta29);
if (1 != tmp30) goto tmp26_end;
{
modelica_metatype __omcQ_24tmpVar45;
modelica_metatype* tmp32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype __omcQ_24tmpVar44;
modelica_integer tmp42;
modelica_metatype _slot_loopVar = 0;
modelica_metatype _slot;
_slot_loopVar = _outSlots;
tmpMeta33 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar45 = tmpMeta33;
tmp32 = &__omcQ_24tmpVar45;
while(1) {
tmp42 = 1;
if (!listEmpty(_slot_loopVar)) {
_slot = MMC_CAR(_slot_loopVar);
_slot_loopVar = MMC_CDR(_slot_loopVar);
tmp42--;
}
if (tmp42 == 0) {
{
modelica_metatype tmp37_1;
tmp37_1 = _slot;
{
volatile mmc_switch_type tmp37;
int tmp38;
tmp37 = 0;
for (; tmp37 < 2; tmp37++) {
switch (MMC_SWITCH_CAST(tmp37)) {
case 0: {
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp37_1), 4));
if (optionNone(tmpMeta39)) goto tmp36_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 1));
_arg = tmpMeta40;
tmpMeta41 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta41), MMC_UNTAGPTR(_slot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta41))[4] = mmc_mk_some(omc_Expression_unboxExp(threadData, _arg));
_slot = tmpMeta41;
tmpMeta34 = _slot;
goto tmp36_done;
}
case 1: {
tmpMeta34 = _slot;
goto tmp36_done;
}
}
goto tmp36_end;
tmp36_end: ;
}
goto goto_35;
goto_35:;
goto goto_25;
goto tmp36_done;
tmp36_done:;
}
}__omcQ_24tmpVar44 = tmpMeta34;
*tmp32 = mmc_mk_cons(__omcQ_24tmpVar44,0);
tmp32 = &MMC_CDR(*tmp32);
} else if (tmp42 == 1) {
break;
} else {
goto goto_25;
}
}
*tmp32 = mmc_mk_nil();
tmpMeta31 = __omcQ_24tmpVar45;
}
{
modelica_metatype __omcQ_24tmpVar47;
modelica_metatype* tmp44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype __omcQ_24tmpVar46;
modelica_integer tmp52;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
_p_loopVar = _params;
tmpMeta45 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar47 = tmpMeta45;
tmp44 = &__omcQ_24tmpVar47;
while(1) {
tmp52 = 1;
if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp52--;
}
if (tmp52 == 0) {
{
modelica_metatype tmp49_1;
tmp49_1 = _p;
{
volatile mmc_switch_type tmp49;
int tmp50;
tmp49 = 0;
for (; tmp49 < 1; tmp49++) {
switch (MMC_SWITCH_CAST(tmp49)) {
case 0: {
modelica_metatype tmpMeta51;
_funcarg = tmp49_1;
tmpMeta51 = MMC_TAGPTR(mmc_alloc_words(7));
memcpy(MMC_UNTAGPTR(tmpMeta51), MMC_UNTAGPTR(_funcarg), 7*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta51))[3] = omc_Types_unboxedType(threadData, omc_Types_fixPolymorphicRestype(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_p), 3))), _pb, _inInfo));
_funcarg = tmpMeta51;
tmpMeta46 = _funcarg;
goto tmp48_done;
}
}
goto tmp48_end;
tmp48_end: ;
}
goto goto_47;
goto_47:;
goto goto_25;
goto tmp48_done;
tmp48_done:;
}
}__omcQ_24tmpVar46 = tmpMeta46;
*tmp44 = mmc_mk_cons(__omcQ_24tmpVar46,0);
tmp44 = &MMC_CDR(*tmp44);
} else if (tmp52 == 1) {
break;
} else {
goto goto_25;
}
}
*tmp44 = mmc_mk_nil();
tmpMeta43 = __omcQ_24tmpVar47;
}
tmpMeta[0+0] = omc_List_map(threadData, _outArgs, boxvar_Expression_unboxExp);
tmpMeta[0+1] = tmpMeta31;
tmpMeta[0+2] = tmpMeta43;
tmpMeta[0+3] = omc_Types_unboxedType(threadData, _res_ty);
goto tmp26_done;
}
case 1: {
tmpMeta[0+0] = _outArgs;
tmpMeta[0+1] = _outSlots;
tmpMeta[0+2] = _params;
tmpMeta[0+3] = _res_ty;
goto tmp26_done;
}
}
goto tmp26_end;
tmp26_end: ;
}
goto goto_25;
goto_25:;
goto goto_20;
goto tmp26_done;
tmp26_done:;
}
}
_outArgs = tmpMeta[0+0];
_outSlots = tmpMeta[0+1];
_params = tmpMeta[0+2];
_res_ty = tmpMeta[0+3];
_params = omc_Static_applyArgTypesToFuncType(threadData, _outSlots, _params, _res_ty, _inEnv, _inCheckTypes, _inInfo ,&_res_ty);
_outDimensions = omc_Static_slotsVectorizable(threadData, _outSlots, _inInfo);
_outResultType = _res_ty;
tmpMeta53 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, _params, _outResultType, _func_attr, _path);
_outFunctionType = tmpMeta53;
_outFunctionType = omc_Types_fixPolymorphicRestype(threadData, _outFunctionType, _pb, _inInfo);
_outFunctionType = omc_Static_createActualFunctype(threadData, _outFunctionType, _outSlots, _inCheckTypes);
_success = 1;
goto tmp21_done;
}
case 1: {
goto tmp21_done;
}
}
goto tmp21_end;
tmp21_end: ;
}
goto goto_20;
tmp21_done:
(void)tmp22;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp21_done2;
goto_20:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp22 < 2) {
goto tmp21_top;
}
MMC_THROW_INTERNAL();
tmp21_done2:;
}
}
;
}
_return: OMC_LABEL_UNUSED
if (out_outArgs) { *out_outArgs = _outArgs; }
if (out_outConsts) { *out_outConsts = _outConsts; }
if (out_outResultType) { *out_outResultType = _outResultType; }
if (out_outFunctionType) { *out_outFunctionType = _outFunctionType; }
if (out_outDimensions) { *out_outDimensions = _outDimensions; }
if (out_outSlots) { *out_outSlots = _outSlots; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabTypes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _typeVars, modelica_metatype _inTypes, modelica_metatype _inOnlyOneFunction, modelica_metatype _inCheckTypes, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outArgs, modelica_metatype *out_outConsts, modelica_metatype *out_outResultType, modelica_metatype *out_outFunctionType, modelica_metatype *out_outDimensions, modelica_metatype *out_outSlots)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inOnlyOneFunction);
tmp2 = mmc_unbox_integer(_inCheckTypes);
tmp3 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabTypes(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _typeVars, _inTypes, tmp1, tmp2, tmp3, _inPrefix, _inInfo, out_outArgs, out_outConsts, out_outResultType, out_outFunctionType, out_outDimensions, out_outSlots);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deoverloadFuncname(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _inType, modelica_metatype _inEnv, modelica_metatype *out_outType)
{
modelica_metatype _outPath = NULL;
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inType;
{
modelica_metatype _fn = NULL;
modelica_string _name = NULL;
modelica_metatype _tty = NULL;
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_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (optionNone(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
_tty = tmp4_1;
_name = tmpMeta9;
tmpMeta11 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _name);
tmpMeta10 = MMC_TAGPTR(mmc_alloc_words(6));
memcpy(MMC_UNTAGPTR(tmpMeta10), MMC_UNTAGPTR(_tty), 6*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta10))[5] = tmpMeta11;
_tty = tmpMeta10;
tmpMeta[0+0] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_tty), 5)));
tmpMeta[0+1] = _tty;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,4) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_fn = tmpMeta12;
tmpMeta[0+0] = _fn;
tmpMeta[0+1] = _inType;
goto tmp3_done;
}
case 2: {
tmpMeta[0+0] = _inPath;
tmpMeta[0+1] = _inType;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outPath = tmpMeta[0+0];
_outType = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outType) { *out_outType = _outType; }
return _outPath;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallScalar3(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inSlots, modelica_integer _inIndex)
{
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _rest_slots = NULL;
modelica_metatype _dims = NULL;
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
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
_rest_slots = _inSlots;
{
modelica_metatype _e;
for (tmpMeta2 = _inExpl; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_e = MMC_CAR(tmpMeta2);
tmpMeta3 = _rest_slots;
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 5));
_dims = tmpMeta6;
_rest_slots = tmpMeta5;
if((!listEmpty(_dims)))
{
tmpMeta8 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_inIndex));
tmpMeta7 = mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil));
_e = omc_Expression_makeASUB(threadData, _e, tmpMeta7);
_e = omc_ExpressionSimplify_simplify1(threadData, _e, NULL);
}
tmpMeta9 = mmc_mk_cons(_e, _outExpl);
_outExpl = tmpMeta9;
}
}
_outExpl = listReverse(_outExpl);
_return: OMC_LABEL_UNUSED
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallScalar3(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inSlots, modelica_metatype _inIndex)
{
modelica_integer tmp1;
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta2;
tmp1 = mmc_unbox_integer(_inIndex);
_outExpl = omc_Static_vectorizeCallScalar3(threadData, _inExpl, _inSlots, tmp1);
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallScalar2(threadData_t *threadData, modelica_metatype _fn, modelica_metatype _exps, modelica_metatype _attr, modelica_metatype _slots, modelica_integer _dim)
{
modelica_metatype _res = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _callargs = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_integer tmp4;
modelica_integer tmp5;
modelica_integer tmp6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_res = tmpMeta1;
tmp4 = _dim; tmp5 = ((modelica_integer) -1); tmp6 = ((modelica_integer) 1);
if(!(((tmp5 > 0) && (tmp4 > tmp6)) || ((tmp5 < 0) && (tmp4 < tmp6))))
{
modelica_integer _cur_dim;
for(_cur_dim = _dim; in_range_integer(_cur_dim, tmp4, tmp6); _cur_dim += tmp5)
{
_callargs = omc_Static_vectorizeCallScalar3(threadData, _exps, _slots, _cur_dim);
tmpMeta3 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fn, _callargs, _attr);
tmpMeta2 = mmc_mk_cons(tmpMeta3, _res);
_res = tmpMeta2;
}
}
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallScalar2(threadData_t *threadData, modelica_metatype _fn, modelica_metatype _exps, modelica_metatype _attr, modelica_metatype _slots, modelica_metatype _dim)
{
modelica_integer tmp1;
modelica_metatype _res = NULL;
modelica_metatype tmpMeta2;
tmp1 = mmc_unbox_integer(_dim);
_res = omc_Static_vectorizeCallScalar2(threadData, _fn, _exps, _attr, _slots, tmp1);
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallScalar(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _ty, modelica_integer _dim, modelica_metatype _slots)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _exp;
{
modelica_metatype _expl = NULL;
modelica_boolean _scalar;
modelica_metatype _e_type = NULL;
modelica_metatype _arr_type = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
_expl = omc_Static_vectorizeCallScalar2(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 2))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 3))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 4))), _slots, _dim);
_e_type = omc_Expression_unliftArray(threadData, _ty);
_scalar = omc_Expression_typeBuiltin(threadData, _e_type);
tmpMeta7 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim));
tmpMeta6 = mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta8 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _e_type, tmpMeta6);
_arr_type = tmpMeta8;
tmpMeta9 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _arr_type, mmc_mk_boolean(_scalar), _expl);
tmpMeta1 = tmpMeta9;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp10;
tmp10 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp10) 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:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallScalar(threadData_t *threadData, modelica_metatype _exp, modelica_metatype _ty, modelica_metatype _dim, modelica_metatype _slots)
{
modelica_integer tmp1;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_dim);
_outExp = omc_Static_vectorizeCallScalar(threadData, _exp, _ty, tmp1, _slots);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inType, modelica_integer _inDim, modelica_metatype _inSlots)
{
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar49;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype __omcQ_24tmpVar48;
modelica_integer tmp9;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _inExpl;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar49 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar49;
while(1) {
tmp9 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp9--;
}
if (tmp9 == 0) {
{
modelica_metatype tmp7_1;
tmp7_1 = _e;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 2; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,13,3) == 0) goto tmp6_end;
tmpMeta4 = omc_Static_vectorizeCallScalar(threadData, _e, _inType, _inDim, _inSlots);
goto tmp6_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,16,3) == 0) goto tmp6_end;
tmpMeta4 = omc_Static_vectorizeCallArray(threadData, _e, _inDim, _inSlots);
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}__omcQ_24tmpVar48 = tmpMeta4;
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar48,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp9 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar49;
}
_outExpl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inType, modelica_metatype _inDim, modelica_metatype _inSlots)
{
modelica_integer tmp1;
modelica_metatype _outExpl = NULL;
tmp1 = mmc_unbox_integer(_inDim);
_outExpl = omc_Static_vectorizeCallArray2(threadData, _inExpl, _inType, tmp1, _inSlots);
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallArray(threadData_t *threadData, modelica_metatype _inExp, modelica_integer _inDim, modelica_metatype _inSlots)
{
modelica_metatype _outExp = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _expl = NULL;
modelica_boolean _sc;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
_ty = tmpMeta2;
_expl = tmpMeta3;
_expl = omc_Static_vectorizeCallArray2(threadData, _expl, _ty, _inDim, _inSlots);
_sc = omc_Expression_typeBuiltin(threadData, _ty);
tmpMeta4 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_inDim));
_ty = omc_Expression_liftArrayRight(threadData, _ty, tmpMeta4);
tmpMeta5 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ty, mmc_mk_boolean(_sc), _expl);
_outExp = tmpMeta5;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_vectorizeCallArray(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDim, modelica_metatype _inSlots)
{
modelica_integer tmp1;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inDim);
_outExp = omc_Static_vectorizeCallArray(threadData, _inExp, tmp1, _inSlots);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCallUnknownDimension(threadData_t *threadData, modelica_metatype _inEs, modelica_metatype _inSlots, modelica_metatype _info, modelica_metatype *out_ofound)
{
modelica_metatype _oes = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _ofound = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _rest_slots = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _tp = NULL;
modelica_string _name = NULL;
modelica_metatype tmpMeta3;
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;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_oes = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_ofound = tmpMeta2;
_rest_slots = _inSlots;
{
modelica_metatype _e;
for (tmpMeta3 = _inEs; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_e = MMC_CAR(tmpMeta3);
tmpMeta4 = _rest_slots;
if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_CAR(tmpMeta4);
tmpMeta6 = MMC_CDR(tmpMeta4);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 5));
_ty = tmpMeta8;
_dims = tmpMeta9;
_rest_slots = tmpMeta6;
if(listEmpty(_dims))
{
tmpMeta10 = mmc_mk_cons(_e, _oes);
_oes = tmpMeta10;
}
else
{
_name = omc_Util_getTempVariableIndex(threadData);
_tp = omc_Types_expTypetoTypesType(threadData, omc_Expression_typeof(threadData, _e));
tmpMeta12 = mmc_mk_box5(3, &DAE_ReductionIterator_REDUCTIONITER__desc, _name, _e, mmc_mk_none(), _tp);
tmpMeta11 = mmc_mk_cons(tmpMeta12, _ofound);
_ofound = tmpMeta11;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta15 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _name, _ty, tmpMeta14);
tmpMeta16 = mmc_mk_box3(9, &DAE_Exp_CREF__desc, tmpMeta15, _ty);
tmpMeta13 = mmc_mk_cons(tmpMeta16, _oes);
_oes = tmpMeta13;
}
}
}
if(listEmpty(_ofound))
{
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT204, _OMC_LIT206, _info);
}
_oes = listReverse(_oes);
_ofound = listReverse(_ofound);
_return: OMC_LABEL_UNUSED
if (out_ofound) { *out_ofound = _ofound; }
return _oes;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_vectorizeCall(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDims, modelica_metatype _inSlots, modelica_metatype _inProperties, modelica_metatype _info, modelica_metatype *out_outProperties)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inExp;
tmp4_2 = _inDims;
tmp4_3 = _inProperties;
{
modelica_metatype _e = NULL;
modelica_metatype _vect_exp = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _exp_type = NULL;
modelica_metatype _c = NULL;
modelica_metatype _fn = NULL;
modelica_metatype _es = NULL;
modelica_integer _int_dim;
modelica_metatype _dim = NULL;
modelica_metatype _ad = NULL;
modelica_string _str = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _rinfo = NULL;
modelica_string _foldName = NULL;
modelica_string _resultName = NULL;
modelica_metatype _riters = NULL;
modelica_metatype _iterType = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_e = tmp4_1;
_prop = tmp4_3;
tmp4 += 5;
tmpMeta[0+0] = _e;
tmpMeta[0+1] = _prop;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,4,0) == 0) goto tmp3_end;
_ad = tmpMeta7;
_e = tmp4_1;
_prop = tmp4_3;
if (!omc_Flags_getConfigBool(threadData, _OMC_LIT19)) goto tmp3_end;
tmpMeta8 = mmc_mk_cons(_OMC_LIT44, _ad);
tmpMeta[0+0] = omc_Static_vectorizeCall(threadData, _e, tmpMeta8, _inSlots, _prop, _info, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmp4_2);
tmpMeta10 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,2) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_e = tmp4_1;
_dim = tmpMeta9;
_ad = tmpMeta10;
_tp = tmpMeta11;
_c = tmpMeta12;
tmp4 += 1;
_int_dim = omc_Expression_dimensionSize(threadData, _dim);
_exp_type = omc_Types_simplifyType(threadData, omc_Types_liftArray(threadData, _tp, _dim));
_vect_exp = omc_Static_vectorizeCallScalar(threadData, _e, _exp_type, _int_dim, _inSlots);
_tp = omc_Types_liftArray(threadData, _tp, _dim);
tmpMeta13 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _tp, _c);
tmpMeta[0+0] = omc_Static_vectorizeCall(threadData, _vect_exp, _ad, _inSlots, tmpMeta13, _info, &tmpMeta[0+1]);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_2);
tmpMeta15 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,2) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_dim = tmpMeta14;
_ad = tmpMeta15;
_tp = tmpMeta16;
_c = tmpMeta17;
tmp4 += 2;
_int_dim = omc_Expression_dimensionSize(threadData, _dim);
_vect_exp = omc_Static_vectorizeCallArray(threadData, _inExp, _int_dim, _inSlots);
_tp = omc_Types_liftArrayRight(threadData, _tp, _dim);
tmpMeta18 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _tp, _c);
tmpMeta[0+0] = omc_Static_vectorizeCall(threadData, _vect_exp, _ad, _inSlots, tmpMeta18, _info, &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_2);
tmpMeta23 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,2) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_fn = tmpMeta19;
_es = tmpMeta20;
_attr = tmpMeta21;
_dim = tmpMeta22;
_ad = tmpMeta23;
_prop = tmp4_3;
_tp = tmpMeta24;
_c = tmpMeta25;
_es = omc_Static_vectorizeCallUnknownDimension(threadData, _es, _inSlots, _info ,&_riters);
_tp = omc_Types_liftArrayRight(threadData, _tp, _dim);
tmpMeta26 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _tp, _c);
_prop = tmpMeta26;
tmpMeta27 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fn, _es, _attr);
_e = tmpMeta27;
_e = omc_Static_vectorizeCall(threadData, _e, _ad, _inSlots, _prop, _info ,&_prop);
_foldName = omc_Util_getTempVariableIndex(threadData);
_resultName = omc_Util_getTempVariableIndex(threadData);
_iterType = ((listLength(_riters) > ((modelica_integer) 1))?_OMC_LIT207:_OMC_LIT208);
tmpMeta28 = mmc_mk_box8(3, &DAE_ReductionInfo_REDUCTIONINFO__desc, _OMC_LIT210, _iterType, _tp, _OMC_LIT213, _foldName, _resultName, mmc_mk_none());
_rinfo = tmpMeta28;
tmpMeta29 = mmc_mk_box4(30, &DAE_Exp_REDUCTION__desc, _rinfo, _e, _riters);
tmpMeta[0+0] = tmpMeta29;
tmpMeta[0+1] = _prop;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,2) == 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta30 = MMC_CAR(tmp4_2);
tmpMeta31 = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,3,1) == 0) goto tmp3_end;
tmpMeta32 = stringAppend(_OMC_LIT214,omc_ExpressionDump_dimensionsString(threadData, _inDims));
tmpMeta33 = stringAppend(tmpMeta32,_OMC_LIT23);
_str = tmpMeta33;
tmpMeta34 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT204, tmpMeta34, _info);
goto goto_2;
goto tmp3_done;
}
case 6: {
modelica_boolean tmp35;
modelica_metatype tmpMeta36;
tmp35 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp35) goto goto_2;
_str = omc_ExpressionDump_dimensionString(threadData, listHead(_inDims));
tmpMeta36 = stringAppend(_OMC_LIT215,_str);
omc_Debug_traceln(threadData, tmpMeta36);
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 < 7) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExp;
}
DLLExport
modelica_metatype omc_Static_isExternalObjectFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_boolean *out_outIsExt)
{
modelica_metatype _outCache = NULL;
modelica_boolean _outIsExt;
modelica_metatype _els = NULL;
modelica_string _last_id = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_boolean tmp9;
tmpMeta8 = omc_Lookup_lookupClass(threadData, _inCache, _inEnv, _inPath, mmc_mk_none(), &tmpMeta5, NULL);
_outCache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,2,8) == 0) goto goto_1;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 7));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,8) == 0) goto goto_1;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_els = tmpMeta7;
tmp9 = omc_SCodeUtil_isExternalObject(threadData, _els);
if (1 != tmp9) goto goto_1;
_outIsExt = 1;
goto tmp2_done;
}
case 1: {
_last_id = omc_AbsynUtil_pathLastIdent(threadData, _inPath);
_outCache = _inCache;
_outIsExt = ((stringEqual(_last_id, _OMC_LIT216)) || (stringEqual(_last_id, _OMC_LIT217)));
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_outIsExt) { *out_outIsExt = _outIsExt; }
return _outCache;
}
modelica_metatype boxptr_Static_isExternalObjectFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype *out_outIsExt)
{
modelica_boolean _outIsExt;
modelica_metatype _outCache = NULL;
_outCache = omc_Static_isExternalObjectFunction(threadData, _inCache, _inEnv, _inPath, &_outIsExt);
if (out_outIsExt) { *out_outIsExt = mmc_mk_icon(_outIsExt); }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_determineConstSpecialFunc(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inConst, modelica_metatype _inFuncName, modelica_metatype *out_outConst)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outConst = NULL;
modelica_boolean _is_ext;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_isExternalObjectFunction(threadData, _inCache, _inEnv, _inFuncName ,&_is_ext);
_outConst = (_is_ext?_OMC_LIT52:_inConst);
_return: OMC_LABEL_UNUSED
if (out_outConst) { *out_outConst = _outConst; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getOptSlotDefaultExp(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inSlots, modelica_metatype _inInfo, modelica_metatype _inOrigExp)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inSlot;
{
modelica_metatype _slot = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
_slot = tmpMeta6;
tmpMeta1 = omc_Static_fillDefaultSlot(threadData, _slot, _inSlots, _inInfo, NULL);
goto tmp3_done;
}
case 1: {
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta1 = _inOrigExp;
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_boolean omc_Static_isSlotNamed(threadData_t *threadData, modelica_string _inName, modelica_metatype _inSlot)
{
modelica_boolean _outIsNamed;
modelica_string _id = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inSlot;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
_id = tmpMeta3;
_outIsNamed = (stringEqual(_id, _inName));
_return: OMC_LABEL_UNUSED
return _outIsNamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isSlotNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inSlot)
{
modelica_boolean _outIsNamed;
modelica_metatype out_outIsNamed;
_outIsNamed = omc_Static_isSlotNamed(threadData, _inName, _inSlot);
out_outIsNamed = mmc_mk_icon(_outIsNamed);
return out_outIsNamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_lookupSlotInArray(threadData_t *threadData, modelica_string _inSlotName, modelica_metatype _inSlots)
{
modelica_metatype _outSlot = NULL;
modelica_metatype _slot = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
_slot = omc_Array_getMemberOnTrue(threadData, _inSlotName, _inSlots, boxvar_Static_isSlotNamed, NULL);
_outSlot = mmc_mk_some(_slot);
goto tmp2_done;
}
case 1: {
_outSlot = mmc_mk_none();
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 _outSlot;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateSlotExp__traverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inTuple, modelica_metatype *out_outTuple)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outTuple = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inTuple;
{
modelica_string _id = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _slot = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _orig_exp = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 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));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_orig_exp = tmp4_1;
_id = tmpMeta7;
_slots = tmpMeta8;
_info = tmpMeta9;
_slot = omc_Static_lookupSlotInArray(threadData, _id, _slots);
_exp = omc_Static_getOptSlotDefaultExp(threadData, _slot, _slots, _info, _orig_exp);
tmpMeta10 = mmc_mk_box2(0, _slots, _info);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = tmpMeta10;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inTuple;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outTuple = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outTuple) { *out_outTuple = _outTuple; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_evaluateSlotExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inSlotArray, modelica_metatype _inInfo)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_box2(0, _inSlotArray, _inInfo);
_outExp = omc_Expression_traverseExpBottomUp(threadData, _inExp, boxvar_Static_evaluateSlotExp__traverser, tmpMeta1, NULL);
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillDefaultSlot2(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inSlotArray, modelica_metatype _inInfo, modelica_metatype *out_outSlot)
{
modelica_metatype _outArg = NULL;
modelica_metatype _outSlot = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outSlot = _inSlot;
{
modelica_metatype tmp4_1;
tmp4_1 = _outSlot;
{
modelica_metatype _exp = NULL;
modelica_string _id = NULL;
modelica_integer _idx;
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_metatype tmpMeta8;
modelica_integer tmp9;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
tmp9 = mmc_unbox_integer(tmpMeta8);
if (2 != tmp9) goto tmp3_end;
_exp = tmpMeta7;
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _inSlot;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_integer tmp13;
modelica_metatype tmpMeta14;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
tmp13 = mmc_unbox_integer(tmpMeta12);
if (1 != tmp13) goto tmp3_end;
_id = tmpMeta11;
tmpMeta14 = mmc_mk_cons(_id, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT221, tmpMeta14, _inInfo);
goto goto_2;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_integer tmp19;
modelica_metatype tmpMeta20;
modelica_integer tmp21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 6));
if (optionNone(tmpMeta16)) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 1));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmp19 = mmc_unbox_integer(tmpMeta18);
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
tmp21 = mmc_unbox_integer(tmpMeta20);
if (0 != tmp21) goto tmp3_end;
_exp = tmpMeta17;
_idx = tmp19;
tmpMeta22 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta22), MMC_UNTAGPTR(_outSlot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta22))[7] = mmc_mk_integer(((modelica_integer) 1));
_outSlot = tmpMeta22;
arrayUpdate(_inSlotArray, _idx, _outSlot);
_exp = omc_Static_evaluateSlotExp(threadData, _exp, _inSlotArray, _inInfo);
tmpMeta23 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta23), MMC_UNTAGPTR(_outSlot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta23))[4] = mmc_mk_some(_exp);
_outSlot = tmpMeta23;
tmpMeta24 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta24), MMC_UNTAGPTR(_outSlot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta24))[3] = mmc_mk_boolean(1);
_outSlot = tmpMeta24;
tmpMeta25 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta25), MMC_UNTAGPTR(_outSlot), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta25))[7] = mmc_mk_integer(((modelica_integer) 2));
_outSlot = tmpMeta25;
arrayUpdate(_inSlotArray, _idx, _outSlot);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _outSlot;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outArg = tmpMeta[0+0];
_outSlot = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outSlot) { *out_outSlot = _outSlot; }
return _outArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fillDefaultSlot(threadData_t *threadData, modelica_metatype _inSlot, modelica_metatype _inSlotArray, modelica_metatype _inInfo, modelica_metatype *out_outSlot)
{
modelica_metatype _outArg = NULL;
modelica_metatype _outSlot = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inSlot;
{
modelica_metatype _arg = NULL;
modelica_string _id = NULL;
modelica_integer _idx;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp7 = mmc_unbox_integer(tmpMeta6);
if (1 != tmp7) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (optionNone(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
_arg = tmpMeta9;
tmpMeta[0+0] = _arg;
tmpMeta[0+1] = _inSlot;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
modelica_integer tmp16;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 6));
if (optionNone(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp14 = mmc_unbox_integer(tmpMeta13);
if (0 != tmp14) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmp16 = mmc_unbox_integer(tmpMeta15);
_idx = tmp16;
tmpMeta[0+0] = omc_Static_fillDefaultSlot2(threadData, arrayGet(_inSlotArray,_idx) /* DAE.ASUB */, _inSlotArray, _inInfo, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_id = tmpMeta18;
tmpMeta19 = mmc_mk_cons(_id, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT224, tmpMeta19, _inInfo);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outArg = tmpMeta[0+0];
_outSlot = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outSlot) { *out_outSlot = _outSlot; }
return _outArg;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_addDefaultArgs(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inInfo, modelica_metatype *out_outSlots)
{
modelica_metatype _outArgs = NULL;
modelica_metatype _outSlots = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outArgs = omc_List_map2__2(threadData, _inSlots, boxvar_Static_fillDefaultSlot, listArray(_inSlots), _inInfo ,&_outSlots);
_return: OMC_LABEL_UNUSED
if (out_outSlots) { *out_outSlots = _outSlots; }
return _outArgs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_instantiateImplicitRecordConstructors(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args)
{
modelica_metatype _outCache = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _args;
{
modelica_metatype _rest_args = NULL;
modelica_metatype _record_name = NULL;
modelica_metatype _cache = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmpMeta1 = _inCache;
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 (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,9,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_record_name = tmpMeta10;
_rest_args = tmpMeta7;
tmpMeta12 = omc_Static_instantiateDaeFunction(threadData, _inCache, _inEnv, _record_name, 0, mmc_mk_none(), 0, &tmpMeta11);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,0) == 0) goto goto_2;
tmpMeta1 = omc_Static_instantiateImplicitRecordConstructors(threadData, _cache, _inEnv, _rest_args);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
_rest_args = tmpMeta14;
tmpMeta1 = omc_Static_instantiateImplicitRecordConstructors(threadData, _inCache, _inEnv, _rest_args);
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 = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_lookupAndFullyQualify(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFunctionName, modelica_metatype *out_outEnv, modelica_metatype *out_outClass, modelica_metatype *out_outFunctionName)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outClass = NULL;
modelica_metatype _outFunctionName = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_Lookup_isFunctionCallViaComponent(threadData, _inCache, _inEnv, _inFunctionName))
{
omc_Lookup_lookupClass(threadData, _inCache, _inEnv, _inFunctionName, mmc_mk_none() ,&_outClass ,&_outEnv);
_outFunctionName = omc_FGraph_joinScopePath(threadData, _outEnv, omc_AbsynUtil_makeIdentPathFromString(threadData, omc_SCodeUtil_elementName(threadData, _outClass)));
_outCache = _inCache;
}
else
{
_outCache = omc_Lookup_lookupClass(threadData, _inCache, _inEnv, _inFunctionName, mmc_mk_none() ,&_outClass ,&_outEnv);
_outFunctionName = omc_AbsynUtil_makeFullyQualified(threadData, omc_FGraph_joinScopePath(threadData, _outEnv, omc_AbsynUtil_makeIdentPathFromString(threadData, omc_SCodeUtil_elementName(threadData, _outClass))));
}
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outClass) { *out_outClass = _outClass; }
if (out_outFunctionName) { *out_outFunctionName = _outFunctionName; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_instantiateDaeFunction2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inName, modelica_boolean _builtin, modelica_metatype _clOpt, modelica_boolean _printErrorMsg, modelica_metatype _forceFunctionInst, modelica_metatype *out_status)
{
modelica_metatype _outCache = NULL;
modelica_metatype _status = NULL;
modelica_integer _numError;
modelica_boolean _instOnlyForcedFunctions;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_numError = omc_Error_getNumErrorMessages(threadData);
_instOnlyForcedFunctions = isSome(getGlobalRoot(((modelica_integer) 0)));
{
volatile modelica_boolean tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_boolean tmp4_3;volatile modelica_metatype tmp4_4;
tmp4_1 = _builtin;
tmp4_2 = _clOpt;
tmp4_3 = _instOnlyForcedFunctions;
tmp4_4 = _forceFunctionInst;
{
modelica_metatype _env = NULL;
modelica_metatype _cl = NULL;
modelica_string _pathStr = NULL;
modelica_string _envStr = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _name = NULL;
modelica_metatype _ty = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 10; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
if (1 != tmp4_3) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,0) == 0) goto tmp3_end;
tmp6 = omc_AbsynUtil_pathIsIdent(threadData, _inName);
if (0 != tmp6) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 1: {
if (1 != tmp4_1) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_4,1,0) == 0) goto tmp3_end;
omc_Static_isExternalObjectFunction(threadData, _inCache, _inEnv, _inName, &tmp7);
if (1 != tmp7) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp8;
modelica_boolean tmp9;
if (!optionNone(tmp4_2)) goto tmp3_end;
tmp8 = omc_FGraph_isTopScope(threadData, _inEnv);
if (0 != tmp8) goto goto_2;
tmp9 = omc_AbsynUtil_pathSuffixOf(threadData, _inName, omc_FGraph_getGraphName(threadData, _inEnv));
if (1 != tmp9) goto goto_2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 4: {
_outCache = omc_Static_lookupAndFullyQualify(threadData, _inCache, _inEnv, _inName ,NULL ,NULL ,&_name);
omc_FCore_checkCachedInstFuncGuard(threadData, _outCache, _name);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (!optionNone(tmp4_2)) goto tmp3_end;
tmp4 += 1;
_outCache = omc_Static_lookupAndFullyQualify(threadData, _inCache, _inEnv, _inName ,&_env ,&_cl ,&_name);
_outCache = omc_FCore_addCachedInstFuncGuard(threadData, _outCache, _name);
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_InstFunction_implicitFunctionInstantiation(threadData, _outCache, _env, tmpMeta10, _OMC_LIT179, _OMC_LIT40, _cl, tmpMeta11, NULL, NULL);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_cl = tmpMeta12;
tmp4 += 1;
_outCache = omc_Inst_makeFullyQualified(threadData, _inCache, _inEnv, _inName, NULL);
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_InstFunction_implicitFunctionInstantiation(threadData, _outCache, _inEnv, tmpMeta13, _OMC_LIT179, _OMC_LIT40, _cl, tmpMeta14, NULL, NULL);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta15;
if (!optionNone(tmp4_2)) goto tmp3_end;
_cref = omc_ComponentReference_pathToCref(threadData, _inName);
_outCache = omc_Lookup_lookupVar(threadData, _inCache, _inEnv, _cref ,NULL ,&_ty, NULL, NULL, NULL, NULL, NULL, NULL);
tmpMeta15 = _ty;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,11,4) == 0) goto goto_2;
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = _OMC_LIT225;
goto tmp3_done;
}
case 8: {
modelica_boolean tmp16;
modelica_metatype tmpMeta17;
if (1 != tmp4_3) goto tmp3_end;
tmp16 = (omc_Error_getNumErrorMessages(threadData) == _numError);
if (1 != tmp16) goto goto_2;
_envStr = omc_FGraph_printGraphPathStr(threadData, _inEnv);
_pathStr = omc_AbsynUtil_pathString(threadData, _inName, _OMC_LIT84, 1, 0);
tmpMeta17 = mmc_mk_cons(_pathStr, mmc_mk_cons(_envStr, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addMessage(threadData, _OMC_LIT228, tmpMeta17);
goto goto_2;
goto tmp3_done;
}
case 9: {
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT229;
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:;
}
}
_outCache = tmpMeta[0+0];
_status = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_status) { *out_status = _status; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_instantiateDaeFunction2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inName, modelica_metatype _builtin, modelica_metatype _clOpt, modelica_metatype _printErrorMsg, modelica_metatype _forceFunctionInst, modelica_metatype *out_status)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_builtin);
tmp2 = mmc_unbox_integer(_printErrorMsg);
_outCache = omc_Static_instantiateDaeFunction2(threadData, _inCache, _inEnv, _inName, tmp1, _clOpt, tmp2, _forceFunctionInst, out_status);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_instantiateDaeFunctionForceInst(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _name, modelica_boolean _builtin, modelica_metatype _clOpt, modelica_boolean _printErrorMsg, modelica_metatype *out_status)
{
modelica_metatype _outCache = NULL;
modelica_metatype _status = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_instantiateDaeFunction2(threadData, _inCache, _env, _name, _builtin, _clOpt, _printErrorMsg, _OMC_LIT230 ,&_status);
_return: OMC_LABEL_UNUSED
if (out_status) { *out_status = _status; }
return _outCache;
}
modelica_metatype boxptr_Static_instantiateDaeFunctionForceInst(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _name, modelica_metatype _builtin, modelica_metatype _clOpt, modelica_metatype _printErrorMsg, modelica_metatype *out_status)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_builtin);
tmp2 = mmc_unbox_integer(_printErrorMsg);
_outCache = omc_Static_instantiateDaeFunctionForceInst(threadData, _inCache, _env, _name, tmp1, _clOpt, tmp2, out_status);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_instantiateDaeFunctionFromTypes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _tys, modelica_boolean _builtin, modelica_metatype _clOpt, modelica_boolean _printErrorMsg, modelica_metatype _acc, modelica_metatype *out_status)
{
modelica_metatype _outCache = NULL;
modelica_metatype _status = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _tys;
tmp4_2 = _acc;
{
modelica_metatype _name = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,11,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
_name = tmpMeta8;
_rest = tmpMeta7;
_outCache = omc_Static_instantiateDaeFunction(threadData, _inCache, _env, _name, _builtin, _clOpt, _printErrorMsg ,&_status);
_tys = _rest;
_acc = _status;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _acc;
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];
_status = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_status) { *out_status = _status; }
return _outCache;
}
modelica_metatype boxptr_Static_instantiateDaeFunctionFromTypes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _tys, modelica_metatype _builtin, modelica_metatype _clOpt, modelica_metatype _printErrorMsg, modelica_metatype _acc, modelica_metatype *out_status)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_builtin);
tmp2 = mmc_unbox_integer(_printErrorMsg);
_outCache = omc_Static_instantiateDaeFunctionFromTypes(threadData, _inCache, _env, _tys, tmp1, _clOpt, tmp2, _acc, out_status);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_instantiateDaeFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _name, modelica_boolean _builtin, modelica_metatype _clOpt, modelica_boolean _printErrorMsg, modelica_metatype *out_status)
{
modelica_metatype _outCache = NULL;
modelica_metatype _status = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_instantiateDaeFunction2(threadData, _inCache, _env, _name, _builtin, _clOpt, _printErrorMsg, _OMC_LIT231 ,&_status);
_return: OMC_LABEL_UNUSED
if (out_status) { *out_status = _status; }
return _outCache;
}
modelica_metatype boxptr_Static_instantiateDaeFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _name, modelica_metatype _builtin, modelica_metatype _clOpt, modelica_metatype _printErrorMsg, modelica_metatype *out_status)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_builtin);
tmp2 = mmc_unbox_integer(_printErrorMsg);
_outCache = omc_Static_instantiateDaeFunction(threadData, _inCache, _env, _name, tmp1, _clOpt, tmp2, out_status);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsMetarecord(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_expProps)
{
modelica_metatype _outCache = NULL;
modelica_metatype _expProps = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;modelica_metatype _ty;
tmp4_1 = _inType;
_ty = tmp4_1;
{
modelica_metatype _fq_path = NULL;
modelica_string _str = NULL;
modelica_string _fn_str = NULL;
modelica_metatype _field_names = NULL;
modelica_metatype _tys = NULL;
modelica_metatype _typeVars = NULL;
modelica_metatype _fargs = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _const_lst = NULL;
modelica_metatype _const = NULL;
modelica_metatype _ty_const = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _args = NULL;
modelica_metatype _bindings = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; 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,21,6) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_fq_path = tmpMeta6;
tmpMeta7 = omc_List_find(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 6))), boxvar_Types_varHasMetaRecordType);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_str = tmpMeta8;
_fn_str = omc_AbsynUtil_pathString(threadData, _fq_path, _OMC_LIT84, 1, 0);
tmpMeta9 = mmc_mk_cons(_fn_str, mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT234, tmpMeta9, _inInfo);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 1: {
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,21,6) == 0) goto tmp3_end;
tmp10 = (listLength((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 6)))) == listLength(_inPosArgs) + listLength(_inNamedArgs));
if (0 != tmp10) goto goto_2;
_fn_str = omc_Types_unparseType(threadData, _inType);
tmpMeta11 = mmc_mk_cons(_fn_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT4, tmpMeta11, _inInfo);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta25;
modelica_integer tmp26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,21,6) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_fq_path = tmpMeta12;
{
modelica_metatype __omcQ_24tmpVar51;
modelica_metatype* tmp14;
modelica_metatype tmpMeta15;
modelica_string __omcQ_24tmpVar50;
modelica_integer tmp16;
modelica_metatype _var_loopVar = 0;
modelica_metatype _var;
_var_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 6)));
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar51 = tmpMeta15;
tmp14 = &__omcQ_24tmpVar51;
while(1) {
tmp16 = 1;
if (!listEmpty(_var_loopVar)) {
_var = MMC_CAR(_var_loopVar);
_var_loopVar = MMC_CDR(_var_loopVar);
tmp16--;
}
if (tmp16 == 0) {
__omcQ_24tmpVar50 = omc_Types_getVarName(threadData, _var);
*tmp14 = mmc_mk_cons(__omcQ_24tmpVar50,0);
tmp14 = &MMC_CDR(*tmp14);
} else if (tmp16 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp14 = mmc_mk_nil();
tmpMeta13 = __omcQ_24tmpVar51;
}
_field_names = tmpMeta13;
{
modelica_metatype __omcQ_24tmpVar53;
modelica_metatype* tmp18;
modelica_metatype tmpMeta19;
modelica_metatype __omcQ_24tmpVar52;
modelica_integer tmp20;
modelica_metatype _var_loopVar = 0;
modelica_metatype _var;
_var_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 6)));
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar53 = tmpMeta19;
tmp18 = &__omcQ_24tmpVar53;
while(1) {
tmp20 = 1;
if (!listEmpty(_var_loopVar)) {
_var = MMC_CAR(_var_loopVar);
_var_loopVar = MMC_CDR(_var_loopVar);
tmp20--;
}
if (tmp20 == 0) {
__omcQ_24tmpVar52 = omc_Types_getVarType(threadData, _var);
*tmp18 = mmc_mk_cons(__omcQ_24tmpVar52,0);
tmp18 = &MMC_CDR(*tmp18);
} else if (tmp20 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp18 = mmc_mk_nil();
tmpMeta17 = __omcQ_24tmpVar53;
}
_tys = tmpMeta17;
{
modelica_metatype __omcQ_24tmpVar55;
modelica_metatype* tmp22;
modelica_metatype tmpMeta23;
modelica_metatype __omcQ_24tmpVar54;
modelica_integer tmp24;
modelica_metatype _n_loopVar = 0;
modelica_metatype _n;
modelica_metatype _t_loopVar = 0;
modelica_metatype _t;
_n_loopVar = _field_names;
_t_loopVar = _tys;
tmpMeta23 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar55 = tmpMeta23;
tmp22 = &__omcQ_24tmpVar55;
while(1) {
tmp24 = 2;
if (!listEmpty(_n_loopVar)) {
_n = MMC_CAR(_n_loopVar);
_n_loopVar = MMC_CDR(_n_loopVar);
tmp24--;
}if (!listEmpty(_t_loopVar)) {
_t = MMC_CAR(_t_loopVar);
_t_loopVar = MMC_CDR(_t_loopVar);
tmp24--;
}
if (tmp24 == 0) {
__omcQ_24tmpVar54 = omc_Types_makeDefaultFuncArg(threadData, _n, _t);
*tmp22 = mmc_mk_cons(__omcQ_24tmpVar54,0);
tmp22 = &MMC_CDR(*tmp22);
} else if (tmp24 == 2) {
break;
} else {
goto goto_2;
}
}
*tmp22 = mmc_mk_nil();
tmpMeta21 = __omcQ_24tmpVar55;
}
_fargs = tmpMeta21;
_slots = omc_Static_makeEmptySlots(threadData, _fargs);
_outCache = omc_Static_elabInputArgs(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _slots, 1, 1, _inImplicit, _inPrefix, _inInfo, _inType, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 3))), 0 ,NULL ,&_slots ,&_const_lst ,&_bindings);
_const = omc_List_fold(threadData, _const_lst, boxvar_Types_constAnd, _OMC_LIT60);
_ty_const = omc_Static_elabConsts(threadData, _inType, _const);
tmpMeta25 = omc_List_fold(threadData, _slots, boxvar_Static_slotAnd, mmc_mk_boolean(1));
tmp26 = mmc_unbox_integer(tmpMeta25);
if (1 != tmp26) goto goto_2;
_args = omc_Static_slotListArgs(threadData, _slots);
if((!listEmpty(_bindings)))
{
_bindings = omc_Types_solvePolymorphicBindings(threadData, _bindings, _inInfo, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 2))));
{
modelica_metatype __omcQ_24tmpVar57;
modelica_metatype* tmp28;
modelica_metatype tmpMeta29;
modelica_metatype __omcQ_24tmpVar56;
modelica_integer tmp30;
modelica_metatype _tv_loopVar = 0;
modelica_metatype _tv;
_tv_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 4)));
tmpMeta29 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar57 = tmpMeta29;
tmp28 = &__omcQ_24tmpVar57;
while(1) {
tmp30 = 1;
if (!listEmpty(_tv_loopVar)) {
_tv = MMC_CAR(_tv_loopVar);
_tv_loopVar = MMC_CDR(_tv_loopVar);
tmp30--;
}
if (tmp30 == 0) {
__omcQ_24tmpVar56 = omc_Types_fixPolymorphicRestype(threadData, _tv, _bindings, _inInfo);
*tmp28 = mmc_mk_cons(__omcQ_24tmpVar56,0);
tmp28 = &MMC_CDR(*tmp28);
} else if (tmp30 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp28 = mmc_mk_nil();
tmpMeta27 = __omcQ_24tmpVar57;
}
_typeVars = tmpMeta27;
tmpMeta31 = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta31), MMC_UNTAGPTR(_ty), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta31))[4] = _typeVars;
_ty = tmpMeta31;
_prop = omc_Static_getProperties(threadData, _ty, _ty_const);
}
else
{
_prop = omc_Static_getProperties(threadData, _ty, _ty_const);
}
tmpMeta32 = mmc_mk_box6(35, &DAE_Exp_METARECORDCALL__desc, _fq_path, _args, _field_names, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 5))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 4))));
tmpMeta33 = mmc_mk_box2(0, tmpMeta32, _prop);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta33);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,21,6) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_fq_path = tmpMeta34;
tmpMeta35 = mmc_mk_box2(19, &Absyn_Exp_TUPLE__desc, _inPosArgs);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, tmpMeta35, 0, 0, _inPrefix, _inInfo ,NULL ,&_prop);
{
modelica_metatype __omcQ_24tmpVar59;
modelica_metatype* tmp37;
modelica_metatype tmpMeta38;
modelica_metatype __omcQ_24tmpVar58;
modelica_integer tmp39;
modelica_metatype _var_loopVar = 0;
modelica_metatype _var;
_var_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inType), 6)));
tmpMeta38 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar59 = tmpMeta38;
tmp37 = &__omcQ_24tmpVar59;
while(1) {
tmp39 = 1;
if (!listEmpty(_var_loopVar)) {
_var = MMC_CAR(_var_loopVar);
_var_loopVar = MMC_CDR(_var_loopVar);
tmp39--;
}
if (tmp39 == 0) {
__omcQ_24tmpVar58 = omc_Types_getVarType(threadData, _var);
*tmp37 = mmc_mk_cons(__omcQ_24tmpVar58,0);
tmp37 = &MMC_CDR(*tmp37);
} else if (tmp39 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp37 = mmc_mk_nil();
tmpMeta36 = __omcQ_24tmpVar59;
}
_tys = tmpMeta36;
tmpMeta40 = stringAppend(_OMC_LIT235,omc_Types_unparseType(threadData, omc_Types_getPropType(threadData, _prop)));
tmpMeta41 = stringAppend(tmpMeta40,_OMC_LIT236);
tmpMeta42 = mmc_mk_box3(17, &DAE_Type_T__TUPLE__desc, _tys, mmc_mk_none());
tmpMeta43 = stringAppend(tmpMeta41,omc_Types_unparseType(threadData, tmpMeta42));
_str = tmpMeta43;
_fn_str = omc_AbsynUtil_pathString(threadData, _fq_path, _OMC_LIT84, 1, 0);
tmpMeta44 = mmc_mk_cons(_fn_str, mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT239, tmpMeta44, _inInfo);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,21,6) == 0) goto tmp3_end;
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_fq_path = tmpMeta45;
tmpMeta46 = mmc_mk_box2(19, &Absyn_Exp_TUPLE__desc, _inPosArgs);
tmpMeta47 = stringAppend(_OMC_LIT240,omc_Dump_printExpStr(threadData, tmpMeta46));
_str = tmpMeta47;
_fn_str = omc_AbsynUtil_pathString(threadData, _fq_path, _OMC_LIT84, 1, 0);
tmpMeta48 = mmc_mk_cons(_fn_str, mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT239, tmpMeta48, _inInfo);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = mmc_mk_none();
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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_expProps = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_expProps) { *out_expProps = _expProps; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallArgsMetarecord(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_expProps)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabCallArgsMetarecord(threadData, _inCache, _inEnv, _inType, _inPosArgs, _inNamedArgs, tmp1, _stopElab, _inPrefix, _inInfo, out_expProps);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isValidWRTParallelScope__dispatch(threadData_t *threadData, modelica_metatype _inFn, modelica_boolean _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inScope, modelica_metatype _inInfo)
{
modelica_boolean _isValid;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_boolean tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _isBuiltin;
tmp4_2 = _inFuncParallelism;
tmp4_3 = _inScope;
{
modelica_string _scopeName = NULL;
modelica_string _errorString = NULL;
modelica_metatype _restScope = NULL;
modelica_metatype _ref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 14; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (1 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_boolean tmp9;
modelica_boolean tmp10;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
_ref = tmpMeta6;
_restScope = tmpMeta7;
tmp8 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp8) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmp9 = listMember(_scopeName, _OMC_LIT253);
if (1 != tmp9) goto goto_2;
tmp10 = (stringEqual(_scopeName, _OMC_LIT242));
if (0 != tmp10) goto goto_2;
tmp1 = omc_Static_isValidWRTParallelScope__dispatch(threadData, _inFn, _isBuiltin, _inFuncParallelism, _restScope, _inInfo);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_3);
tmpMeta12 = MMC_CDR(tmp4_3);
_ref = tmpMeta11;
tmpMeta13 = mmc_mk_cons(_ref, MMC_REFSTRUCTLIT(mmc_nil));
tmp14 = omc_FGraph_checkScopeType(threadData, tmpMeta13, _OMC_LIT255);
if (1 != tmp14) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_boolean tmp18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_3);
tmpMeta16 = MMC_CDR(tmp4_3);
_ref = tmpMeta15;
tmpMeta17 = mmc_mk_cons(_ref, MMC_REFSTRUCTLIT(mmc_nil));
tmp18 = omc_FGraph_checkScopeType(threadData, tmpMeta17, _OMC_LIT257);
if (1 != tmp18) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_boolean tmp21;
modelica_metatype tmpMeta22;
modelica_boolean tmp23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmp4_3);
tmpMeta20 = MMC_CDR(tmp4_3);
_ref = tmpMeta19;
tmp4 += 8;
tmp21 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp21) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmpMeta22 = mmc_mk_cons(_ref, MMC_REFSTRUCTLIT(mmc_nil));
tmp23 = omc_FGraph_checkScopeType(threadData, tmpMeta22, _OMC_LIT259);
if (1 != tmp23) goto goto_2;
tmpMeta24 = stringAppend(_OMC_LIT260,omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0));
tmpMeta25 = stringAppend(tmpMeta24,_OMC_LIT261);
tmpMeta26 = stringAppend(tmpMeta25,_OMC_LIT93);
tmpMeta27 = stringAppend(tmpMeta26,_OMC_LIT262);
tmpMeta28 = stringAppend(tmpMeta27,_scopeName);
tmpMeta29 = stringAppend(tmpMeta28,_OMC_LIT93);
tmpMeta30 = stringAppend(tmpMeta29,_OMC_LIT263);
_errorString = tmpMeta30;
tmpMeta31 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT266, tmpMeta31, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_boolean tmp34;
modelica_metatype tmpMeta35;
modelica_boolean tmp36;
modelica_boolean tmp37;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmp4_3);
tmpMeta33 = MMC_CDR(tmp4_3);
_ref = tmpMeta32;
tmp34 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp34) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmpMeta35 = mmc_mk_cons(_ref, MMC_REFSTRUCTLIT(mmc_nil));
tmp36 = omc_FGraph_checkScopeType(threadData, tmpMeta35, _OMC_LIT259);
if (1 != tmp36) goto goto_2;
tmp37 = (stringEqual(_scopeName, omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0)));
if (0 != tmp37) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_boolean tmp40;
modelica_metatype tmpMeta41;
modelica_boolean tmp42;
modelica_boolean tmp43;
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(tmp4_2,1,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta38 = MMC_CAR(tmp4_3);
tmpMeta39 = MMC_CDR(tmp4_3);
_ref = tmpMeta38;
tmp40 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp40) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmpMeta41 = mmc_mk_cons(_ref, MMC_REFSTRUCTLIT(mmc_nil));
tmp42 = omc_FGraph_checkScopeType(threadData, tmpMeta41, _OMC_LIT259);
if (1 != tmp42) goto goto_2;
tmp43 = (stringEqual(_scopeName, omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0)));
if (1 != tmp43) goto goto_2;
tmpMeta44 = stringAppend(_OMC_LIT267,omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0));
tmpMeta45 = stringAppend(tmpMeta44,_OMC_LIT268);
tmpMeta46 = stringAppend(tmpMeta45,_OMC_LIT93);
tmpMeta47 = stringAppend(tmpMeta46,_OMC_LIT269);
tmpMeta48 = stringAppend(tmpMeta47,_OMC_LIT270);
tmpMeta49 = stringAppend(tmpMeta48,_OMC_LIT271);
_errorString = tmpMeta49;
tmpMeta50 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT266, tmpMeta50, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_boolean tmp53;
modelica_boolean tmp54;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta51 = MMC_CAR(tmp4_3);
tmpMeta52 = MMC_CDR(tmp4_3);
_ref = tmpMeta51;
tmp53 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp53) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmp54 = (stringEqual(_scopeName, _OMC_LIT242));
if (1 != tmp54) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_boolean tmp57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta55 = MMC_CAR(tmp4_3);
tmpMeta56 = MMC_CDR(tmp4_3);
_ref = tmpMeta55;
tmp4 += 4;
tmp57 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp57) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmpMeta58 = stringAppend(_OMC_LIT267,omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0));
tmpMeta59 = stringAppend(tmpMeta58,_OMC_LIT272);
tmpMeta60 = stringAppend(tmpMeta59,_scopeName);
tmpMeta61 = stringAppend(tmpMeta60,_OMC_LIT273);
tmpMeta62 = stringAppend(tmpMeta61,_OMC_LIT269);
tmpMeta63 = stringAppend(tmpMeta62,_OMC_LIT274);
tmpMeta64 = stringAppend(tmpMeta63,_OMC_LIT271);
_errorString = tmpMeta64;
tmpMeta65 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT266, tmpMeta65, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_boolean tmp68;
modelica_boolean tmp69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta66 = MMC_CAR(tmp4_3);
tmpMeta67 = MMC_CDR(tmp4_3);
_ref = tmpMeta66;
tmp68 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp68) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmp69 = (stringEqual(_scopeName, omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0)));
if (1 != tmp69) goto goto_2;
tmpMeta70 = stringAppend(_OMC_LIT275,omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0));
tmpMeta71 = stringAppend(tmpMeta70,_OMC_LIT276);
tmpMeta72 = stringAppend(tmpMeta71,_OMC_LIT93);
tmpMeta73 = stringAppend(tmpMeta72,_OMC_LIT277);
_errorString = tmpMeta73;
tmpMeta74 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT266, tmpMeta74, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta75;
modelica_metatype tmpMeta76;
modelica_boolean tmp77;
modelica_metatype tmpMeta78;
modelica_boolean tmp79;
modelica_metatype tmpMeta80;
modelica_metatype tmpMeta81;
modelica_metatype tmpMeta82;
modelica_metatype tmpMeta83;
modelica_metatype tmpMeta84;
modelica_metatype tmpMeta85;
modelica_metatype tmpMeta86;
modelica_metatype tmpMeta87;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta75 = MMC_CAR(tmp4_3);
tmpMeta76 = MMC_CDR(tmp4_3);
_ref = tmpMeta75;
tmp77 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp77) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmpMeta78 = mmc_mk_cons(_ref, MMC_REFSTRUCTLIT(mmc_nil));
tmp79 = omc_FGraph_checkScopeType(threadData, tmpMeta78, _OMC_LIT259);
if (1 != tmp79) goto goto_2;
tmpMeta80 = stringAppend(_OMC_LIT275,omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0));
tmpMeta81 = stringAppend(tmpMeta80,_OMC_LIT278);
tmpMeta82 = stringAppend(tmpMeta81,_scopeName);
tmpMeta83 = stringAppend(tmpMeta82,_OMC_LIT273);
tmpMeta84 = stringAppend(tmpMeta83,_OMC_LIT279);
tmpMeta85 = stringAppend(tmpMeta84,_OMC_LIT280);
tmpMeta86 = stringAppend(tmpMeta85,_OMC_LIT271);
_errorString = tmpMeta86;
tmpMeta87 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT266, tmpMeta87, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
modelica_boolean tmp90;
modelica_boolean tmp91;
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_2,2,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta88 = MMC_CAR(tmp4_3);
tmpMeta89 = MMC_CDR(tmp4_3);
_ref = tmpMeta88;
tmp90 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp90) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmp91 = (stringEqual(_scopeName, _OMC_LIT242));
if (1 != tmp91) goto goto_2;
tmpMeta92 = stringAppend(_OMC_LIT275,omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0));
tmpMeta93 = stringAppend(tmpMeta92,_OMC_LIT281);
tmpMeta94 = stringAppend(tmpMeta93,_OMC_LIT273);
tmpMeta95 = stringAppend(tmpMeta94,_OMC_LIT279);
tmpMeta96 = stringAppend(tmpMeta95,_OMC_LIT280);
tmpMeta97 = stringAppend(tmpMeta96,_OMC_LIT271);
_errorString = tmpMeta97;
tmpMeta98 = mmc_mk_cons(_errorString, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT266, tmpMeta98, _inInfo);
tmp1 = 0;
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta99;
modelica_metatype tmpMeta100;
modelica_boolean tmp101;
modelica_boolean tmp102;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta99 = MMC_CAR(tmp4_3);
tmpMeta100 = MMC_CDR(tmp4_3);
_ref = tmpMeta99;
tmp101 = omc_FNode_isRefTop(threadData, _ref);
if (0 != tmp101) goto goto_2;
_scopeName = omc_FNode_refName(threadData, _ref);
tmp102 = (stringEqual(_scopeName, omc_AbsynUtil_pathString(threadData, _inFn, _OMC_LIT84, 1, 0)));
if (0 != tmp102) goto goto_2;
tmp1 = 1;
goto tmp3_done;
}
case 13: {
tmp1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 14) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_isValid = tmp1;
_return: OMC_LABEL_UNUSED
return _isValid;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isValidWRTParallelScope__dispatch(threadData_t *threadData, modelica_metatype _inFn, modelica_metatype _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inScope, modelica_metatype _inInfo)
{
modelica_integer tmp1;
modelica_boolean _isValid;
modelica_metatype out_isValid;
tmp1 = mmc_unbox_integer(_isBuiltin);
_isValid = omc_Static_isValidWRTParallelScope__dispatch(threadData, _inFn, tmp1, _inFuncParallelism, _inScope, _inInfo);
out_isValid = mmc_mk_icon(_isValid);
return out_isValid;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isValidWRTParallelScope(threadData_t *threadData, modelica_metatype _inFn, modelica_boolean _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inEnv, modelica_metatype _inInfo)
{
modelica_boolean _isValid;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_isValid = omc_Static_isValidWRTParallelScope__dispatch(threadData, _inFn, _isBuiltin, _inFuncParallelism, omc_FGraph_currentScope(threadData, _inEnv), _inInfo);
_return: OMC_LABEL_UNUSED
return _isValid;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isValidWRTParallelScope(threadData_t *threadData, modelica_metatype _inFn, modelica_metatype _isBuiltin, modelica_metatype _inFuncParallelism, modelica_metatype _inEnv, modelica_metatype _inInfo)
{
modelica_integer tmp1;
modelica_boolean _isValid;
modelica_metatype out_isValid;
tmp1 = mmc_unbox_integer(_isBuiltin);
_isValid = omc_Static_isValidWRTParallelScope(threadData, _inFn, tmp1, _inFuncParallelism, _inEnv, _inInfo);
out_isValid = mmc_mk_icon(_isValid);
return out_isValid;
}
DLLExport
modelica_metatype omc_Static_inlineBuiltin(threadData_t *threadData, modelica_metatype _isBuiltin, modelica_metatype _inlineType)
{
modelica_metatype _outInlineType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _isBuiltin;
{
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,2,0) == 0) goto tmp3_end;
tmpMeta1 = _OMC_LIT282;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inlineType;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outInlineType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outInlineType;
}
DLLExport
modelica_metatype omc_Static_elabCallArgs3(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _typelist, modelica_metatype _fn, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _typeVars, modelica_boolean _impl, modelica_metatype _pre, modelica_metatype _info, modelica_metatype *out_expProps)
{
modelica_metatype _outCache = NULL;
modelica_metatype _expProps = NULL;
modelica_metatype _callExp = NULL;
modelica_metatype _call_exp = NULL;
modelica_metatype _args_1 = NULL;
modelica_metatype _args_2 = NULL;
modelica_metatype _constlist = NULL;
modelica_metatype _const = NULL;
modelica_metatype _restype = NULL;
modelica_metatype _functype = NULL;
modelica_metatype _isBuiltin = NULL;
modelica_metatype _funcParal = NULL;
modelica_boolean _isPure;
modelica_boolean _tuple_;
modelica_boolean _builtin;
modelica_boolean _isImpure;
modelica_metatype _inlineType = NULL;
modelica_metatype _fn_1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _prop_1 = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _tyconst = NULL;
modelica_metatype _vect_dims = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _slots2 = NULL;
modelica_metatype _functionTree = NULL;
modelica_metatype _status = NULL;
modelica_metatype _cache = NULL;
modelica_boolean _didInline;
modelica_boolean _b;
modelica_boolean _onlyOneFunction;
modelica_boolean _isFunctionPointer;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_boolean tmp17;
modelica_metatype tmpMeta18;
modelica_integer tmp19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_boolean tmp24;
modelica_metatype tmpMeta25;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_onlyOneFunction = (listLength(_typelist) == ((modelica_integer) 1));
tmpMeta16 = omc_Static_elabTypes(threadData, _inCache, _inEnv, _args, _nargs, _typeVars, _typelist, _onlyOneFunction, 1, _impl, _pre, _info, &tmpMeta1, &tmpMeta2, &tmpMeta3, &tmpMeta4, &tmpMeta14, &tmpMeta15);
_cache = tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta4,11,4) == 0) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 4));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
tmp8 = mmc_unbox_integer(tmpMeta7);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 4));
tmp10 = mmc_unbox_integer(tmpMeta9);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 5));
tmp12 = mmc_unbox_integer(tmpMeta11);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 7));
_args_1 = tmpMeta1;
_constlist = tmpMeta2;
_restype = tmpMeta3;
_functype = tmpMeta4;
_inlineType = tmpMeta6;
_isPure = tmp8;
_isImpure = tmp10;
_isFunctionPointer = tmp12;
_funcParal = tmpMeta13;
_vect_dims = tmpMeta14;
_slots = tmpMeta15;
_fn_1 = omc_Static_deoverloadFuncname(threadData, _fn, _functype, _inEnv ,&_functype);
_tuple_ = omc_Types_isTuple(threadData, _restype);
_isBuiltin = omc_Static_isBuiltinFunc(threadData, _fn_1, _functype ,&_builtin ,&_fn_1);
_inlineType = omc_Static_inlineBuiltin(threadData, _isBuiltin, _inlineType);
tmp17 = omc_Static_isValidWRTParallelScope(threadData, _fn, _builtin, _funcParal, _inEnv, _info);
if (1 != tmp17) MMC_THROW_INTERNAL();
_const = omc_List_fold(threadData, _constlist, boxvar_Types_constAnd, _OMC_LIT60);
_const = (((omc_Flags_isSet(threadData, _OMC_LIT286) && (!_builtin)) || (!_isPure))?_OMC_LIT52:_const);
_cache = omc_Static_determineConstSpecialFunc(threadData, _cache, _inEnv, _const, _fn_1 ,&_const);
_tyconst = omc_Static_elabConsts(threadData, _restype, _const);
_prop = omc_Static_getProperties(threadData, _restype, _tyconst);
_tp = omc_Types_simplifyType(threadData, _restype);
_args_2 = omc_Static_addDefaultArgs(threadData, _slots, _info ,&_slots2);
tmpMeta18 = omc_List_fold(threadData, _slots2, boxvar_Static_slotAnd, mmc_mk_boolean(1));
tmp19 = mmc_unbox_integer(tmpMeta18);
if (1 != tmp19) MMC_THROW_INTERNAL();
tmpMeta20 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _tp, mmc_mk_boolean(_tuple_), mmc_mk_boolean(_builtin), mmc_mk_boolean((_isImpure || (!_isPure))), mmc_mk_boolean(_isFunctionPointer), _inlineType, _OMC_LIT287);
tmpMeta21 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fn_1, _args_2, tmpMeta20);
_callExp = tmpMeta21;
_call_exp = omc_Static_vectorizeCall(threadData, _callExp, _vect_dims, _slots2, _prop, _info ,&_prop_1);
_cache = omc_Static_instantiateDaeFunction(threadData, _cache, _inEnv, (omc_Lookup_isFunctionCallViaComponent(threadData, _cache, _inEnv, _fn)?_fn:_fn_1), _builtin, mmc_mk_none(), 1 ,&_status);
_cache = omc_Static_instantiateImplicitRecordConstructors(threadData, _cache, _inEnv, _args_1);
_functionTree = omc_FCore_getFunctionTree(threadData, _cache);
tmpMeta22 = mmc_mk_box2(0, mmc_mk_some(_functionTree), _OMC_LIT290);
_call_exp = omc_Inline_inlineExp(threadData, _call_exp, tmpMeta22, _OMC_LIT292 ,NULL ,&_didInline ,NULL);
_call_exp = omc_ExpressionSimplify_condsimplify(threadData, _didInline, _call_exp, NULL);
_didInline = (_didInline && (!omc_Config_acceptMetaModelicaGrammar(threadData)));
_prop_1 = (_didInline?omc_Types_setPropType(threadData, _prop_1, _restype):_prop_1);
if((!_isImpure))
{
_cache = omc_Ceval_cevalIfConstant(threadData, _cache, _inEnv, _call_exp, _prop_1, _impl, _info ,&_call_exp ,&_prop_1);
}
tmp24 = (modelica_boolean)omc_Util_isSuccess(threadData, _status);
if(tmp24)
{
tmpMeta23 = mmc_mk_box2(0, _call_exp, _prop_1);
tmpMeta25 = mmc_mk_some(tmpMeta23);
}
else
{
tmpMeta25 = mmc_mk_none();
}
_expProps = tmpMeta25;
_outCache = _cache;
_return: OMC_LABEL_UNUSED
if (out_expProps) { *out_expProps = _expProps; }
return _outCache;
}
modelica_metatype boxptr_Static_elabCallArgs3(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _typelist, modelica_metatype _fn, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _typeVars, modelica_metatype _impl, modelica_metatype _pre, modelica_metatype _info, modelica_metatype *out_expProps)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_impl);
_outCache = omc_Static_elabCallArgs3(threadData, _inCache, _inEnv, _typelist, _fn, _args, _nargs, _typeVars, tmp1, _pre, _info, out_expProps);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgs2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inAbsynExpLst, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _typeVars, modelica_boolean _inBoolean, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _info, modelica_integer _numErrors, modelica_metatype *out_expProps)
{
modelica_metatype _outCache = NULL;
modelica_metatype _expProps = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_boolean tmp4_6;volatile modelica_metatype tmp4_7;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inPath;
tmp4_4 = _inAbsynExpLst;
tmp4_5 = _inAbsynNamedArgLst;
tmp4_6 = _inBoolean;
tmp4_7 = _inPrefix;
{
modelica_metatype _t = NULL;
modelica_metatype _outtype = NULL;
modelica_metatype _functype = NULL;
modelica_metatype _tp1 = NULL;
modelica_metatype _fargs = NULL;
modelica_metatype _env_1 = NULL;
modelica_metatype _env_2 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _recordEnv = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _newslots = NULL;
modelica_metatype _newslots2 = NULL;
modelica_metatype _args_1 = NULL;
modelica_metatype _args_2 = NULL;
modelica_metatype _constlist = NULL;
modelica_metatype _constInputArgs = NULL;
modelica_metatype _const = NULL;
modelica_metatype _tyconst = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _prop_1 = NULL;
modelica_metatype _cl = NULL;
modelica_metatype _recordCl = NULL;
modelica_metatype _fn = NULL;
modelica_metatype _fn_1 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _args = NULL;
modelica_metatype _nargs = NULL;
modelica_boolean _impl;
modelica_metatype _typelist = NULL;
modelica_metatype _vect_dims = NULL;
modelica_metatype _call_exp = NULL;
modelica_metatype _callExp = NULL;
modelica_metatype _daeexp = NULL;
modelica_metatype _t_lst = NULL;
modelica_metatype _names = NULL;
modelica_string _fn_str = NULL;
modelica_string _types_str = NULL;
modelica_string _scope = NULL;
modelica_string _pre_str = NULL;
modelica_string _s = NULL;
modelica_string _name = NULL;
modelica_string _argStr = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _re = NULL;
modelica_metatype _operNames = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _daecref = NULL;
modelica_metatype _func = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 12; 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;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_args = tmp4_4;
_nargs = tmp4_5;
_impl = tmp4_6;
_pre = tmp4_7;
tmpMeta8 = omc_Lookup_lookupClassIdent(threadData, _cache, _env, _OMC_LIT293, mmc_mk_none(), &tmpMeta6, NULL);
_cache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,8) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,8,0) == 0) goto goto_2;
_cl = tmpMeta6;
tmpMeta12 = omc_Lookup_lookupClass(threadData, _cache, _env, _fn, mmc_mk_none(), &tmpMeta9, &tmpMeta11);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,8) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,3,1) == 0) goto goto_2;
_cl = tmpMeta9;
_env_1 = tmpMeta11;
_cache = omc_Lookup_lookupRecordConstructorClass(threadData, _cache, _env_1, _fn ,&_cl ,&_env_2);
omc_SCodeUtil_getClassComponents(threadData, _cl, &tmpMeta13);
if (listEmpty(tmpMeta13)) goto goto_2;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
_names = tmpMeta15;
_fargs = omc_List_map(threadData, _names, boxvar_Static_createDummyFarg);
_slots = omc_Static_makeEmptySlots(threadData, _fargs);
_cache = omc_Static_elabInputArgs(threadData, _cache, _env, _args, _nargs, _slots, 1, 0, _impl, _pre, _info, _OMC_LIT42, _fn, 1 ,NULL ,&_newslots ,NULL ,NULL);
_cache = omc_Static_fillGraphicsDefaultSlots(threadData, _cache, _newslots, _cl, _env_2, _impl, _pre, _info ,&_newslots2 ,NULL ,NULL);
_args_2 = omc_Static_slotListArgs(threadData, _newslots2);
_tp = omc_Static_complexTypeFromSlots(threadData, _newslots2, _OMC_LIT80);
tmpMeta16 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _tp, mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT294, _OMC_LIT287);
tmpMeta17 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _fn, _args_2, tmpMeta16);
tmpMeta18 = mmc_mk_box2(0, tmpMeta17, _OMC_LIT295);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_some(tmpMeta18);
goto tmp3_done;
}
case 1: {
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;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_args = tmp4_4;
_nargs = tmp4_5;
_impl = tmp4_6;
_pre = tmp4_7;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT296);
_cache = omc_InstFunction_getRecordConstructorFunction(threadData, _cache, _env, _fn ,&_func);
tmpMeta19 = _func;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,1,3) == 0) goto goto_2;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 3));
_path = tmpMeta20;
_tp1 = tmpMeta21;
tmpMeta22 = _tp1;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,11,4) == 0) goto goto_2;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 5));
_fargs = tmpMeta23;
_outtype = tmpMeta24;
_path = tmpMeta25;
_slots = omc_Static_makeEmptySlots(threadData, _fargs);
_cache = omc_Static_elabInputArgs(threadData, _cache, _env, _args, _nargs, _slots, 1, 1, _impl, _pre, _info, _tp1, _path, 0 ,NULL ,&_newslots ,&_constInputArgs ,NULL);
_args_2 = omc_Static_addDefaultArgs(threadData, _newslots, _info ,&_newslots2);
_vect_dims = omc_Static_slotsVectorizable(threadData, _newslots2, _info);
_constlist = _constInputArgs;
_const = omc_List_fold(threadData, _constlist, boxvar_Types_constAnd, _OMC_LIT60);
_tyconst = omc_Static_elabConsts(threadData, _outtype, _const);
_prop = omc_Static_getProperties(threadData, _outtype, _tyconst);
tmpMeta26 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _outtype, mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT294, _OMC_LIT287);
tmpMeta27 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _path, _args_2, tmpMeta26);
_callExp = tmpMeta27;
_call_exp = omc_Static_vectorizeCall(threadData, _callExp, _vect_dims, _newslots2, _prop, _info ,&_prop_1);
tmpMeta28 = mmc_mk_box2(0, _call_exp, _prop_1);
_expProps = mmc_mk_some(tmpMeta28);
omc_Mutable_update(threadData, _stopElab, mmc_mk_boolean(1));
omc_ErrorExt_rollBack(threadData, _OMC_LIT296);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _expProps;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta29;
modelica_integer tmp30;
modelica_boolean tmp31;
modelica_boolean tmp32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_args = tmp4_4;
_nargs = tmp4_5;
_impl = tmp4_6;
_pre = tmp4_7;
tmpMeta29 = omc_Mutable_access(threadData, _stopElab);
tmp30 = mmc_unbox_integer(tmpMeta29);
if (0 != tmp30) goto goto_2;
_cache = omc_Lookup_lookupClass(threadData, _cache, _env, _fn, mmc_mk_none() ,&_recordCl ,&_recordEnv);
tmp31 = omc_SCodeUtil_isOperatorRecord(threadData, _recordCl);
if (1 != tmp31) goto goto_2;
_fn_1 = omc_AbsynUtil_joinPaths(threadData, _fn, _OMC_LIT298);
_cache = omc_Lookup_lookupClass(threadData, _cache, _recordEnv, _fn_1, mmc_mk_none() ,&_recordCl ,&_recordEnv);
tmp32 = omc_SCodeUtil_isOperator(threadData, _recordCl);
if (1 != tmp32) goto goto_2;
_operNames = omc_AbsynToSCode_getListofQualOperatorFuncsfromOperator(threadData, _recordCl);
tmpMeta36 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta37 = omc_Lookup_lookupFunctionsListInEnv(threadData, _cache, _recordEnv, _operNames, _info, tmpMeta36, &tmpMeta33);
_cache = tmpMeta37;
if (listEmpty(tmpMeta33)) goto goto_2;
tmpMeta34 = MMC_CAR(tmpMeta33);
tmpMeta35 = MMC_CDR(tmpMeta33);
_typelist = tmpMeta33;
omc_Mutable_update(threadData, _stopElab, mmc_mk_boolean(1));
_cache = omc_Static_elabCallArgs3(threadData, _cache, _env, _typelist, _fn_1, _args, _nargs, _typeVars, _impl, _pre, _info ,&_expProps);
omc_ErrorExt_rollBack(threadData, _OMC_LIT296);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _expProps;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp38;
modelica_metatype tmpMeta39;
modelica_integer tmp40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_args = tmp4_4;
_nargs = tmp4_5;
_impl = tmp4_6;
_pre = tmp4_7;
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT296);
tmp38 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp38) goto goto_2;
tmpMeta39 = omc_Mutable_access(threadData, _stopElab);
tmp40 = mmc_unbox_integer(tmpMeta39);
if (0 != tmp40) goto goto_2;
tmpMeta42 = omc_Lookup_lookupType(threadData, _cache, _env, _fn, mmc_mk_none(), &tmpMeta41, NULL);
_cache = tmpMeta42;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta41,21,6) == 0) goto goto_2;
_t = tmpMeta41;
omc_Mutable_update(threadData, _stopElab, mmc_mk_boolean(1));
tmpMeta[0+0] = omc_Static_elabCallArgsMetarecord(threadData, _cache, _env, _t, _args, _nargs, _impl, _stopElab, _pre, _info, &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta43;
modelica_integer tmp44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_args = tmp4_4;
_nargs = tmp4_5;
_impl = tmp4_6;
_pre = tmp4_7;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT299);
tmpMeta43 = omc_Mutable_access(threadData, _stopElab);
tmp44 = mmc_unbox_integer(tmpMeta43);
if (0 != tmp44) goto goto_2;
tmpMeta48 = omc_Lookup_lookupFunctionsInEnv(threadData, _cache, _env, _fn, _info, &tmpMeta45);
_cache = tmpMeta48;
if (listEmpty(tmpMeta45)) goto goto_2;
tmpMeta46 = MMC_CAR(tmpMeta45);
tmpMeta47 = MMC_CDR(tmpMeta45);
_typelist = tmpMeta45;
omc_Mutable_update(threadData, _stopElab, mmc_mk_boolean(1));
_cache = omc_Static_elabCallArgs3(threadData, _cache, _env, _typelist, _fn, _args, _nargs, _typeVars, _impl, _pre, _info ,&_expProps);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _expProps;
goto tmp3_done;
}
case 5: {
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;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_args = tmp4_4;
_nargs = tmp4_5;
_impl = tmp4_6;
_pre = tmp4_7;
tmpMeta52 = omc_Lookup_lookupFunctionsInEnv(threadData, _cache, _env, _fn, _info, &tmpMeta49);
_cache = tmpMeta52;
if (listEmpty(tmpMeta49)) goto goto_2;
tmpMeta50 = MMC_CAR(tmpMeta49);
tmpMeta51 = MMC_CDR(tmpMeta49);
if (!listEmpty(tmpMeta51)) goto goto_2;
_typelist = tmpMeta49;
_tp1 = tmpMeta50;
tmpMeta53 = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_Static_elabTypes(threadData, _cache, _env, _args, _nargs, tmpMeta53, _typelist, 1, 0, _impl, _pre, _info ,&_args_1 ,NULL ,NULL ,&_functype ,NULL ,NULL);
_argStr = omc_ExpressionDump_printExpListStr(threadData, _args_1);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta54 = stringAppend(omc_AbsynUtil_pathString(threadData, _fn, _OMC_LIT84, 1, 0),_OMC_LIT300);
tmpMeta55 = stringAppend(tmpMeta54,_argStr);
tmpMeta56 = stringAppend(tmpMeta55,_OMC_LIT301);
tmpMeta57 = stringAppend(tmpMeta56,omc_Types_unparseType(threadData, _functype));
_fn_str = tmpMeta57;
tmpMeta58 = stringAppend(_OMC_LIT302,omc_Types_unparseType(threadData, _tp1));
_types_str = tmpMeta58;
tmpMeta59 = mmc_mk_cons(_fn_str, mmc_mk_cons(_pre_str, mmc_mk_cons(_types_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_Error_getNumErrorMessages(threadData) != _numErrors), _OMC_LIT305, tmpMeta59, _info);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta60;
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_boolean tmp63;
modelica_metatype tmpMeta64;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
tmpMeta62 = omc_Lookup_lookupClass(threadData, _cache, _env, _fn, mmc_mk_none(), &tmpMeta60, NULL);
_cache = tmpMeta62;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta60,2,8) == 0) goto goto_2;
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 6));
_re = tmpMeta61;
tmp63 = omc_SCodeUtil_isFunctionRestriction(threadData, _re);
if (0 != tmp63) goto goto_2;
_fn_str = omc_AbsynUtil_pathString(threadData, _fn, _OMC_LIT84, 1, 0);
_s = omc_SCodeDump_restrString(threadData, _re);
tmpMeta64 = mmc_mk_cons(_fn_str, mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT308, tmpMeta64, _info);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_pre = tmp4_7;
tmpMeta70 = omc_Lookup_lookupFunctionsInEnv(threadData, _cache, _env, _fn, _info, &tmpMeta65);
_cache = tmpMeta70;
if (listEmpty(tmpMeta65)) goto goto_2;
tmpMeta66 = MMC_CAR(tmpMeta65);
tmpMeta67 = MMC_CDR(tmpMeta65);
if (listEmpty(tmpMeta67)) goto goto_2;
tmpMeta68 = MMC_CAR(tmpMeta67);
tmpMeta69 = MMC_CDR(tmpMeta67);
_typelist = tmpMeta65;
_t_lst = omc_List_map(threadData, _typelist, boxvar_Types_unparseType);
_fn_str = omc_AbsynUtil_pathString(threadData, _fn, _OMC_LIT84, 1, 0);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
_types_str = stringDelimitList(_t_lst, _OMC_LIT309);
tmpMeta71 = mmc_mk_cons(_fn_str, mmc_mk_cons(_pre_str, mmc_mk_cons(_types_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessage(threadData, _OMC_LIT305, tmpMeta71, _info);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 8: {
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_metatype tmpMeta84;
modelica_metatype tmpMeta85;
if (listEmpty(tmp4_4)) goto tmp3_end;
tmpMeta72 = MMC_CAR(tmp4_4);
tmpMeta73 = MMC_CDR(tmp4_4);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta72,2,1) == 0) goto tmp3_end;
tmpMeta74 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta72), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta74,2,2) == 0) goto tmp3_end;
tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta74), 2));
if (!listEmpty(tmpMeta73)) goto tmp3_end;
_name = tmpMeta75;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_impl = tmp4_6;
_pre = tmp4_7;
if (!omc_Config_acceptOptimicaGrammar(threadData)) goto tmp3_end;
_cref = omc_AbsynUtil_pathToCref(threadData, _fn);
tmpMeta82 = omc_Static_elabCref(threadData, _cache, _env, _cref, _impl, 1, _pre, _info, &tmpMeta76);
_cache = tmpMeta82;
if (optionNone(tmpMeta76)) goto goto_2;
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta76), 1));
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta77), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta78,6,2) == 0) goto goto_2;
tmpMeta79 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta78), 2));
tmpMeta80 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta78), 3));
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta77), 2));
_daeexp = tmpMeta78;
_daecref = tmpMeta79;
_tp = tmpMeta80;
_prop = tmpMeta81;
omc_ErrorExt_rollBack(threadData, _OMC_LIT299);
tmpMeta83 = mmc_mk_box3(5, &DAE_ComponentRef_OPTIMICA__ATTR__INST__CREF__desc, _daecref, _name);
tmpMeta84 = mmc_mk_box3(9, &DAE_Exp_CREF__desc, tmpMeta83, _tp);
_daeexp = tmpMeta84;
tmpMeta85 = mmc_mk_box2(0, _daeexp, _prop);
_expProps = mmc_mk_some(tmpMeta85);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _expProps;
goto tmp3_done;
}
case 9: {
modelica_boolean tmp86;
modelica_metatype tmpMeta88;
modelica_metatype tmpMeta89;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
tmp86 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
omc_Lookup_lookupType(threadData, _cache, _env, _fn, mmc_mk_none(), NULL, NULL);
tmp86 = 1;
goto goto_87;
goto_87:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp86) {goto goto_2;}
tmpMeta88 = stringAppend(omc_FGraph_printGraphPathStr(threadData, _env),_OMC_LIT310);
_scope = tmpMeta88;
_fn_str = omc_AbsynUtil_pathString(threadData, _fn, _OMC_LIT84, 1, 0);
tmpMeta89 = mmc_mk_cons(_fn_str, mmc_mk_cons(_scope, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT313, tmpMeta89, _info);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta90;
modelica_metatype tmpMeta91;
modelica_metatype tmpMeta92;
modelica_metatype tmpMeta93;
modelica_metatype tmpMeta94;
_cache = tmp4_1;
_env = tmp4_2;
_fn = tmp4_3;
_pre = tmp4_7;
tmpMeta91 = omc_Lookup_lookupFunctionsInEnv(threadData, _cache, _env, _fn, _info, &tmpMeta90);
_cache = tmpMeta91;
if (!listEmpty(tmpMeta90)) goto goto_2;
_fn_str = omc_AbsynUtil_pathString(threadData, _fn, _OMC_LIT84, 1, 0);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta92 = stringAppend(_fn_str,_OMC_LIT314);
tmpMeta93 = stringAppend(tmpMeta92,_pre_str);
_fn_str = tmpMeta93;
tmpMeta94 = mmc_mk_cons(_fn_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT317, tmpMeta94, _info);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 11: {
modelica_boolean tmp95;
modelica_metatype tmpMeta96;
modelica_metatype tmpMeta97;
modelica_metatype tmpMeta98;
_env = tmp4_2;
_fn = tmp4_3;
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT299);
tmp95 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp95) goto goto_2;
tmpMeta96 = stringAppend(_OMC_LIT318,omc_AbsynUtil_pathString(threadData, _fn, _OMC_LIT84, 1, 0));
tmpMeta97 = stringAppend(tmpMeta96,_OMC_LIT71);
tmpMeta98 = stringAppend(tmpMeta97,omc_FGraph_printGraphPathStr(threadData, _env));
omc_Debug_traceln(threadData, tmpMeta98);
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 < 12) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_expProps = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_expProps) { *out_expProps = _expProps; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallArgs2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inAbsynExpLst, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _typeVars, modelica_metatype _inBoolean, modelica_metatype _stopElab, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _numErrors, modelica_metatype *out_expProps)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
tmp2 = mmc_unbox_integer(_numErrors);
_outCache = omc_Static_elabCallArgs2(threadData, _inCache, _inEnv, _inPath, _inAbsynExpLst, _inAbsynNamedArgLst, _typeVars, tmp1, _stopElab, _inPrefix, _info, tmp2, out_expProps);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createInputVariableReplacements(threadData_t *threadData, modelica_metatype _inSlotLst, modelica_metatype _inVarsRepl)
{
modelica_metatype _outVarsRepl = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inSlotLst;
{
modelica_metatype _o = NULL;
modelica_string _id = NULL;
modelica_metatype _e = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 1;
tmpMeta1 = _inVarsRepl;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
tmp11 = mmc_unbox_integer(tmpMeta10);
if (1 != tmp11) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
if (optionNone(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
_id = tmpMeta9;
_e = tmpMeta13;
_rest = tmpMeta7;
tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
_o = omc_VarTransform_addReplacement(threadData, _inVarsRepl, omc_ComponentReference_makeCrefIdent(threadData, _id, _OMC_LIT42, tmpMeta14), _e);
tmpMeta1 = omc_Static_createInputVariableReplacements(threadData, _rest, _o);
goto tmp3_done;
}
case 2: {
tmpMeta1 = omc_Static_createInputVariableReplacements(threadData, listRest(_inSlotLst), _inVarsRepl);
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:;
}
}
_outVarsRepl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outVarsRepl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsEvaluateArrayLength3(threadData_t *threadData, modelica_metatype _inDim, modelica_metatype _inTpl, modelica_metatype *out_outTpl)
{
modelica_metatype _outDim = NULL;
modelica_metatype _outTpl = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inDim;
tmp4_2 = _inTpl;
{
modelica_integer _i;
modelica_metatype _exp = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
_exp = tmpMeta6;
_cache = tmpMeta7;
_env = tmpMeta8;
tmpMeta12 = omc_Ceval_ceval(threadData, _cache, _env, _exp, 0, _OMC_LIT54, ((modelica_integer) 0), &tmpMeta9);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmp11 = mmc_unbox_integer(tmpMeta10);
_i = tmp11;
tmpMeta13 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_i));
tmpMeta14 = mmc_mk_box2(0, _cache, _env);
tmpMeta[0+0] = tmpMeta13;
tmpMeta[0+1] = tmpMeta14;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inDim;
tmpMeta[0+1] = _inTpl;
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:;
}
}
_outDim = tmpMeta[0+0];
_outTpl = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outTpl) { *out_outTpl = _outTpl; }
return _outDim;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsEvaluateArrayLength2(threadData_t *threadData, modelica_metatype _ty, modelica_metatype _inTpl, modelica_metatype *out_outTpl)
{
modelica_metatype _oty = NULL;
modelica_metatype _outTpl = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_oty = _ty;
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _oty;
tmp4_2 = _inTpl;
{
modelica_metatype _tpl = NULL;
modelica_metatype _dims = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
_tpl = tmp4_2;
_dims = omc_List_mapFold(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_oty), 3))), boxvar_Static_elabCallArgsEvaluateArrayLength3, _tpl ,&_tpl);
tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(4));
memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_oty), 4*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[3] = _dims;
_oty = tmpMeta6;
tmpMeta[0+0] = _oty;
tmpMeta[0+1] = _tpl;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _oty;
tmpMeta[0+1] = _inTpl;
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:;
}
}
_oty = tmpMeta[0+0];
_outTpl = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outTpl) { *out_outTpl = _outTpl; }
return _oty;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallArgsEvaluateArrayLength(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _env, modelica_metatype _inProperties, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta5 = mmc_mk_cons(omc_FGraph_lastScopeRef(threadData, _env), MMC_REFSTRUCTLIT(mmc_nil));
tmp6 = omc_FGraph_checkScopeType(threadData, tmpMeta5, _OMC_LIT255);
if (1 != tmp6) goto goto_1;
_ty = omc_Types_getPropType(threadData, _inProperties);
tmpMeta9 = mmc_mk_box2(0, _inCache, _env);
tmpMeta10 = omc_Types_traverseType(threadData, _ty, tmpMeta9, boxvar_Static_elabCallArgsEvaluateArrayLength2, &tmpMeta7);
_ty = tmpMeta10;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
_outCache = tmpMeta8;
_outProperties = omc_Types_setPropType(threadData, _inProperties, _ty);
goto tmp2_done;
}
case 1: {
_outCache = _inCache;
_outProperties = _inProperties;
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_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabCallArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inAbsynExpLst, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _typeVars, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta5 = omc_Static_elabCallArgs2(threadData, _inCache, _inEnv, _inPath, _inAbsynExpLst, _inAbsynNamedArgLst, _typeVars, _inBoolean, omc_Mutable_create(threadData, mmc_mk_boolean(0)), _inPrefix, _info, omc_Error_getNumErrorMessages(threadData), &tmpMeta1);
_outCache = tmpMeta5;
if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
_outExp = tmpMeta3;
_outProperties = tmpMeta4;
_outCache = omc_Static_elabCallArgsEvaluateArrayLength(threadData, _outCache, _inEnv, _outProperties, _inPrefix, _info ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabCallArgs(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _inAbsynExpLst, modelica_metatype _inAbsynNamedArgLst, modelica_metatype _typeVars, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabCallArgs(threadData, _inCache, _inEnv, _inPath, _inAbsynExpLst, _inAbsynNamedArgLst, _typeVars, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_createDummyFarg(threadData_t *threadData, modelica_string _name)
{
modelica_metatype _farg = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _name, _OMC_LIT42, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
_farg = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _farg;
}
DLLExport
modelica_boolean omc_Static_needToRebuild(threadData_t *threadData, modelica_string _newFile, modelica_string _oldFile, modelica_real _buildTime)
{
modelica_boolean _buildNeeded;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_string tmp4_1;volatile modelica_string tmp4_2;
tmp4_1 = _newFile;
tmp4_2 = _oldFile;
{
modelica_string _newf = NULL;
modelica_string _oldf = NULL;
modelica_real _nfmt;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (0 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT7), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT7), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_real tmp9;
modelica_boolean tmp10;
_newf = tmp4_1;
_oldf = tmp4_2;
tmp6 = (stringEqual(_newf, _oldf));
if (1 != tmp6) goto goto_2;
tmpMeta7 = omc_System_getFileModificationTime(threadData, _newf);
if (optionNone(tmpMeta7)) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmp9 = mmc_unbox_real(tmpMeta8);
_nfmt = tmp9;
tmp10 = (_buildTime > _nfmt);
if (1 != tmp10) goto goto_2;
tmp1 = 0;
goto tmp3_done;
}
case 2: {
tmp1 = 1;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_buildNeeded = tmp1;
_return: OMC_LABEL_UNUSED
return _buildNeeded;
}
modelica_metatype boxptr_Static_needToRebuild(threadData_t *threadData, modelica_metatype _newFile, modelica_metatype _oldFile, modelica_metatype _buildTime)
{
modelica_real tmp1;
modelica_boolean _buildNeeded;
modelica_metatype out_buildNeeded;
tmp1 = mmc_unbox_real(_buildTime);
_buildNeeded = omc_Static_needToRebuild(threadData, _newFile, _oldFile, tmp1);
out_buildNeeded = mmc_mk_icon(_buildNeeded);
return out_buildNeeded;
}
DLLExport
modelica_metatype omc_Static_elabUntypedCref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outCref)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outCref = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inCref;
{
modelica_metatype _subs = NULL;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
_outCache = omc_Static_elabSubscripts(threadData, _inCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCref), 3))), _inImplicit, _inPrefix, _inInfo ,&_subs, NULL);
tmpMeta1 = omc_ComponentReference_makeCrefIdent(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCref), 2))), _OMC_LIT42, _subs);
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
_outCache = omc_Static_elabSubscripts(threadData, _inCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCref), 3))), _inImplicit, _inPrefix, _inInfo ,&_subs, NULL);
_outCache = omc_Static_elabUntypedCref(threadData, _outCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCref), 4))), _inImplicit, _inPrefix, _inInfo ,&_cr);
tmpMeta1 = omc_ComponentReference_makeCrefQual(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inCref), 2))), _OMC_LIT42, _subs, _cr);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCref = tmpMeta1;
_return: OMC_LABEL_UNUSED
if (out_outCref) { *out_outCref = _outCref; }
return _outCache;
}
modelica_metatype boxptr_Static_elabUntypedCref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inCref, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outCref)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabUntypedCref(threadData, _inCache, _inEnv, _inCref, tmp1, _inPrefix, _inInfo, out_outCref);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_getOptionalNamedArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_boolean _inImplicit, modelica_string _inArgName, modelica_metatype _inType, modelica_metatype _inArgs, modelica_metatype _inDefaultExp, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_string _name = NULL;
modelica_string _exp_str = NULL;
modelica_string _ty_str = NULL;
modelica_string _ety_str = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _e = NULL;
modelica_boolean _ty_match;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta14;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outExp = _inDefaultExp;
{
modelica_metatype _arg;
for (tmpMeta1 = _inArgs; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_arg = MMC_CAR(tmpMeta1);
tmpMeta2 = _arg;
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
_name = tmpMeta3;
if((stringEqual(_name, _inArgName)))
{
{
{
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp5_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp6 < 2; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
tmpMeta8 = _arg;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
_e = tmpMeta9;
tmpMeta13 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta10, &tmpMeta11);
_outCache = tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) goto goto_4;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_outExp = tmpMeta10;
_ty = tmpMeta12;
_outExp = omc_Types_matchType(threadData, _outExp, _ty, _inType, 1, NULL);
goto tmp5_done;
}
case 1: {
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
tmp5_done:
(void)tmp6;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp5_done2;
goto_4:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp6 < 2) {
goto tmp5_top;
}
MMC_THROW_INTERNAL();
tmp5_done2:;
}
}
;
break;
}
}
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
return _outCache;
}
modelica_metatype boxptr_Static_getOptionalNamedArg(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inImplicit, modelica_metatype _inArgName, modelica_metatype _inType, modelica_metatype _inArgs, modelica_metatype _inDefaultExp, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_getOptionalNamedArg(threadData, _inCache, _inEnv, tmp1, _inArgName, _inType, _inArgs, _inDefaultExp, _inPrefix, _inInfo, out_outExp);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_absynExpListToDaeExpList(threadData_t *threadData, modelica_metatype _absynExpList)
{
modelica_metatype _out = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _absynExpList;
{
modelica_metatype _daeExpList = NULL;
modelica_metatype _absynRest = NULL;
modelica_metatype _absynCr = NULL;
modelica_metatype _absynPath = NULL;
modelica_metatype _daeCr = NULL;
modelica_metatype _crefExp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_absynCr = tmpMeta9;
_absynRest = tmpMeta8;
_absynPath = omc_AbsynUtil_crefToPath(threadData, _absynCr);
_daeCr = omc_ComponentReference_pathToCref(threadData, _absynPath);
_crefExp = omc_Expression_crefExp(threadData, _daeCr);
_daeExpList = omc_Static_absynExpListToDaeExpList(threadData, _absynRest);
tmpMeta10 = mmc_mk_cons(_crefExp, _daeExpList);
tmpMeta1 = tmpMeta10;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_1);
tmpMeta12 = MMC_CDR(tmp4_1);
_absynRest = tmpMeta12;
_absynExpList = _absynRest;
goto _tailrecursive;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_out = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out;
}
DLLExport
modelica_metatype omc_Static_getOptionalNamedArgExpList(threadData_t *threadData, modelica_string _name, modelica_metatype _nargs)
{
modelica_metatype _out = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _nargs;
{
modelica_metatype _absynExpList = NULL;
modelica_string _argName = NULL;
modelica_metatype _rest = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
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_boolean tmp12;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,13,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_argName = tmpMeta9;
_absynExpList = tmpMeta11;
tmp12 = (stringEqual(_name, _argName));
if (1 != tmp12) goto goto_2;
tmpMeta1 = omc_Static_absynExpListToDaeExpList(threadData, _absynExpList);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_1);
tmpMeta14 = MMC_CDR(tmp4_1);
_rest = tmpMeta14;
tmpMeta1 = omc_Static_getOptionalNamedArgExpList(threadData, _name, _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 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_out = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _out;
}
DLLExport
modelica_metatype omc_Static_elabVariablenames(threadData_t *threadData, modelica_metatype _inExpl)
{
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _exp = NULL;
modelica_metatype _cr = NULL;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
{
modelica_metatype __omcQ_24tmpVar61;
modelica_metatype* tmp3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype __omcQ_24tmpVar60;
modelica_integer tmp21;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _inExpl;
tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar61 = tmpMeta4;
tmp3 = &__omcQ_24tmpVar61;
while(1) {
tmp21 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp21--;
}
if (tmp21 == 0) {
{
modelica_metatype tmp8_1;
tmp8_1 = _e;
{
volatile mmc_switch_type tmp8;
int tmp9;
tmp8 = 0;
for (; tmp8 < 2; tmp8++) {
switch (MMC_SWITCH_CAST(tmp8)) {
case 0: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,2,1) == 0) goto tmp7_end;
tmpMeta10 = mmc_mk_box2(4, &Absyn_CodeNode_C__VARIABLENAME__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_e), 2))));
tmpMeta11 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta10, _OMC_LIT42);
tmpMeta5 = tmpMeta11;
goto tmp7_done;
}
case 1: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,11,3) == 0) goto tmp7_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,2,2) == 0) goto tmp7_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (3 != MMC_STRLEN(tmpMeta13) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmpMeta13)) != 0) goto tmp7_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp8_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,0,2) == 0) goto tmp7_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
if (listEmpty(tmpMeta15)) goto tmp7_end;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,2,1) == 0) goto tmp7_end;
if (!listEmpty(tmpMeta17)) goto tmp7_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
if (!listEmpty(tmpMeta18)) goto tmp7_end;
tmpMeta19 = mmc_mk_box2(9, &Absyn_CodeNode_C__EXPRESSION__desc, _e);
tmpMeta20 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, tmpMeta19, _OMC_LIT42);
tmpMeta5 = tmpMeta20;
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
goto_6:;
MMC_THROW_INTERNAL();
goto tmp7_done;
tmp7_done:;
}
}__omcQ_24tmpVar60 = tmpMeta5;
*tmp3 = mmc_mk_cons(__omcQ_24tmpVar60,0);
tmp3 = &MMC_CDR(*tmp3);
} else if (tmp21 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp3 = mmc_mk_nil();
tmpMeta2 = __omcQ_24tmpVar61;
}
_outExpl = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_hasBuiltInHandler(threadData_t *threadData, modelica_metatype _fn)
{
modelica_boolean _b;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _fn;
{
modelica_metatype _cr = NULL;
modelica_string _name = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_name = tmpMeta6;
tmp4 += 4;
omc_Static_elabBuiltinHandler(threadData, _name);
tmp1 = 1;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,2) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (6 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT321), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmp4 += 3;
tmp1 = 1;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta11) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta11)) != 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,2,2) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (17 != MMC_STRLEN(tmpMeta13) || strcmp(MMC_STRINGDATA(_OMC_LIT322), MMC_STRINGDATA(tmpMeta13)) != 0) goto tmp3_end;
tmp4 += 2;
tmp1 = 1;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta14) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta14)) != 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,2,2) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (6 != MMC_STRLEN(tmpMeta16) || strcmp(MMC_STRINGDATA(_OMC_LIT323), MMC_STRINGDATA(tmpMeta16)) != 0) goto tmp3_end;
tmp4 += 1;
tmp1 = 1;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta17;
tmp1 = omc_Static_hasBuiltInHandler(threadData, _cr);
goto tmp3_done;
}
case 5: {
tmp1 = 0;
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:;
}
}
_b = tmp1;
_return: OMC_LABEL_UNUSED
return _b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_hasBuiltInHandler(threadData_t *threadData, modelica_metatype _fn)
{
modelica_boolean _b;
modelica_metatype out_b;
_b = omc_Static_hasBuiltInHandler(threadData, _fn);
out_b = mmc_mk_icon(_b);
return out_b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCall(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _fn, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _typeVars, modelica_boolean _impl, modelica_metatype _pre, modelica_metatype _info, modelica_metatype *out_e, modelica_metatype *out_prop)
{
jmp_buf *old_mmc_jumper = threadData->mmc_jumper;
modelica_metatype _cache = NULL;
modelica_metatype _e = NULL;
modelica_metatype _prop = NULL;
modelica_integer _numErrorMessages;
modelica_metatype _handles = NULL;
modelica_string _name = NULL;
modelica_string _s = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_cache = __omcQ_24in_5Fcache;
_numErrorMessages = omc_Error_getNumErrorMessages(threadData);
if(omc_Static_hasBuiltInHandler(threadData, _fn))
{
{
{
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: {
_cache = omc_Static_elabCallBuiltin(threadData, _cache, _env, _fn, _args, _nargs, _impl, _pre, _info ,&_e ,&_prop);
goto _return;
goto tmp2_done;
}
case 1: {
modelica_boolean tmp5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_string tmp9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
tmp5 = (_numErrorMessages == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp5) goto goto_1;
_name = omc_Dump_printComponentRefStr(threadData, _fn);
_s1 = stringDelimitList(omc_List_map(threadData, _args, boxvar_Dump_printExpStr), _OMC_LIT166);
_s2 = stringDelimitList(omc_List_map(threadData, _nargs, boxvar_Dump_printNamedArgStr), _OMC_LIT166);
tmp8 = (modelica_boolean)(stringEqual(_s2, _OMC_LIT7));
if(tmp8)
{
tmp9 = _s1;
}
else
{
tmpMeta6 = stringAppend(_s1,_OMC_LIT166);
tmpMeta7 = stringAppend(tmpMeta6,_s2);
tmp9 = tmpMeta7;
}
_s = tmp9;
tmpMeta10 = mmc_mk_cons(_name, mmc_mk_cons(_OMC_LIT300, mmc_mk_cons(_s, mmc_mk_cons(_OMC_LIT324, MMC_REFSTRUCTLIT(mmc_nil)))));
_s = stringAppendList(tmpMeta10);
tmpMeta11 = mmc_mk_cons(_s, mmc_mk_cons(omc_PrefixUtil_printPrefixStr3(threadData, _pre), MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT327, tmpMeta11, _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:;
}
}
;
}
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
_handles = tmpMeta12;
{
{
modelica_metatype _fn_1 = NULL;
modelica_string _fnstr = NULL;
modelica_string _argstr = NULL;
modelica_string _prestr = NULL;
modelica_metatype _argstrs = NULL;
volatile mmc_switch_type tmp16;
int tmp17;
tmp16 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp15_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp16 < 3; tmp16++) {
switch (MMC_SWITCH_CAST(tmp16)) {
case 0: {
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT328);
_fn_1 = omc_AbsynUtil_crefToPath(threadData, _fn);
_cache = omc_Static_elabCallArgs(threadData, _cache, _env, _fn_1, _args, _nargs, _typeVars, _impl, _pre, _info ,&_e ,&_prop);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT328);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _e;
tmpMeta[0+2] = _prop;
goto tmp15_done;
}
case 1: {
modelica_boolean tmp18;
tmp18 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp18) goto goto_14;
omc_Debug_traceln(threadData, _OMC_LIT329);
omc_Debug_trace(threadData, _OMC_LIT330);
_fnstr = omc_Dump_printComponentRefStr(threadData, _fn);
omc_Debug_trace(threadData, _fnstr);
omc_Debug_trace(threadData, _OMC_LIT331);
_argstrs = omc_List_map(threadData, _args, boxvar_Dump_printExpStr);
_argstr = stringDelimitList(_argstrs, _OMC_LIT166);
omc_Debug_traceln(threadData, _argstr);
omc_Debug_trace(threadData, _OMC_LIT332);
_prestr = omc_PrefixUtil_printPrefixStr(threadData, _pre);
omc_Debug_traceln(threadData, _prestr);
goto goto_14;
goto tmp15_done;
}
case 2: {
tmpMeta[0+0] = omc_BackendInterface_elabCallInteractive(threadData, _cache, _env, _fn, _args, _nargs, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp15_done;
}
}
goto tmp15_end;
tmp15_end: ;
}
goto goto_14;
tmp15_done:
(void)tmp16;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp15_done2;
goto_14:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp16 < 3) {
goto tmp15_top;
}
MMC_THROW_INTERNAL();
tmp15_done2:;
}
}
_cache = tmpMeta[0+0];
_e = tmpMeta[0+1];
_prop = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_e) { *out_e = _e; }
if (out_prop) { *out_prop = _prop; }
threadData->mmc_jumper = old_mmc_jumper;
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCall(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _fn, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _typeVars, modelica_metatype _impl, modelica_metatype _pre, modelica_metatype _info, modelica_metatype *out_e, modelica_metatype *out_prop)
{
modelica_integer tmp1;
modelica_metatype _cache = NULL;
tmp1 = mmc_unbox_integer(_impl);
_cache = omc_Static_elabCall(threadData, __omcQ_24in_5Fcache, _env, _fn, _args, _nargs, _typeVars, tmp1, _pre, _info, out_e, out_prop);
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallBuiltin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnName, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inFnName;
{
modelica_fnptr _handler;
modelica_metatype _cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
_handler = (modelica_fnptr) omc_Static_elabBuiltinHandler(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inFnName), 2))));
tmpMeta[0+0] = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_handler), 2))) ? ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_handler), 1)))) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_handler), 2))), _inCache, _inEnv, _inPosArgs, _inNamedArgs, mmc_mk_boolean(_inImplicit), _inPrefix, _inInfo, &tmpMeta[0+1], &tmpMeta[0+2]) : ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_handler), 1)))) (threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, mmc_mk_boolean(_inImplicit), _inPrefix, _inInfo, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,2) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
if (6 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT321), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmpMeta[0+0] = omc_Static_elabBuiltinIsRoot(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _inImplicit, _inPrefix, _inInfo, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (17 != MMC_STRLEN(tmpMeta12) || strcmp(MMC_STRINGDATA(_OMC_LIT322), MMC_STRINGDATA(tmpMeta12)) != 0) goto tmp3_end;
omc_Error_addSourceMessage(threadData, _OMC_LIT336, _OMC_LIT338, _inInfo);
tmpMeta[0+0] = omc_Static_elabBuiltinUniqueRootIndices(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _inImplicit, _inPrefix, _inInfo, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta13) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta13)) != 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,2,2) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
if (6 != MMC_STRLEN(tmpMeta15) || strcmp(MMC_STRINGDATA(_OMC_LIT323), MMC_STRINGDATA(tmpMeta15)) != 0) goto tmp3_end;
tmpMeta[0+0] = omc_Static_elabBuiltinRooted(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, _inImplicit, _inPrefix, _inInfo, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cr = tmpMeta16;
_inFnName = _cr;
goto _tailrecursive;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallBuiltin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnName, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabCallBuiltin(threadData, _inCache, _inEnv, _inFnName, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_isBuiltinFunc(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _ty, modelica_boolean *out_b, modelica_metatype *out_outPath)
{
modelica_metatype _isBuiltin = NULL;
modelica_boolean _b;
modelica_metatype _outPath = NULL;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inPath;
tmp4_2 = _ty;
{
modelica_string _id = NULL;
modelica_metatype _path = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,11,4) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,2) == 0) goto tmp3_end;
_isBuiltin = tmpMeta7;
_path = tmp4_1;
tmp4 += 1;
_path = omc_AbsynUtil_makeNotFullyQualified(threadData, _path);
tmpMeta[0+0] = _isBuiltin;
tmp1_c1 = 1;
tmpMeta[0+2] = _path;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,11,4) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 6));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,0) == 0) goto tmp3_end;
_isBuiltin = tmpMeta9;
_path = tmp4_1;
_path = omc_AbsynUtil_makeNotFullyQualified(threadData, _path);
tmpMeta[0+0] = _isBuiltin;
tmp1_c1 = 0;
tmpMeta[0+2] = _path;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_id = tmpMeta10;
tmp4 += 2;
omc_Static_elabBuiltinHandler(threadData, _id);
tmpMeta11 = mmc_mk_box3(4, &DAE_FunctionBuiltin_FUNCTION__BUILTIN__desc, mmc_mk_some(_id), mmc_mk_boolean(0));
tmpMeta[0+0] = tmpMeta11;
tmp1_c1 = 1;
tmpMeta[0+2] = _inPath;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_path = tmpMeta12;
tmp4 += 1;
tmpMeta14 = omc_Static_isBuiltinFunc(threadData, _path, _ty, NULL, &tmpMeta13);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,1,2) == 0) goto goto_2;
_isBuiltin = tmpMeta14;
_path = tmpMeta13;
tmpMeta[0+0] = _isBuiltin;
tmp1_c1 = 1;
tmpMeta[0+2] = _path;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,2) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta15) || strcmp(MMC_STRINGDATA(_OMC_LIT320), MMC_STRINGDATA(tmpMeta15)) != 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,1,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
if (6 != MMC_STRLEN(tmpMeta17) || strcmp(MMC_STRINGDATA(_OMC_LIT321), MMC_STRINGDATA(tmpMeta17)) != 0) goto tmp3_end;
tmpMeta[0+0] = _OMC_LIT339;
tmp1_c1 = 1;
tmpMeta[0+2] = _inPath;
goto tmp3_done;
}
case 5: {
tmpMeta[0+0] = _OMC_LIT139;
tmp1_c1 = 0;
tmpMeta[0+2] = _inPath;
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:;
}
}
_isBuiltin = tmpMeta[0+0];
_b = tmp1_c1;
_outPath = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_b) { *out_b = _b; }
if (out_outPath) { *out_outPath = _outPath; }
return _isBuiltin;
}
modelica_metatype boxptr_Static_isBuiltinFunc(threadData_t *threadData, modelica_metatype _inPath, modelica_metatype _ty, modelica_metatype *out_b, modelica_metatype *out_outPath)
{
modelica_boolean _b;
modelica_metatype _isBuiltin = NULL;
_isBuiltin = omc_Static_isBuiltinFunc(threadData, _inPath, _ty, &_b, out_outPath);
if (out_b) { *out_b = mmc_mk_icon(_b); }
return _isBuiltin;
}
DLLExport
modelica_fnptr omc_Static_elabBuiltinHandler(threadData_t *threadData, modelica_string _inIdent)
{
modelica_fnptr _outHandler;
modelica_fnptr tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;
tmp4_1 = _inIdent;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(stringHashDjb2Mod(tmp4_1,2048))) {
case 415 /* smooth */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT340), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinSmooth;
goto tmp3_done;
}
case 1504 /* size */: {
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT5), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinSize;
goto tmp3_done;
}
case 672 /* ndims */: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT341), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinNDims;
goto tmp3_done;
}
case 920 /* zeros */: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT342), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinZeros;
goto tmp3_done;
}
case 1786 /* ones */: {
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT343), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinOnes;
goto tmp3_done;
}
case 812 /* fill */: {
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT344), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinFill;
goto tmp3_done;
}
case 1931 /* max */: {
if (3 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinMax;
goto tmp3_done;
}
case 137 /* min */: {
if (3 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinMin;
goto tmp3_done;
}
case 356 /* transpose */: {
if (9 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT347), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinTranspose;
goto tmp3_done;
}
case 226 /* symmetric */: {
if (9 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT348), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinSymmetric;
goto tmp3_done;
}
case 1572 /* array */: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT209), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinArray;
goto tmp3_done;
}
case 922 /* sum */: {
if (3 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinSum;
goto tmp3_done;
}
case 1606 /* product */: {
if (7 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinProduct;
goto tmp3_done;
}
case 1644 /* pre */: {
if (3 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT351), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinPre;
goto tmp3_done;
}
case 1464 /* firstTick */: {
if (9 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT352), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinFirstTick;
goto tmp3_done;
}
case 1834 /* interval */: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT353), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinInterval;
goto tmp3_done;
}
case 133 /* boolean */: {
if (7 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT354), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinBoolean;
goto tmp3_done;
}
case 484 /* noEvent */: {
if (7 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT355), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinNoevent;
goto tmp3_done;
}
case 218 /* edge */: {
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT356), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinEdge;
goto tmp3_done;
}
case 448 /* der */: {
if (3 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinDer;
goto tmp3_done;
}
case 459 /* change */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT357), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinChange;
goto tmp3_done;
}
case 1277 /* cat */: {
if (3 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT358), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinCat;
goto tmp3_done;
}
case 1711 /* identity */: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT359), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinIdentity;
goto tmp3_done;
}
case 1944 /* vector */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT360), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinVector;
goto tmp3_done;
}
case 282 /* matrix */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT361), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinMatrix;
goto tmp3_done;
}
case 27 /* scalar */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT362), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinScalar;
goto tmp3_done;
}
case 988 /* String */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT363), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinString;
goto tmp3_done;
}
case 1362 /* rooted */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT323), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinRooted;
goto tmp3_done;
}
case 1523 /* Integer */: {
if (7 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT27), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinIntegerEnum;
goto tmp3_done;
}
case 203 /* EnumToInteger */: {
if (13 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT364), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinIntegerEnum;
goto tmp3_done;
}
case 424 /* inStream */: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT365), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinInStream;
goto tmp3_done;
}
case 1515 /* actualStream */: {
if (12 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT366), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinActualStream;
goto tmp3_done;
}
case 1243 /* getInstanceName */: {
if (15 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT367), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinGetInstanceName;
goto tmp3_done;
}
case 1136 /* classDirectory */: {
if (14 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT368), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinClassDirectory;
goto tmp3_done;
}
case 1543 /* sample */: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT369), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinSample;
goto tmp3_done;
}
case 25 /* cardinality */: {
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT370), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinCardinality;
goto tmp3_done;
}
case 1188 /* homotopy */: {
if (8 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT371), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinHomotopy;
goto tmp3_done;
}
case 1258 /* DynamicSelect */: {
if (13 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT372), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp1 = boxvar_Static_elabBuiltinDynamicSelect;
goto tmp3_done;
}
case 49 /* Clock */: {
modelica_boolean tmp5;
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT373), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp5 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp5) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinClock;
goto tmp3_done;
}
case 1388 /* hold */: {
modelica_boolean tmp6;
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT374), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp6 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp6) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinHold;
goto tmp3_done;
}
case 293 /* shiftSample */: {
modelica_boolean tmp7;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT375), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp7 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp7) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinShiftSample;
goto tmp3_done;
}
case 1048 /* backSample */: {
modelica_boolean tmp8;
if (10 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT376), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp8 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp8) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinBackSample;
goto tmp3_done;
}
case 1582 /* noClock */: {
modelica_boolean tmp9;
if (7 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT377), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp9 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp9) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinNoClock;
goto tmp3_done;
}
case 1904 /* transition */: {
modelica_boolean tmp10;
if (10 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT378), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp10 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp10) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinTransition;
goto tmp3_done;
}
case 336 /* initialState */: {
modelica_boolean tmp11;
if (12 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT379), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp11 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp11) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinInitialState;
goto tmp3_done;
}
case 1090 /* activeState */: {
modelica_boolean tmp12;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT380), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp12 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp12) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinActiveState;
goto tmp3_done;
}
case 603 /* ticksInState */: {
modelica_boolean tmp13;
if (12 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT381), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp13 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp13) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinTicksInState;
goto tmp3_done;
}
case 1036 /* timeInState */: {
modelica_boolean tmp14;
if (11 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT382), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp14 = omc_Config_synchronousFeaturesAllowed(threadData);
if (1 != tmp14) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinTimeInState;
goto tmp3_done;
}
case 930 /* sourceInfo */: {
modelica_boolean tmp15;
if (10 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT383), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp15 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp15) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinSourceInfo;
goto tmp3_done;
}
case 1337 /* SOME */: {
modelica_boolean tmp16;
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT384), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp16 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp16) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinSome;
goto tmp3_done;
}
case 1909 /* NONE */: {
modelica_boolean tmp17;
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT147), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp17 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp17) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinNone;
goto tmp3_done;
}
case 2018 /* isPresent */: {
modelica_boolean tmp18;
if (9 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT385), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmp18 = omc_Config_acceptMetaModelicaGrammar(threadData);
if (1 != tmp18) goto goto_2;
tmp1 = boxvar_Static_elabBuiltinIsPresent;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outHandler = (modelica_fnptr) tmp1;
_return: OMC_LABEL_UNUSED
return _outHandler;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_arrayScalar(threadData_t *threadData, modelica_metatype _inExp, modelica_integer _inDim, modelica_string _inOperator, modelica_metatype _inInfo)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _exp = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _mexpl = NULL;
modelica_string _dim_str = NULL;
modelica_string _size_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
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 (!listEmpty(tmpMeta8)) goto tmp3_end;
_exp = tmpMeta7;
_inExp = _exp;
_inDim = ((modelica_integer) 1) + _inDim;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_expl = tmpMeta9;
_dim_str = intString(_inDim);
_size_str = intString(listLength(_expl));
tmpMeta10 = mmc_mk_cons(_dim_str, mmc_mk_cons(_inOperator, mmc_mk_cons(_OMC_LIT389, mmc_mk_cons(_size_str, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessage(threadData, _OMC_LIT388, tmpMeta10, _inInfo);
goto goto_2;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,3) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_ty = tmpMeta11;
_expl = tmpMeta13;
tmpMeta15 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ty, mmc_mk_boolean(1), _expl);
_inExp = tmpMeta15;
_inDim = ((modelica_integer) 1) + _inDim;
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,3) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_mexpl = tmpMeta16;
_dim_str = intString(_inDim);
_size_str = intString(listLength(_mexpl));
tmpMeta17 = mmc_mk_cons(_dim_str, mmc_mk_cons(_inOperator, mmc_mk_cons(_OMC_LIT389, mmc_mk_cons(_size_str, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessage(threadData, _OMC_LIT388, tmpMeta17, _inInfo);
goto goto_2;
goto tmp3_done;
}
case 4: {
tmpMeta1 = _inExp;
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 boxptr_Static_arrayScalar(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inDim, modelica_metatype _inOperator, modelica_metatype _inInfo)
{
modelica_integer tmp1;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inDim);
_outExp = omc_Static_arrayScalar(threadData, _inExp, tmp1, _inOperator, _inInfo);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMatrix3(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inInfo)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _ety = NULL;
modelica_metatype _ety2 = NULL;
modelica_boolean _scalar;
modelica_metatype _expl = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _matrix_expl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,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(tmpMeta6), 3));
if (listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp12 = mmc_unbox_integer(tmpMeta11);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_ety = tmpMeta7;
_dim = tmpMeta9;
_scalar = tmp12;
_expl = tmpMeta13;
{
modelica_metatype __omcQ_24tmpVar73;
modelica_metatype* tmp15;
modelica_metatype tmpMeta16;
modelica_metatype __omcQ_24tmpVar72;
modelica_integer tmp17;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _expl;
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar73 = tmpMeta16;
tmp15 = &__omcQ_24tmpVar73;
while(1) {
tmp17 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp17--;
}
if (tmp17 == 0) {
__omcQ_24tmpVar72 = omc_Static_arrayScalar(threadData, _e, ((modelica_integer) 3), _OMC_LIT361, _inInfo);
*tmp15 = mmc_mk_cons(__omcQ_24tmpVar72,0);
tmp15 = &MMC_CDR(*tmp15);
} else if (tmp17 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp15 = mmc_mk_nil();
tmpMeta14 = __omcQ_24tmpVar73;
}
_expl = tmpMeta14;
tmpMeta18 = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta19 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, tmpMeta18);
tmpMeta20 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta19, mmc_mk_boolean(_scalar), _expl);
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
case 1: {
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 tmpMeta32;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,3) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,6,2) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 3));
if (listEmpty(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmpMeta23);
tmpMeta25 = MMC_CDR(tmpMeta23);
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_ety = tmpMeta22;
_dim = tmpMeta24;
_dims = tmpMeta25;
_matrix_expl = tmpMeta26;
tmpMeta27 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, _dims);
_ety2 = tmpMeta27;
{
modelica_metatype __omcQ_24tmpVar75;
modelica_metatype* tmp29;
modelica_metatype tmpMeta30;
modelica_metatype __omcQ_24tmpVar74;
modelica_integer tmp31;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _matrix_expl;
tmpMeta30 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar75 = tmpMeta30;
tmp29 = &__omcQ_24tmpVar75;
while(1) {
tmp31 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp31--;
}
if (tmp31 == 0) {
__omcQ_24tmpVar74 = omc_Expression_makeArray(threadData, _e, _ety2, 1);
*tmp29 = mmc_mk_cons(__omcQ_24tmpVar74,0);
tmp29 = &MMC_CDR(*tmp29);
} else if (tmp31 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp29 = mmc_mk_nil();
tmpMeta28 = __omcQ_24tmpVar75;
}
_expl = tmpMeta28;
{
modelica_metatype __omcQ_24tmpVar77;
modelica_metatype* tmp33;
modelica_metatype tmpMeta34;
modelica_metatype __omcQ_24tmpVar76;
modelica_integer tmp35;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _expl;
tmpMeta34 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar77 = tmpMeta34;
tmp33 = &__omcQ_24tmpVar77;
while(1) {
tmp35 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp35--;
}
if (tmp35 == 0) {
__omcQ_24tmpVar76 = omc_Static_arrayScalar(threadData, _e, ((modelica_integer) 3), _OMC_LIT361, _inInfo);
*tmp33 = mmc_mk_cons(__omcQ_24tmpVar76,0);
tmp33 = &MMC_CDR(*tmp33);
} else if (tmp35 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp33 = mmc_mk_nil();
tmpMeta32 = __omcQ_24tmpVar77;
}
_expl = tmpMeta32;
tmpMeta36 = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta37 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, tmpMeta36);
tmpMeta38 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta37, mmc_mk_boolean(1), _expl);
tmpMeta1 = tmpMeta38;
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_Static_elabBuiltinMatrix2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArg, modelica_metatype _inProperties, modelica_metatype _inType, modelica_metatype _inInfo, modelica_metatype *out_outProperties)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inArg;
{
modelica_metatype _ty = NULL;
modelica_metatype _props = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
modelica_boolean _scalar;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!omc_Types_isSimpleType(threadData, _inType)) goto tmp3_end;
tmpMeta[0+0] = omc_Static_promoteExp(threadData, _inArg, _inProperties, ((modelica_integer) 2), &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
if (!(omc_Types_numberOfDimensions(threadData, _inType) == ((modelica_integer) 1))) goto tmp3_end;
tmpMeta[0+0] = omc_Static_promoteExp(threadData, _inArg, _inProperties, ((modelica_integer) 2), &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,17,3) == 0) goto tmp3_end;
tmpMeta[0+0] = _inArg;
tmpMeta[0+1] = _inProperties;
goto tmp3_done;
}
case 3: {
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_integer tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,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(tmpMeta6), 3));
if (listEmpty(tmpMeta8)) goto tmp3_end;
tmpMeta9 = MMC_CAR(tmpMeta8);
tmpMeta10 = MMC_CDR(tmpMeta8);
if (listEmpty(tmpMeta10)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmpMeta10);
tmpMeta12 = MMC_CDR(tmpMeta10);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp14 = mmc_unbox_integer(tmpMeta13);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_ety = tmpMeta7;
_dim1 = tmpMeta9;
_dim2 = tmpMeta11;
_scalar = tmp14;
_expl = tmpMeta15;
_expl = omc_List_map1(threadData, _expl, boxvar_Static_elabBuiltinMatrix3, _inInfo);
_ty = omc_Types_arrayElementType(threadData, _inType);
tmpMeta16 = mmc_mk_cons(_dim1, mmc_mk_cons(_dim2, MMC_REFSTRUCTLIT(mmc_nil)));
_ty = omc_Types_liftArrayListDims(threadData, _ty, tmpMeta16);
_props = omc_Types_setPropType(threadData, _inProperties, _ty);
tmpMeta17 = mmc_mk_cons(_dim1, mmc_mk_cons(_dim2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta18 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, tmpMeta17);
tmpMeta19 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta18, mmc_mk_boolean(_scalar), _expl);
tmpMeta[0+0] = tmpMeta19;
tmpMeta[0+1] = _props;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExp;
}
DLLExport
modelica_metatype omc_Static_elabBuiltinMatrix(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT361, _inInfo);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImpl, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_ty = omc_Types_getPropType(threadData, _outProperties);
_outExp = omc_Static_elabBuiltinMatrix2(threadData, _inCache, _inEnv, _outExp, _outProperties, _ty, _inInfo ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabBuiltinMatrix(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImpl, modelica_metatype _inPrefix, 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_Static_elabBuiltinMatrix(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_flattenArray(threadData_t *threadData, modelica_metatype _arr)
{
modelica_metatype _flattenedExpl = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _arr;
{
modelica_metatype _e = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _expl2 = NULL;
modelica_metatype _rest_expl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,16,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
_expl = tmpMeta9;
_rest_expl = tmpMeta8;
_expl = omc_Static_flattenArray(threadData, _expl);
_expl2 = omc_Static_flattenArray(threadData, _rest_expl);
tmpMeta1 = listAppend(_expl, _expl2);
goto tmp3_done;
}
case 2: {
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 (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,17,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (listEmpty(tmpMeta13)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmpMeta13);
tmpMeta16 = MMC_CDR(tmpMeta13);
if (!listEmpty(tmpMeta16)) goto tmp3_end;
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_e = tmpMeta15;
_rest_expl = tmpMeta11;
_expl = omc_Static_flattenArray(threadData, _rest_expl);
tmpMeta17 = mmc_mk_cons(_e, _expl);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 3: {
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);
_e = tmpMeta18;
_expl = tmpMeta19;
_expl = omc_Static_flattenArray(threadData, _expl);
tmpMeta20 = mmc_mk_cons(_e, _expl);
tmpMeta1 = tmpMeta20;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_flattenedExpl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _flattenedExpl;
}
PROTECTED_FUNCTION_STATIC void omc_Static_checkBuiltinVectorDims(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inPrefix, modelica_metatype _inInfo)
{
modelica_boolean _found_dim_sz_one;
modelica_metatype _dims = NULL;
modelica_string _arg_str = NULL;
modelica_string _scope_str = NULL;
modelica_string _dim_str = NULL;
modelica_string _pre_str = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_found_dim_sz_one = 0;
_dims = omc_Types_getDimensionSizes(threadData, _inType);
{
modelica_metatype _dim;
for (tmpMeta1 = _dims; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_dim = MMC_CAR(tmpMeta1);
if((mmc_unbox_integer(_dim) > ((modelica_integer) 1)))
{
if(_found_dim_sz_one)
{
_scope_str = omc_FGraph_printGraphPathStr(threadData, _inEnv);
tmpMeta2 = stringAppend(_OMC_LIT390,omc_Dump_printExpStr(threadData, _inExp));
tmpMeta3 = stringAppend(tmpMeta2,_OMC_LIT391);
_arg_str = tmpMeta3;
{
modelica_metatype __omcQ_24tmpVar79;
modelica_metatype* tmp5;
modelica_metatype tmpMeta6;
modelica_string __omcQ_24tmpVar78;
modelica_integer tmp7;
modelica_metatype _d_loopVar = 0;
modelica_metatype _d;
_d_loopVar = _dims;
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar79 = tmpMeta6;
tmp5 = &__omcQ_24tmpVar79;
while(1) {
tmp7 = 1;
if (!listEmpty(_d_loopVar)) {
_d = MMC_CAR(_d_loopVar);
_d_loopVar = MMC_CDR(_d_loopVar);
tmp7--;
}
if (tmp7 == 0) {
__omcQ_24tmpVar78 = intString(mmc_unbox_integer(_d));
*tmp5 = mmc_mk_cons(__omcQ_24tmpVar78,0);
tmp5 = &MMC_CDR(*tmp5);
} else if (tmp7 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp5 = mmc_mk_nil();
tmpMeta4 = __omcQ_24tmpVar79;
}
tmpMeta8 = stringAppend(_OMC_LIT22,stringDelimitList(tmpMeta4, _OMC_LIT166));
tmpMeta9 = stringAppend(tmpMeta8,_OMC_LIT23);
_dim_str = tmpMeta9;
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta10 = mmc_mk_cons(_scope_str, mmc_mk_cons(_pre_str, mmc_mk_cons(_dim_str, mmc_mk_cons(_arg_str, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT394, tmpMeta10, _inInfo);
}
else
{
_found_dim_sz_one = 1;
}
}
}
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinVector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _arr_ty = NULL;
modelica_metatype _exp_ty = NULL;
modelica_metatype _el_ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _expl = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT360, _inInfo);
_e = listHead(_inPosArgs);
tmpMeta5 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta1, &tmpMeta2);
_outCache = tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_outExp = tmpMeta1;
_outProperties = tmpMeta2;
_ty = tmpMeta3;
_c = tmpMeta4;
if(omc_Types_isSimpleType(threadData, _ty))
{
_arr_ty = omc_Types_liftArray(threadData, _ty, _OMC_LIT44);
_exp_ty = omc_Types_simplifyType(threadData, _arr_ty);
tmpMeta6 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta7 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _exp_ty, mmc_mk_boolean(1), tmpMeta6);
_outExp = tmpMeta7;
tmpMeta8 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _arr_ty, _c);
_outProperties = tmpMeta8;
}
else
{
if((omc_Expression_isArray(threadData, _outExp) || omc_Expression_isMatrix(threadData, _outExp)))
{
if((omc_Types_numberOfDimensions(threadData, _ty) != ((modelica_integer) 1)))
{
omc_Static_checkBuiltinVectorDims(threadData, _e, _inEnv, _ty, _inPrefix, _inInfo);
_expl = omc_Expression_getArrayOrMatrixContents(threadData, _outExp);
_expl = omc_Static_flattenArray(threadData, _expl);
_el_ty = omc_Types_arrayElementType(threadData, _ty);
tmpMeta9 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(listLength(_expl)));
_arr_ty = omc_Types_liftArray(threadData, _el_ty, tmpMeta9);
tmpMeta10 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, omc_Types_simplifyType(threadData, _arr_ty), mmc_mk_boolean(0), _expl);
_outExp = tmpMeta10;
tmpMeta11 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _arr_ty, _c);
_outProperties = tmpMeta11;
}
}
else
{
_ty = omc_Types_liftArray(threadData, omc_Types_arrayElementType(threadData, _ty), _OMC_LIT20);
_exp_ty = omc_Types_simplifyType(threadData, _ty);
tmpMeta12 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT360, tmpMeta12, _exp_ty);
tmpMeta13 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta13;
}
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinVector(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinVector(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIsPresent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_string _str = NULL;
modelica_metatype _direction = NULL;
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT385, _info);
if((!omc_FGraph_inFunctionScope(threadData, _inEnv)))
{
tmpMeta1 = mmc_mk_cons(omc_SCodeDump_restrString(threadData, omc_FGraph_getScopeRestriction(threadData, omc_FGraph_currentScope(threadData, _inEnv))), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT397, tmpMeta1, _info);
}
{
modelica_metatype tmp5_1;
tmp5_1 = listGet(_inPosArgs, ((modelica_integer) 1));
{
volatile mmc_switch_type tmp5;
int tmp6;
tmp5 = 0;
for (; tmp5 < 2; tmp5++) {
switch (MMC_SWITCH_CAST(tmp5)) {
case 0: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp5_1,2,1) == 0) goto tmp4_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp5_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,2) == 0) goto tmp4_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_str = tmpMeta8;
tmpMeta12 = omc_Lookup_lookupIdentLocal(threadData, _outCache, _inEnv, _str, &tmpMeta9, NULL, NULL, NULL, NULL);
_outCache = tmpMeta12;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 5));
_direction = tmpMeta11;
{
modelica_metatype tmp15_1;
tmp15_1 = _direction;
{
volatile mmc_switch_type tmp15;
int tmp16;
tmp15 = 0;
for (; tmp15 < 2; tmp15++) {
switch (MMC_SWITCH_CAST(tmp15)) {
case 0: {
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp15_1,2,0) == 0) goto tmp14_end;
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT400, tmpMeta17, _info);
goto goto_13;
goto tmp14_done;
}
case 1: {
goto tmp14_done;
}
}
goto tmp14_end;
tmp14_end: ;
}
goto goto_13;
goto_13:;
goto goto_3;
goto tmp14_done;
tmp14_done:;
}
}
;
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = mmc_mk_box4(4, &DAE_ComponentRef_CREF__IDENT__desc, _str, _OMC_LIT56, tmpMeta19);
tmpMeta21 = mmc_mk_box3(9, &DAE_Exp_CREF__desc, tmpMeta20, _OMC_LIT56);
tmpMeta18 = mmc_mk_cons(tmpMeta21, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta2 = omc_Expression_makeImpureBuiltinCall(threadData, _OMC_LIT385, tmpMeta18, _OMC_LIT56);
goto tmp4_done;
}
case 1: {
modelica_metatype tmpMeta22;
_exp = tmp5_1;
tmpMeta22 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _exp), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT403, tmpMeta22, _info);
goto goto_3;
goto tmp4_done;
}
}
goto tmp4_end;
tmp4_end: ;
}
goto goto_3;
goto_3:;
MMC_THROW_INTERNAL();
goto tmp4_done;
tmp4_done:;
}
}
_outExp = tmpMeta2;
_outProperties = _OMC_LIT404;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIsPresent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinIsPresent(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinGetInstanceName(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_string _str = NULL;
modelica_metatype _name = NULL;
modelica_metatype _envName = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 0), _OMC_LIT367, _inInfo);
tmpMeta1 = _inCache;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,4) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 5));
_name = tmpMeta2;
if(omc_PrefixUtil_isNoPrefix(threadData, _inPrefix))
{
_envName = omc_FGraph_getGraphNameNoImplicitScopes(threadData, _inEnv);
_str = (omc_AbsynUtil_pathEqual(threadData, _envName, _name)?omc_AbsynUtil_pathLastIdent(threadData, _name):omc_AbsynUtil_pathString(threadData, _envName, _OMC_LIT84, 1, 0));
}
else
{
tmpMeta3 = stringAppend(omc_AbsynUtil_pathLastIdent(threadData, _name),_OMC_LIT84);
tmpMeta4 = stringAppend(tmpMeta3,omc_PrefixUtil_printPrefixStr(threadData, _inPrefix));
_str = tmpMeta4;
}
tmpMeta5 = mmc_mk_box2(5, &DAE_Exp_SCONST__desc, _str);
_outExp = tmpMeta5;
_outProperties = _OMC_LIT406;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinGetInstanceName(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinGetInstanceName(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinString(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _args = NULL;
modelica_metatype _consts = NULL;
modelica_metatype _val_slot = NULL;
modelica_metatype _format_slot = NULL;
modelica_metatype _format_arg = NULL;
modelica_metatype _slots = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_format_arg = mmc_mk_none();
{
{
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;
tmpMeta5 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, _inPosArgs, _inNamedArgs);
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = mmc_mk_box4(14, &Absyn_Exp_CALL__desc, _OMC_LIT407, tmpMeta5, tmpMeta6);
_e = tmpMeta7;
_outCache = omc_OperatorOverloading_string(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
goto tmp2_done;
}
case 1: {
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 tmpMeta27;
_e = listHead(_inPosArgs);
tmpMeta12 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta8, &tmpMeta9);
_outCache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto goto_1;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_exp = tmpMeta8;
_ty = tmpMeta10;
_c = tmpMeta11;
if(omc_Types_isMetaBoxedType(threadData, _ty))
{
_ty = omc_Types_unboxedType(threadData, _ty);
tmpMeta13 = mmc_mk_box3(38, &DAE_Exp_UNBOX__desc, _exp, _ty);
_exp = tmpMeta13;
}
tmpMeta14 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT408, _ty, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta16 = mmc_mk_box7(3, &Static_Slot_SLOT__desc, tmpMeta14, mmc_mk_boolean(0), mmc_mk_none(), tmpMeta15, mmc_mk_integer(((modelica_integer) 1)), mmc_mk_integer(((modelica_integer) 0)));
_val_slot = tmpMeta16;
{
{
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;
_slots = _OMC_LIT419;
if(omc_Types_isRealOrSubTypeReal(threadData, _ty))
{
tmpMeta21 = mmc_mk_cons(_OMC_LIT424, _slots);
_slots = tmpMeta21;
}
tmpMeta22 = mmc_mk_cons(_val_slot, _slots);
_slots = tmpMeta22;
_outCache = omc_Static_elabInputArgs(threadData, _outCache, _inEnv, _inPosArgs, _inNamedArgs, _slots, 0, 1, _inImplicit, _inPrefix, _inInfo, _OMC_LIT42, _OMC_LIT425, 0 ,&_args ,NULL ,&_consts, NULL);
goto tmp18_done;
}
case 1: {
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
if(omc_Types_isRealOrSubTypeReal(threadData, _ty))
{
_format_arg = _OMC_LIT434;
}
else
{
if(omc_Types_isIntegerOrSubTypeInteger(threadData, _ty))
{
_format_arg = _OMC_LIT431;
}
else
{
if(omc_Types_isString(threadData, _ty))
{
_format_arg = _OMC_LIT428;
}
else
{
_format_arg = mmc_mk_none();
}
}
}
if(isSome(_format_arg))
{
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta25 = mmc_mk_box7(3, &Static_Slot_SLOT__desc, _OMC_LIT436, mmc_mk_boolean(0), _format_arg, tmpMeta24, mmc_mk_integer(((modelica_integer) 2)), mmc_mk_integer(((modelica_integer) 0)));
tmpMeta23 = mmc_mk_cons(_val_slot, mmc_mk_cons(tmpMeta25, MMC_REFSTRUCTLIT(mmc_nil)));
_slots = tmpMeta23;
}
else
{
tmpMeta26 = mmc_mk_cons(_val_slot, MMC_REFSTRUCTLIT(mmc_nil));
_slots = tmpMeta26;
}
_outCache = omc_Static_elabInputArgs(threadData, _outCache, _inEnv, _inPosArgs, _inNamedArgs, _slots, 0, 1, _inImplicit, _inPrefix, _inInfo, _OMC_LIT42, _OMC_LIT425, 0 ,&_args ,NULL ,&_consts, NULL);
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_1;
tmp18_done2:;
}
}
;
_c = omc_List_fold(threadData, _consts, boxvar_Types_constAnd, _OMC_LIT60);
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT363, _args, _OMC_LIT405);
tmpMeta27 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _OMC_LIT405, _c);
_outProperties = tmpMeta27;
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_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinString(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinString(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinScalar(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _scalar_ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _dims = NULL;
modelica_string _ty_str = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT362, _inInfo);
tmpMeta5 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta1, &tmpMeta2);
_outCache = tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_outExp = tmpMeta1;
_ty = tmpMeta3;
_c = tmpMeta4;
_scalar_ty = omc_Types_flattenArrayType(threadData, _ty ,&_dims);
{
modelica_metatype _dim;
for (tmpMeta6 = _dims; !listEmpty(tmpMeta6); tmpMeta6=MMC_CDR(tmpMeta6))
{
_dim = MMC_CAR(tmpMeta6);
if((omc_Expression_dimensionKnown(threadData, _dim) && (omc_Expression_dimensionSize(threadData, _dim) != ((modelica_integer) 1))))
{
_ty_str = omc_Types_unparseTypeNoAttr(threadData, _ty);
tmpMeta7 = mmc_mk_cons(_ty_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT388, tmpMeta7, _inInfo);
}
}
}
if((!listEmpty(_dims)))
{
tmpMeta9 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT362, tmpMeta9, _scalar_ty);
}
_outExp = omc_ExpressionSimplify_simplify1(threadData, _outExp, NULL);
tmpMeta10 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _scalar_ty, _c);
_outProperties = tmpMeta10;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinScalar(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinScalar(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinUniqueRootIndices(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inNamedArg;
tmp4_5 = _inPrefix;
{
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _aexp1 = NULL;
modelica_metatype _aexp2 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _exp3 = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _lst = NULL;
modelica_integer _dim;
modelica_metatype _ty = NULL;
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_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_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_aexp1 = tmpMeta6;
_aexp2 = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
tmpMeta12 = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp1, 0, 0, _pre, _info, &tmpMeta10, NULL);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,16,3) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_exp1 = tmpMeta10;
_lst = tmpMeta11;
_dim = listLength(_lst);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp2, 0, 0, _pre, _info ,&_exp2 ,NULL);
_exp3 = _OMC_LIT437;
tmpMeta14 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim));
tmpMeta13 = mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta15 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT89, tmpMeta13);
_ty = tmpMeta15;
tmpMeta16 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta17 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _ty, mmc_mk_boolean(0), mmc_mk_boolean(1), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT294, _OMC_LIT287);
tmpMeta18 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _OMC_LIT439, tmpMeta16, tmpMeta17);
tmpMeta19 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT52);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta18;
tmpMeta[0+2] = tmpMeta19;
goto tmp3_done;
}
case 1: {
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;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_3);
tmpMeta21 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmpMeta21);
tmpMeta23 = MMC_CDR(tmpMeta21);
if (listEmpty(tmpMeta23)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmpMeta23);
tmpMeta25 = MMC_CDR(tmpMeta23);
if (!listEmpty(tmpMeta25)) goto tmp3_end;
_aexp1 = tmpMeta20;
_aexp2 = tmpMeta22;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
tmpMeta28 = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp1, 0, 0, _pre, _info, &tmpMeta26, NULL);
_cache = tmpMeta28;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta26,16,3) == 0) goto goto_2;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 4));
_exp1 = tmpMeta26;
_lst = tmpMeta27;
_dim = listLength(_lst);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp2, 0, 0, _pre, _info ,&_exp2 ,NULL);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp2, 0, 0, _pre, _info ,&_exp3 ,NULL);
tmpMeta30 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim));
tmpMeta29 = mmc_mk_cons(tmpMeta30, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta31 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT89, tmpMeta29);
_ty = tmpMeta31;
tmpMeta32 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta33 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _ty, mmc_mk_boolean(0), mmc_mk_boolean(1), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT294, _OMC_LIT287);
tmpMeta34 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _OMC_LIT439, tmpMeta32, tmpMeta33);
tmpMeta35 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT52);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta34;
tmpMeta[0+2] = tmpMeta35;
goto tmp3_done;
}
case 2: {
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_metatype tmpMeta50;
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta36 = MMC_CAR(tmp4_3);
tmpMeta37 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta37)) goto tmp3_end;
tmpMeta38 = MMC_CAR(tmpMeta37);
tmpMeta39 = MMC_CDR(tmpMeta37);
if (!listEmpty(tmpMeta39)) goto tmp3_end;
if (listEmpty(tmp4_4)) goto tmp3_end;
tmpMeta40 = MMC_CAR(tmp4_4);
tmpMeta41 = MMC_CDR(tmp4_4);
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 2));
if (7 != MMC_STRLEN(tmpMeta42) || strcmp(MMC_STRINGDATA(_OMC_LIT440), MMC_STRINGDATA(tmpMeta42)) != 0) goto tmp3_end;
if (!listEmpty(tmpMeta41)) goto tmp3_end;
_aexp1 = tmpMeta36;
_aexp2 = tmpMeta38;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
tmpMeta45 = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp1, 0, 0, _pre, _info, &tmpMeta43, NULL);
_cache = tmpMeta45;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,16,3) == 0) goto goto_2;
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 4));
_exp1 = tmpMeta43;
_lst = tmpMeta44;
_dim = listLength(_lst);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp2, 0, 0, _pre, _info ,&_exp2 ,NULL);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aexp2, 0, 0, _pre, _info ,&_exp3 ,NULL);
tmpMeta47 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim));
tmpMeta46 = mmc_mk_cons(tmpMeta47, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta48 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT89, tmpMeta46);
_ty = tmpMeta48;
tmpMeta49 = mmc_mk_cons(_exp1, mmc_mk_cons(_exp2, mmc_mk_cons(_exp3, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta50 = mmc_mk_box8(3, &DAE_CallAttributes_CALL__ATTR__desc, _ty, mmc_mk_boolean(0), mmc_mk_boolean(1), mmc_mk_boolean(0), mmc_mk_boolean(0), _OMC_LIT294, _OMC_LIT287);
tmpMeta51 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _OMC_LIT439, tmpMeta49, tmpMeta50);
tmpMeta52 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT52);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta51;
tmpMeta[0+2] = tmpMeta52;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinUniqueRootIndices(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinUniqueRootIndices(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinRooted(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT323, _inInfo);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), 0, 0, _inPrefix, _inInfo ,&_exp, NULL);
tmpMeta1 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta2 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _OMC_LIT441, tmpMeta1, _OMC_LIT442);
_outExp = tmpMeta2;
_outProperties = _OMC_LIT404;
omc_Static_zeroSizeOverconstrainedOperator(threadData, _exp, _outExp, _inInfo);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinRooted(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinRooted(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIsRoot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT443, _inInfo);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), 0, 0, _inPrefix, _inInfo ,&_exp, NULL);
tmpMeta1 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta2 = mmc_mk_box4(16, &DAE_Exp_CALL__desc, _OMC_LIT445, tmpMeta1, _OMC_LIT442);
_outExp = tmpMeta2;
_outProperties = _OMC_LIT404;
omc_Static_zeroSizeOverconstrainedOperator(threadData, _exp, _outExp, _inInfo);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIsRoot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinIsRoot(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC void omc_Static_zeroSizeOverconstrainedOperator(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inFExp, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inExp;
{
modelica_string _s = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,16,3) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
if (!listEmpty(tmpMeta5)) goto tmp2_end;
_s = omc_ExpressionDump_printExpStr(threadData, _inFExp);
tmpMeta6 = mmc_mk_cons(_s, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT448, tmpMeta6, _inInfo);
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIdentity(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _exp_ty = NULL;
modelica_metatype _c = NULL;
modelica_string _pre_str = NULL;
modelica_metatype _msg = NULL;
modelica_integer _sz;
modelica_metatype _dim_size = NULL;
modelica_metatype _dim_exp = NULL;
modelica_boolean _check_model;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT359, _inInfo);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo ,&_dim_exp ,&_outProperties);
tmpMeta1 = _outProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_ty = tmpMeta2;
_c = tmpMeta3;
if((!omc_Types_isScalarInteger(threadData, _ty)))
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta4 = mmc_mk_cons(_OMC_LIT452, mmc_mk_cons(_OMC_LIT359, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT451, tmpMeta4, _inInfo);
}
if(omc_Types_isParameterOrConstant(threadData, _c))
{
_check_model = omc_Flags_getConfigBool(threadData, _OMC_LIT19);
tmp6 = (modelica_boolean)_check_model;
if(tmp6)
{
tmpMeta7 = _OMC_LIT54;
}
else
{
tmpMeta5 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta7 = tmpMeta5;
}
_msg = tmpMeta7;
{
{
volatile mmc_switch_type tmp10;
int tmp11;
tmp10 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp9_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp10 < 2; tmp10++) {
switch (MMC_SWITCH_CAST(tmp10)) {
case 0: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
tmpMeta15 = omc_Ceval_ceval(threadData, _outCache, _inEnv, _dim_exp, 0, _msg, ((modelica_integer) 0), &tmpMeta12);
_outCache = tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,1) == 0) goto goto_8;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
tmp14 = mmc_unbox_integer(tmpMeta13);
_sz = tmp14;
tmpMeta16 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_sz));
_dim_size = tmpMeta16;
tmpMeta17 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_sz));
_dim_exp = tmpMeta17;
goto tmp9_done;
}
case 1: {
if(_check_model)
{
_dim_size = _OMC_LIT20;
}
else
{
goto goto_8;
}
goto tmp9_done;
}
}
goto tmp9_end;
tmp9_end: ;
}
goto goto_8;
tmp9_done:
(void)tmp10;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp9_done2;
goto_8:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp10 < 2) {
goto tmp9_top;
}
MMC_THROW_INTERNAL();
tmp9_done2:;
}
}
;
}
else
{
_dim_size = _OMC_LIT20;
}
tmpMeta18 = mmc_mk_cons(_dim_size, mmc_mk_cons(_dim_size, MMC_REFSTRUCTLIT(mmc_nil)));
_ty = omc_Types_liftArrayListDims(threadData, _OMC_LIT89, tmpMeta18);
_exp_ty = omc_Types_simplifyType(threadData, _ty);
tmpMeta19 = mmc_mk_cons(_dim_exp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT359, tmpMeta19, _exp_ty);
tmpMeta20 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta20;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIdentity(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinIdentity(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinCat(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _dim_exp = NULL;
modelica_metatype _dim_props = NULL;
modelica_metatype _dim_ty = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _result_ty = NULL;
modelica_metatype _dim_c = NULL;
modelica_metatype _arr_c = NULL;
modelica_metatype _c = NULL;
modelica_string _pre_str = NULL;
modelica_string _exp_str = NULL;
modelica_integer _dim_int;
modelica_metatype _arr_expl = NULL;
modelica_metatype _arr_props = NULL;
modelica_metatype _arr_tys = NULL;
modelica_metatype _tys = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _dim = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(((listLength(_inPosArgs) < ((modelica_integer) 2)) || (!listEmpty(_inNamedArgs))))
{
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT4, _OMC_LIT453, _inInfo);
}
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo ,&_dim_exp ,&_dim_props);
tmpMeta1 = _dim_props;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_dim_ty = tmpMeta2;
_dim_c = tmpMeta3;
if((!omc_Types_isScalarInteger(threadData, _dim_ty)))
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta4 = mmc_mk_cons(_OMC_LIT452, mmc_mk_cons(_OMC_LIT358, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT451, tmpMeta4, _inInfo);
}
tmpMeta8 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta9 = omc_Ceval_ceval(threadData, _inCache, _inEnv, _dim_exp, 0, tmpMeta8, ((modelica_integer) 0), &tmpMeta5);
_outCache = tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,1) == 0) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
_dim_int = tmp7;
_outCache = omc_Static_elabExpList(threadData, _outCache, _inEnv, listRest(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo, _OMC_LIT42 ,&_arr_expl ,&_arr_props);
{
modelica_metatype __omcQ_24tmpVar63;
modelica_metatype* tmp11;
modelica_metatype tmpMeta12;
modelica_metatype __omcQ_24tmpVar62;
modelica_integer tmp13;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
_p_loopVar = _arr_props;
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar63 = tmpMeta12;
tmp11 = &__omcQ_24tmpVar63;
while(1) {
tmp13 = 1;
if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp13--;
}
if (tmp13 == 0) {
__omcQ_24tmpVar62 = omc_Types_getPropType(threadData, _p);
*tmp11 = mmc_mk_cons(__omcQ_24tmpVar62,0);
tmp11 = &MMC_CDR(*tmp11);
} else if (tmp13 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp11 = mmc_mk_nil();
tmpMeta10 = __omcQ_24tmpVar63;
}
_arr_tys = tmpMeta10;
{
modelica_metatype __omcQ_24tmpVar65;
modelica_metatype* tmp15;
modelica_metatype tmpMeta16;
modelica_metatype __omcQ_24tmpVar64;
modelica_integer tmp17;
modelica_metatype _t_loopVar = 0;
modelica_metatype _t;
_t_loopVar = _arr_tys;
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar65 = tmpMeta16;
tmp15 = &__omcQ_24tmpVar65;
while(1) {
tmp17 = 1;
if (!listEmpty(_t_loopVar)) {
_t = MMC_CAR(_t_loopVar);
_t_loopVar = MMC_CDR(_t_loopVar);
tmp17--;
}
if (tmp17 == 0) {
__omcQ_24tmpVar64 = omc_Types_makeNthDimUnknown(threadData, _t, _dim_int);
*tmp15 = mmc_mk_cons(__omcQ_24tmpVar64,0);
tmp15 = &MMC_CDR(*tmp15);
} else if (tmp17 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp15 = mmc_mk_nil();
tmpMeta14 = __omcQ_24tmpVar65;
}
tmpMeta18 = tmpMeta14;
if (listEmpty(tmpMeta18)) MMC_THROW_INTERNAL();
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
_ty = tmpMeta19;
_tys = tmpMeta20;
_result_ty = omc_List_fold1(threadData, _tys, boxvar_Types_arraySuperType, _inInfo, _ty);
{
{
volatile mmc_switch_type tmp23;
int tmp24;
tmp23 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp22_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp23 < 2; tmp23++) {
switch (MMC_SWITCH_CAST(tmp23)) {
case 0: {
_arr_expl = omc_Types_matchTypes(threadData, _arr_expl, _arr_tys, _result_ty, 0 ,&_arr_tys);
goto tmp22_done;
}
case 1: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
{
modelica_metatype __omcQ_24tmpVar67;
modelica_metatype* tmp26;
modelica_metatype tmpMeta27;
modelica_string __omcQ_24tmpVar66;
modelica_integer tmp28;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _inPosArgs;
tmpMeta27 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar67 = tmpMeta27;
tmp26 = &__omcQ_24tmpVar67;
while(1) {
tmp28 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp28--;
}
if (tmp28 == 0) {
__omcQ_24tmpVar66 = omc_Dump_printExpStr(threadData, _e);
*tmp26 = mmc_mk_cons(__omcQ_24tmpVar66,0);
tmp26 = &MMC_CDR(*tmp26);
} else if (tmp28 == 1) {
break;
} else {
goto goto_21;
}
}
*tmp26 = mmc_mk_nil();
tmpMeta25 = __omcQ_24tmpVar67;
}
_exp_str = stringDelimitList(tmpMeta25, _OMC_LIT166);
tmpMeta29 = stringAppend(_OMC_LIT454,_exp_str);
tmpMeta30 = stringAppend(tmpMeta29,_OMC_LIT391);
_exp_str = tmpMeta30;
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta31 = mmc_mk_cons(_exp_str, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT457, tmpMeta31, _inInfo);
goto tmp22_done;
}
}
goto tmp22_end;
tmp22_end: ;
}
goto goto_21;
tmp22_done:
(void)tmp23;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp22_done2;
goto_21:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp23 < 2) {
goto tmp22_top;
}
MMC_THROW_INTERNAL();
tmp22_done2:;
}
}
;
{
modelica_metatype __omcQ_24tmpVar69;
modelica_metatype* tmp33;
modelica_metatype tmpMeta34;
modelica_metatype __omcQ_24tmpVar68;
modelica_integer tmp35;
modelica_metatype _t_loopVar = 0;
modelica_metatype _t;
_t_loopVar = _arr_tys;
tmpMeta34 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar69 = tmpMeta34;
tmp33 = &__omcQ_24tmpVar69;
while(1) {
tmp35 = 1;
if (!listEmpty(_t_loopVar)) {
_t = MMC_CAR(_t_loopVar);
_t_loopVar = MMC_CDR(_t_loopVar);
tmp35--;
}
if (tmp35 == 0) {
__omcQ_24tmpVar68 = omc_Types_getDimensionNth(threadData, _t, _dim_int);
*tmp33 = mmc_mk_cons(__omcQ_24tmpVar68,0);
tmp33 = &MMC_CDR(*tmp33);
} else if (tmp35 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp33 = mmc_mk_nil();
tmpMeta32 = __omcQ_24tmpVar69;
}
_dims = tmpMeta32;
{
modelica_integer tmp36;
modelica_metatype __omcQ_24tmpVar71;
modelica_metatype __omcQ_24tmpVar70;
modelica_integer tmp38;
modelica_metatype _d_loopVar = 0;
modelica_metatype _d;
_d_loopVar = _dims;
tmp36 = 0;
while(1) {
tmp38 = 1;
if (!listEmpty(_d_loopVar)) {
_d = MMC_CAR(_d_loopVar);
_d_loopVar = MMC_CDR(_d_loopVar);
tmp38--;
}
if (tmp38 == 0) {
__omcQ_24tmpVar70 = _d;
if (tmp36)
{
__omcQ_24tmpVar71 = omc_Expression_dimensionsAdd(threadData, __omcQ_24tmpVar70, __omcQ_24tmpVar71);
}
else
{
__omcQ_24tmpVar71 = __omcQ_24tmpVar70;
tmp36 = 1;
}
} else if (tmp38 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
if (!tmp36) MMC_THROW_INTERNAL();
tmpMeta37 = __omcQ_24tmpVar71;
}
_dim = tmpMeta37;
_result_ty = omc_Types_setDimensionNth(threadData, _result_ty, _dim, _dim_int);
_arr_c = omc_Static_elabArrayConst(threadData, _arr_props);
_c = omc_Types_constAnd(threadData, _dim_c, _arr_c);
_ty = omc_Types_simplifyType(threadData, _result_ty);
tmpMeta39 = mmc_mk_cons(_dim_exp, _arr_expl);
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT358, tmpMeta39, _ty);
tmpMeta40 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _result_ty, _c);
_outProperties = tmpMeta40;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinCat(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinCat(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinChange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_string _pre_str = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _var = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT357, _inInfo);
_e = listHead(_inPosArgs);
if((!omc_AbsynUtil_isCref(threadData, _e)))
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta1 = mmc_mk_cons(_OMC_LIT452, mmc_mk_cons(_OMC_LIT357, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT460, tmpMeta1, _inInfo);
}
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
tmpMeta2 = _outProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_ty = tmpMeta3;
_c = tmpMeta4;
if(omc_Types_isSimpleType(threadData, _ty))
{
if(omc_Types_isParameterOrConstant(threadData, _c))
{
_outExp = _OMC_LIT122;
_outProperties = _OMC_LIT469;
}
else
{
if(omc_Types_isDiscreteType(threadData, _ty))
{
tmpMeta5 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT357, tmpMeta5, _OMC_LIT56);
_outProperties = _OMC_LIT404;
}
else
{
_cref = omc_Expression_getCrefFromCrefOrAsub(threadData, _outExp);
_outCache = omc_Lookup_lookupVar(threadData, _outCache, _inEnv, _cref ,&_attr, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
tmpMeta6 = _attr;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_var = tmpMeta7;
if(valueEq(_var, _OMC_LIT468))
{
tmpMeta8 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT357, tmpMeta8, _OMC_LIT56);
_outProperties = _OMC_LIT404;
}
else
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta9 = mmc_mk_cons(_OMC_LIT452, mmc_mk_cons(_OMC_LIT357, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT467, tmpMeta9, _inInfo);
}
}
}
}
else
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta10 = mmc_mk_cons(_OMC_LIT464, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT463, tmpMeta10, _inInfo);
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinChange(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinChange(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinDer(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _dims = NULL;
modelica_string _exp_str = NULL;
modelica_string _ty_str = 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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_FGraph_inFunctionScope(threadData, _inEnv))
{
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT472, tmpMeta1, _inInfo);
}
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT50, _inInfo);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
tmpMeta2 = _outProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_ty = tmpMeta3;
_c = tmpMeta4;
if((!omc_Types_isRealOrSubTypeReal(threadData, omc_Types_arrayElementType(threadData, _ty))))
{
_exp_str = omc_Dump_printExpStr(threadData, listHead(_inPosArgs));
_ty_str = omc_Types_unparseTypeNoAttr(threadData, _ty);
tmpMeta5 = mmc_mk_cons(_exp_str, mmc_mk_cons(_ty_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT475, tmpMeta5, _inInfo);
}
if(omc_Types_isVar(threadData, _c))
{
if(omc_Types_dimensionsKnown(threadData, _ty))
{
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabCallArgs(threadData, _inCache, _inEnv, _OMC_LIT476, _inPosArgs, tmpMeta6, tmpMeta7, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
else
{
tmpMeta8 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT50, tmpMeta8, omc_Types_simplifyType(threadData, _ty));
}
}
else
{
_dims = omc_Types_getDimensions(threadData, _ty);
_outExp = omc_Expression_makeZeroExpression(threadData, _dims ,&_ty);
tmpMeta9 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT60);
_outProperties = tmpMeta9;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinDer(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinDer(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinEdge(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_string _msg = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT356, _inInfo);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
tmpMeta1 = _outProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_ty = tmpMeta2;
_c = tmpMeta3;
if((!omc_Types_isScalarBoolean(threadData, _ty)))
{
tmpMeta4 = stringAppend(_OMC_LIT477,omc_ExpressionDump_printExpStr(threadData, _outExp));
tmpMeta5 = stringAppend(tmpMeta4,_OMC_LIT391);
_msg = tmpMeta5;
tmpMeta6 = mmc_mk_cons(_msg, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT480, tmpMeta6, _inInfo);
}
if(omc_Types_isVar(threadData, _c))
{
tmpMeta7 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT356, tmpMeta7, _OMC_LIT56);
}
else
{
_outExp = _OMC_LIT122;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinEdge(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinEdge(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNoevent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT355, _inInfo);
_e = listHead(_inPosArgs);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
tmpMeta1 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT355, tmpMeta1, _OMC_LIT56);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNoevent(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinNoevent(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinIntegerEnum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_verifyBuiltInHandlerType(threadData, _inCache, _inEnv, _inPosArgs, _inImplicit, boxvar_Types_isEnumeration, _OMC_LIT27, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinIntegerEnum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinIntegerEnum(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArg, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinBoolean(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_verifyBuiltInHandlerType(threadData, _inCache, _inEnv, _inPosArgs, _inImplicit, boxvar_Types_isIntegerOrRealOrBooleanOrSubTypeOfEither, _OMC_LIT354, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinBoolean(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinBoolean(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTimeInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (!listEmpty(tmp4_3)) goto tmp3_end;
if (!listEmpty(tmp4_4)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_ty = _OMC_LIT484;
tmpMeta10 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta10, _OMC_LIT483, _args, _nargs, tmpMeta11, _impl, _pre, _info, &tmpMeta6);
_cache = tmpMeta12;
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_call = tmpMeta8;
_prop = tmpMeta9;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTimeInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinTimeInState(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTicksInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (!listEmpty(tmp4_3)) goto tmp3_end;
if (!listEmpty(tmp4_4)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_ty = _OMC_LIT486;
tmpMeta10 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta10, _OMC_LIT485, _args, _nargs, tmpMeta11, _impl, _pre, _info, &tmpMeta6);
_cache = tmpMeta12;
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_call = tmpMeta8;
_prop = tmpMeta9;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTicksInState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinTicksInState(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinActiveState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _astate = NULL;
modelica_string _strMsg = NULL;
modelica_string _strPre = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_astate = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _astate, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_getPropType(threadData, _prop1);
tmpMeta8 = stringAppend(_OMC_LIT487,omc_Dump_printExpLstStr(threadData, _args));
tmpMeta9 = stringAppend(tmpMeta8,_OMC_LIT488);
_strMsg = tmpMeta9;
_strPre = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta10 = mmc_mk_cons(_strMsg, mmc_mk_cons(_strPre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_assertionOrAddSourceMessage(threadData, omc_Static_isBlockTypeWorkaround(threadData, _ty1), _OMC_LIT327, tmpMeta10, _info);
tmpMeta12 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT489, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta13 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta11, _OMC_LIT56, _OMC_LIT482, _OMC_LIT490);
_ty = tmpMeta13;
tmpMeta18 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta18, _OMC_LIT490, _args, _nargs, tmpMeta19, _impl, _pre, _info, &tmpMeta14);
_cache = tmpMeta20;
if (optionNone(tmpMeta14)) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
_call = tmpMeta16;
_prop = tmpMeta17;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinActiveState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinActiveState(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinInitialState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _astate = NULL;
modelica_string _strMsg = NULL;
modelica_string _strPre = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_astate = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _astate, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_getPropType(threadData, _prop1);
tmpMeta8 = stringAppend(_OMC_LIT491,omc_Dump_printExpLstStr(threadData, _args));
tmpMeta9 = stringAppend(tmpMeta8,_OMC_LIT488);
_strMsg = tmpMeta9;
_strPre = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta10 = mmc_mk_cons(_strMsg, mmc_mk_cons(_strPre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_assertionOrAddSourceMessage(threadData, omc_Static_isBlockTypeWorkaround(threadData, _ty1), _OMC_LIT327, tmpMeta10, _info);
tmpMeta12 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT489, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta13 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta11, _OMC_LIT492, _OMC_LIT482, _OMC_LIT493);
_ty = tmpMeta13;
tmpMeta18 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta18, _OMC_LIT493, _args, _nargs, tmpMeta19, _impl, _pre, _info, &tmpMeta14);
_cache = tmpMeta20;
if (optionNone(tmpMeta14)) goto goto_2;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
_call = tmpMeta16;
_prop = tmpMeta17;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinInitialState(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinInitialState(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition5(threadData_t *threadData, modelica_string _argName, modelica_boolean _getAsNamedArg, modelica_metatype _args, modelica_metatype _nargs)
{
modelica_metatype _argValue = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_boolean tmp4_2;
tmp4_1 = _argName;
tmp4_2 = _getAsNamedArg;
{
modelica_metatype _namedArg = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (1 != tmp4_2) goto tmp3_end;
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT494), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_namedArg = omc_List_getMemberOnTrue(threadData, _OMC_LIT494, _nargs, boxvar_Static_elabBuiltinTransition3);
tmpMeta1 = omc_Static_elabBuiltinTransition4(threadData, _namedArg);
goto tmp3_done;
}
case 1: {
if (0 != tmp4_2) goto tmp3_end;
if (4 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT494), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = listHead(_args);
goto tmp3_done;
}
case 2: {
if (1 != tmp4_2) goto tmp3_end;
if (2 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT495), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
_namedArg = omc_List_getMemberOnTrue(threadData, _OMC_LIT495, _nargs, boxvar_Static_elabBuiltinTransition3);
tmpMeta1 = omc_Static_elabBuiltinTransition4(threadData, _namedArg);
goto tmp3_done;
}
case 3: {
if (0 != tmp4_2) goto tmp3_end;
if (2 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT495), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
tmpMeta1 = listGet(_args, ((modelica_integer) 2));
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_argValue = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _argValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition5(threadData_t *threadData, modelica_metatype _argName, modelica_metatype _getAsNamedArg, modelica_metatype _args, modelica_metatype _nargs)
{
modelica_integer tmp1;
modelica_metatype _argValue = NULL;
tmp1 = mmc_unbox_integer(_getAsNamedArg);
_argValue = omc_Static_elabBuiltinTransition5(threadData, _argName, tmp1, _args, _nargs);
return _argValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition4(threadData_t *threadData, modelica_metatype _inElement)
{
modelica_metatype _argValue = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inElement;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_argValue = tmpMeta2;
_return: OMC_LABEL_UNUSED
return _argValue;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_elabBuiltinTransition3(threadData_t *threadData, modelica_string _name, modelica_metatype _namedArg)
{
modelica_boolean _outIsEqual;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _namedArg;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
tmp1 = (stringEqual(_name, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_namedArg), 2)))));
goto tmp3_done;
}
case 1: {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outIsEqual = tmp1;
_return: OMC_LABEL_UNUSED
return _outIsEqual;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition3(threadData_t *threadData, modelica_metatype _name, modelica_metatype _namedArg)
{
modelica_boolean _outIsEqual;
modelica_metatype out_outIsEqual;
_outIsEqual = omc_Static_elabBuiltinTransition3(threadData, _name, _namedArg);
out_outIsEqual = mmc_mk_icon(_outIsEqual);
return out_outIsEqual;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_string _argName, modelica_integer _n, modelica_string _strMsg0, modelica_string _strPre)
{
modelica_metatype _ty = NULL;
modelica_metatype _arg1 = NULL;
modelica_metatype _prop1 = NULL;
modelica_integer _nPos;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_string _strPos = NULL;
modelica_string _strMsg1 = NULL;
modelica_boolean _b1;
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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_strPos = ((stringEqual(_argName, _OMC_LIT494))?_OMC_LIT496:_OMC_LIT497);
_nPos = ((stringEqual(_argName, _OMC_LIT494))?((modelica_integer) 1):((modelica_integer) 2));
_b1 = omc_List_isMemberOnTrue(threadData, _argName, _nargs, boxvar_Static_elabBuiltinTransition3);
tmpMeta1 = stringAppend(_strMsg0,_OMC_LIT498);
tmpMeta2 = stringAppend(tmpMeta1,_argName);
tmpMeta3 = stringAppend(tmpMeta2,_OMC_LIT499);
_s1 = tmpMeta3;
tmpMeta4 = mmc_mk_cons(_s1, mmc_mk_cons(_strPre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_assertionOrAddSourceMessage(threadData, (!(_b1 && (_n >= _nPos))), _OMC_LIT327, tmpMeta4, _info);
tmpMeta5 = stringAppend(_strMsg0,_OMC_LIT500);
tmpMeta6 = stringAppend(tmpMeta5,_strPos);
tmpMeta7 = stringAppend(tmpMeta6,_OMC_LIT501);
tmpMeta8 = stringAppend(tmpMeta7,_argName);
tmpMeta9 = stringAppend(tmpMeta8,_OMC_LIT502);
_s2 = tmpMeta9;
tmpMeta10 = mmc_mk_cons(_s2, mmc_mk_cons(_strPre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_assertionOrAddSourceMessage(threadData, (_b1 || (_n >= _nPos)), _OMC_LIT327, tmpMeta10, _info);
_arg1 = omc_Static_elabBuiltinTransition5(threadData, _argName, _b1, _args, _nargs);
omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _arg1, _inBoolean, 1, _inPrefix, _info ,NULL ,&_prop1);
_ty = omc_Types_getPropType(threadData, _prop1);
tmpMeta11 = stringAppend(_strMsg0,_OMC_LIT166);
tmpMeta12 = stringAppend(tmpMeta11,_strPos);
tmpMeta13 = stringAppend(tmpMeta12,_OMC_LIT503);
_strMsg1 = tmpMeta13;
tmpMeta14 = mmc_mk_cons(_strMsg1, mmc_mk_cons(_strPre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_assertionOrAddSourceMessage(threadData, omc_Static_isBlockTypeWorkaround(threadData, _ty), _OMC_LIT327, tmpMeta14, _info);
_return: OMC_LABEL_UNUSED
return _ty;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype _argName, modelica_metatype _n, modelica_metatype _strMsg0, modelica_metatype _strPre)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _ty = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
tmp2 = mmc_unbox_integer(_n);
_ty = omc_Static_elabBuiltinTransition2(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, _argName, tmp2, _strMsg0, _strPre);
return _ty;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTransition(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_boolean tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inBoolean;
tmp4_4 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop = NULL;
modelica_integer _n;
modelica_string _strMsg0 = NULL;
modelica_string _strPre = NULL;
modelica_string _s1 = NULL;
modelica_string _s2 = NULL;
modelica_metatype _slist = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_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;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_3;
_pre = tmp4_4;
_slist = omc_List_map(threadData, _nargs, boxvar_Dump_printNamedArgStr);
_s1 = omc_Dump_printExpLstStr(threadData, _args);
tmpMeta6 = mmc_mk_cons(_s1, _slist);
_s2 = stringDelimitList(tmpMeta6, _OMC_LIT166);
tmpMeta7 = stringAppend(_OMC_LIT504,_s2);
tmpMeta8 = stringAppend(tmpMeta7,_OMC_LIT391);
_strMsg0 = tmpMeta8;
_strPre = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
_n = listLength(_args);
_ty1 = omc_Static_elabBuiltinTransition2(threadData, _cache, _env, _args, _nargs, _impl, _pre, _info, _OMC_LIT494, _n, _strMsg0, _strPre);
_ty2 = omc_Static_elabBuiltinTransition2(threadData, _cache, _env, _args, _nargs, _impl, _pre, _info, _OMC_LIT495, _n, _strMsg0, _strPre);
tmpMeta10 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT494, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta11 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT495, _ty2, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta9 = mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(_OMC_LIT506, mmc_mk_cons(_OMC_LIT508, mmc_mk_cons(_OMC_LIT510, mmc_mk_cons(_OMC_LIT513, mmc_mk_cons(_OMC_LIT517, MMC_REFSTRUCTLIT(mmc_nil))))))));
tmpMeta12 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta9, _OMC_LIT492, _OMC_LIT482, _OMC_LIT518);
_ty = tmpMeta12;
tmpMeta17 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta18 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta19 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta17, _OMC_LIT518, _args, _nargs, tmpMeta18, _impl, _pre, _info, &tmpMeta13);
_cache = tmpMeta19;
if (optionNone(tmpMeta13)) goto goto_2;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 1));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 1));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 2));
_call = tmpMeta15;
_prop = tmpMeta16;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTransition(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinTransition(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_isBlockTypeWorkaround(threadData_t *threadData, modelica_metatype _ity)
{
modelica_boolean _b;
modelica_boolean tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _ity;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 13: {
_ity = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ity), 4)));
goto _tailrecursive;
goto tmp3_done;
}
case 12: {
tmp1 = 1;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
tmp1 = 0;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_b = tmp1;
_return: OMC_LABEL_UNUSED
return _b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_isBlockTypeWorkaround(threadData_t *threadData, modelica_metatype _ity)
{
modelica_boolean _b;
modelica_metatype out_b;
_b = omc_Static_isBlockTypeWorkaround(threadData, _ity);
out_b = mmc_mk_icon(_b);
return out_b;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinInterval(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _au = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (!listEmpty(tmp4_3)) goto tmp3_end;
if (!listEmpty(tmp4_4)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_ty = _OMC_LIT520;
tmpMeta10 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta10, _OMC_LIT519, _args, _nargs, tmpMeta11, _impl, _pre, _info, &tmpMeta6);
_cache = tmpMeta12;
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_call = tmpMeta8;
_prop = tmpMeta9;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 1: {
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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_3);
tmpMeta14 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_au = tmpMeta13;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta16 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta15 = mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta17 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta15, _OMC_LIT131, _OMC_LIT482, _OMC_LIT519);
_ty = tmpMeta17;
tmpMeta22 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta23 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta24 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta22, _OMC_LIT519, _args, _nargs, tmpMeta23, _impl, _pre, _info, &tmpMeta18);
_cache = tmpMeta24;
if (optionNone(tmpMeta18)) goto goto_2;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 1));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 1));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_call = tmpMeta20;
_prop = tmpMeta21;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinInterval(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinInterval(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinFirstTick(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _au = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (!listEmpty(tmp4_3)) goto tmp3_end;
if (!listEmpty(tmp4_4)) goto tmp3_end;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_ty = _OMC_LIT523;
tmpMeta10 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta10, _OMC_LIT522, _args, _nargs, tmpMeta11, _impl, _pre, _info, &tmpMeta6);
_cache = tmpMeta12;
if (optionNone(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 1));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 1));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_call = tmpMeta8;
_prop = tmpMeta9;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 1: {
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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmp4_3);
tmpMeta14 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_au = tmpMeta13;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta16 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta15 = mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta17 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta15, _OMC_LIT56, _OMC_LIT482, _OMC_LIT522);
_ty = tmpMeta17;
tmpMeta22 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta23 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta24 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta22, _OMC_LIT522, _args, _nargs, tmpMeta23, _impl, _pre, _info, &tmpMeta18);
_cache = tmpMeta24;
if (optionNone(tmpMeta18)) goto goto_2;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 1));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 1));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
_call = tmpMeta20;
_prop = tmpMeta21;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinFirstTick(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinFirstTick(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNoClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _au = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_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 (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_au = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta9 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta8 = mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta8, _ty1, _OMC_LIT482, _OMC_LIT524);
_ty = tmpMeta10;
tmpMeta15 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta17 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta15, _OMC_LIT524, _args, _nargs, tmpMeta16, _impl, _pre, _info, &tmpMeta11);
_cache = tmpMeta17;
if (optionNone(tmpMeta11)) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_call = tmpMeta13;
_prop = tmpMeta14;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNoClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinNoClock(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinBackSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _backCounter = NULL;
modelica_metatype _resolution = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _prop3 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _au = NULL;
modelica_metatype _abackCounter = NULL;
modelica_metatype _aresolution = NULL;
modelica_metatype _val = NULL;
modelica_metatype _rval = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_au = tmpMeta6;
_abackCounter = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _abackCounter, _impl, 1, _pre, _info ,&_backCounter ,&_prop2);
_backCounter = omc_Types_matchType(threadData, _backCounter, omc_Types_getPropType(threadData, _prop2), _OMC_LIT89, 1, NULL);
tmpMeta10 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _backCounter, 0, tmpMeta10, ((modelica_integer) 0) ,&_val);
tmpMeta11 = mmc_mk_cons(_OMC_LIT376, mmc_mk_cons(_OMC_LIT528, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _val), mmc_mk_cons(_OMC_LIT529, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _val) >= ((modelica_integer) 0)), _OMC_LIT527, tmpMeta11, _info);
tmpMeta12 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(omc_ValuesUtil_valueInteger(threadData, _val)));
_abackCounter = tmpMeta12;
_aresolution = _OMC_LIT530;
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta14 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta13 = mmc_mk_cons(tmpMeta14, mmc_mk_cons(_OMC_LIT531, mmc_mk_cons(_OMC_LIT533, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta15 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta13, _ty1, _OMC_LIT482, _OMC_LIT534);
_ty = tmpMeta15;
tmpMeta20 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta21 = mmc_mk_cons(_au, mmc_mk_cons(_abackCounter, mmc_mk_cons(_aresolution, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta22 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta23 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta20, _OMC_LIT534, tmpMeta21, _nargs, tmpMeta22, _impl, _pre, _info, &tmpMeta16);
_cache = tmpMeta23;
if (optionNone(tmpMeta16)) goto goto_2;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 1));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 1));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_call = tmpMeta18;
_prop = tmpMeta19;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 1: {
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;
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;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmp4_3);
tmpMeta25 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_CAR(tmpMeta25);
tmpMeta27 = MMC_CDR(tmpMeta25);
if (listEmpty(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_CAR(tmpMeta27);
tmpMeta29 = MMC_CDR(tmpMeta27);
if (!listEmpty(tmpMeta29)) goto tmp3_end;
_au = tmpMeta24;
_abackCounter = tmpMeta26;
_aresolution = tmpMeta28;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _abackCounter, _impl, 1, _pre, _info ,&_backCounter ,&_prop2);
_backCounter = omc_Types_matchType(threadData, _backCounter, omc_Types_getPropType(threadData, _prop2), _OMC_LIT89, 1, NULL);
tmpMeta30 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _backCounter, 0, tmpMeta30, ((modelica_integer) 0) ,&_val);
tmpMeta31 = mmc_mk_cons(_OMC_LIT376, mmc_mk_cons(_OMC_LIT528, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _val), mmc_mk_cons(_OMC_LIT529, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _val) >= ((modelica_integer) 0)), _OMC_LIT527, tmpMeta31, _info);
tmpMeta32 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(omc_ValuesUtil_valueInteger(threadData, _val)));
_abackCounter = tmpMeta32;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aresolution, _impl, 1, _pre, _info ,&_resolution ,&_prop3);
_resolution = omc_Types_matchType(threadData, _resolution, omc_Types_getPropType(threadData, _prop3), _OMC_LIT89, 1, NULL);
tmpMeta33 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _resolution, 0, tmpMeta33, ((modelica_integer) 0) ,&_rval);
tmpMeta34 = mmc_mk_cons(_OMC_LIT376, mmc_mk_cons(_OMC_LIT532, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _rval), mmc_mk_cons(_OMC_LIT535, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _rval) >= ((modelica_integer) 1)), _OMC_LIT527, tmpMeta34, _info);
tmpMeta35 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(omc_ValuesUtil_valueInteger(threadData, _rval)));
_aresolution = tmpMeta35;
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta37 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta36 = mmc_mk_cons(tmpMeta37, mmc_mk_cons(_OMC_LIT531, mmc_mk_cons(_OMC_LIT533, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta38 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta36, _ty1, _OMC_LIT482, _OMC_LIT534);
_ty = tmpMeta38;
tmpMeta43 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta44 = mmc_mk_cons(_au, mmc_mk_cons(_abackCounter, mmc_mk_cons(_aresolution, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta45 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta46 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta43, _OMC_LIT534, tmpMeta44, _nargs, tmpMeta45, _impl, _pre, _info, &tmpMeta39);
_cache = tmpMeta46;
if (optionNone(tmpMeta39)) goto goto_2;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 1));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 1));
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 2));
_call = tmpMeta41;
_prop = tmpMeta42;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinBackSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinBackSample(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinShiftSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _shiftCounter = NULL;
modelica_metatype _resolution = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _prop3 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _au = NULL;
modelica_metatype _ashiftCounter = NULL;
modelica_metatype _aresolution = NULL;
modelica_metatype _val = NULL;
modelica_metatype _rval = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_au = tmpMeta6;
_ashiftCounter = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ashiftCounter, _impl, 1, _pre, _info ,&_shiftCounter ,&_prop2);
_shiftCounter = omc_Types_matchType(threadData, _shiftCounter, omc_Types_getPropType(threadData, _prop2), _OMC_LIT89, 1, NULL);
tmpMeta10 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _shiftCounter, 0, tmpMeta10, ((modelica_integer) 0) ,&_val);
tmpMeta11 = mmc_mk_cons(_OMC_LIT375, mmc_mk_cons(_OMC_LIT536, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _val), mmc_mk_cons(_OMC_LIT529, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _val) >= ((modelica_integer) 0)), _OMC_LIT527, tmpMeta11, _info);
tmpMeta12 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(omc_ValuesUtil_valueInteger(threadData, _val)));
_ashiftCounter = tmpMeta12;
_aresolution = _OMC_LIT530;
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta14 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta13 = mmc_mk_cons(tmpMeta14, mmc_mk_cons(_OMC_LIT537, mmc_mk_cons(_OMC_LIT533, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta15 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta13, _ty1, _OMC_LIT482, _OMC_LIT538);
_ty = tmpMeta15;
tmpMeta20 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta21 = mmc_mk_cons(_au, mmc_mk_cons(_ashiftCounter, mmc_mk_cons(_aresolution, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta22 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta23 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta20, _OMC_LIT538, tmpMeta21, _nargs, tmpMeta22, _impl, _pre, _info, &tmpMeta16);
_cache = tmpMeta23;
if (optionNone(tmpMeta16)) goto goto_2;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 1));
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 1));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_call = tmpMeta18;
_prop = tmpMeta19;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 1: {
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;
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;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmp4_3);
tmpMeta25 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta25)) goto tmp3_end;
tmpMeta26 = MMC_CAR(tmpMeta25);
tmpMeta27 = MMC_CDR(tmpMeta25);
if (listEmpty(tmpMeta27)) goto tmp3_end;
tmpMeta28 = MMC_CAR(tmpMeta27);
tmpMeta29 = MMC_CDR(tmpMeta27);
if (!listEmpty(tmpMeta29)) goto tmp3_end;
_au = tmpMeta24;
_ashiftCounter = tmpMeta26;
_aresolution = tmpMeta28;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ashiftCounter, _impl, 1, _pre, _info ,&_shiftCounter ,&_prop2);
_shiftCounter = omc_Types_matchType(threadData, _shiftCounter, omc_Types_getPropType(threadData, _prop2), _OMC_LIT89, 1, NULL);
tmpMeta30 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _shiftCounter, 0, tmpMeta30, ((modelica_integer) 0) ,&_val);
tmpMeta31 = mmc_mk_cons(_OMC_LIT375, mmc_mk_cons(_OMC_LIT536, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _val), mmc_mk_cons(_OMC_LIT529, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _val) >= ((modelica_integer) 0)), _OMC_LIT527, tmpMeta31, _info);
tmpMeta32 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(omc_ValuesUtil_valueInteger(threadData, _val)));
_ashiftCounter = tmpMeta32;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aresolution, _impl, 1, _pre, _info ,&_resolution ,&_prop3);
_resolution = omc_Types_matchType(threadData, _resolution, omc_Types_getPropType(threadData, _prop3), _OMC_LIT89, 1, NULL);
tmpMeta33 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _resolution, 0, tmpMeta33, ((modelica_integer) 0) ,&_rval);
tmpMeta34 = mmc_mk_cons(_OMC_LIT375, mmc_mk_cons(_OMC_LIT532, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _rval), mmc_mk_cons(_OMC_LIT535, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _rval) >= ((modelica_integer) 1)), _OMC_LIT527, tmpMeta34, _info);
tmpMeta35 = mmc_mk_box2(3, &Absyn_Exp_INTEGER__desc, mmc_mk_integer(omc_ValuesUtil_valueInteger(threadData, _rval)));
_aresolution = tmpMeta35;
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta37 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta36 = mmc_mk_cons(tmpMeta37, mmc_mk_cons(_OMC_LIT537, mmc_mk_cons(_OMC_LIT533, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta38 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta36, _ty1, _OMC_LIT482, _OMC_LIT538);
_ty = tmpMeta38;
tmpMeta43 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta44 = mmc_mk_cons(_au, mmc_mk_cons(_ashiftCounter, mmc_mk_cons(_aresolution, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta45 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta46 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta43, _OMC_LIT538, tmpMeta44, _nargs, tmpMeta45, _impl, _pre, _info, &tmpMeta39);
_cache = tmpMeta46;
if (optionNone(tmpMeta39)) goto goto_2;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta39), 1));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 1));
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 2));
_call = tmpMeta41;
_prop = tmpMeta42;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinShiftSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinShiftSample(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_boolean tmp4_5;volatile modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _c = NULL;
modelica_metatype _start = NULL;
modelica_metatype _interval = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _variability = NULL;
modelica_metatype _au = NULL;
modelica_metatype _ac = NULL;
modelica_metatype _astart = NULL;
modelica_metatype _ainterval = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_astart = tmpMeta6;
_ainterval = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _astart, _impl, 1, _pre, _info ,&_start ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ainterval, _impl, 1, _pre, _info ,&_interval ,&_prop2);
_ty1 = omc_Types_getPropType(threadData, _prop1);
_ty2 = omc_Types_getPropType(threadData, _prop2);
_start = omc_Types_matchType(threadData, _start, _ty1, _OMC_LIT131, 1, NULL);
_interval = omc_Types_matchType(threadData, _interval, _ty2, _OMC_LIT131, 1, NULL);
_ty = _OMC_LIT545;
tmpMeta14 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta16 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta14, _OMC_LIT544, _args, _nargs, tmpMeta15, _impl, _pre, _info, &tmpMeta10);
_cache = tmpMeta16;
if (optionNone(tmpMeta10)) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_call = tmpMeta12;
_prop = tmpMeta13;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 1: {
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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_3);
tmpMeta18 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
if (!listEmpty(tmpMeta20)) goto tmp3_end;
_au = tmpMeta17;
_ac = tmpMeta19;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
tmp4 += 1;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ac, _impl, 1, _pre, _info ,&_c ,&_prop2);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop2));
_variability = omc_Types_getPropConst(threadData, _prop1);
_c = omc_Types_matchType(threadData, _c, _ty2, _OMC_LIT546, 1, NULL);
tmpMeta22 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _variability, _OMC_LIT319, mmc_mk_none());
tmpMeta23 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT547, _ty2, _OMC_LIT52, _OMC_LIT319, _OMC_LIT550);
tmpMeta21 = mmc_mk_cons(tmpMeta22, mmc_mk_cons(tmpMeta23, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta24 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta21, _ty1, _OMC_LIT482, _OMC_LIT544);
_ty = tmpMeta24;
tmpMeta29 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta30 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta31 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta29, _OMC_LIT544, _args, _nargs, tmpMeta30, _impl, _pre, _info, &tmpMeta25);
_cache = tmpMeta31;
if (optionNone(tmpMeta25)) goto goto_2;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 1));
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 1));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
_call = tmpMeta27;
_prop = tmpMeta28;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 2: {
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;
if (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta32 = MMC_CAR(tmp4_3);
tmpMeta33 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta33)) goto tmp3_end;
_au = tmpMeta32;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_variability = omc_Types_getPropConst(threadData, _prop1);
tmpMeta35 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _variability, _OMC_LIT319, mmc_mk_none());
tmpMeta34 = mmc_mk_cons(tmpMeta35, mmc_mk_cons(_OMC_LIT551, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta36 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta34, _ty1, _OMC_LIT482, _OMC_LIT544);
_ty = tmpMeta36;
tmpMeta41 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta42 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta43 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta41, _OMC_LIT544, _args, _nargs, tmpMeta42, _impl, _pre, _info, &tmpMeta37);
_cache = tmpMeta43;
if (optionNone(tmpMeta37)) goto goto_2;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta37), 1));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 1));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 2));
_call = tmpMeta39;
_prop = tmpMeta40;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _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 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSample(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinSample(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinHold(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_boolean tmp4_5;modelica_metatype tmp4_6;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _args;
tmp4_4 = _nargs;
tmp4_5 = _inBoolean;
tmp4_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _au = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_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 (!listEmpty(tmp4_4)) goto tmp3_end;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_au = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_5;
_pre = tmp4_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _au, _impl, 1, _pre, _info ,NULL ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
tmpMeta9 = mmc_mk_box6(3, &DAE_FuncArg_FUNCARG__desc, _OMC_LIT521, _ty1, _OMC_LIT52, _OMC_LIT319, mmc_mk_none());
tmpMeta8 = mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta10 = mmc_mk_box5(14, &DAE_Type_T__FUNCTION__desc, tmpMeta8, _ty1, _OMC_LIT482, _OMC_LIT552);
_ty = tmpMeta10;
tmpMeta15 = mmc_mk_cons(_ty, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta17 = omc_Static_elabCallArgs3(threadData, _cache, _env, tmpMeta15, _OMC_LIT552, _args, _nargs, tmpMeta16, _impl, _pre, _info, &tmpMeta11);
_cache = tmpMeta17;
if (optionNone(tmpMeta11)) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_call = tmpMeta13;
_prop = tmpMeta14;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinHold(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinHold(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp8_1;volatile modelica_metatype tmp8_2;volatile modelica_metatype tmp8_3;volatile modelica_metatype tmp8_4;volatile modelica_boolean tmp8_5;volatile modelica_metatype tmp8_6;
tmp8_1 = _inCache;
tmp8_2 = _inEnv;
tmp8_3 = _args;
tmp8_4 = _nargs;
tmp8_5 = _inBoolean;
tmp8_6 = _inPrefix;
{
modelica_metatype _call = NULL;
modelica_metatype _interval = NULL;
modelica_metatype _intervalCounter = NULL;
modelica_metatype _resolution = NULL;
modelica_metatype _condition = NULL;
modelica_metatype _startInterval = NULL;
modelica_metatype _c = NULL;
modelica_metatype _solverMethod = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _prop = NULL;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype _ainterval = NULL;
modelica_metatype _aintervalCounter = NULL;
modelica_metatype _aresolution = NULL;
modelica_metatype _acondition = NULL;
modelica_metatype _astartInterval = NULL;
modelica_metatype _ac = NULL;
modelica_metatype _asolverMethod = NULL;
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp8;
int tmp9;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta4 = mmc_mk_box2(7, &DAE_Type_T__CLOCK__desc, tmpMeta3);
tmpMeta5 = mmc_mk_box1(5, &DAE_Const_C__VAR__desc);
tmpMeta6 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta4, tmpMeta5);
_prop = tmpMeta6;
tmp8 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp7_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp8 < 8; tmp8++) {
switch (MMC_SWITCH_CAST(tmp8)) {
case 0: {
if (!listEmpty(tmp8_3)) goto tmp7_end;
if (!listEmpty(tmp8_4)) goto tmp7_end;
_cache = tmp8_1;
tmp8 += 7;
_call = _OMC_LIT549;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _OMC_LIT553;
goto tmp7_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (!listEmpty(tmp8_4)) goto tmp7_end;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta10 = MMC_CAR(tmp8_3);
tmpMeta11 = MMC_CDR(tmp8_3);
if (!listEmpty(tmpMeta11)) goto tmp7_end;
_aintervalCounter = tmpMeta10;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
tmp8 += 1;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aintervalCounter, _impl, 1, _pre, _info ,&_intervalCounter ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_intervalCounter = omc_Types_matchType(threadData, _intervalCounter, _ty1, _OMC_LIT89, 1, NULL);
tmpMeta12 = mmc_mk_box3(4, &DAE_ClockKind_RATIONAL__CLOCK__desc, _intervalCounter, _OMC_LIT515);
tmpMeta13 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta12);
_call = tmpMeta13;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
case 2: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (!listEmpty(tmp8_4)) goto tmp7_end;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta14 = MMC_CAR(tmp8_3);
tmpMeta15 = MMC_CDR(tmp8_3);
if (listEmpty(tmpMeta15)) goto tmp7_end;
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (!listEmpty(tmpMeta17)) goto tmp7_end;
_aintervalCounter = tmpMeta14;
_aresolution = tmpMeta16;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
tmp8 += 2;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aintervalCounter, _impl, 1, _pre, _info ,&_intervalCounter ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _aresolution, _impl, 1, _pre, _info ,&_resolution ,&_prop2);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop2));
_intervalCounter = omc_Types_matchType(threadData, _intervalCounter, _ty1, _OMC_LIT89, 1, NULL);
_resolution = omc_Types_matchType(threadData, _resolution, _ty2, _OMC_LIT89, 1, NULL);
tmpMeta18 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _resolution, 0, tmpMeta18, ((modelica_integer) 0) ,&_val);
tmpMeta19 = mmc_mk_cons(_OMC_LIT373, mmc_mk_cons(_OMC_LIT532, mmc_mk_cons(omc_ValuesUtil_valString(threadData, _val), mmc_mk_cons(_OMC_LIT535, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_assertionOrAddSourceMessage(threadData, (omc_ValuesUtil_valueInteger(threadData, _val) >= ((modelica_integer) 1)), _OMC_LIT527, tmpMeta19, _info);
_resolution = omc_ValuesUtil_valueExp(threadData, _val, mmc_mk_some(_resolution));
tmpMeta20 = mmc_mk_box3(4, &DAE_ClockKind_RATIONAL__CLOCK__desc, _intervalCounter, _resolution);
tmpMeta21 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta20);
_call = tmpMeta21;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
case 3: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (!listEmpty(tmp8_4)) goto tmp7_end;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta22 = MMC_CAR(tmp8_3);
tmpMeta23 = MMC_CDR(tmp8_3);
if (!listEmpty(tmpMeta23)) goto tmp7_end;
_ainterval = tmpMeta22;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ainterval, _impl, 1, _pre, _info ,&_interval ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_interval = omc_Types_matchType(threadData, _interval, _ty1, _OMC_LIT131, 1, NULL);
tmpMeta24 = mmc_mk_box2(5, &DAE_ClockKind_REAL__CLOCK__desc, _interval);
tmpMeta25 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta24);
_call = tmpMeta25;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
case 4: {
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
if (!listEmpty(tmp8_4)) goto tmp7_end;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta26 = MMC_CAR(tmp8_3);
tmpMeta27 = MMC_CDR(tmp8_3);
if (!listEmpty(tmpMeta27)) goto tmp7_end;
_acondition = tmpMeta26;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
tmp8 += 3;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _acondition, _impl, 1, _pre, _info ,&_condition ,&_prop1);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_condition = omc_Types_matchType(threadData, _condition, _ty1, _OMC_LIT56, 1, NULL);
tmpMeta28 = mmc_mk_box3(6, &DAE_ClockKind_EVENT__CLOCK__desc, _condition, _OMC_LIT554);
tmpMeta29 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta28);
_call = tmpMeta29;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
case 5: {
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (!listEmpty(tmp8_4)) goto tmp7_end;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta30 = MMC_CAR(tmp8_3);
tmpMeta31 = MMC_CDR(tmp8_3);
if (listEmpty(tmpMeta31)) goto tmp7_end;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (!listEmpty(tmpMeta33)) goto tmp7_end;
_acondition = tmpMeta30;
_astartInterval = tmpMeta32;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _acondition, _impl, 1, _pre, _info ,&_condition ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _astartInterval, _impl, 1, _pre, _info ,&_startInterval ,&_prop2);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop2));
_condition = omc_Types_matchType(threadData, _condition, _ty1, _OMC_LIT56, 1, NULL);
_startInterval = omc_Types_matchType(threadData, _startInterval, _ty2, _OMC_LIT131, 1, NULL);
tmpMeta34 = mmc_mk_box3(6, &DAE_ClockKind_EVENT__CLOCK__desc, _condition, _startInterval);
tmpMeta35 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta34);
_call = tmpMeta35;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
case 6: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (!listEmpty(tmp8_4)) goto tmp7_end;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta36 = MMC_CAR(tmp8_3);
tmpMeta37 = MMC_CDR(tmp8_3);
if (listEmpty(tmpMeta37)) goto tmp7_end;
tmpMeta38 = MMC_CAR(tmpMeta37);
tmpMeta39 = MMC_CDR(tmpMeta37);
if (!listEmpty(tmpMeta39)) goto tmp7_end;
_ac = tmpMeta36;
_asolverMethod = tmpMeta38;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
tmp8 += 1;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ac, _impl, 1, _pre, _info ,&_c ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _asolverMethod, _impl, 1, _pre, _info ,&_solverMethod ,&_prop2);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop2));
_c = omc_Types_matchType(threadData, _c, _ty1, _OMC_LIT546, 1, NULL);
_solverMethod = omc_Types_matchType(threadData, _solverMethod, _ty2, _OMC_LIT405, 1, NULL);
tmpMeta40 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _solverMethod, 0, tmpMeta40, ((modelica_integer) 0) ,&_val);
_solverMethod = omc_ValuesUtil_valueExp(threadData, _val, mmc_mk_some(_solverMethod));
tmpMeta41 = mmc_mk_box3(7, &DAE_ClockKind_SOLVER__CLOCK__desc, _c, _solverMethod);
tmpMeta42 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta41);
_call = tmpMeta42;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
case 7: {
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;
if (listEmpty(tmp8_3)) goto tmp7_end;
tmpMeta43 = MMC_CAR(tmp8_3);
tmpMeta44 = MMC_CDR(tmp8_3);
if (!listEmpty(tmpMeta44)) goto tmp7_end;
if (listEmpty(tmp8_4)) goto tmp7_end;
tmpMeta45 = MMC_CAR(tmp8_4);
tmpMeta46 = MMC_CDR(tmp8_4);
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 2));
if (12 != MMC_STRLEN(tmpMeta47) || strcmp(MMC_STRINGDATA(_OMC_LIT555), MMC_STRINGDATA(tmpMeta47)) != 0) goto tmp7_end;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta45), 3));
if (!listEmpty(tmpMeta46)) goto tmp7_end;
_ac = tmpMeta43;
_asolverMethod = tmpMeta48;
_cache = tmp8_1;
_env = tmp8_2;
_impl = tmp8_5;
_pre = tmp8_6;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _ac, _impl, 1, _pre, _info ,&_c ,&_prop1);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _asolverMethod, _impl, 1, _pre, _info ,&_solverMethod ,&_prop2);
_ty1 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2 = omc_Types_arrayElementType(threadData, omc_Types_getPropType(threadData, _prop2));
_c = omc_Types_matchType(threadData, _c, _ty1, _OMC_LIT546, 1, NULL);
_solverMethod = omc_Types_matchType(threadData, _solverMethod, _ty2, _OMC_LIT405, 1, NULL);
tmpMeta49 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _info);
_cache = omc_Ceval_ceval(threadData, _cache, _env, _solverMethod, 0, tmpMeta49, ((modelica_integer) 0) ,&_val);
_solverMethod = omc_ValuesUtil_valueExp(threadData, _val, mmc_mk_some(_solverMethod));
tmpMeta50 = mmc_mk_box3(7, &DAE_ClockKind_SOLVER__CLOCK__desc, _c, _solverMethod);
tmpMeta51 = mmc_mk_box2(7, &DAE_Exp_CLKCONST__desc, tmpMeta50);
_call = tmpMeta51;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _call;
tmpMeta[0+2] = _prop;
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_2;
tmp7_done:
(void)tmp8;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp7_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp8 < 8) {
goto tmp7_top;
}
MMC_THROW_INTERNAL();
tmp7_done2:;
}
}
_outCache = tmpMeta[0+0];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinClock(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _args, modelica_metatype _nargs, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinClock(threadData, _inCache, _inEnv, _args, _nargs, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMinMaxCommon(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_string _inFnName, modelica_metatype _inFnArgs, modelica_boolean _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _cache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_cache = __omcQ_24in_5Fcache;
{
modelica_metatype tmp4_1;
tmp4_1 = _inFnArgs;
{
modelica_metatype _arrexp_1 = NULL;
modelica_metatype _s1_1 = NULL;
modelica_metatype _s2_1 = NULL;
modelica_metatype _call = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _elt_ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _arrexp = NULL;
modelica_metatype _s1 = NULL;
modelica_metatype _s2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_arrexp = tmpMeta6;
tmpMeta12 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arrexp, _impl, 1, _prefix, _info, &tmpMeta8, &tmpMeta9);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_arrexp_1 = tmpMeta8;
_ty = tmpMeta10;
_c = tmpMeta11;
tmp13 = omc_Types_isArray(threadData, _ty);
if (1 != tmp13) goto goto_2;
_arrexp_1 = omc_Expression_matrixToArray(threadData, _arrexp_1);
_elt_ty = omc_Types_arrayElementType(threadData, _ty);
_tp = omc_Types_simplifyType(threadData, _elt_ty);
tmp14 = omc_Types_isString(threadData, _tp);
if (0 != tmp14) goto goto_2;
tmpMeta15 = mmc_mk_cons(_arrexp_1, MMC_REFSTRUCTLIT(mmc_nil));
_call = omc_Expression_makePureBuiltinCall(threadData, _inFnName, tmpMeta15, _tp);
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _elt_ty, _c);
tmpMeta[0+0] = _call;
tmpMeta[0+1] = tmpMeta16;
goto tmp3_done;
}
case 1: {
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;
modelica_boolean tmp33;
modelica_metatype tmpMeta34;
modelica_boolean tmp35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
if (!listEmpty(tmpMeta20)) goto tmp3_end;
_s1 = tmpMeta17;
_s2 = tmpMeta19;
tmpMeta25 = omc_Static_elabExpInExpression(threadData, _cache, _env, _s1, _impl, 1, _prefix, _info, &tmpMeta21, &tmpMeta22);
_cache = tmpMeta25;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,0,2) == 0) goto goto_2;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
_s1_1 = tmpMeta21;
_ty1 = tmpMeta23;
_c1 = tmpMeta24;
tmpMeta30 = omc_Static_elabExpInExpression(threadData, _cache, _env, _s2, _impl, 1, _prefix, _info, &tmpMeta26, &tmpMeta27);
_cache = tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,0,2) == 0) goto goto_2;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 3));
_s2_1 = tmpMeta26;
_ty2 = tmpMeta28;
_c2 = tmpMeta29;
tmpMeta34 = omc_Types_checkTypeCompat(threadData, _s1_1, _ty1, _s2_1, _ty2, 0, &tmpMeta31, &tmpMeta32, &tmp33);
_s1_1 = tmpMeta34;
if (1 != tmp33) goto goto_2;
_s2_1 = tmpMeta31;
_ty = tmpMeta32;
_c = omc_Types_constAnd(threadData, _c1, _c2);
_tp = omc_Types_simplifyType(threadData, _ty);
tmp35 = omc_Types_isString(threadData, _tp);
if (0 != tmp35) goto goto_2;
tmpMeta36 = mmc_mk_cons(_s1_1, mmc_mk_cons(_s2_1, MMC_REFSTRUCTLIT(mmc_nil)));
_call = omc_Expression_makePureBuiltinCall(threadData, _inFnName, tmpMeta36, _tp);
tmpMeta37 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
tmpMeta[0+0] = _call;
tmpMeta[0+1] = tmpMeta37;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinMinMaxCommon(threadData_t *threadData, modelica_metatype __omcQ_24in_5Fcache, modelica_metatype _env, modelica_metatype _inFnName, modelica_metatype _inFnArgs, modelica_metatype _impl, modelica_metatype _prefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _cache = NULL;
tmp1 = mmc_unbox_integer(_impl);
_cache = omc_Static_elabBuiltinMinMaxCommon(threadData, __omcQ_24in_5Fcache, _env, _inFnName, _inFnArgs, tmp1, _prefix, _info, out_outExp, out_outProperties);
return _cache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_elabBuiltinMinMaxCommon(threadData, _inCache, _inEnv, _OMC_LIT346, _inFnArgs, _inImpl, _inPrefix, _info ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinMin(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_Static_elabBuiltinMin(threadData, _inCache, _inEnv, _inFnArgs, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinMax(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_elabBuiltinMinMaxCommon(threadData, _inCache, _inEnv, _OMC_LIT345, _inFnArgs, _inImpl, _inPrefix, _info ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinMax(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFnArgs, modelica_metatype _inNamedArg, modelica_metatype _inImpl, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_Static_elabBuiltinMax(threadData, _inCache, _inEnv, _inFnArgs, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinOnes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_cons(_OMC_LIT530, _inPosArgs);
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabBuiltinFill(threadData, _inCache, _inEnv, tmpMeta1, tmpMeta2, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinOnes(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinOnes(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArg, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensions3(threadData_t *threadData, modelica_metatype _inDims)
{
modelica_boolean _outSame;
modelica_metatype _dim1 = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outSame = 1;
if(listEmpty(_inDims))
{
goto _return;
}
_dim1 = listHead(_inDims);
{
modelica_metatype _dim2;
for (tmpMeta1 = listRest(_inDims); !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_dim2 = MMC_CAR(tmpMeta1);
if((!omc_Expression_dimensionsEqual(threadData, _dim1, _dim2)))
{
_outSame = 0;
goto _return;
}
}
}
_return: OMC_LABEL_UNUSED
return _outSame;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensions3(threadData_t *threadData, modelica_metatype _inDims)
{
modelica_boolean _outSame;
modelica_metatype out_outSame;
_outSame = omc_Static_sameDimensions3(threadData, _inDims);
out_outSame = mmc_mk_icon(_outSame);
return out_outSame;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensions2(threadData_t *threadData, modelica_metatype _inDimensions)
{
modelica_boolean _outSame;
modelica_metatype _dims = NULL;
modelica_metatype _rest_dims = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta9;
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outSame = 1;
_rest_dims = _inDimensions;
if(listEmpty(_inDimensions))
{
goto _return;
}
while(1)
{
if(!(!listEmpty(listHead(_rest_dims)))) break;
{
modelica_metatype __omcQ_24tmpVar81;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype __omcQ_24tmpVar80;
modelica_integer tmp4;
modelica_metatype _d_loopVar = 0;
modelica_metatype _d;
_d_loopVar = _rest_dims;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar81 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar81;
while(1) {
tmp4 = 1;
if (!listEmpty(_d_loopVar)) {
_d = MMC_CAR(_d_loopVar);
_d_loopVar = MMC_CDR(_d_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar80 = listHead(_d);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar80,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar81;
}
_dims = tmpMeta1;
if((!omc_Static_sameDimensions3(threadData, _dims)))
{
_outSame = 0;
goto _return;
}
{
modelica_metatype __omcQ_24tmpVar83;
modelica_metatype* tmp6;
modelica_metatype tmpMeta7;
modelica_metatype __omcQ_24tmpVar82;
modelica_integer tmp8;
modelica_metatype _d_loopVar = 0;
modelica_metatype _d;
_d_loopVar = _rest_dims;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar83 = tmpMeta7;
tmp6 = &__omcQ_24tmpVar83;
while(1) {
tmp8 = 1;
if (!listEmpty(_d_loopVar)) {
_d = MMC_CAR(_d_loopVar);
_d_loopVar = MMC_CDR(_d_loopVar);
tmp8--;
}
if (tmp8 == 0) {
__omcQ_24tmpVar82 = listRest(_d);
*tmp6 = mmc_mk_cons(__omcQ_24tmpVar82,0);
tmp6 = &MMC_CDR(*tmp6);
} else if (tmp8 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp6 = mmc_mk_nil();
tmpMeta5 = __omcQ_24tmpVar83;
}
_rest_dims = tmpMeta5;
}
{
modelica_metatype _d;
for (tmpMeta9 = _rest_dims; !listEmpty(tmpMeta9); tmpMeta9=MMC_CDR(tmpMeta9))
{
_d = MMC_CAR(tmpMeta9);
tmp10 = listEmpty(_d);
if (1 != tmp10) MMC_THROW_INTERNAL();
}
}
_return: OMC_LABEL_UNUSED
return _outSame;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensions2(threadData_t *threadData, modelica_metatype _inDimensions)
{
modelica_boolean _outSame;
modelica_metatype out_outSame;
_outSame = omc_Static_sameDimensions2(threadData, _inDimensions);
out_outSame = mmc_mk_icon(_outSame);
return out_outSame;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensionsExceptionDimX(threadData_t *threadData, modelica_metatype _inProps, modelica_integer _dimException)
{
modelica_boolean _res;
modelica_metatype _types = NULL;
modelica_metatype _dims = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_types = omc_List_map(threadData, _inProps, boxvar_Types_getPropType);
_dims = omc_List_map(threadData, _types, boxvar_Types_getDimensions);
_dims = omc_List_map1(threadData, _dims, boxvar_listDelete, mmc_mk_integer(_dimException));
_res = omc_Static_sameDimensions2(threadData, _dims);
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensionsExceptionDimX(threadData_t *threadData, modelica_metatype _inProps, modelica_metatype _dimException)
{
modelica_integer tmp1;
modelica_boolean _res;
modelica_metatype out_res;
tmp1 = mmc_unbox_integer(_dimException);
_res = omc_Static_sameDimensionsExceptionDimX(threadData, _inProps, tmp1);
out_res = mmc_mk_icon(_res);
return out_res;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_sameDimensions(threadData_t *threadData, modelica_metatype _inProps)
{
modelica_boolean _res;
modelica_metatype _types = NULL;
modelica_metatype _dims = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_types = omc_List_map(threadData, _inProps, boxvar_Types_getPropType);
_dims = omc_List_map(threadData, _types, boxvar_Types_getDimensions);
_res = omc_Static_sameDimensions2(threadData, _dims);
_return: OMC_LABEL_UNUSED
return _res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_sameDimensions(threadData_t *threadData, modelica_metatype _inProps)
{
modelica_boolean _res;
modelica_metatype out_res;
_res = omc_Static_sameDimensions(threadData, _inProps);
out_res = mmc_mk_icon(_res);
return out_res;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinZeros(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = mmc_mk_cons(_OMC_LIT556, _inPosArgs);
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabBuiltinFill(threadData, _inCache, _inEnv, tmpMeta1, tmpMeta2, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinZeros(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinZeros(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinArray3(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inPropertiesLst, modelica_metatype _inProperties, modelica_metatype *out_outProperties)
{
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outProperties = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _rest_props = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
_outProperties = listHead(_inPropertiesLst);
_rest_props = _inPropertiesLst;
{
modelica_metatype _e;
for (tmpMeta2 = _inExpl; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_e = MMC_CAR(tmpMeta2);
tmpMeta3 = _rest_props;
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
_prop = tmpMeta4;
_rest_props = tmpMeta5;
_e = omc_Types_matchProp(threadData, _e, _prop, _inProperties, 1, NULL);
tmpMeta6 = mmc_mk_cons(_e, _outExpl);
_outExpl = tmpMeta6;
}
}
_outExpl = listReverse(_outExpl);
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProperties, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outProperties)
{
modelica_metatype _outExpl = NULL;
modelica_metatype _outProperties = NULL;
modelica_string _pre_str = NULL;
modelica_metatype _types = NULL;
modelica_boolean _have_real;
modelica_metatype _prop = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_have_real = 0;
if((!omc_Static_sameDimensions(threadData, _inProperties)))
{
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta1 = mmc_mk_cons(_OMC_LIT209, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT457, tmpMeta1, _inInfo);
}
_prop = (omc_Types_propsContainReal(threadData, _inProperties)?_OMC_LIT134:listHead(_inProperties));
_outExpl = omc_Static_elabBuiltinArray3(threadData, _inExpl, _inProperties, _prop ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _arr_ty = NULL;
modelica_metatype _c = NULL;
modelica_integer _len;
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 = omc_Static_elabExpList(threadData, _inCache, _inEnv, _inPosArgs, _inImplicit, 1, _inPrefix, _inInfo, _OMC_LIT42 ,&_expl ,&_props);
omc_Static_elabBuiltinArray2(threadData, _expl, _props, _inPrefix, _inInfo, &tmpMeta1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_ty = tmpMeta2;
_c = tmpMeta3;
_len = listLength(_expl);
tmpMeta5 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_len));
tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta4);
_arr_ty = tmpMeta6;
tmpMeta7 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _arr_ty, _c);
_outProperties = tmpMeta7;
_arr_ty = omc_Types_simplifyType(threadData, _arr_ty);
tmpMeta8 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _arr_ty, mmc_mk_boolean(omc_Types_isArray(threadData, _ty)), _expl);
_outExp = tmpMeta8;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinArray(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinPreMatrix(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,17,3) == 0) goto tmp3_end;
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_exp = tmpMeta7;
{
modelica_metatype __omcQ_24tmpVar85;
modelica_metatype* tmp11;
modelica_metatype tmpMeta12;
modelica_metatype __omcQ_24tmpVar84;
modelica_integer tmp13;
modelica_metatype _row_loopVar = 0;
modelica_metatype _row;
_row_loopVar = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_exp), 4)));
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar85 = tmpMeta12;
tmp11 = &__omcQ_24tmpVar85;
while(1) {
tmp13 = 1;
if (!listEmpty(_row_loopVar)) {
_row = MMC_CAR(_row_loopVar);
_row_loopVar = MMC_CDR(_row_loopVar);
tmp13--;
}
if (tmp13 == 0) {
__omcQ_24tmpVar84 = omc_Static_makePreLst(threadData, _row, _inType);
*tmp11 = mmc_mk_cons(__omcQ_24tmpVar84,0);
tmp11 = &MMC_CDR(*tmp11);
} else if (tmp13 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp11 = mmc_mk_nil();
tmpMeta10 = __omcQ_24tmpVar85;
}
tmpMeta9 = MMC_TAGPTR(mmc_alloc_words(5));
memcpy(MMC_UNTAGPTR(tmpMeta9), MMC_UNTAGPTR(_exp), 5*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta9))[4] = tmpMeta10;
_exp = tmpMeta9;
tmpMeta1 = _exp;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inExp;
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_Static_makePreLst(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inType)
{
modelica_metatype _outExpl = NULL;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_ty = omc_Types_simplifyType(threadData, _inType);
{
modelica_metatype __omcQ_24tmpVar87;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype __omcQ_24tmpVar86;
modelica_integer tmp5;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _inExpl;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar87 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar87;
while(1) {
tmp5 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp5--;
}
if (tmp5 == 0) {
tmpMeta4 = mmc_mk_cons(_e, MMC_REFSTRUCTLIT(mmc_nil));
__omcQ_24tmpVar86 = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT351, tmpMeta4, _ty);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar86,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp5 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar87;
}
_outExpl = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExpl;
}
PROTECTED_FUNCTION_STATIC void omc_Static_validateBuiltinStreamOperator(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inOperand, modelica_metatype _inType, modelica_string _inOperator, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inOperand;
{
modelica_metatype _cr = NULL;
modelica_metatype _attr = NULL;
modelica_string _op_str = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 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,6,2) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_cr = tmpMeta5;
omc_Lookup_lookupVar(threadData, _inCache, _inEnv, _cr ,&_attr, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
tmpMeta6 = _attr;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) goto goto_1;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta8;
_op_str = omc_ExpressionDump_printExpStr(threadData, _inOperand);
tmpMeta8 = mmc_mk_cons(_op_str, mmc_mk_cons(_inOperator, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT559, tmpMeta8, _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 modelica_metatype omc_Static_elabBuiltinStreamOperator(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_string _inOperator, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _inInfo)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _et = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta1 = _inExp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
tmpMeta7 = omc_Expression_flattenArrayExpToList(threadData, _inExp);
if (listEmpty(tmpMeta7)) goto goto_2;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
_exp = tmpMeta8;
omc_Static_validateBuiltinStreamOperator(threadData, _inCache, _inEnv, _exp, _inType, _inOperator, _inInfo);
_et = omc_Types_simplifyType(threadData, _inType);
tmpMeta10 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = omc_Expression_makePureBuiltinCall(threadData, _inOperator, tmpMeta10, _et);
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_Static_elabBuiltinActualStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ty = 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
tmpMeta1 = _inArgs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (!listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
_e = tmpMeta2;
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImpl, 1, _inPrefix, _inInfo ,&_exp ,&_outProperties);
_ty = omc_Types_getPropType(threadData, _outProperties);
_outExp = omc_Static_elabBuiltinStreamOperator(threadData, _outCache, _inEnv, _OMC_LIT366, _exp, _ty, _inInfo);
if(omc_Types_dimensionsKnown(threadData, _ty))
{
tmpMeta4 = mmc_mk_cons(_e, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabCallArgs(threadData, _outCache, _inEnv, _OMC_LIT560, tmpMeta4, tmpMeta5, tmpMeta6, _inImpl, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinActualStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImpl, modelica_metatype _inPrefix, 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_Static_elabBuiltinActualStream(threadData, _inCache, _inEnv, _inArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinInStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ty = 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
tmpMeta1 = _inArgs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (!listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
_e = tmpMeta2;
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImpl, 1, _inPrefix, _inInfo ,&_exp ,&_outProperties);
_ty = omc_Types_getPropType(threadData, _outProperties);
_outExp = omc_Static_elabBuiltinStreamOperator(threadData, _outCache, _inEnv, _OMC_LIT365, _exp, _ty, _inInfo);
if(omc_Types_dimensionsKnown(threadData, _ty))
{
tmpMeta4 = mmc_mk_cons(_e, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabCallArgs(threadData, _outCache, _inEnv, _OMC_LIT561, tmpMeta4, tmpMeta5, tmpMeta6, _inImpl, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinInStream(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImpl, modelica_metatype _inPrefix, 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_Static_elabBuiltinInStream(threadData, _inCache, _inEnv, _inArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinPre2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType, modelica_boolean *out_outScalar)
{
modelica_metatype _outExp = NULL;
modelica_boolean _outScalar;
modelica_boolean tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_boolean _sc;
modelica_metatype _expl = NULL;
modelica_integer _i;
modelica_metatype _mexpl = NULL;
modelica_metatype _ty = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,16,3) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmp10 = mmc_unbox_integer(tmpMeta9);
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 4));
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_sc = tmp10;
_expl = tmpMeta11;
tmp4 += 1;
tmpMeta[0+0] = omc_Static_makePreLst(threadData, _expl, _inType);
tmp1_c1 = _sc;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,17,3) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
tmp17 = mmc_unbox_integer(tmpMeta16);
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 4));
if (!listEmpty(tmpMeta14)) goto tmp3_end;
_ty = tmpMeta15;
_i = tmp17;
_mexpl = tmpMeta18;
{
modelica_metatype __omcQ_24tmpVar89;
modelica_metatype* tmp20;
modelica_metatype tmpMeta21;
modelica_metatype __omcQ_24tmpVar88;
modelica_integer tmp22;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _mexpl;
tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar89 = tmpMeta21;
tmp20 = &__omcQ_24tmpVar89;
while(1) {
tmp22 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp22--;
}
if (tmp22 == 0) {
__omcQ_24tmpVar88 = omc_Static_makePreLst(threadData, _e, _inType);
*tmp20 = mmc_mk_cons(__omcQ_24tmpVar88,0);
tmp20 = &MMC_CDR(*tmp20);
} else if (tmp22 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp20 = mmc_mk_nil();
tmpMeta19 = __omcQ_24tmpVar89;
}
_mexpl = tmpMeta19;
tmpMeta24 = mmc_mk_box4(20, &DAE_Exp_MATRIX__desc, _ty, mmc_mk_integer(_i), _mexpl);
tmpMeta23 = mmc_mk_cons(tmpMeta24, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = tmpMeta23;
tmp1_c1 = 0;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta25;
tmpMeta25 = mmc_mk_cons(_inExp, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[0+0] = tmpMeta25;
tmp1_c1 = 0;
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:;
}
}
_outExp = tmpMeta[0+0];
_outScalar = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outScalar) { *out_outScalar = _outScalar; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinPre2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype *out_outScalar)
{
modelica_boolean _outScalar;
modelica_metatype _outExp = NULL;
_outExp = omc_Static_elabBuiltinPre2(threadData, _inExp, _inType, &_outScalar);
if (out_outScalar) { *out_outScalar = mmc_mk_icon(_outScalar); }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinPre(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _c = NULL;
modelica_metatype _expl = NULL;
modelica_boolean _sc;
modelica_string _exp_str = NULL;
modelica_string _pre_str = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT351, _inInfo);
tmpMeta5 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta1, &tmpMeta2);
_outCache = tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
_exp = tmpMeta1;
_ty = tmpMeta3;
_c = tmpMeta4;
if(omc_Expression_isMatrix(threadData, _exp))
{
tmpMeta6 = _ty;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
_ty2 = tmpMeta7;
_ty2 = omc_Types_unliftArray(threadData, _ty2);
tmpMeta8 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT351, tmpMeta8, omc_Types_simplifyType(threadData, _ty2));
_outExp = omc_Static_elabBuiltinPreMatrix(threadData, _outExp, _ty2);
}
else
{
if(omc_Types_isArray(threadData, _ty))
{
_ty2 = omc_Types_unliftArray(threadData, _ty);
tmpMeta9 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT351, tmpMeta9, omc_Types_simplifyType(threadData, _ty2));
_expl = omc_Static_elabBuiltinPre2(threadData, _outExp, _ty2 ,&_sc);
tmpMeta10 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, omc_Types_simplifyType(threadData, _ty), mmc_mk_boolean(_sc), _expl);
_outExp = tmpMeta10;
}
else
{
_ty = omc_Types_arrayElementType(threadData, _ty);
if(omc_Types_basicType(threadData, _ty))
{
tmpMeta11 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT351, tmpMeta11, omc_Types_simplifyType(threadData, _ty));
}
else
{
_exp_str = omc_ExpressionDump_printExpStr(threadData, _exp);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta12 = mmc_mk_cons(_OMC_LIT351, mmc_mk_cons(_pre_str, mmc_mk_cons(_exp_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT564, tmpMeta12, _inInfo);
}
}
}
tmpMeta13 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta13;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinPre(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinPre(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinProduct2(threadData_t *threadData, modelica_metatype _inExp)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _array_exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,3) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta6)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_array_exp = tmpMeta7;
tmpMeta1 = omc_Expression_makeProductLst(threadData, omc_Expression_arrayElements(threadData, _array_exp));
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inExp;
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:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinProduct(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp_2 = NULL;
modelica_metatype _t = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _c = NULL;
modelica_metatype _env = NULL;
modelica_metatype _arrexp = NULL;
modelica_boolean _impl;
modelica_metatype _ty = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_string _str_exp = NULL;
modelica_string _str_pre = NULL;
modelica_metatype _etp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_arrexp = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta12 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arrexp, _impl, 1, _pre, _info, &tmpMeta8, &tmpMeta9);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_exp_1 = tmpMeta8;
_ty = tmpMeta10;
_c = tmpMeta11;
_exp_1 = omc_Types_matchType(threadData, _exp_1, _ty, _OMC_LIT89, 1, NULL);
tmpMeta13 = stringAppend(_OMC_LIT565,omc_Dump_printExpStr(threadData, _arrexp));
tmpMeta14 = stringAppend(tmpMeta13,_OMC_LIT391);
_str_exp = tmpMeta14;
_str_pre = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta15 = mmc_mk_cons(_str_exp, mmc_mk_cons(_str_pre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT568, tmpMeta15, _info);
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _OMC_LIT89, _c);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp_1;
tmpMeta[0+2] = tmpMeta16;
goto tmp3_done;
}
case 1: {
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;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_3);
tmpMeta18 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta18)) goto tmp3_end;
_arrexp = tmpMeta17;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta23 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arrexp, _impl, 1, _pre, _info, &tmpMeta19, &tmpMeta20);
_cache = tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta20,0,2) == 0) goto goto_2;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 3));
_exp_1 = tmpMeta19;
_ty = tmpMeta21;
_c = tmpMeta22;
_exp_1 = omc_Types_matchType(threadData, _exp_1, _ty, _OMC_LIT131, 1, NULL);
tmpMeta24 = stringAppend(_OMC_LIT565,omc_Dump_printExpStr(threadData, _arrexp));
tmpMeta25 = stringAppend(tmpMeta24,_OMC_LIT391);
_str_exp = tmpMeta25;
_str_pre = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta26 = mmc_mk_cons(_str_exp, mmc_mk_cons(_str_pre, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT568, tmpMeta26, _info);
tmpMeta27 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _OMC_LIT131, _c);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp_1;
tmpMeta[0+2] = tmpMeta27;
goto tmp3_done;
}
case 2: {
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;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta28 = MMC_CAR(tmp4_3);
tmpMeta29 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta29)) goto tmp3_end;
_arrexp = tmpMeta28;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta38 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arrexp, _impl, 1, _pre, _info, &tmpMeta30, &tmpMeta31);
_cache = tmpMeta38;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta31,0,2) == 0) goto goto_2;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,6,2) == 0) goto goto_2;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 3));
if (listEmpty(tmpMeta34)) goto goto_2;
tmpMeta35 = MMC_CAR(tmpMeta34);
tmpMeta36 = MMC_CDR(tmpMeta34);
if (!listEmpty(tmpMeta36)) goto goto_2;
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 3));
_exp_1 = tmpMeta30;
_t = tmpMeta32;
_tp = tmpMeta33;
_c = tmpMeta37;
_tp = omc_Types_arrayElementType(threadData, _t);
_etp = omc_Types_simplifyType(threadData, _tp);
tmpMeta39 = mmc_mk_cons(_exp_1, MMC_REFSTRUCTLIT(mmc_nil));
_exp_2 = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT350, tmpMeta39, _etp);
if((!omc_Types_arrayHasUnknownDims(threadData, _t)))
{
_exp_2 = omc_Static_elabBuiltinProduct2(threadData, _exp_2);
}
tmpMeta40 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _tp, _c);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp_2;
tmpMeta[0+2] = tmpMeta40;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinProduct(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinProduct(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_boolean tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp_2 = NULL;
modelica_metatype _t = NULL;
modelica_metatype _tp = NULL;
modelica_metatype _c = NULL;
modelica_metatype _env = NULL;
modelica_metatype _arrexp = NULL;
modelica_boolean _impl;
modelica_boolean _b;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_string _estr = NULL;
modelica_string _tstr = NULL;
modelica_metatype _etp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_arrexp = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta12 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arrexp, _impl, 1, _pre, _info, &tmpMeta8, &tmpMeta9);
_cache = tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_exp_1 = tmpMeta8;
_t = tmpMeta10;
_c = tmpMeta11;
_tp = omc_Types_arrayElementType(threadData, _t);
_etp = omc_Types_simplifyType(threadData, _tp);
_b = omc_Types_isArray(threadData, _t);
_b = (_b && omc_Types_isSimpleType(threadData, _tp));
_estr = omc_Dump_printExpStr(threadData, _arrexp);
_tstr = omc_Types_unparseType(threadData, _t);
tmpMeta13 = mmc_mk_cons(_estr, mmc_mk_cons(_tstr, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_assertionOrAddSourceMessage(threadData, _b, _OMC_LIT571, tmpMeta13, _info);
tmpMeta14 = mmc_mk_cons(_exp_1, MMC_REFSTRUCTLIT(mmc_nil));
_exp_2 = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT349, tmpMeta14, _etp);
tmpMeta15 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _tp, _c);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp_2;
tmpMeta[0+2] = tmpMeta15;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSum(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinSum(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinTranspose(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_boolean _inImpl, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _aexp = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _el_ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _d1 = NULL;
modelica_metatype _d2 = 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;
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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inPosArgs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (!listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
_aexp = tmpMeta2;
tmpMeta8 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _aexp, _inImpl, 1, _inPrefix, _inInfo, &tmpMeta4, &tmpMeta5);
_outCache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
_exp = tmpMeta4;
_ty = tmpMeta6;
_c = tmpMeta7;
tmpMeta9 = _ty;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
if (!listEmpty(tmpMeta14)) MMC_THROW_INTERNAL();
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
if (listEmpty(tmpMeta15)) MMC_THROW_INTERNAL();
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
if (!listEmpty(tmpMeta17)) MMC_THROW_INTERNAL();
_el_ty = tmpMeta11;
_d1 = tmpMeta13;
_d2 = tmpMeta16;
tmpMeta18 = mmc_mk_cons(_d2, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta19 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _el_ty, tmpMeta18);
tmpMeta20 = mmc_mk_cons(_d1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta21 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, tmpMeta19, tmpMeta20);
_ty = tmpMeta21;
tmpMeta22 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta22;
_ty = omc_Types_simplifyType(threadData, _ty);
tmpMeta23 = mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT347, tmpMeta23, _ty);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinTranspose(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArg, modelica_metatype _inImpl, modelica_metatype _inPrefix, 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_Static_elabBuiltinTranspose(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArg, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinDynamicSelect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_string _msg_str = NULL;
modelica_metatype _astatic = NULL;
modelica_metatype _adynamic = NULL;
modelica_metatype _dstatic = NULL;
modelica_metatype _ddynamic = NULL;
modelica_metatype _ty = 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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
if(((listLength(_inPosArgs) != ((modelica_integer) 2)) || (!listEmpty(_inNamedArgs))))
{
_msg_str = _OMC_LIT572;
omc_Static_printBuiltinFnArgError(threadData, _OMC_LIT372, _msg_str, _inPosArgs, _inNamedArgs, _inPrefix, _inInfo);
}
tmpMeta1 = _inPosArgs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
if (!listEmpty(tmpMeta5)) MMC_THROW_INTERNAL();
_astatic = tmpMeta2;
_adynamic = tmpMeta4;
tmpMeta9 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _astatic, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta6, &tmpMeta7);
_outCache = tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
_dstatic = tmpMeta6;
_outProperties = tmpMeta7;
_ty = tmpMeta8;
{
{
volatile mmc_switch_type tmp12;
int tmp13;
tmp12 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp11_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp12 < 2; tmp12++) {
switch (MMC_SWITCH_CAST(tmp12)) {
case 0: {
modelica_metatype tmpMeta14;
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _adynamic, _inImplicit, 1, _inPrefix, _inInfo ,&_ddynamic ,NULL);
tmpMeta14 = mmc_mk_cons(_dstatic, mmc_mk_cons(_ddynamic, MMC_REFSTRUCTLIT(mmc_nil)));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT372, tmpMeta14, _ty);
goto tmp11_done;
}
case 1: {
_outExp = _dstatic;
goto tmp11_done;
}
}
goto tmp11_end;
tmp11_end: ;
}
goto goto_10;
tmp11_done:
(void)tmp12;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp11_done2;
goto_10:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp12 < 2) {
goto tmp11_top;
}
MMC_THROW_INTERNAL();
tmp11_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinDynamicSelect(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinDynamicSelect(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getHomotopyArguments(threadData_t *threadData, modelica_metatype _args, modelica_metatype _nargs)
{
modelica_metatype _outPositionalArgs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _args;
tmp4_2 = _nargs;
{
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_1);
tmpMeta7 = MMC_CDR(tmp4_1);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_e1 = tmpMeta6;
_e2 = tmpMeta8;
tmpMeta10 = mmc_mk_cons(_e1, mmc_mk_cons(_e2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta1 = tmpMeta10;
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_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (!listEmpty(tmp4_1)) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_2);
tmpMeta12 = MMC_CDR(tmp4_2);
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (6 != MMC_STRLEN(tmpMeta13) || strcmp(MMC_STRINGDATA(_OMC_LIT574), MMC_STRINGDATA(tmpMeta13)) != 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (listEmpty(tmpMeta12)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmpMeta12);
tmpMeta16 = MMC_CDR(tmpMeta12);
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
if (10 != MMC_STRLEN(tmpMeta17) || strcmp(MMC_STRINGDATA(_OMC_LIT575), MMC_STRINGDATA(tmpMeta17)) != 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
if (!listEmpty(tmpMeta16)) goto tmp3_end;
_e1 = tmpMeta14;
_e2 = tmpMeta18;
tmpMeta19 = mmc_mk_cons(_e1, mmc_mk_cons(_e2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta1 = tmpMeta19;
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;
if (!listEmpty(tmp4_1)) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta20 = MMC_CAR(tmp4_2);
tmpMeta21 = MMC_CDR(tmp4_2);
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 2));
if (10 != MMC_STRLEN(tmpMeta22) || strcmp(MMC_STRINGDATA(_OMC_LIT575), MMC_STRINGDATA(tmpMeta22)) != 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta20), 3));
if (listEmpty(tmpMeta21)) goto tmp3_end;
tmpMeta24 = MMC_CAR(tmpMeta21);
tmpMeta25 = MMC_CDR(tmpMeta21);
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
if (6 != MMC_STRLEN(tmpMeta26) || strcmp(MMC_STRINGDATA(_OMC_LIT574), MMC_STRINGDATA(tmpMeta26)) != 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 3));
if (!listEmpty(tmpMeta25)) goto tmp3_end;
_e2 = tmpMeta23;
_e1 = tmpMeta27;
tmpMeta28 = mmc_mk_cons(_e1, mmc_mk_cons(_e2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta1 = tmpMeta28;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta29 = MMC_CAR(tmp4_1);
tmpMeta30 = MMC_CDR(tmp4_1);
if (!listEmpty(tmpMeta30)) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta31 = MMC_CAR(tmp4_2);
tmpMeta32 = MMC_CDR(tmp4_2);
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 2));
if (10 != MMC_STRLEN(tmpMeta33) || strcmp(MMC_STRINGDATA(_OMC_LIT575), MMC_STRINGDATA(tmpMeta33)) != 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta31), 3));
if (!listEmpty(tmpMeta32)) goto tmp3_end;
_e1 = tmpMeta29;
_e2 = tmpMeta34;
tmpMeta35 = mmc_mk_cons(_e1, mmc_mk_cons(_e2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta1 = tmpMeta35;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
tmpMeta36 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, _args, _nargs);
tmpMeta37 = stringAppend(_OMC_LIT573,omc_Dump_printFunctionArgsStr(threadData, tmpMeta36));
omc_Error_addCompilerError(threadData, tmpMeta37);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outPositionalArgs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outPositionalArgs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinHomotopy(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_string _replaceWith = NULL;
modelica_metatype _e = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = 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 = _inCache;
_replaceWith = omc_Flags_getConfigString(threadData, _OMC_LIT596);
if(((stringEqual(_replaceWith, _OMC_LIT574)) || (stringEqual(_replaceWith, _OMC_LIT575))))
{
tmpMeta1 = omc_Static_getHomotopyArguments(threadData, _inPosArgs, _inNamedArgs);
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
if (!listEmpty(tmpMeta5)) MMC_THROW_INTERNAL();
_e1 = tmpMeta2;
_e2 = tmpMeta4;
_e = ((stringEqual(_replaceWith, _OMC_LIT574))?_e1:_e2);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
else
{
tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
_outCache = omc_Static_elabCallArgs(threadData, _inCache, _inEnv, _OMC_LIT597, _inPosArgs, _inNamedArgs, tmpMeta6, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinHomotopy(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinHomotopy(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNone(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _arg = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
if(((!listEmpty(_inPosArgs)) || (!listEmpty(_inNamedArgs))))
{
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT327, _OMC_LIT602, _inInfo);
}
else
{
_outExp = _OMC_LIT598;
_outProperties = _OMC_LIT600;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNone(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinNone(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSome(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _arg = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(((listLength(_inPosArgs) != ((modelica_integer) 1)) || (!listEmpty(_inNamedArgs))))
{
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT327, _OMC_LIT604, _inInfo);
}
else
{
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, listHead(_inPosArgs), _inImplicit, 1, _inPrefix, _inInfo ,&_arg ,&_prop);
_ty = omc_Types_getPropType(threadData, _prop);
_arg = omc_Types_matchType(threadData, _arg, _ty, _OMC_LIT603, 1 ,&_ty);
_c = omc_Types_propAllConst(threadData, _prop);
tmpMeta1 = mmc_mk_box2(34, &DAE_Exp_META__OPTION__desc, mmc_mk_some(_arg));
_outExp = tmpMeta1;
tmpMeta2 = mmc_mk_box2(22, &DAE_Type_T__METAOPTION__desc, _ty);
tmpMeta3 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta2, _c);
_outProperties = tmpMeta3;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSome(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinSome(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSourceInfo(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inAbsynExpLst;
if (!listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
{
modelica_metatype tmp5_1;
tmp5_1 = _info;
{
modelica_metatype _args = NULL;
volatile mmc_switch_type tmp5;
int tmp6;
tmp5 = 0;
for (; tmp5 < 1; tmp5++) {
switch (MMC_SWITCH_CAST(tmp5)) {
case 0: {
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;
tmpMeta8 = mmc_mk_box2(5, &DAE_Exp_SCONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 2))));
tmpMeta9 = mmc_mk_box2(6, &DAE_Exp_BCONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 3))));
tmpMeta10 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 4))));
tmpMeta11 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 5))));
tmpMeta12 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 6))));
tmpMeta13 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 7))));
tmpMeta14 = mmc_mk_box2(4, &DAE_Exp_RCONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_info), 8))));
tmpMeta7 = mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil))))))));
_args = tmpMeta7;
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta16 = mmc_mk_box6(35, &DAE_Exp_METARECORDCALL__desc, _OMC_LIT608, _args, _OMC_LIT622, mmc_mk_integer(((modelica_integer) 0)), tmpMeta15);
_outExp = tmpMeta16;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _outExp;
tmpMeta[0+2] = _OMC_LIT643;
goto tmp4_done;
}
}
goto tmp4_end;
tmp4_end: ;
}
goto goto_3;
goto_3:;
MMC_THROW_INTERNAL();
goto tmp4_done;
tmp4_done:;
}
}
_outCache = tmpMeta[0+0];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSourceInfo(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinSourceInfo(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinClassDirectory(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _info;
{
modelica_string _str = NULL;
modelica_string _fileName = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_fileName = tmpMeta6;
tmpMeta7 = stringAppend(omc_System_dirname(threadData, _fileName),_OMC_LIT644);
_str = tmpMeta7;
tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT647, tmpMeta8, _info);
tmpMeta9 = mmc_mk_box2(5, &DAE_Exp_SCONST__desc, _str);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = tmpMeta9;
tmpMeta[0+2] = _OMC_LIT406;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinClassDirectory(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinClassDirectory(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSymmetric(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_boolean tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _tp = NULL;
modelica_boolean _impl;
modelica_metatype _d1 = NULL;
modelica_metatype _d2 = NULL;
modelica_metatype _eltp = NULL;
modelica_metatype _newtp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _c = NULL;
modelica_metatype _env = NULL;
modelica_metatype _matexp = NULL;
modelica_metatype _exp_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_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;
modelica_metatype tmpMeta26;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_matexp = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta20 = omc_Static_elabExpInExpression(threadData, _cache, _env, _matexp, _impl, 1, _pre, _info, &tmpMeta8, &tmpMeta9);
_cache = tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,2) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,6,2) == 0) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,6,2) == 0) goto goto_2;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (listEmpty(tmpMeta13)) goto goto_2;
tmpMeta14 = MMC_CAR(tmpMeta13);
tmpMeta15 = MMC_CDR(tmpMeta13);
if (!listEmpty(tmpMeta15)) goto goto_2;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
if (listEmpty(tmpMeta16)) goto goto_2;
tmpMeta17 = MMC_CAR(tmpMeta16);
tmpMeta18 = MMC_CDR(tmpMeta16);
if (!listEmpty(tmpMeta18)) goto goto_2;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 3));
_exp_1 = tmpMeta8;
_eltp = tmpMeta12;
_d2 = tmpMeta14;
_d1 = tmpMeta17;
_c = tmpMeta19;
tmpMeta21 = mmc_mk_cons(_d1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta22 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _eltp, tmpMeta21);
tmpMeta23 = mmc_mk_cons(_d2, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta24 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, tmpMeta22, tmpMeta23);
_newtp = tmpMeta24;
_tp = omc_Types_simplifyType(threadData, _newtp);
tmpMeta25 = mmc_mk_cons(_exp_1, MMC_REFSTRUCTLIT(mmc_nil));
_exp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT348, tmpMeta25, _tp);
tmpMeta26 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _newtp, _c);
_prop = tmpMeta26;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSymmetric(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinSymmetric(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabBuiltinFill2(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _inValuesValueLst, modelica_metatype _constVar, modelica_metatype _inPrefix, modelica_metatype _inDims, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_metatype tmp4_4;volatile modelica_metatype tmp4_5;volatile modelica_metatype tmp4_6;volatile modelica_metatype tmp4_7;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inExp;
tmp4_4 = _inType;
tmp4_5 = _inValuesValueLst;
tmp4_6 = _constVar;
tmp4_7 = _inPrefix;
{
modelica_metatype _arraylist = NULL;
modelica_metatype _at = NULL;
modelica_boolean _is_scalar;
modelica_metatype _env = NULL;
modelica_metatype _s = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _sty = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _sty2 = NULL;
modelica_integer _v;
modelica_metatype _rest = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _pre = NULL;
modelica_string _str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_integer tmp9;
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
if (listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_5);
tmpMeta7 = MMC_CDR(tmp4_5);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmp9 = mmc_unbox_integer(tmpMeta8);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_v = tmp9;
_cache = tmp4_1;
_s = tmp4_3;
_sty = tmp4_4;
_c1 = tmp4_6;
tmp10 = (_v < ((modelica_integer) 0));
if (1 != tmp10) goto goto_2;
_v = ((modelica_integer) 0);
_arraylist = omc_List_fill(threadData, _s, _v);
tmpMeta12 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_v));
tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta13 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _sty, tmpMeta11);
_sty2 = tmpMeta13;
_at = omc_Types_simplifyType(threadData, _sty2);
_is_scalar = (!omc_Types_isArray(threadData, _sty));
tmpMeta14 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _at, mmc_mk_boolean(_is_scalar), _arraylist);
tmpMeta15 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _sty2, _c1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta14;
tmpMeta[0+2] = tmpMeta15;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_integer tmp19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta16 = MMC_CAR(tmp4_5);
tmpMeta17 = MMC_CDR(tmp4_5);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta16,0,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta16), 2));
tmp19 = mmc_unbox_integer(tmpMeta18);
if (!listEmpty(tmpMeta17)) goto tmp3_end;
_v = tmp19;
_cache = tmp4_1;
_s = tmp4_3;
_sty = tmp4_4;
_c1 = tmp4_6;
_arraylist = omc_List_fill(threadData, _s, _v);
tmpMeta21 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_v));
tmpMeta20 = mmc_mk_cons(tmpMeta21, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta22 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _sty, tmpMeta20);
_sty2 = tmpMeta22;
_at = omc_Types_simplifyType(threadData, _sty2);
_is_scalar = (!omc_Types_isArray(threadData, _sty));
tmpMeta23 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _at, mmc_mk_boolean(_is_scalar), _arraylist);
tmpMeta24 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _sty2, _c1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta23;
tmpMeta[0+2] = tmpMeta24;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_integer tmp28;
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;
if (listEmpty(tmp4_5)) goto tmp3_end;
tmpMeta25 = MMC_CAR(tmp4_5);
tmpMeta26 = MMC_CDR(tmp4_5);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,0,1) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 2));
tmp28 = mmc_unbox_integer(tmpMeta27);
_v = tmp28;
_rest = tmpMeta26;
_cache = tmp4_1;
_env = tmp4_2;
_s = tmp4_3;
_sty = tmp4_4;
_c1 = tmp4_6;
_pre = tmp4_7;
tmpMeta32 = omc_Static_elabBuiltinFill2(threadData, _cache, _env, _s, _sty, _rest, _c1, _pre, _inDims, _inInfo, &tmpMeta29, &tmpMeta30);
_cache = tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta30,0,2) == 0) goto goto_2;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta30), 2));
_exp = tmpMeta29;
_ty = tmpMeta31;
_arraylist = omc_List_fill(threadData, _exp, _v);
tmpMeta34 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_v));
tmpMeta33 = mmc_mk_cons(tmpMeta34, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta35 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta33);
_sty2 = tmpMeta35;
_at = omc_Types_simplifyType(threadData, _sty2);
tmpMeta36 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _at, mmc_mk_boolean(0), _arraylist);
tmpMeta37 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _sty2, _c1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta36;
tmpMeta[0+2] = tmpMeta37;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
tmpMeta38 = stringAppend(_OMC_LIT648,omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix));
tmpMeta39 = stringAppend(tmpMeta38,_OMC_LIT649);
tmpMeta40 = stringAppend(tmpMeta39,omc_FGraph_printGraphPathStr(threadData, _inEnv));
tmpMeta41 = stringAppend(tmpMeta40,_OMC_LIT650);
tmpMeta42 = stringAppend(tmpMeta41,omc_Dump_printExpLstStr(threadData, _inDims));
tmpMeta43 = stringAppend(tmpMeta42,_OMC_LIT391);
_str = tmpMeta43;
tmpMeta44 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT204, tmpMeta44, _inInfo);
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:;
}
}
_outCache = tmpMeta[0+0];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinFill(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _s_1 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _dims_1 = NULL;
modelica_metatype _dimprops = NULL;
modelica_metatype _sty = NULL;
modelica_metatype _dimvals = NULL;
modelica_metatype _env = NULL;
modelica_metatype _s = NULL;
modelica_metatype _dims = NULL;
modelica_boolean _impl;
modelica_string _implstr = NULL;
modelica_string _expstr = NULL;
modelica_string _str = NULL;
modelica_string _sp = NULL;
modelica_metatype _expstrs = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _exp_type = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_boolean tmp8;
modelica_metatype tmpMeta10;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
_s = tmpMeta6;
_dims = tmpMeta7;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _s, _impl, 1, _pre, _info ,&_s_1 ,&_prop);
_cache = omc_Static_elabExpList(threadData, _cache, _env, _dims, _impl, 1, _pre, _info, _OMC_LIT42 ,&_dims_1 ,&_dimprops);
_dims_1 = omc_Types_matchTypes(threadData, _dims_1, omc_List_map(threadData, _dimprops, boxvar_Types_getPropType), _OMC_LIT89, 0, NULL);
_c1 = omc_Types_propertiesListToConst(threadData, _dimprops);
tmp8 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta10 = _c1;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,0) == 0) goto goto_9;
tmp8 = 1;
goto goto_9;
goto_9:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp8) {goto goto_2;}
_c1 = omc_Types_constAnd(threadData, _c1, omc_Types_propAllConst(threadData, _prop));
_sty = omc_Types_getPropType(threadData, _prop);
_cache = omc_Ceval_cevalList(threadData, _cache, _env, _dims_1, _impl, _OMC_LIT54, ((modelica_integer) 0) ,&_dimvals);
tmpMeta[0+0] = omc_Static_elabBuiltinFill2(threadData, _cache, _env, _s_1, _sty, _dimvals, _c1, _pre, _dims, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta11 = MMC_CAR(tmp4_3);
tmpMeta12 = MMC_CDR(tmp4_3);
_s = tmpMeta11;
_dims = tmpMeta12;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
_c1 = omc_Static_unevaluatedFunctionVariability(threadData, _env);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _s, _impl, 1, _pre, _info ,&_s_1 ,&_prop);
_cache = omc_Static_elabExpList(threadData, _cache, _env, _dims, _impl, 1, _pre, _info, _OMC_LIT42 ,&_dims_1 ,&_dimprops);
_dims_1 = omc_Types_matchTypes(threadData, _dims_1, omc_List_map(threadData, _dimprops, boxvar_Types_getPropType), _OMC_LIT89, 0, NULL);
_sty = omc_Types_getPropType(threadData, _prop);
_sty = omc_Types_liftTypeWithDimExps(threadData, _sty, _dims_1);
_exp_type = omc_Types_simplifyType(threadData, _sty);
tmpMeta13 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _sty, _c1);
_prop = tmpMeta13;
tmpMeta14 = mmc_mk_cons(_s_1, _dims_1);
_exp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT344, tmpMeta14, _exp_type);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_boolean tmp17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta15 = MMC_CAR(tmp4_3);
tmpMeta16 = MMC_CDR(tmp4_3);
_s = tmpMeta15;
_dims = tmpMeta16;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp17 = omc_Config_splitArrays(threadData);
if (0 != tmp17) goto goto_2;
tmpMeta22 = omc_Static_elabExpInExpression(threadData, _cache, _env, _s, _impl, 1, _pre, _info, &tmpMeta18, &tmpMeta19);
_cache = tmpMeta22;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,2) == 0) goto goto_2;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 3));
_s_1 = tmpMeta18;
_sty = tmpMeta20;
_c1 = tmpMeta21;
_cache = omc_Static_elabExpList(threadData, _cache, _env, _dims, _impl, 1, _pre, _info, _OMC_LIT42 ,&_dims_1 ,NULL);
_sty = omc_Types_liftTypeWithDimExps(threadData, _sty, _dims_1);
_exp_type = omc_Types_simplifyType(threadData, _sty);
_c1 = omc_Types_constAnd(threadData, _c1, _OMC_LIT101);
tmpMeta23 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _sty, _c1);
_prop = tmpMeta23;
tmpMeta24 = mmc_mk_cons(_s_1, _dims_1);
_exp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT344, tmpMeta24, _exp_type);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp;
tmpMeta[0+2] = _prop;
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;
_env = tmp4_2;
_dims = tmp4_3;
tmpMeta25 = stringAppend(_OMC_LIT651,omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix));
tmpMeta26 = stringAppend(tmpMeta25,_OMC_LIT649);
tmpMeta27 = stringAppend(tmpMeta26,omc_FGraph_printGraphPathStr(threadData, _env));
tmpMeta28 = stringAppend(tmpMeta27,_OMC_LIT650);
tmpMeta29 = stringAppend(tmpMeta28,omc_Dump_printExpLstStr(threadData, _dims));
tmpMeta30 = stringAppend(tmpMeta29,_OMC_LIT391);
_str = tmpMeta30;
tmpMeta31 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT204, tmpMeta31, _info);
goto goto_2;
goto tmp3_done;
}
case 4: {
modelica_boolean tmp32;
modelica_metatype tmpMeta33;
_dims = tmp4_3;
_impl = tmp4_4;
_pre = tmp4_5;
tmp32 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp32) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT652);
_implstr = (_impl?_OMC_LIT653:_OMC_LIT654);
_expstrs = omc_List_map(threadData, _dims, boxvar_Dump_printExpStr);
_expstr = stringDelimitList(_expstrs, _OMC_LIT166);
_sp = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta33 = mmc_mk_cons(_expstr, mmc_mk_cons(_OMC_LIT655, mmc_mk_cons(_implstr, mmc_mk_cons(_OMC_LIT656, mmc_mk_cons(_sp, MMC_REFSTRUCTLIT(mmc_nil))))));
_str = stringAppendList(tmpMeta33);
omc_Debug_traceln(threadData, _str);
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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinFill(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinFill(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinNDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _exp = NULL;
modelica_metatype _arrtp = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _arraycr = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _expl = NULL;
modelica_integer _nd;
modelica_metatype _pre = NULL;
modelica_string _sp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta7)) goto tmp3_end;
_arraycr = tmpMeta6;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta10 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arraycr, _impl, 1, _pre, _info, NULL, &tmpMeta8);
_cache = tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
_arrtp = tmpMeta9;
_nd = omc_Types_numberOfDimensions(threadData, _arrtp);
tmpMeta11 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_nd));
_exp = tmpMeta11;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp;
tmpMeta[0+2] = _OMC_LIT657;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
_expl = tmp4_3;
_pre = tmp4_5;
tmp12 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp12) goto goto_2;
_sp = omc_PrefixUtil_printPrefixStr3(threadData, _pre);
tmpMeta13 = stringAppend(_OMC_LIT658,omc_Dump_printExpLstStr(threadData, _expl));
tmpMeta14 = stringAppend(tmpMeta13,_OMC_LIT659);
tmpMeta15 = stringAppend(tmpMeta14,_sp);
omc_Debug_traceln(threadData, tmpMeta15);
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinNDims(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinNDims(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSizeIndex(threadData_t *threadData, modelica_metatype _inArrayExp, modelica_metatype _inArrayProp, modelica_metatype _inArrayType, modelica_metatype _inIndexExp, modelica_metatype _inDimensions, modelica_metatype _inEnv, modelica_metatype _inInfo, modelica_metatype *out_outProperties)
{
modelica_metatype _outSizeExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inDimensions;
{
modelica_integer _dim_int;
modelica_integer _dim_count;
modelica_metatype _exp = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _cnst = NULL;
modelica_string _exp_str = NULL;
modelica_string _index_str = NULL;
modelica_string _size_str = NULL;
modelica_string _dim_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp6 = omc_Types_isUnknownType(threadData, _inArrayType);
if (0 != tmp6) goto goto_2;
_exp_str = omc_ExpressionDump_printExpStr(threadData, _inArrayExp);
_index_str = omc_ExpressionDump_printExpStr(threadData, _inIndexExp);
tmpMeta7 = stringAppend(_OMC_LIT660,_exp_str);
tmpMeta8 = stringAppend(tmpMeta7,_OMC_LIT166);
tmpMeta9 = stringAppend(tmpMeta8,_index_str);
tmpMeta10 = stringAppend(tmpMeta9,_OMC_LIT391);
_size_str = tmpMeta10;
tmpMeta11 = mmc_mk_cons(_size_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT663, tmpMeta11, _inInfo);
tmpMeta[0+0] = mmc_mk_none();
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 1: {
modelica_boolean tmp12;
_dim_int = omc_Expression_expInt(threadData, _inIndexExp);
_dim_count = listLength(_inDimensions);
tmp12 = ((_dim_int > ((modelica_integer) 0)) && (_dim_int <= _dim_count));
if (1 != tmp12) goto goto_2;
_dim = listGet(_inDimensions, _dim_int);
_exp = omc_Expression_dimensionSizeConstantExp(threadData, _dim);
_prop = _OMC_LIT657;
tmpMeta[0+0] = mmc_mk_some(_exp);
tmpMeta[0+1] = mmc_mk_some(_prop);
goto tmp3_done;
}
case 2: {
modelica_boolean tmp13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
tmp13 = omc_Types_isUnknownType(threadData, _inArrayType);
if (0 != tmp13) goto goto_2;
_dim_int = omc_Expression_expInt(threadData, _inIndexExp);
_dim_count = listLength(_inDimensions);
tmp14 = ((_dim_int <= ((modelica_integer) 0)) || (_dim_int > _dim_count));
if (1 != tmp14) goto goto_2;
_index_str = intString(_dim_int);
_exp_str = omc_ExpressionDump_printExpStr(threadData, _inArrayExp);
_dim_str = intString(_dim_count);
tmpMeta15 = mmc_mk_cons(_index_str, mmc_mk_cons(_exp_str, mmc_mk_cons(_dim_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessage(threadData, _OMC_LIT666, tmpMeta15, _inInfo);
tmpMeta[0+0] = mmc_mk_none();
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
tmpMeta16 = mmc_mk_box3(27, &DAE_Exp_SIZE__desc, _inArrayExp, mmc_mk_some(_inIndexExp));
_exp = tmpMeta16;
_cnst = _OMC_LIT101;
_cnst = (omc_FGraph_inFunctionScope(threadData, _inEnv)?_OMC_LIT52:_cnst);
tmpMeta17 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _OMC_LIT89, _cnst);
_prop = tmpMeta17;
tmpMeta[0+0] = mmc_mk_some(_exp);
tmpMeta[0+1] = mmc_mk_some(_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 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outSizeExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outSizeExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSizeNoIndex(threadData_t *threadData, modelica_metatype _inArrayExp, modelica_metatype _inArrayExpType, modelica_metatype _inDimensions, modelica_metatype _inArrayType, modelica_metatype _inInfo, modelica_metatype *out_outProperties)
{
modelica_metatype _outSizeExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inDimensions;
{
modelica_metatype _dim_expl = NULL;
modelica_integer _dim_int;
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
modelica_boolean _b;
modelica_metatype _cnst = NULL;
modelica_metatype _ty = NULL;
modelica_string _exp_str = NULL;
modelica_string _size_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmp4 += 2;
tmp6 = omc_Types_isUnknownType(threadData, _inArrayExpType);
if (0 != tmp6) goto goto_2;
_exp_str = omc_ExpressionDump_printExpStr(threadData, _inArrayExp);
tmpMeta7 = stringAppend(_OMC_LIT660,_exp_str);
tmpMeta8 = stringAppend(tmpMeta7,_OMC_LIT391);
_size_str = tmpMeta8;
tmpMeta9 = mmc_mk_cons(_size_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT663, tmpMeta9, _inInfo);
goto goto_2;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmp4_1);
tmpMeta11 = MMC_CDR(tmp4_1);
_dim_expl = omc_List_map(threadData, _inDimensions, boxvar_Expression_dimensionSizeExp);
_dim_int = listLength(_dim_expl);
tmpMeta13 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim_int));
tmpMeta12 = mmc_mk_cons(tmpMeta13, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta14 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT89, tmpMeta12);
_ty = tmpMeta14;
tmpMeta15 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ty, mmc_mk_boolean(1), _dim_expl);
_exp = tmpMeta15;
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT60);
_prop = tmpMeta16;
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _prop;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta17 = MMC_CAR(tmp4_1);
tmpMeta18 = MMC_CDR(tmp4_1);
_b = omc_Types_dimensionsKnown(threadData, _inArrayType);
_cnst = omc_Types_boolConstSize(threadData, _b);
tmpMeta19 = mmc_mk_box3(27, &DAE_Exp_SIZE__desc, _inArrayExp, mmc_mk_none());
_exp = tmpMeta19;
_ty = _OMC_LIT668;
tmpMeta20 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _cnst);
_prop = tmpMeta20;
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _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 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outSizeExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outSizeExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSize(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_boolean tmp4_4;modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inAbsynExpLst;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_metatype _dimp = NULL;
modelica_metatype _arraycrefe = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _arrtp = NULL;
modelica_metatype _prop = NULL;
modelica_boolean _impl;
modelica_metatype _env = NULL;
modelica_metatype _arraycr = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _dims1 = NULL;
modelica_metatype _dims2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_3);
tmpMeta7 = MMC_CDR(tmp4_3);
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_arraycr = tmpMeta6;
_dim = tmpMeta8;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _dim, _impl, 1, _pre, _info ,&_dimp ,NULL);
_cache = omc_Static_elabExpInExpression(threadData, _cache, _env, _arraycr, _impl, 0, _pre, _info ,&_arraycrefe ,&_prop);
_ety = omc_Expression_typeof(threadData, _arraycrefe);
_dims1 = omc_Expression_arrayDimension(threadData, _ety);
omc_Types_flattenArrayType(threadData, omc_Types_getPropType(threadData, _prop) ,&_dims2);
_dims = ((listLength(_dims1) >= listLength(_dims2))?_dims1:_dims2);
tmpMeta12 = omc_Static_elabBuiltinSizeIndex(threadData, _arraycrefe, _prop, _ety, _dimp, _dims, _env, _info, &tmpMeta10);
if (optionNone(tmpMeta12)) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 1));
_exp = tmpMeta13;
if (optionNone(tmpMeta10)) goto goto_2;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 1));
_prop = tmpMeta11;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_3);
tmpMeta15 = MMC_CDR(tmp4_3);
if (!listEmpty(tmpMeta15)) goto tmp3_end;
_arraycr = tmpMeta14;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta19 = omc_Static_elabExpInExpression(threadData, _cache, _env, _arraycr, _impl, 0, _pre, _info, &tmpMeta16, &tmpMeta17);
_cache = tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,0,2) == 0) goto goto_2;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
_arraycrefe = tmpMeta16;
_arrtp = tmpMeta18;
_ety = omc_Expression_typeof(threadData, _arraycrefe);
_dims = omc_Expression_arrayDimension(threadData, _ety);
_exp = omc_Static_elabBuiltinSizeNoIndex(threadData, _arraycrefe, _ety, _dims, _arrtp, _info ,&_prop);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _exp;
tmpMeta[0+2] = _prop;
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSize(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inAbsynExpLst, modelica_metatype _inNamedArg, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabBuiltinSize(threadData, _inCache, _inEnv, _inAbsynExpLst, _inNamedArg, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC void omc_Static_printBuiltinFnArgError(threadData_t *threadData, modelica_string _inFnName, modelica_string _inMsg, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inPrefix, modelica_metatype _inInfo)
{
modelica_string _args_str = NULL;
modelica_string _pre_str = NULL;
modelica_string _msg_str = NULL;
modelica_metatype _pos_args = NULL;
modelica_metatype _named_args = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype __omcQ_24tmpVar91;
modelica_metatype* tmp2;
modelica_metatype tmpMeta3;
modelica_string __omcQ_24tmpVar90;
modelica_integer tmp4;
modelica_metatype _arg_loopVar = 0;
modelica_metatype _arg;
_arg_loopVar = _inPosArgs;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar91 = tmpMeta3;
tmp2 = &__omcQ_24tmpVar91;
while(1) {
tmp4 = 1;
if (!listEmpty(_arg_loopVar)) {
_arg = MMC_CAR(_arg_loopVar);
_arg_loopVar = MMC_CDR(_arg_loopVar);
tmp4--;
}
if (tmp4 == 0) {
__omcQ_24tmpVar90 = omc_Dump_printExpStr(threadData, _arg);
*tmp2 = mmc_mk_cons(__omcQ_24tmpVar90,0);
tmp2 = &MMC_CDR(*tmp2);
} else if (tmp4 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp2 = mmc_mk_nil();
tmpMeta1 = __omcQ_24tmpVar91;
}
_pos_args = tmpMeta1;
{
modelica_metatype __omcQ_24tmpVar93;
modelica_metatype* tmp6;
modelica_metatype tmpMeta7;
modelica_string __omcQ_24tmpVar92;
modelica_integer tmp8;
modelica_metatype _arg_loopVar = 0;
modelica_metatype _arg;
_arg_loopVar = _inNamedArgs;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar93 = tmpMeta7;
tmp6 = &__omcQ_24tmpVar93;
while(1) {
tmp8 = 1;
if (!listEmpty(_arg_loopVar)) {
_arg = MMC_CAR(_arg_loopVar);
_arg_loopVar = MMC_CDR(_arg_loopVar);
tmp8--;
}
if (tmp8 == 0) {
__omcQ_24tmpVar92 = omc_Dump_printNamedArgStr(threadData, _arg);
*tmp6 = mmc_mk_cons(__omcQ_24tmpVar92,0);
tmp6 = &MMC_CDR(*tmp6);
} else if (tmp8 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp6 = mmc_mk_nil();
tmpMeta5 = __omcQ_24tmpVar93;
}
_named_args = tmpMeta5;
_args_str = stringDelimitList(listAppend(_pos_args, _named_args), _OMC_LIT166);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
tmpMeta9 = stringAppend(_inFnName,_OMC_LIT300);
tmpMeta10 = stringAppend(tmpMeta9,_args_str);
tmpMeta11 = stringAppend(tmpMeta10,_OMC_LIT391);
tmpMeta12 = stringAppend(tmpMeta11,_inMsg);
_msg_str = tmpMeta12;
tmpMeta13 = mmc_mk_cons(_msg_str, mmc_mk_cons(_pre_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT327, tmpMeta13, _inInfo);
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinSmooth(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_string _msg_str = NULL;
modelica_metatype _p = NULL;
modelica_metatype _expr = NULL;
modelica_metatype _dp = NULL;
modelica_metatype _dexpr = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(((listLength(_inPosArgs) != ((modelica_integer) 2)) || (!listEmpty(_inNamedArgs))))
{
_msg_str = _OMC_LIT669;
omc_Static_printBuiltinFnArgError(threadData, _OMC_LIT340, _msg_str, _inPosArgs, _inNamedArgs, _inPrefix, _inInfo);
}
tmpMeta1 = _inPosArgs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
if (!listEmpty(tmpMeta5)) MMC_THROW_INTERNAL();
_p = tmpMeta2;
_expr = tmpMeta4;
tmpMeta10 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _p, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta6, &tmpMeta7);
_outCache = tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
_dp = tmpMeta6;
_ty = tmpMeta8;
_c = tmpMeta9;
if(((!omc_Types_isParameterOrConstant(threadData, _c)) || (!omc_Types_isInteger(threadData, _ty))))
{
_msg_str = _OMC_LIT670;
omc_Static_printBuiltinFnArgError(threadData, _OMC_LIT340, _msg_str, _inPosArgs, _inNamedArgs, _inPrefix, _inInfo);
}
tmpMeta15 = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _expr, _inImplicit, 1, _inPrefix, _inInfo, &tmpMeta11, &tmpMeta12);
_outCache = tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
_dexpr = tmpMeta11;
_outProperties = tmpMeta12;
_ty = tmpMeta13;
_c = tmpMeta14;
if((!(omc_Types_isReal(threadData, _ty) || omc_Types_isRecordWithOnlyReals(threadData, _ty))))
{
_msg_str = _OMC_LIT671;
omc_Static_printBuiltinFnArgError(threadData, _OMC_LIT340, _msg_str, _inPosArgs, _inNamedArgs, _inPrefix, _inInfo);
}
_ty = omc_Types_simplifyType(threadData, _ty);
tmpMeta16 = mmc_mk_cons(_dp, mmc_mk_cons(_dexpr, MMC_REFSTRUCTLIT(mmc_nil)));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT340, tmpMeta16, _ty);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinSmooth(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinSmooth(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabBuiltinCardinality(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _e = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Static_checkBuiltinCallArgs(threadData, _inPosArgs, _inNamedArgs, ((modelica_integer) 1), _OMC_LIT370, _inInfo);
tmpMeta1 = _inPosArgs;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (!listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
_e = tmpMeta2;
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
tmpMeta4 = _outProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta4,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
_ty = tmpMeta5;
_ty = omc_Types_liftArrayListDims(threadData, _OMC_LIT89, omc_Types_getDimensions(threadData, _ty));
tmpMeta6 = mmc_mk_cons(_outExp, MMC_REFSTRUCTLIT(mmc_nil));
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT370, tmpMeta6, _ty);
tmpMeta7 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT60);
_outProperties = tmpMeta7;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabBuiltinCardinality(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inPosArgs, modelica_metatype _inNamedArgs, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabBuiltinCardinality(threadData, _inCache, _inEnv, _inPosArgs, _inNamedArgs, tmp1, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_verifyBuiltInHandlerType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_fnptr _inTypeChecker, modelica_string _inFnName, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_integer tmp5;
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
tmpMeta1 = _inExpl;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
if (!listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
_e = tmpMeta2;
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, 1, _inPrefix, _inInfo ,NULL ,&_outProperties);
_ty = omc_Types_getPropType(threadData, _outProperties);
_ty = omc_Types_arrayElementType(threadData, _ty);
tmpMeta4 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inTypeChecker), 2))) ? ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inTypeChecker), 1)))) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inTypeChecker), 2))), _ty) : ((modelica_metatype(*)(threadData_t*, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inTypeChecker), 1)))) (threadData, _ty);
tmp5 = mmc_unbox_integer(tmpMeta4);
if (1 != tmp5) MMC_THROW_INTERNAL();
tmpMeta8 = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _inFnName);
tmpMeta9 = mmc_mk_box2(5, &Absyn_Path_FULLYQUALIFIED__desc, tmpMeta8);
tmpMeta10 = mmc_mk_cons(_e, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta13 = omc_Static_elabCallArgs(threadData, _outCache, _inEnv, tmpMeta9, tmpMeta10, tmpMeta11, tmpMeta12, _inImplicit, _inPrefix, _inInfo, &tmpMeta6, &tmpMeta7);
_outCache = tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,2) == 0) MMC_THROW_INTERNAL();
_outExp = tmpMeta6;
_outProperties = tmpMeta7;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_verifyBuiltInHandlerType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_fnptr _inTypeChecker, modelica_metatype _inFnName, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_verifyBuiltInHandlerType(threadData, _inCache, _inEnv, _inExpl, tmp1, _inTypeChecker, _inFnName, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixSemi(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inMatrix, modelica_metatype _inProperties, modelica_boolean _inImpl, modelica_boolean _inHaveReal, modelica_integer _inDims, modelica_boolean _inDoVectorization, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _outDim1 = NULL;
modelica_metatype _outDim2 = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _rest_expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _rest_props = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
modelica_string _dim1_str = NULL;
modelica_string _dim2_str = NULL;
modelica_string _pre_str = NULL;
modelica_string _el_str = NULL;
modelica_string _ty1_str = NULL;
modelica_string _ty2_str = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta19;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inMatrix;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
_expl = tmpMeta2;
_rest_expl = tmpMeta3;
tmpMeta4 = _inProperties;
if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_CAR(tmpMeta4);
tmpMeta6 = MMC_CDR(tmpMeta4);
_props = tmpMeta5;
_rest_props = tmpMeta6;
_outExp = omc_Static_elabMatrixComma(threadData, _expl, _props, _inHaveReal, _inDims, _inInfo ,&_outProperties ,&_outDim1 ,&_outDim2);
_outExp = omc_Static_elabMatrixCatTwoExp(threadData, _outExp);
while(1)
{
if(!(!listEmpty(_rest_expl))) break;
tmpMeta7 = _rest_expl;
if (listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
_expl = tmpMeta8;
_rest_expl = tmpMeta9;
tmpMeta10 = _rest_props;
if (listEmpty(tmpMeta10)) MMC_THROW_INTERNAL();
tmpMeta11 = MMC_CAR(tmpMeta10);
tmpMeta12 = MMC_CDR(tmpMeta10);
_props = tmpMeta11;
_rest_props = tmpMeta12;
_exp = omc_Static_elabMatrixComma(threadData, _expl, _props, _inHaveReal, _inDims, _inInfo ,&_prop ,&_dim1 ,&_dim2);
if((!omc_Expression_dimensionsEqual(threadData, _dim2, _outDim2)))
{
_dim1_str = omc_ExpressionDump_dimensionString(threadData, _dim1);
_dim2_str = omc_ExpressionDump_dimensionString(threadData, _dim2);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
_el_str = omc_List_toString(threadData, _expl, boxvar_ExpressionDump_printExpStr, _OMC_LIT7, _OMC_LIT672, _OMC_LIT166, _OMC_LIT673, 1, ((modelica_integer) 0));
tmpMeta13 = mmc_mk_cons(_pre_str, mmc_mk_cons(_el_str, mmc_mk_cons(_dim1_str, mmc_mk_cons(_dim2_str, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT676, tmpMeta13, _inInfo);
}
{
{
volatile mmc_switch_type tmp16;
int tmp17;
tmp16 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp15_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp16 < 2; tmp16++) {
switch (MMC_SWITCH_CAST(tmp16)) {
case 0: {
_outProperties = omc_Types_matchWithPromote(threadData, _outProperties, _prop, _inHaveReal);
goto tmp15_done;
}
case 1: {
modelica_metatype tmpMeta18;
_ty1_str = omc_Types_unparsePropTypeNoAttr(threadData, _outProperties);
_ty2_str = omc_Types_unparsePropTypeNoAttr(threadData, _prop);
omc_Types_typeErrorSanityCheck(threadData, _ty1_str, _ty2_str, _inInfo);
_pre_str = omc_PrefixUtil_printPrefixStr3(threadData, _inPrefix);
_el_str = omc_List_toString(threadData, _expl, boxvar_ExpressionDump_printExpStr, _OMC_LIT7, _OMC_LIT672, _OMC_LIT166, _OMC_LIT673, 1, ((modelica_integer) 0));
tmpMeta18 = mmc_mk_cons(_pre_str, mmc_mk_cons(_el_str, mmc_mk_cons(_ty1_str, mmc_mk_cons(_ty2_str, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT679, tmpMeta18, _inInfo);
goto tmp15_done;
}
}
goto tmp15_end;
tmp15_end: ;
}
goto goto_14;
tmp15_done:
(void)tmp16;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp15_done2;
goto_14:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp16 < 2) {
goto tmp15_top;
}
MMC_THROW_INTERNAL();
tmp15_done2:;
}
}
;
_exp = omc_Static_elabMatrixCatTwoExp(threadData, _exp);
tmpMeta19 = mmc_mk_cons(_outExp, mmc_mk_cons(_exp, MMC_REFSTRUCTLIT(mmc_nil)));
_outExp = omc_Static_elabMatrixCatOne(threadData, tmpMeta19);
_outDim1 = omc_Expression_dimensionsAdd(threadData, _dim1, _outDim1);
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
if (out_outDim1) { *out_outDim1 = _outDim1; }
if (out_outDim2) { *out_outDim2 = _outDim2; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabMatrixSemi(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inMatrix, modelica_metatype _inProperties, modelica_metatype _inImpl, modelica_metatype _inHaveReal, modelica_metatype _inDims, modelica_metatype _inDoVectorization, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_integer tmp4;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inHaveReal);
tmp3 = mmc_unbox_integer(_inDims);
tmp4 = mmc_unbox_integer(_inDoVectorization);
_outCache = omc_Static_elabMatrixSemi(threadData, _inCache, _inEnv, _inMatrix, _inProperties, tmp1, tmp2, tmp3, tmp4, _inPrefix, _inInfo, out_outExp, out_outProperties, out_outDim1, out_outDim2);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_promoteExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_integer _inDims, modelica_metatype *out_outProperties)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
tmpMeta5 = _inProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,2) == 0) goto goto_1;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
_ty = tmpMeta6;
_c = tmpMeta7;
_outExp = omc_Expression_promoteExp(threadData, _inExp, _ty, _inDims ,&_ty);
tmpMeta8 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta8;
goto tmp2_done;
}
case 1: {
modelica_boolean tmp9;
tmp9 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp9) goto goto_1;
omc_Debug_traceln(threadData, _OMC_LIT680);
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_outProperties) { *out_outProperties = _outProperties; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_promoteExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype _inDims, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inDims);
_outExp = omc_Static_promoteExp(threadData, _inExp, _inProperties, tmp1, out_outProperties);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatOne2(threadData_t *threadData, modelica_metatype _inArray1, modelica_metatype _inArray2)
{
modelica_metatype _outExp = NULL;
modelica_metatype _ety = NULL;
modelica_boolean _at;
modelica_metatype _dim = NULL;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
modelica_metatype _dim_rest = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _expl2 = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
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;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inArray1;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 3));
if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_CAR(tmpMeta4);
tmpMeta6 = MMC_CDR(tmpMeta4);
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
tmp8 = mmc_unbox_integer(tmpMeta7);
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
_ety = tmpMeta3;
_dim1 = tmpMeta5;
_dim_rest = tmpMeta6;
_at = tmp8;
_expl1 = tmpMeta9;
tmpMeta10 = _inArray2;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
tmpMeta13 = MMC_CAR(tmpMeta12);
tmpMeta14 = MMC_CDR(tmpMeta12);
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
_dim2 = tmpMeta13;
_expl2 = tmpMeta15;
_expl = listAppend(_expl1, _expl2);
_dim = omc_Expression_dimensionsAdd(threadData, _dim1, _dim2);
tmpMeta16 = mmc_mk_cons(_dim, _dim_rest);
tmpMeta17 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ety, tmpMeta16);
tmpMeta18 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, tmpMeta17, mmc_mk_boolean(_at), _expl);
_outExp = tmpMeta18;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatOne(threadData_t *threadData, modelica_metatype _inExpl)
{
modelica_metatype _outExp = NULL;
modelica_metatype _ty = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
_outExp = omc_List_reduce(threadData, _inExpl, boxvar_Static_elabMatrixCatOne2);
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta5;
_ty = omc_Expression_typeof(threadData, listHead(_inExpl));
tmpMeta5 = mmc_mk_cons(_OMC_LIT515, _inExpl);
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT358, tmpMeta5, _ty);
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 _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwo3(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2)
{
modelica_metatype _outExp = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_boolean _sc;
modelica_metatype _expl1 = NULL;
modelica_metatype _expl2 = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_integer tmp4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inExp1;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
tmp4 = mmc_unbox_integer(tmpMeta3);
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
_ty1 = tmpMeta2;
_sc = tmp4;
_expl1 = tmpMeta5;
tmpMeta6 = _inExp2;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
_ty2 = tmpMeta7;
_expl2 = tmpMeta8;
_expl2 = listAppend(_expl1, _expl2);
_ty1 = omc_Expression_concatArrayType(threadData, _ty1, _ty2);
tmpMeta9 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ty1, mmc_mk_boolean(_sc), _expl2);
_outExp = tmpMeta9;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwo2(threadData_t *threadData, modelica_metatype _inExp1, modelica_metatype _inExp2)
{
modelica_metatype _outExp = NULL;
modelica_metatype _expl1 = NULL;
modelica_metatype _expl2 = NULL;
modelica_boolean _sc;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_integer tmp3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inExp1;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
tmp3 = mmc_unbox_integer(tmpMeta2);
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 4));
_sc = tmp3;
_expl1 = tmpMeta4;
tmpMeta5 = _inExp2;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,16,3) == 0) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 4));
_expl2 = tmpMeta6;
{
modelica_metatype __omcQ_24tmpVar95;
modelica_metatype* tmp8;
modelica_metatype tmpMeta9;
modelica_metatype __omcQ_24tmpVar94;
modelica_integer tmp10;
modelica_metatype _e1_loopVar = 0;
modelica_metatype _e1;
modelica_metatype _e2_loopVar = 0;
modelica_metatype _e2;
_e1_loopVar = _expl1;
_e2_loopVar = _expl2;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar95 = tmpMeta9;
tmp8 = &__omcQ_24tmpVar95;
while(1) {
tmp10 = 2;
if (!listEmpty(_e1_loopVar)) {
_e1 = MMC_CAR(_e1_loopVar);
_e1_loopVar = MMC_CDR(_e1_loopVar);
tmp10--;
}if (!listEmpty(_e2_loopVar)) {
_e2 = MMC_CAR(_e2_loopVar);
_e2_loopVar = MMC_CDR(_e2_loopVar);
tmp10--;
}
if (tmp10 == 0) {
__omcQ_24tmpVar94 = omc_Static_elabMatrixCatTwo3(threadData, _e1, _e2);
*tmp8 = mmc_mk_cons(__omcQ_24tmpVar94,0);
tmp8 = &MMC_CDR(*tmp8);
} else if (tmp10 == 2) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp8 = mmc_mk_nil();
tmpMeta7 = __omcQ_24tmpVar95;
}
_expl1 = tmpMeta7;
_ty = omc_Expression_typeof(threadData, listHead(_expl1));
tmpMeta11 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(listLength(_expl1)));
_ty = omc_Expression_liftArrayLeft(threadData, _ty, tmpMeta11);
tmpMeta12 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _ty, mmc_mk_boolean(_sc), _expl1);
_outExp = tmpMeta12;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwo(threadData_t *threadData, modelica_metatype _inExpl)
{
modelica_metatype _outExp = NULL;
modelica_metatype _ty = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta6;
{
modelica_integer tmp5;
modelica_metatype __omcQ_24tmpVar97;
modelica_metatype __omcQ_24tmpVar96;
modelica_integer tmp7;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = listReverse(_inExpl);
tmp5 = 0;
while(1) {
tmp7 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp7--;
}
if (tmp7 == 0) {
__omcQ_24tmpVar96 = _e;
if (tmp5)
{
__omcQ_24tmpVar97 = omc_Static_elabMatrixCatTwo2(threadData, __omcQ_24tmpVar96, __omcQ_24tmpVar97);
}
else
{
__omcQ_24tmpVar97 = __omcQ_24tmpVar96;
tmp5 = 1;
}
} else if (tmp7 == 1) {
break;
} else {
goto goto_1;
}
}
if (!tmp5) goto goto_1;
tmpMeta6 = __omcQ_24tmpVar97;
}
_outExp = tmpMeta6;
goto tmp2_done;
}
case 1: {
modelica_metatype tmpMeta8;
_ty = omc_Expression_typeof(threadData, listHead(_inExpl));
tmpMeta8 = mmc_mk_cons(_OMC_LIT681, _inExpl);
_outExp = omc_Expression_makePureBuiltinCall(threadData, _OMC_LIT358, tmpMeta8, _ty);
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 _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixCatTwoExp(threadData_t *threadData, modelica_metatype _inExp)
{
modelica_metatype _outExp = NULL;
modelica_metatype _expl = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta5 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,16,3) == 0) goto goto_1;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 4));
_expl = tmpMeta6;
_expl = omc_ExpressionSimplify_simplifyList(threadData, _expl);
{
modelica_metatype __omcQ_24tmpVar99;
modelica_metatype* tmp8;
modelica_metatype tmpMeta9;
modelica_metatype __omcQ_24tmpVar98;
modelica_integer tmp10;
modelica_metatype _e_loopVar = 0;
modelica_metatype _e;
_e_loopVar = _expl;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar99 = tmpMeta9;
tmp8 = &__omcQ_24tmpVar99;
while(1) {
tmp10 = 1;
if (!listEmpty(_e_loopVar)) {
_e = MMC_CAR(_e_loopVar);
_e_loopVar = MMC_CDR(_e_loopVar);
tmp10--;
}
if (tmp10 == 0) {
__omcQ_24tmpVar98 = omc_Expression_matrixToArray(threadData, _e);
*tmp8 = mmc_mk_cons(__omcQ_24tmpVar98,0);
tmp8 = &MMC_CDR(*tmp8);
} else if (tmp10 == 1) {
break;
} else {
goto goto_1;
}
}
*tmp8 = mmc_mk_nil();
tmpMeta7 = __omcQ_24tmpVar99;
}
_expl = tmpMeta7;
_outExp = omc_Static_elabMatrixCatTwo(threadData, _expl);
goto tmp2_done;
}
case 1: {
modelica_boolean tmp11;
tmp11 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp11) goto goto_1;
omc_Debug_traceln(threadData, _OMC_LIT682);
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 _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixComma(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProps, modelica_boolean _inHaveReal, modelica_integer _inDims, modelica_metatype _inInfo, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _outDim1 = NULL;
modelica_metatype _outDim2 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _rest_expl = NULL;
modelica_metatype _accum_expl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _prop = NULL;
modelica_metatype _rest_props = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _sty = NULL;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_accum_expl = tmpMeta1;
{
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
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;
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;
tmpMeta6 = _inExpl;
if (listEmpty(tmpMeta6)) goto goto_2;
tmpMeta7 = MMC_CAR(tmpMeta6);
tmpMeta8 = MMC_CDR(tmpMeta6);
_exp = tmpMeta7;
_rest_expl = tmpMeta8;
tmpMeta9 = _inProps;
if (listEmpty(tmpMeta9)) goto goto_2;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
_prop = tmpMeta10;
_rest_props = tmpMeta11;
tmpMeta14 = omc_Static_promoteExp(threadData, _exp, _prop, _inDims, &tmpMeta12);
_exp = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,2) == 0) goto goto_2;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_outProperties = tmpMeta12;
_ty = tmpMeta13;
tmpMeta15 = mmc_mk_cons(_exp, _accum_expl);
_accum_expl = tmpMeta15;
tmpMeta16 = omc_Types_getDimensions(threadData, _ty);
if (listEmpty(tmpMeta16)) goto goto_2;
tmpMeta17 = MMC_CAR(tmpMeta16);
tmpMeta18 = MMC_CDR(tmpMeta16);
if (listEmpty(tmpMeta18)) goto goto_2;
tmpMeta19 = MMC_CAR(tmpMeta18);
tmpMeta20 = MMC_CDR(tmpMeta18);
_outDim1 = tmpMeta17;
_outDim2 = tmpMeta19;
while(1)
{
if(!(!listEmpty(_rest_expl))) break;
tmpMeta21 = _rest_expl;
if (listEmpty(tmpMeta21)) goto goto_2;
tmpMeta22 = MMC_CAR(tmpMeta21);
tmpMeta23 = MMC_CDR(tmpMeta21);
_exp = tmpMeta22;
_rest_expl = tmpMeta23;
tmpMeta24 = _rest_props;
if (listEmpty(tmpMeta24)) goto goto_2;
tmpMeta25 = MMC_CAR(tmpMeta24);
tmpMeta26 = MMC_CDR(tmpMeta24);
_prop = tmpMeta25;
_rest_props = tmpMeta26;
tmpMeta29 = omc_Static_promoteExp(threadData, _exp, _prop, _inDims, &tmpMeta27);
_exp = tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,0,2) == 0) goto goto_2;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
_prop = tmpMeta27;
_ty = tmpMeta28;
tmpMeta30 = mmc_mk_cons(_exp, _accum_expl);
_accum_expl = tmpMeta30;
tmpMeta31 = omc_Types_getDimensions(threadData, _ty);
if (listEmpty(tmpMeta31)) goto goto_2;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (listEmpty(tmpMeta33)) goto goto_2;
tmpMeta34 = MMC_CAR(tmpMeta33);
tmpMeta35 = MMC_CDR(tmpMeta33);
_dim1 = tmpMeta32;
_dim2 = tmpMeta34;
if((!omc_Expression_dimensionsEqual(threadData, _dim1, _outDim1)))
{
tmpMeta36 = mmc_mk_cons(omc_ExpressionDump_printExpStr(threadData, listHead(_inExpl)), mmc_mk_cons(omc_ExpressionDump_dimensionString(threadData, _outDim1), mmc_mk_cons(omc_ExpressionDump_printExpStr(threadData, _exp), mmc_mk_cons(omc_ExpressionDump_dimensionString(threadData, _dim1), MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT685, tmpMeta36, _inInfo);
}
_outDim2 = omc_Expression_dimensionsAdd(threadData, _dim2, _outDim2);
_outProperties = omc_Types_matchWithPromote(threadData, _prop, _outProperties, _inHaveReal);
}
tmpMeta37 = mmc_mk_cons(_outDim1, mmc_mk_cons(_outDim2, MMC_REFSTRUCTLIT(mmc_nil)));
_sty = omc_Expression_liftArrayLeftList(threadData, omc_Expression_unliftArrayX(threadData, _ty, ((modelica_integer) 2)), tmpMeta37);
tmpMeta38 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _sty, mmc_mk_boolean(0), listReverse(_accum_expl));
_outExp = tmpMeta38;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp39;
tmp39 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp39) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT686);
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_outProperties) { *out_outProperties = _outProperties; }
if (out_outDim1) { *out_outDim1 = _outDim1; }
if (out_outDim2) { *out_outDim2 = _outDim2; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabMatrixComma(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProps, modelica_metatype _inHaveReal, modelica_metatype _inDims, modelica_metatype _inInfo, modelica_metatype *out_outProperties, modelica_metatype *out_outDim1, modelica_metatype *out_outDim2)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_inHaveReal);
tmp2 = mmc_unbox_integer(_inDims);
_outExp = omc_Static_elabMatrixComma(threadData, _inExpl, _inProps, tmp1, tmp2, _inInfo, out_outProperties, out_outDim1, out_outDim2);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabGraphicsArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outProperties = NULL;
modelica_metatype _c = NULL;
modelica_metatype _c2 = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _ty = NULL;
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;
modelica_metatype tmpMeta11;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
_c = _OMC_LIT60;
if(listEmpty(_inExpl))
{
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT689, tmpMeta2, _inInfo);
MMC_THROW_INTERNAL();
}
{
modelica_metatype _e;
for (tmpMeta3 = _inExpl; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_e = MMC_CAR(tmpMeta3);
tmpMeta8 = omc_Static_elabGraphicsExp(threadData, _outCache, _inEnv, _e, _inImplicit, _inPrefix, _inInfo, &tmpMeta4, &tmpMeta5);
_outCache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
_exp = tmpMeta4;
_ty = tmpMeta6;
_c2 = tmpMeta7;
tmpMeta9 = mmc_mk_cons(_exp, _outExpl);
_outExpl = tmpMeta9;
_c = omc_Types_constAnd(threadData, _c, _c2);
}
}
_outExpl = listReverse(_outExpl);
tmpMeta11 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta11;
_return: OMC_LABEL_UNUSED
if (out_outExpl) { *out_outExpl = _outExpl; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabGraphicsArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
_outCache = omc_Static_elabGraphicsArray(threadData, _inCache, _inEnv, _inExpl, tmp1, _inPrefix, _inInfo, out_outExpl, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArray2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inTypes, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outType)
{
modelica_metatype _outExpl = NULL;
modelica_metatype _outType = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _rest_tys = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _rest_expl = NULL;
modelica_string _pre_str = NULL;
modelica_string _exp_str = NULL;
modelica_string _expl_str = NULL;
modelica_string _ty1_str = NULL;
modelica_string _ty2_str = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inExpl;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
_exp1 = tmpMeta2;
_rest_expl = tmpMeta3;
tmpMeta4 = _inTypes;
if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_CAR(tmpMeta4);
tmpMeta6 = MMC_CDR(tmpMeta4);
_outType = tmpMeta5;
_rest_tys = tmpMeta6;
tmpMeta7 = mmc_mk_cons(_exp1, MMC_REFSTRUCTLIT(mmc_nil));
_outExpl = tmpMeta7;
_outType = omc_Types_getUniontypeIfMetarecordReplaceAllSubtypes(threadData, _outType);
{
modelica_metatype _exp2;
for (tmpMeta8 = _rest_expl; !listEmpty(tmpMeta8); tmpMeta8=MMC_CDR(tmpMeta8))
{
_exp2 = MMC_CAR(tmpMeta8);
tmpMeta9 = _rest_tys;
if (listEmpty(tmpMeta9)) MMC_THROW_INTERNAL();
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
_ty2 = tmpMeta10;
_rest_tys = tmpMeta11;
_ty2 = omc_Types_getUniontypeIfMetarecordReplaceAllSubtypes(threadData, _ty2);
if((!omc_Types_equivtypes(threadData, _outType, _ty2)))
{
{
{
volatile mmc_switch_type tmp14;
int tmp15;
tmp14 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp13_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp14 < 2; tmp14++) {
switch (MMC_SWITCH_CAST(tmp14)) {
case 0: {
_exp2 = omc_Types_matchType(threadData, _exp2, _outType, _ty2, 0 ,&_outType);
goto tmp13_done;
}
case 1: {
modelica_metatype tmpMeta16;
_ty1_str = omc_Types_unparseTypeNoAttr(threadData, _outType);
_ty2_str = omc_Types_unparseTypeNoAttr(threadData, _ty2);
omc_Types_typeErrorSanityCheck(threadData, _ty1_str, _ty2_str, _inInfo);
_pre_str = omc_PrefixUtil_printPrefixStr(threadData, _inPrefix);
_exp_str = omc_ExpressionDump_printExpStr(threadData, _exp2);
_expl_str = omc_List_toString(threadData, _inExpl, boxvar_ExpressionDump_printExpStr, _OMC_LIT7, _OMC_LIT22, _OMC_LIT690, _OMC_LIT23, 1, ((modelica_integer) 0));
tmpMeta16 = mmc_mk_cons(_pre_str, mmc_mk_cons(_exp_str, mmc_mk_cons(_ty1_str, mmc_mk_cons(_expl_str, mmc_mk_cons(_ty2_str, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT693, tmpMeta16, _inInfo);
goto tmp13_done;
}
}
goto tmp13_end;
tmp13_end: ;
}
goto goto_12;
tmp13_done:
(void)tmp14;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp13_done2;
goto_12:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp14 < 2) {
goto tmp13_top;
}
MMC_THROW_INTERNAL();
tmp13_done2:;
}
}
;
}
tmpMeta17 = mmc_mk_cons(_exp2, _outExpl);
_outExpl = tmpMeta17;
}
}
_outExpl = listReverse(_outExpl);
_return: OMC_LABEL_UNUSED
if (out_outType) { *out_outType = _outType; }
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayReal2(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inTypes, modelica_metatype _inExpectedType)
{
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _exp = NULL;
modelica_metatype _rest_expl = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
_rest_expl = _inExpl;
{
modelica_metatype _ty;
for (tmpMeta2 = _inTypes; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_ty = MMC_CAR(tmpMeta2);
tmpMeta3 = _rest_expl;
if (listEmpty(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_CAR(tmpMeta3);
tmpMeta5 = MMC_CDR(tmpMeta3);
_exp = tmpMeta4;
_rest_expl = tmpMeta5;
if((!omc_Types_equivtypes(threadData, _ty, _inExpectedType)))
{
_exp = omc_Types_matchType(threadData, _exp, _ty, _inExpectedType, 1, NULL);
}
tmpMeta6 = mmc_mk_cons(_exp, _outExpl);
_outExpl = tmpMeta6;
}
}
_outExpl = listReverse(_outExpl);
_return: OMC_LABEL_UNUSED
return _outExpl;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayConst(threadData_t *threadData, modelica_metatype _inProperties)
{
modelica_metatype _outConst = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outConst = _OMC_LIT60;
{
modelica_metatype _prop;
for (tmpMeta1 = _inProperties; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_prop = MMC_CAR(tmpMeta1);
_outConst = omc_Types_constAnd(threadData, _outConst, omc_Types_getPropConst(threadData, _prop));
}
}
_return: OMC_LABEL_UNUSED
return _outConst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArrayHasMixedIntReals(threadData_t *threadData, modelica_metatype _inTypes, modelica_boolean *out_outIsMixed)
{
modelica_metatype _outType = NULL;
modelica_boolean _outIsMixed;
modelica_boolean _has_int;
modelica_boolean _has_real;
modelica_metatype _ty = NULL;
modelica_metatype _rest_tys = 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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outIsMixed = 1;
_has_int = 0;
_has_real = 0;
tmpMeta1 = _inTypes;
if (listEmpty(tmpMeta1)) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_CAR(tmpMeta1);
tmpMeta3 = MMC_CDR(tmpMeta1);
_outType = tmpMeta2;
_rest_tys = tmpMeta3;
if(omc_Types_isReal(threadData, _outType))
{
while(1)
{
if(!(!listEmpty(_rest_tys))) break;
tmpMeta4 = _rest_tys;
if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_CAR(tmpMeta4);
tmpMeta6 = MMC_CDR(tmpMeta4);
_ty = tmpMeta5;
_rest_tys = tmpMeta6;
if(omc_Types_isInteger(threadData, _ty))
{
goto _return;
}
}
}
else
{
if(omc_Types_isInteger(threadData, _outType))
{
while(1)
{
if(!(!listEmpty(_rest_tys))) break;
tmpMeta7 = _rest_tys;
if (listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
_outType = tmpMeta8;
_rest_tys = tmpMeta9;
if(omc_Types_isReal(threadData, _outType))
{
goto _return;
}
}
}
}
_outIsMixed = 0;
_return: OMC_LABEL_UNUSED
if (out_outIsMixed) { *out_outIsMixed = _outIsMixed; }
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabArrayHasMixedIntReals(threadData_t *threadData, modelica_metatype _inTypes, modelica_metatype *out_outIsMixed)
{
modelica_boolean _outIsMixed;
modelica_metatype _outType = NULL;
_outType = omc_Static_elabArrayHasMixedIntReals(threadData, _inTypes, &_outIsMixed);
if (out_outIsMixed) { *out_outIsMixed = mmc_mk_icon(_outIsMixed); }
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabArray(threadData_t *threadData, modelica_metatype _inExpl, modelica_metatype _inProps, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outProperties)
{
modelica_metatype _outExpLst = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _types = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _c2 = NULL;
modelica_boolean _mixed;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_types = tmpMeta1;
_c = _OMC_LIT60;
if(listEmpty(_inExpl))
{
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT689, tmpMeta2, _inInfo);
MMC_THROW_INTERNAL();
}
{
modelica_metatype _p;
for (tmpMeta3 = _inProps; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_p = MMC_CAR(tmpMeta3);
tmpMeta4 = _p;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta4,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 3));
_ty = tmpMeta5;
_c2 = tmpMeta6;
tmpMeta7 = mmc_mk_cons(_ty, _types);
_types = tmpMeta7;
_c = omc_Types_constAnd(threadData, _c, _c2);
}
}
_types = listReverse(_types);
_ty = omc_Static_elabArrayHasMixedIntReals(threadData, _types ,&_mixed);
if(_mixed)
{
_outExpLst = omc_Static_elabArrayReal2(threadData, _inExpl, _types, _ty);
}
else
{
_outExpLst = omc_Static_elabArray2(threadData, _inExpl, _types, _inPrefix, _inInfo ,&_ty);
}
tmpMeta9 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta9;
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExpLst;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_stripExtraArgsFromType2(threadData_t *threadData, modelica_metatype _inSlots, modelica_metatype _inType, modelica_metatype _inAccumType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inSlots;
tmp4_2 = _inType;
{
modelica_metatype _slotsRest = NULL;
modelica_metatype _rest = NULL;
modelica_metatype _arg = NULL;
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_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_integer tmp11;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_CAR(tmp4_2);
tmpMeta7 = MMC_CDR(tmp4_2);
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmp4_1);
tmpMeta9 = MMC_CDR(tmp4_1);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
tmp11 = mmc_unbox_integer(tmpMeta10);
if (1 != tmp11) goto tmp3_end;
_rest = tmpMeta7;
_slotsRest = tmpMeta9;
_inSlots = _slotsRest;
_inType = _rest;
goto _tailrecursive;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
modelica_metatype tmpMeta18;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmp4_2);
tmpMeta13 = MMC_CDR(tmp4_2);
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmp4_1);
tmpMeta15 = MMC_CDR(tmp4_1);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmp17 = mmc_unbox_integer(tmpMeta16);
if (0 != tmp17) goto tmp3_end;
_arg = tmpMeta12;
_rest = tmpMeta13;
_slotsRest = tmpMeta15;
tmpMeta18 = mmc_mk_cons(_arg, _inAccumType);
_inSlots = _slotsRest;
_inType = _rest;
_inAccumType = tmpMeta18;
goto _tailrecursive;
goto tmp3_done;
}
case 2: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta1 = listReverse(_inAccumType);
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_Static_stripExtraArgsFromType(threadData_t *threadData, modelica_metatype _slots, modelica_metatype _inType)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outType = _inType;
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _outType;
{
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,4) == 0) goto tmp3_end;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(6));
memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_outType), 6*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[2] = omc_Static_stripExtraArgsFromType2(threadData, _slots, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_outType), 2))), tmpMeta7);
_outType = tmpMeta6;
tmpMeta1 = _outType;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp8;
tmp8 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp8) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT694);
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:;
}
}
_outType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabTuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_boolean _isLhs, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
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 = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outProperties = tmpMeta2;
if(((!_isLhs)?(!omc_Config_acceptMetaModelicaGrammar(threadData)):0))
{
tmpMeta4 = mmc_mk_box2(19, &Absyn_Exp_TUPLE__desc, _inExpl);
tmpMeta3 = mmc_mk_cons(omc_Dump_printExpStr(threadData, tmpMeta4), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT697, tmpMeta3, _inInfo);
MMC_THROW_INTERNAL();
}
{
modelica_metatype _e;
for (tmpMeta5 = _inExpl; !listEmpty(tmpMeta5); tmpMeta5=MMC_CDR(tmpMeta5))
{
_e = MMC_CAR(tmpMeta5);
_outCache = omc_Static_elabExp(threadData, _outCache, _inEnv, _e, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_exp ,&_prop);
if(omc_AbsynUtil_isTuple(threadData, _e))
{
_exp = omc_Types_matchProp(threadData, _exp, _prop, _OMC_LIT698, 1 ,&_prop);
}
tmpMeta6 = mmc_mk_cons(_exp, _outExpl);
_outExpl = tmpMeta6;
tmpMeta7 = mmc_mk_cons(_prop, _outProperties);
_outProperties = tmpMeta7;
}
}
_outExpl = listReverse(_outExpl);
_outProperties = listReverse(_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExpl) { *out_outExpl = _outExpl; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabTuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _isLhs, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
tmp3 = mmc_unbox_integer(_isLhs);
_outCache = omc_Static_elabTuple(threadData, _inCache, _inEnv, _inExpl, tmp1, tmp2, _inPrefix, _inInfo, tmp3, out_outExpl, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Static_elabRangeSize(threadData_t *threadData, modelica_metatype _inStartValue, modelica_metatype _inStepValue, modelica_metatype _inStopValue)
{
modelica_integer _outSize;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inStartValue;
tmp4_2 = _inStepValue;
tmp4_3 = _inStopValue;
{
modelica_integer _int_start;
modelica_integer _int_step;
modelica_integer _int_stop;
modelica_integer _dim;
modelica_real _real_start;
modelica_real _real_step;
modelica_real _real_stop;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 9; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_boolean tmp6;
if (!optionNone(tmp4_2)) goto tmp3_end;
tmp6 = omc_ValuesUtil_safeLessEq(threadData, _inStartValue, _inStopValue);
if (0 != tmp6) goto goto_2;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_integer tmp8;
modelica_metatype tmpMeta9;
modelica_integer tmp10;
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 (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp10 = mmc_unbox_integer(tmpMeta9);
_int_start = tmp8;
_int_stop = tmp10;
tmp4 += 7;
tmp1 = ((modelica_integer) 1) + _int_stop - _int_start;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_integer tmp17;
modelica_integer tmp18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp12 = mmc_unbox_integer(tmpMeta11);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp14 = mmc_unbox_integer(tmpMeta13);
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmp17 = mmc_unbox_integer(tmpMeta16);
_int_start = tmp12;
_int_stop = tmp14;
_int_step = tmp17;
tmp4 += 6;
_dim = _int_stop - _int_start;
tmp18 = _int_step;
if (tmp18 == 0) {goto goto_2;}
tmp1 = ((modelica_integer) 1) + modelica_div_integer(_dim,tmp18).quot;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta19;
modelica_real tmp20;
modelica_metatype tmpMeta21;
modelica_real tmp22;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp20 = mmc_unbox_real(tmpMeta19);
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,1) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp22 = mmc_unbox_real(tmpMeta21);
_real_start = tmp20;
_real_stop = tmp22;
tmp4 += 5;
tmp1 = omc_Util_realRangeSize(threadData, _real_start, 1.0, _real_stop);
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta23;
modelica_real tmp24;
modelica_metatype tmpMeta25;
modelica_real tmp26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_real tmp29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp24 = mmc_unbox_real(tmpMeta23);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,1) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp26 = mmc_unbox_real(tmpMeta25);
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,1,1) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
tmp29 = mmc_unbox_real(tmpMeta28);
_real_start = tmp24;
_real_stop = tmp26;
_real_step = tmp29;
tmp4 += 4;
tmp1 = omc_Util_realRangeSize(threadData, _real_start, _real_step, _real_stop);
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta30;
modelica_integer tmp31;
modelica_metatype tmpMeta32;
modelica_integer tmp33;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,2) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp31 = mmc_unbox_integer(tmpMeta30);
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,4,2) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
tmp33 = mmc_unbox_integer(tmpMeta32);
_int_start = tmp31;
_int_stop = tmp33;
tmp4 += 3;
tmp1 = ((modelica_integer) 1) + _int_stop - _int_start;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta34;
modelica_integer tmp35;
modelica_metatype tmpMeta36;
modelica_integer tmp37;
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp35 = mmc_unbox_integer(tmpMeta34);
if (1 != tmp35) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,1) == 0) goto tmp3_end;
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp37 = mmc_unbox_integer(tmpMeta36);
if (0 != tmp37) goto tmp3_end;
tmp4 += 1;
tmp1 = ((modelica_integer) 0);
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta38;
modelica_integer tmp39;
modelica_metatype tmpMeta40;
modelica_integer tmp41;
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp39 = mmc_unbox_integer(tmpMeta38);
if (0 != tmp39) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,1) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp41 = mmc_unbox_integer(tmpMeta40);
if (1 != tmp41) goto tmp3_end;
tmp1 = ((modelica_integer) 2);
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,1) == 0) goto tmp3_end;
tmp1 = ((modelica_integer) 1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 9) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outSize = tmp1;
_return: OMC_LABEL_UNUSED
return _outSize;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabRangeSize(threadData_t *threadData, modelica_metatype _inStartValue, modelica_metatype _inStepValue, modelica_metatype _inStopValue)
{
modelica_integer _outSize;
modelica_metatype out_outSize;
_outSize = omc_Static_elabRangeSize(threadData, _inStartValue, _inStepValue, _inStopValue);
out_outSize = mmc_mk_icon(_outSize);
return out_outSize;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabRangeType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inStart, modelica_metatype _inStep, modelica_metatype _inStop, modelica_metatype _inType, modelica_metatype _inExpType, modelica_metatype _co, modelica_boolean _inImpl, modelica_metatype *out_outType)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inStep;
tmp4_2 = _co;
{
modelica_metatype _step_exp = NULL;
modelica_metatype _start_val = NULL;
modelica_metatype _step_val = NULL;
modelica_metatype _stop_val = NULL;
modelica_integer _dim;
modelica_metatype _cache = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
tmpMeta6 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _inType, _OMC_LIT667);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = tmpMeta6;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (!optionNone(tmp4_1)) goto tmp3_end;
tmp4 += 1;
_cache = omc_Ceval_ceval(threadData, _inCache, _inEnv, _inStart, _inImpl, _OMC_LIT10, ((modelica_integer) 0) ,&_start_val);
_cache = omc_Ceval_ceval(threadData, _cache, _inEnv, _inStop, _inImpl, _OMC_LIT10, ((modelica_integer) 0) ,&_stop_val);
_dim = omc_Static_elabRangeSize(threadData, _start_val, mmc_mk_none(), _stop_val);
tmpMeta8 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim));
tmpMeta7 = mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta9 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _inType, tmpMeta7);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta9;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
_step_exp = tmpMeta10;
_cache = omc_Ceval_ceval(threadData, _inCache, _inEnv, _inStart, _inImpl, _OMC_LIT10, ((modelica_integer) 0) ,&_start_val);
_cache = omc_Ceval_ceval(threadData, _cache, _inEnv, _step_exp, _inImpl, _OMC_LIT10, ((modelica_integer) 0) ,&_step_val);
_cache = omc_Ceval_ceval(threadData, _cache, _inEnv, _inStop, _inImpl, _OMC_LIT10, ((modelica_integer) 0) ,&_stop_val);
_dim = omc_Static_elabRangeSize(threadData, _start_val, mmc_mk_some(_step_val), _stop_val);
tmpMeta12 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim));
tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta13 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _inType, tmpMeta11);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta13;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta14;
tmpMeta14 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _inType, _OMC_LIT667);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = tmpMeta14;
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:;
}
}
_outCache = tmpMeta[0+0];
_outType = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outType) { *out_outType = _outType; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabRangeType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inStart, modelica_metatype _inStep, modelica_metatype _inStop, modelica_metatype _inType, modelica_metatype _inExpType, modelica_metatype _co, modelica_metatype _inImpl, modelica_metatype *out_outType)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
_outCache = omc_Static_elabRangeType(threadData, _inCache, _inEnv, _inStart, _inStep, _inStop, _inType, _inExpType, _co, tmp1, out_outType);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deoverloadRange(threadData_t *threadData, modelica_metatype _inStartExp, modelica_metatype _inStartType, modelica_metatype _inStepExp, modelica_metatype _inStepType, modelica_metatype _inStopExp, modelica_metatype _inStopType, modelica_metatype _inInfo, modelica_metatype *out_outStep, modelica_metatype *out_outStop, modelica_metatype *out_outRangeType)
{
modelica_metatype _outStart = NULL;
modelica_metatype _outStep = NULL;
modelica_metatype _outStop = NULL;
modelica_metatype _outRangeType = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inStartType;
tmp4_2 = _inStepType;
tmp4_3 = _inStopType;
{
modelica_metatype _step_exp = NULL;
modelica_metatype _step_ty = NULL;
modelica_metatype _et = NULL;
modelica_metatype _ns = NULL;
modelica_metatype _ne = NULL;
modelica_string _e1_str = NULL;
modelica_string _e2_str = NULL;
modelica_string _t1_str = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 6; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,1) == 0) goto tmp3_end;
tmpMeta[0+0] = _inStartExp;
tmpMeta[0+1] = mmc_mk_none();
tmpMeta[0+2] = _inStopExp;
tmpMeta[0+3] = _OMC_LIT56;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,1) == 0) goto tmp3_end;
tmpMeta[0+0] = _inStartExp;
tmpMeta[0+1] = _inStepExp;
tmpMeta[0+2] = _inStopExp;
tmpMeta[0+3] = _OMC_LIT89;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,1) == 0) goto tmp3_end;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
tmpMeta[0+0] = _inStartExp;
tmpMeta[0+1] = _inStepExp;
tmpMeta[0+2] = _inStopExp;
tmpMeta[0+3] = _OMC_LIT89;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,5) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!optionNone(tmp4_2)) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,5,5) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_ns = tmpMeta7;
_ne = tmpMeta8;
if(omc_List_isEqual(threadData, _ns, _ne, 1))
{
_et = omc_Types_simplifyType(threadData, _inStartType);
}
else
{
_e1_str = omc_ExpressionDump_printExpStr(threadData, _inStartExp);
_e2_str = omc_ExpressionDump_printExpStr(threadData, _inStopExp);
_t1_str = omc_Types_unparseTypeNoAttr(threadData, _inStartType);
omc_Types_unparseTypeNoAttr(threadData, _inStopType);
tmpMeta10 = stringAppend(_e1_str,_OMC_LIT702);
tmpMeta11 = stringAppend(tmpMeta10,_e2_str);
tmpMeta12 = stringAppend(_t1_str,_OMC_LIT166);
tmpMeta13 = stringAppend(tmpMeta12,_t1_str);
tmpMeta9 = mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta13, mmc_mk_cons(_OMC_LIT7, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT701, tmpMeta9, _inInfo);
}
tmpMeta[0+0] = _inStartExp;
tmpMeta[0+1] = mmc_mk_none();
tmpMeta[0+2] = _inStopExp;
tmpMeta[0+3] = _et;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (!optionNone(tmp4_2)) goto tmp3_end;
tmpMeta15 = mmc_mk_box2(0, _inStartExp, _inStartType);
tmpMeta16 = mmc_mk_box2(0, _inStopExp, _inStopType);
tmpMeta14 = mmc_mk_cons(tmpMeta15, mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta17 = omc_OperatorOverloading_elabArglist(threadData, _OMC_LIT704, tmpMeta14, NULL);
if (listEmpty(tmpMeta17)) goto goto_2;
tmpMeta18 = MMC_CAR(tmpMeta17);
tmpMeta19 = MMC_CDR(tmpMeta17);
if (listEmpty(tmpMeta19)) goto goto_2;
tmpMeta20 = MMC_CAR(tmpMeta19);
tmpMeta21 = MMC_CDR(tmpMeta19);
if (!listEmpty(tmpMeta21)) goto goto_2;
_outStart = tmpMeta18;
_outStop = tmpMeta20;
tmpMeta[0+0] = _outStart;
tmpMeta[0+1] = mmc_mk_none();
tmpMeta[0+2] = _outStop;
tmpMeta[0+3] = _OMC_LIT131;
goto tmp3_done;
}
case 5: {
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;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (optionNone(tmp4_2)) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_step_ty = tmpMeta22;
tmpMeta23 = _inStepExp;
if (optionNone(tmpMeta23)) goto goto_2;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 1));
_step_exp = tmpMeta24;
tmpMeta26 = mmc_mk_box2(0, _inStartExp, _inStartType);
tmpMeta27 = mmc_mk_box2(0, _step_exp, _step_ty);
tmpMeta28 = mmc_mk_box2(0, _inStopExp, _inStopType);
tmpMeta25 = mmc_mk_cons(tmpMeta26, mmc_mk_cons(tmpMeta27, mmc_mk_cons(tmpMeta28, MMC_REFSTRUCTLIT(mmc_nil))));
tmpMeta29 = omc_OperatorOverloading_elabArglist(threadData, _OMC_LIT705, tmpMeta25, NULL);
if (listEmpty(tmpMeta29)) goto goto_2;
tmpMeta30 = MMC_CAR(tmpMeta29);
tmpMeta31 = MMC_CDR(tmpMeta29);
if (listEmpty(tmpMeta31)) goto goto_2;
tmpMeta32 = MMC_CAR(tmpMeta31);
tmpMeta33 = MMC_CDR(tmpMeta31);
if (listEmpty(tmpMeta33)) goto goto_2;
tmpMeta34 = MMC_CAR(tmpMeta33);
tmpMeta35 = MMC_CDR(tmpMeta33);
if (!listEmpty(tmpMeta35)) goto goto_2;
_outStart = tmpMeta30;
_step_exp = tmpMeta32;
_outStop = tmpMeta34;
tmpMeta[0+0] = _outStart;
tmpMeta[0+1] = mmc_mk_some(_step_exp);
tmpMeta[0+2] = _outStop;
tmpMeta[0+3] = _OMC_LIT131;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outStart = tmpMeta[0+0];
_outStep = tmpMeta[0+1];
_outStop = tmpMeta[0+2];
_outRangeType = tmpMeta[0+3];
_return: OMC_LABEL_UNUSED
if (out_outStep) { *out_outStep = _outStep; }
if (out_outStop) { *out_outStop = _outStop; }
if (out_outRangeType) { *out_outRangeType = _outRangeType; }
return _outStart;
}
DLLExport
modelica_metatype omc_Static_elabGraphicsExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;volatile modelica_boolean tmp4_4;volatile modelica_metatype tmp4_5;
tmp4_1 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inExp;
tmp4_4 = _inBoolean;
tmp4_5 = _inPrefix;
{
modelica_integer _i;
modelica_integer _l;
modelica_integer _nmax;
modelica_real _r;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
modelica_boolean _b;
modelica_boolean _impl;
modelica_boolean _a;
modelica_boolean _havereal;
modelica_string _s = NULL;
modelica_string _ps = NULL;
modelica_metatype _dexp = NULL;
modelica_metatype _e1_1 = NULL;
modelica_metatype _e2_1 = NULL;
modelica_metatype _e_1 = NULL;
modelica_metatype _e3_1 = NULL;
modelica_metatype _start_1 = NULL;
modelica_metatype _stop_1 = NULL;
modelica_metatype _start_2 = NULL;
modelica_metatype _stop_2 = NULL;
modelica_metatype _step_1 = NULL;
modelica_metatype _step_2 = NULL;
modelica_metatype _mexp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _prop3 = NULL;
modelica_metatype _env = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _fn = NULL;
modelica_metatype _t = NULL;
modelica_metatype _start_t = NULL;
modelica_metatype _stop_t = NULL;
modelica_metatype _step_t = NULL;
modelica_metatype _t_1 = NULL;
modelica_metatype _t_2 = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c = NULL;
modelica_metatype _c_start = NULL;
modelica_metatype _c_stop = NULL;
modelica_metatype _const = NULL;
modelica_metatype _c_step = NULL;
modelica_metatype _e = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _e3 = NULL;
modelica_metatype _start = NULL;
modelica_metatype _stop = NULL;
modelica_metatype _step = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _op = NULL;
modelica_metatype _args = NULL;
modelica_metatype _es = NULL;
modelica_metatype _nargs = NULL;
modelica_metatype _es_1 = NULL;
modelica_metatype _props = NULL;
modelica_metatype _types = NULL;
modelica_metatype _tps_2 = NULL;
modelica_metatype _consts = NULL;
modelica_metatype _rt = NULL;
modelica_metatype _at = NULL;
modelica_metatype _tps = NULL;
modelica_metatype _tps_1 = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _pre = NULL;
modelica_metatype _ess = NULL;
modelica_metatype _dess = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 19; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_integer tmp7;
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
_i = tmp7;
_cache = tmp4_1;
tmp4 += 17;
tmpMeta8 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_i));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta8;
tmpMeta[0+2] = _OMC_LIT657;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_s = tmpMeta9;
_cache = tmp4_1;
tmp4 += 16;
_r = stringReal(_s);
tmpMeta10 = mmc_mk_box2(4, &DAE_Exp_RCONST__desc, mmc_mk_real(_r));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta10;
tmpMeta[0+2] = _OMC_LIT706;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,3,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_s = tmpMeta11;
_cache = tmp4_1;
tmp4 += 15;
_s = omc_System_unescapedString(threadData, _s);
tmpMeta12 = mmc_mk_box2(5, &DAE_Exp_SCONST__desc, _s);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta12;
tmpMeta[0+2] = _OMC_LIT406;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta13;
modelica_integer tmp14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,4,1) == 0) goto tmp3_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmp14 = mmc_unbox_integer(tmpMeta13);
_b = tmp14;
_cache = tmp4_1;
tmp4 += 14;
tmpMeta15 = mmc_mk_box2(6, &DAE_Exp_BCONST__desc, mmc_mk_boolean(_b));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta15;
tmpMeta[0+2] = _OMC_LIT469;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_cr = tmpMeta16;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 13;
tmpMeta21 = omc_Static_elabCref(threadData, _cache, _env, _cr, _impl, 1, _pre, _info, &tmpMeta17);
_cache = tmpMeta21;
if (optionNone(tmpMeta17)) goto goto_2;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 1));
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 1));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
_dexp = tmpMeta19;
_prop = tmpMeta20;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _dexp;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,5,3) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_exp = tmp4_3;
_e1 = tmpMeta22;
_op = tmpMeta23;
_e2 = tmpMeta24;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 12;
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e1, _impl, _pre, _info ,&_e1_1 ,&_prop1);
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e2, _impl, _pre, _info ,&_e2_1 ,&_prop2);
tmpMeta[0+0] = omc_OperatorOverloading_binary(threadData, _cache, _env, _op, _prop1, _e1_1, _prop2, _e2_1, _exp, _e1, _e2, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
modelica_boolean tmp31;
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta25,5,0) == 0) goto tmp3_end;
_e = tmp4_3;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmpMeta30 = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e, _impl, _pre, _info, &tmpMeta26, &tmpMeta27);
_cache = tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta27,0,2) == 0) goto goto_2;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 2));
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta27), 3));
_e_1 = tmpMeta26;
_t = tmpMeta28;
_c = tmpMeta29;
tmp31 = omc_Types_isRealOrSubTypeReal(threadData, omc_Types_arrayElementType(threadData, _t));
if (1 != tmp31) goto goto_2;
tmpMeta32 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _c);
_prop = tmpMeta32;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _e_1;
tmpMeta[0+2] = _prop;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,6,2) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_exp = tmp4_3;
_op = tmpMeta33;
_e = tmpMeta34;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 10;
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e, _impl, _pre, _info ,&_e_1 ,&_prop1);
tmpMeta[0+0] = omc_OperatorOverloading_unary(threadData, _cache, _env, _op, _prop1, _e_1, _exp, _e, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,7,3) == 0) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta36 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
tmpMeta37 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_exp = tmp4_3;
_e1 = tmpMeta35;
_op = tmpMeta36;
_e2 = tmpMeta37;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 9;
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e1, _impl, _pre, _info ,&_e1_1 ,&_prop1);
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e2, _impl, _pre, _info ,&_e2_1 ,&_prop2);
tmpMeta[0+0] = omc_OperatorOverloading_binary(threadData, _cache, _env, _op, _prop1, _e1_1, _prop2, _e2_1, _exp, _e1, _e2, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,8,2) == 0) goto tmp3_end;
tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
_exp = tmp4_3;
_op = tmpMeta38;
_e = tmpMeta39;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 8;
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e, _impl, _pre, _info ,&_e_1 ,&_prop1);
tmpMeta[0+0] = omc_OperatorOverloading_unary(threadData, _cache, _env, _op, _prop1, _e_1, _exp, _e, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta40;
modelica_metatype tmpMeta41;
modelica_metatype tmpMeta42;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,9,3) == 0) goto tmp3_end;
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta41 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_exp = tmp4_3;
_e1 = tmpMeta40;
_op = tmpMeta41;
_e2 = tmpMeta42;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 7;
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e1, _impl, _pre, _info ,&_e1_1 ,&_prop1);
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e2, _impl, _pre, _info ,&_e2_1 ,&_prop2);
tmpMeta[0+0] = omc_OperatorOverloading_binary(threadData, _cache, _env, _op, _prop1, _e1_1, _prop2, _e2_1, _exp, _e1, _e2, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
modelica_metatype tmpMeta46;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,10,4) == 0) goto tmp3_end;
_e = tmp4_3;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 6;
tmpMeta43 = omc_AbsynUtil_canonIfExp(threadData, _e);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta43,10,4) == 0) goto goto_2;
tmpMeta44 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 2));
tmpMeta45 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 3));
tmpMeta46 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta43), 4));
_e1 = tmpMeta44;
_e2 = tmpMeta45;
_e3 = tmpMeta46;
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e1, _impl, _pre, _info ,&_e1_1 ,&_prop1);
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e2, _impl, _pre, _info ,&_e2_1 ,&_prop2);
_cache = omc_Static_elabGraphicsExp(threadData, _cache, _env, _e3, _impl, _pre, _info ,&_e3_1 ,&_prop3);
tmpMeta[0+0] = omc_Static_makeIfExp(threadData, _cache, _env, _e1_1, _prop1, _e2_1, _prop2, _e3_1, _prop3, _impl, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,11,3) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta48,0,2) == 0) goto tmp3_end;
tmpMeta49 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 2));
tmpMeta50 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta48), 3));
_fn = tmpMeta47;
_args = tmpMeta49;
_nargs = tmpMeta50;
_cache = tmp4_1;
_env = tmp4_2;
_pre = tmp4_5;
tmp4 += 5;
tmpMeta[0+0] = omc_Static_elabCall(threadData, _cache, _env, _fn, _args, _nargs, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 4))), 1, _pre, _info, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 13: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,16,1) == 0) goto tmp3_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
if (listEmpty(tmpMeta51)) goto tmp3_end;
tmpMeta52 = MMC_CAR(tmpMeta51);
tmpMeta53 = MMC_CDR(tmpMeta51);
_es = tmpMeta51;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 4;
_cache = omc_Static_elabTuple(threadData, _cache, _env, _es, _impl, 0, _pre, _info, 0 ,&_es_1 ,&_props);
_types = omc_Static_splitProps(threadData, _props ,&_consts);
tmpMeta54 = mmc_mk_box2(22, &DAE_Exp_TUPLE__desc, _es_1);
tmpMeta55 = mmc_mk_box3(17, &DAE_Type_T__TUPLE__desc, _types, mmc_mk_none());
tmpMeta56 = mmc_mk_box2(4, &DAE_TupleConst_TUPLE__CONST__desc, _consts);
tmpMeta57 = mmc_mk_box3(4, &DAE_Properties_PROP__TUPLE__desc, tmpMeta55, tmpMeta56);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta54;
tmpMeta[0+2] = tmpMeta57;
goto tmp3_done;
}
case 14: {
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,15,3) == 0) goto tmp3_end;
tmpMeta58 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (!optionNone(tmpMeta59)) goto tmp3_end;
tmpMeta60 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_start = tmpMeta58;
_stop = tmpMeta60;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 3;
tmpMeta65 = omc_Static_elabGraphicsExp(threadData, _cache, _env, _start, _impl, _pre, _info, &tmpMeta61, &tmpMeta62);
_cache = tmpMeta65;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta62,0,2) == 0) goto goto_2;
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta62), 2));
tmpMeta64 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta62), 3));
_start_1 = tmpMeta61;
_start_t = tmpMeta63;
_c_start = tmpMeta64;
tmpMeta70 = omc_Static_elabGraphicsExp(threadData, _cache, _env, _stop, _impl, _pre, _info, &tmpMeta66, &tmpMeta67);
_cache = tmpMeta70;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta67,0,2) == 0) goto goto_2;
tmpMeta68 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta67), 2));
tmpMeta69 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta67), 3));
_stop_1 = tmpMeta66;
_stop_t = tmpMeta68;
_c_stop = tmpMeta69;
omc_Static_deoverloadRange(threadData, _start_1, _start_t, mmc_mk_none(), mmc_mk_none(), _stop_1, _stop_t, _info, &tmpMeta71, NULL, &tmpMeta72);
if (!optionNone(tmpMeta71)) goto goto_2;
_rt = tmpMeta72;
_const = omc_Types_constAnd(threadData, _c_start, _c_stop);
_cache = omc_Static_elabRangeType(threadData, _cache, _env, _start_1, mmc_mk_none(), _stop_1, _start_t, _rt, _const, _impl ,&_t);
tmpMeta73 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _t, _start_1, mmc_mk_none(), _stop_1);
tmpMeta74 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _const);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta73;
tmpMeta[0+2] = tmpMeta74;
goto tmp3_done;
}
case 15: {
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;
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,15,3) == 0) goto tmp3_end;
tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta76 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
if (optionNone(tmpMeta76)) goto tmp3_end;
tmpMeta77 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta76), 1));
tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_start = tmpMeta75;
_step = tmpMeta77;
_stop = tmpMeta78;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 2;
tmpMeta83 = omc_Static_elabGraphicsExp(threadData, _cache, _env, _start, _impl, _pre, _info, &tmpMeta79, &tmpMeta80);
_cache = tmpMeta83;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta80,0,2) == 0) goto goto_2;
tmpMeta81 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta80), 2));
tmpMeta82 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta80), 3));
_start_1 = tmpMeta79;
_start_t = tmpMeta81;
_c_start = tmpMeta82;
tmpMeta88 = omc_Static_elabGraphicsExp(threadData, _cache, _env, _step, _impl, _pre, _info, &tmpMeta84, &tmpMeta85);
_cache = tmpMeta88;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta85,0,2) == 0) goto goto_2;
tmpMeta86 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta85), 2));
tmpMeta87 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta85), 3));
_step_1 = tmpMeta84;
_step_t = tmpMeta86;
_c_step = tmpMeta87;
tmpMeta93 = omc_Static_elabGraphicsExp(threadData, _cache, _env, _stop, _impl, _pre, _info, &tmpMeta89, &tmpMeta90);
_cache = tmpMeta93;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta90,0,2) == 0) goto goto_2;
tmpMeta91 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 2));
tmpMeta92 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta90), 3));
_stop_1 = tmpMeta89;
_stop_t = tmpMeta91;
_c_stop = tmpMeta92;
tmpMeta98 = omc_Static_deoverloadRange(threadData, _start_1, _start_t, mmc_mk_some(_step_1), mmc_mk_some(_step_t), _stop_1, _stop_t, _info, &tmpMeta94, &tmpMeta96, &tmpMeta97);
_start_2 = tmpMeta98;
if (optionNone(tmpMeta94)) goto goto_2;
tmpMeta95 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta94), 1));
_step_2 = tmpMeta95;
_stop_2 = tmpMeta96;
_rt = tmpMeta97;
_c1 = omc_Types_constAnd(threadData, _c_start, _c_step);
_const = omc_Types_constAnd(threadData, _c1, _c_stop);
_cache = omc_Static_elabRangeType(threadData, _cache, _env, _start_1, mmc_mk_some(_step_1), _stop_1, _start_t, _rt, _const, _impl ,&_t);
tmpMeta99 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _t, _start_2, mmc_mk_some(_step_2), _stop_2);
tmpMeta100 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _t, _const);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta99;
tmpMeta[0+2] = tmpMeta100;
goto tmp3_done;
}
case 16: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,13,1) == 0) goto tmp3_end;
tmpMeta101 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_es = tmpMeta101;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
tmp4 += 1;
tmpMeta106 = omc_Static_elabGraphicsArray(threadData, _cache, _env, _es, _impl, _pre, _info, &tmpMeta102, &tmpMeta103);
_cache = tmpMeta106;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta103,0,2) == 0) goto goto_2;
tmpMeta104 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta103), 2));
tmpMeta105 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta103), 3));
_es_1 = tmpMeta102;
_t = tmpMeta104;
_const = tmpMeta105;
_l = listLength(_es_1);
_at = omc_Types_simplifyType(threadData, _t);
_a = omc_Types_isArray(threadData, _t);
tmpMeta107 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, _at, mmc_mk_boolean(_a), _es_1);
tmpMeta109 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_l));
tmpMeta108 = mmc_mk_cons(tmpMeta109, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta110 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _t, tmpMeta108);
tmpMeta111 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta110, _const);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta107;
tmpMeta[0+2] = tmpMeta111;
goto tmp3_done;
}
case 17: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,14,1) == 0) goto tmp3_end;
tmpMeta112 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_ess = tmpMeta112;
_cache = tmp4_1;
_env = tmp4_2;
_impl = tmp4_4;
_pre = tmp4_5;
_cache = omc_Static_elabExpListList(threadData, _cache, _env, _ess, _impl, 1, _pre, _info, _OMC_LIT42 ,&_dess ,&_tps);
_tps_1 = omc_List_mapList(threadData, _tps, boxvar_Types_getPropType);
_tps_2 = omc_List_flatten(threadData, _tps_1);
_nmax = omc_Static_matrixConstrMaxDim(threadData, _tps_2);
_havereal = omc_Types_containReal(threadData, _tps_2);
tmpMeta119 = omc_Static_elabMatrixSemi(threadData, _cache, _env, _dess, _tps, _impl, _havereal, _nmax, 1, _pre, _info, &tmpMeta113, &tmpMeta114, &tmpMeta117, &tmpMeta118);
_cache = tmpMeta119;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta114,0,2) == 0) goto goto_2;
tmpMeta115 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta114), 2));
tmpMeta116 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta114), 3));
_mexp = tmpMeta113;
_t = tmpMeta115;
_c = tmpMeta116;
_dim1 = tmpMeta117;
_dim2 = tmpMeta118;
omc_Static_elabMatrixToMatrixExp(threadData, _mexp);
_t_1 = omc_Types_unliftArray(threadData, _t);
_t_2 = omc_Types_unliftArray(threadData, _t_1);
tmpMeta120 = mmc_mk_cons(_dim2, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta121 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _t_2, tmpMeta120);
tmpMeta122 = mmc_mk_cons(_dim1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta123 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, tmpMeta121, tmpMeta122);
tmpMeta124 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta123, _c);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _mexp;
tmpMeta[0+2] = tmpMeta124;
goto tmp3_done;
}
case 18: {
modelica_boolean tmp125;
modelica_metatype tmpMeta126;
_e = tmp4_3;
_pre = tmp4_5;
tmp125 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp125) goto goto_2;
omc_Print_printErrorBuf(threadData, _OMC_LIT707);
_ps = omc_PrefixUtil_printPrefixStr2(threadData, _pre);
_s = omc_Dump_printExpStr(threadData, _e);
tmpMeta126 = stringAppend(_ps,_s);
omc_Print_printErrorBuf(threadData, tmpMeta126);
omc_Print_printErrorBuf(threadData, _OMC_LIT93);
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:;
}
}
_outCache = tmpMeta[0+0];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabGraphicsExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inBoolean, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inBoolean);
_outCache = omc_Static_elabGraphicsExp(threadData, _inCache, _inEnv, _inExp, tmp1, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCodeType(threadData_t *threadData, modelica_metatype _inCode)
{
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inCode;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
tmpMeta1 = _OMC_LIT709;
goto tmp3_done;
}
case 4: {
tmpMeta1 = _OMC_LIT710;
goto tmp3_done;
}
case 6: {
tmpMeta1 = _OMC_LIT714;
goto tmp3_done;
}
case 7: {
tmpMeta1 = _OMC_LIT718;
goto tmp3_done;
}
case 8: {
tmpMeta1 = _OMC_LIT722;
goto tmp3_done;
}
case 9: {
tmpMeta1 = _OMC_LIT726;
goto tmp3_done;
}
case 10: {
tmpMeta1 = _OMC_LIT730;
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_Static_constructArrayType(threadData_t *threadData, modelica_metatype _arrayType, modelica_metatype _expType)
{
modelica_metatype _resType = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _arrayType;
{
modelica_metatype _ty = NULL;
modelica_metatype _dim = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,0) == 0) goto tmp3_end;
tmpMeta1 = _expType;
goto tmp3_done;
}
case 1: {
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;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) goto tmp3_end;
_ty = tmpMeta6;
_dim = tmpMeta8;
_ty = omc_Static_constructArrayType(threadData, _ty, _expType);
tmpMeta10 = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta11 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta10);
tmpMeta1 = tmpMeta11;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_resType = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _resType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_constToVariability(threadData_t *threadData, modelica_metatype _const)
{
modelica_metatype _variability = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _const;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 5: {
tmpMeta1 = _OMC_LIT78;
goto tmp3_done;
}
case 4: {
tmpMeta1 = _OMC_LIT110;
goto tmp3_done;
}
case 3: {
tmpMeta1 = _OMC_LIT100;
goto tmp3_done;
}
case 6: {
modelica_boolean tmp5;
tmp5 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp5) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT731);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_variability = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _variability;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkReductionType2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _expType, modelica_metatype _typeA, modelica_metatype _typeB, modelica_metatype _typeC, modelica_boolean _equivAB, modelica_boolean _equivBC, modelica_metatype _info, modelica_metatype *out_outTy)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outTy = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_boolean tmp4_1;modelica_boolean tmp4_2;
tmp4_1 = _equivAB;
tmp4_2 = _equivBC;
{
modelica_string _str1 = NULL;
modelica_string _str2 = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (1 != tmp4_1) goto tmp3_end;
if (1 != tmp4_2) goto tmp3_end;
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _typeA;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
if (0 != tmp4_2) goto tmp3_end;
_str1 = omc_Types_unparseType(threadData, _typeB);
_str2 = omc_Types_unparseType(threadData, _typeC);
tmpMeta6 = mmc_mk_cons(_OMC_LIT735, mmc_mk_cons(_OMC_LIT736, mmc_mk_cons(_OMC_LIT737, mmc_mk_cons(_str1, mmc_mk_cons(_str2, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT734, tmpMeta6, _info);
goto goto_2;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta7;
if (0 != tmp4_1) goto tmp3_end;
if (1 != tmp4_2) goto tmp3_end;
_str1 = omc_Types_unparseType(threadData, _typeA);
_str2 = omc_Types_unparseType(threadData, _typeB);
tmpMeta7 = mmc_mk_cons(_OMC_LIT496, mmc_mk_cons(_OMC_LIT738, mmc_mk_cons(_OMC_LIT737, mmc_mk_cons(_str1, mmc_mk_cons(_str2, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT734, tmpMeta7, _info);
goto goto_2;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta8;
if (1 != tmp4_1) goto tmp3_end;
if (1 != tmp4_2) goto tmp3_end;
_str1 = omc_Types_unparseType(threadData, _expType);
_str2 = omc_Types_unparseType(threadData, _typeA);
tmpMeta8 = mmc_mk_cons(_OMC_LIT739, mmc_mk_cons(_OMC_LIT740, mmc_mk_cons(_OMC_LIT741, mmc_mk_cons(_str1, mmc_mk_cons(_str2, MMC_REFSTRUCTLIT(mmc_nil))))));
omc_Error_addSourceMessage(threadData, _OMC_LIT734, tmpMeta8, _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:;
}
}
_outExp = tmpMeta[0+0];
_outTy = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outTy) { *out_outTy = _outTy; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_checkReductionType2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _expType, modelica_metatype _typeA, modelica_metatype _typeB, modelica_metatype _typeC, modelica_metatype _equivAB, modelica_metatype _equivBC, modelica_metatype _info, modelica_metatype *out_outTy)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outExp = NULL;
tmp1 = mmc_unbox_integer(_equivAB);
tmp2 = mmc_unbox_integer(_equivBC);
_outExp = omc_Static_checkReductionType2(threadData, _inExp, _expType, _typeA, _typeB, _typeC, tmp1, tmp2, _info, out_outTy);
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_checkReductionType1(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _inPath, modelica_metatype _fnTypes, modelica_metatype _info, modelica_metatype *out_typeB, modelica_metatype *out_resType, modelica_metatype *out_startValue, modelica_metatype *out_outPath)
{
modelica_metatype _typeA = NULL;
modelica_metatype _typeB = NULL;
modelica_metatype _resType = NULL;
modelica_metatype _startValue = NULL;
modelica_metatype _outPath = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _fnTypes;
{
modelica_string _str1 = NULL;
modelica_string _str2 = NULL;
modelica_metatype _path = NULL;
modelica_metatype _e = NULL;
modelica_metatype _v = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 4; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (!listEmpty(tmp4_1)) goto tmp3_end;
_str1 = omc_AbsynUtil_pathString(threadData, _inPath, _OMC_LIT84, 1, 0);
_str2 = omc_FGraph_printGraphPathStr(threadData, _inEnv);
tmpMeta6 = mmc_mk_cons(_str1, mmc_mk_cons(_str2, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT744, tmpMeta6, _info);
goto goto_2;
goto tmp3_done;
}
case 1: {
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;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta7 = MMC_CAR(tmp4_1);
tmpMeta8 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,11,4) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
if (listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 3));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,2,0) == 0) goto tmp3_end;
if (listEmpty(tmpMeta11)) goto tmp3_end;
tmpMeta14 = MMC_CAR(tmpMeta11);
tmpMeta15 = MMC_CDR(tmpMeta11);
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 3));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,2,0) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta14), 6));
if (optionNone(tmpMeta18)) goto tmp3_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 1));
if (!listEmpty(tmpMeta15)) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 5));
if (!listEmpty(tmpMeta8)) goto tmp3_end;
_typeA = tmpMeta12;
_typeB = tmpMeta16;
_e = tmpMeta19;
_resType = tmpMeta20;
_path = tmpMeta21;
_v = omc_Ceval_cevalSimple(threadData, _e);
tmpMeta[0+0] = _typeA;
tmpMeta[0+1] = _typeB;
tmpMeta[0+2] = _resType;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _path;
goto tmp3_done;
}
case 2: {
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;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_metatype tmpMeta35;
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta22 = MMC_CAR(tmp4_1);
tmpMeta23 = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,11,4) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
if (listEmpty(tmpMeta24)) goto tmp3_end;
tmpMeta25 = MMC_CAR(tmpMeta24);
tmpMeta26 = MMC_CDR(tmpMeta24);
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 3));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta25), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,2,0) == 0) goto tmp3_end;
if (listEmpty(tmpMeta26)) goto tmp3_end;
tmpMeta29 = MMC_CAR(tmpMeta26);
tmpMeta30 = MMC_CDR(tmpMeta26);
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 3));
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,2,0) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 6));
if (!optionNone(tmpMeta33)) goto tmp3_end;
if (!listEmpty(tmpMeta30)) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 3));
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 5));
if (!listEmpty(tmpMeta23)) goto tmp3_end;
_typeA = tmpMeta27;
_typeB = tmpMeta31;
_resType = tmpMeta34;
_path = tmpMeta35;
tmpMeta[0+0] = _typeA;
tmpMeta[0+1] = _typeB;
tmpMeta[0+2] = _resType;
tmpMeta[0+3] = mmc_mk_none();
tmpMeta[0+4] = _path;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta36;
_str1 = stringDelimitList(omc_List_map(threadData, _fnTypes, boxvar_Types_unparseType), _OMC_LIT690);
tmpMeta36 = mmc_mk_cons(_str1, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT747, tmpMeta36, _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:;
}
}
_typeA = tmpMeta[0+0];
_typeB = tmpMeta[0+1];
_resType = tmpMeta[0+2];
_startValue = tmpMeta[0+3];
_outPath = tmpMeta[0+4];
_return: OMC_LABEL_UNUSED
if (out_typeB) { *out_typeB = _typeB; }
if (out_resType) { *out_resType = _resType; }
if (out_startValue) { *out_startValue = _startValue; }
if (out_outPath) { *out_outPath = _outPath; }
return _typeA;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_reductionType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFn, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _unboxedType, modelica_metatype _dims, modelica_boolean _hasGuardExp, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outType, modelica_metatype *out_resultType, modelica_metatype *out_defaultValue, modelica_metatype *out_outPath)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outType = NULL;
modelica_metatype _resultType = NULL;
modelica_metatype _defaultValue = NULL;
modelica_metatype _outPath = NULL;
modelica_metatype _fn = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_fn = omc_AbsynUtil_makeNotFullyQualified(threadData, _inFn);
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _fn;
tmp4_2 = _unboxedType;
{
modelica_integer _i;
modelica_real _r;
modelica_metatype _fnTypes = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _typeA = NULL;
modelica_metatype _typeB = NULL;
modelica_metatype _resType = NULL;
modelica_metatype _path = NULL;
modelica_metatype _v = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _bindings = NULL;
modelica_metatype _defaultBinding = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 25; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (5 != MMC_STRLEN(tmpMeta6) || strcmp(MMC_STRINGDATA(_OMC_LIT209), MMC_STRINGDATA(tmpMeta6)) != 0) goto tmp3_end;
_ty = omc_List_foldr(threadData, _dims, boxvar_Types_liftArray, _inType);
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = _OMC_LIT213;
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (6 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT774), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
_ty = omc_List_foldr(threadData, _dims, boxvar_Types_liftArray, _inType);
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = _OMC_LIT213;
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT775), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT603, 1 ,&_ty);
_ty = omc_List_foldr(threadData, _dims, boxvar_Types_liftList, _ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = _OMC_LIT749;
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT776), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT603, 1 ,&_ty);
_ty = omc_List_foldr(threadData, _dims, boxvar_Types_liftList, _ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = _OMC_LIT749;
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
_r = realMaxLit();
tmpMeta11 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_r));
_v = tmpMeta11;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT131, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta12) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmpMeta12)) != 0) goto tmp3_end;
_i = intMaxLit();
tmpMeta13 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_i));
_v = tmpMeta13;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT89, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta14) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmpMeta14)) != 0) goto tmp3_end;
_v = _OMC_LIT750;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT56, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta15) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmpMeta15)) != 0) goto tmp3_end;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT405, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_none();
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta16) || strcmp(MMC_STRINGDATA(_OMC_LIT346), MMC_STRINGDATA(tmpMeta16)) != 0) goto tmp3_end;
tmpMeta17 = mmc_mk_box3(7, &Values_Value_ENUM__LITERAL__desc, omc_AbsynUtil_suffixPath(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unboxedType), 3))), omc_List_last(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unboxedType), 4))))), mmc_mk_integer(listLength((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unboxedType), 4))))));
_v = tmpMeta17;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT751, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta18) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmpMeta18)) != 0) goto tmp3_end;
_r = (-realMaxLit());
tmpMeta19 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_r));
_v = tmpMeta19;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT131, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 10: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta20) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmpMeta20)) != 0) goto tmp3_end;
_i = (-intMaxLit());
tmpMeta21 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_i));
_v = tmpMeta21;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT89, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 11: {
modelica_metatype tmpMeta22;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta22) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmpMeta22)) != 0) goto tmp3_end;
_v = _OMC_LIT752;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT56, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 12: {
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta23) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmpMeta23)) != 0) goto tmp3_end;
_v = _OMC_LIT753;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT405, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 13: {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta24) || strcmp(MMC_STRINGDATA(_OMC_LIT345), MMC_STRINGDATA(tmpMeta24)) != 0) goto tmp3_end;
tmpMeta25 = mmc_mk_box3(7, &Values_Value_ENUM__LITERAL__desc, omc_AbsynUtil_suffixPath(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unboxedType), 3))), listHead((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unboxedType), 4))))), mmc_mk_integer(((modelica_integer) 1)));
_v = tmpMeta25;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT751, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 14: {
modelica_metatype tmpMeta26;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta26) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmpMeta26)) != 0) goto tmp3_end;
_v = _OMC_LIT754;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT131, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 15: {
modelica_metatype tmpMeta27;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta27) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmpMeta27)) != 0) goto tmp3_end;
_v = _OMC_LIT755;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT89, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 16: {
modelica_metatype tmpMeta28;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta28) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmpMeta28)) != 0) goto tmp3_end;
_v = _OMC_LIT752;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT56, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 17: {
modelica_metatype tmpMeta29;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta29 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta29) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmpMeta29)) != 0) goto tmp3_end;
_v = _OMC_LIT753;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT405, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 18: {
modelica_metatype tmpMeta30;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta30) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmpMeta30)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inType;
tmpMeta[0+2] = _inType;
tmpMeta[0+3] = mmc_mk_none();
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 19: {
modelica_metatype tmpMeta31;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta31) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmpMeta31)) != 0) goto tmp3_end;
_v = _OMC_LIT757;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT131, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 20: {
modelica_metatype tmpMeta32;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta32) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmpMeta32)) != 0) goto tmp3_end;
_v = _OMC_LIT758;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT89, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 21: {
modelica_metatype tmpMeta33;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta33) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmpMeta33)) != 0) goto tmp3_end;
_v = _OMC_LIT750;
_exp = omc_Types_matchType(threadData, _inExp, _inType, _OMC_LIT56, 1 ,&_ty);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _ty;
tmpMeta[0+3] = mmc_mk_some(_v);
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 22: {
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta34) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmpMeta34)) != 0) goto tmp3_end;
omc_Error_addSourceMessage(threadData, _OMC_LIT204, _OMC_LIT760, _info);
goto goto_2;
goto tmp3_done;
}
case 23: {
modelica_metatype tmpMeta35;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,2) == 0) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta35) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmpMeta35)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inType;
tmpMeta[0+2] = _inType;
tmpMeta[0+3] = mmc_mk_none();
tmpMeta[0+4] = _fn;
goto tmp3_done;
}
case 24: {
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
_outCache = omc_Lookup_lookupFunctionsInEnv(threadData, _inCache, _inEnv, _inFn, _info ,&_fnTypes);
_typeA = omc_Static_checkReductionType1(threadData, _inEnv, _inFn, _fnTypes, _info ,&_typeB ,&_resType ,&_defaultBinding ,&_path);
_ty2 = (isSome(_defaultBinding)?_typeB:_inType);
tmpMeta36 = MMC_REFSTRUCTLIT(mmc_nil);
_exp = omc_Types_matchTypePolymorphicWithError(threadData, _inExp, _inType, _typeA, mmc_mk_some(_path), tmpMeta36, _info ,&_typeA ,&_bindings);
omc_Types_matchTypePolymorphicWithError(threadData, _OMC_LIT763, _ty2, _typeB, mmc_mk_some(_path), _bindings, _info ,&_typeB ,&_bindings);
_bindings = omc_Types_solvePolymorphicBindings(threadData, _bindings, _info, _path);
_typeA = omc_Types_fixPolymorphicRestype(threadData, _typeA, _bindings, _info);
_typeB = omc_Types_fixPolymorphicRestype(threadData, _typeB, _bindings, _info);
_resType = omc_Types_fixPolymorphicRestype(threadData, _resType, _bindings, _info);
_exp = omc_Static_checkReductionType2(threadData, _exp, _inType, _typeA, _typeB, _resType, (omc_Types_equivtypes(threadData, _typeA, _typeB) || isSome(_defaultBinding)), omc_Types_equivtypes(threadData, _typeB, _resType), _info ,&_ty);
tmpMeta38 = omc_Static_instantiateDaeFunction(threadData, _outCache, _inEnv, _path, 0, mmc_mk_none(), 1, &tmpMeta37);
_outCache = tmpMeta38;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta37,0,0) == 0) goto goto_2;
omc_Error_assertionOrAddSourceMessage(threadData, (omc_Config_acceptMetaModelicaGrammar(threadData) || omc_Flags_isSet(threadData, _OMC_LIT767)), _OMC_LIT771, _OMC_LIT773, _info);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _ty;
tmpMeta[0+2] = _typeB;
tmpMeta[0+3] = _defaultBinding;
tmpMeta[0+4] = _path;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outType = tmpMeta[0+1];
_resultType = tmpMeta[0+2];
_defaultValue = tmpMeta[0+3];
_outPath = tmpMeta[0+4];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outType) { *out_outType = _outType; }
if (out_resultType) { *out_resultType = _resultType; }
if (out_defaultValue) { *out_defaultValue = _defaultValue; }
if (out_outPath) { *out_outPath = _outPath; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_reductionType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFn, modelica_metatype _inExp, modelica_metatype _inType, modelica_metatype _unboxedType, modelica_metatype _dims, modelica_metatype _hasGuardExp, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outType, modelica_metatype *out_resultType, modelica_metatype *out_defaultValue, modelica_metatype *out_outPath)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_hasGuardExp);
_outCache = omc_Static_reductionType(threadData, _inCache, _inEnv, _inFn, _inExp, _inType, _unboxedType, _dims, tmp1, _info, out_outExp, out_outType, out_resultType, out_defaultValue, out_outPath);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_makeReductionFoldExp(threadData_t *threadData, modelica_metatype _inEnv, modelica_metatype _path, modelica_metatype _expty, modelica_metatype _resultTy, modelica_string _foldId, modelica_string _resultId, modelica_metatype *out_afoldExp)
{
modelica_metatype _outEnv = NULL;
modelica_metatype _afoldExp = NULL;
modelica_string _func_name = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = omc_AbsynUtil_makeNotFullyQualified(threadData, _path);
{
modelica_metatype _exp = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 7; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (6 != MMC_STRLEN(tmpMeta6) || strcmp(MMC_STRINGDATA(_OMC_LIT774), MMC_STRINGDATA(tmpMeta6)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inEnv;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (5 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT209), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inEnv;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT775), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inEnv;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (11 != MMC_STRLEN(tmpMeta9) || strcmp(MMC_STRINGDATA(_OMC_LIT776), MMC_STRINGDATA(tmpMeta9)) != 0) goto tmp3_end;
tmpMeta[0+0] = _inEnv;
tmpMeta[0+1] = mmc_mk_none();
goto tmp3_done;
}
case 4: {
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,1,1) == 0) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (3 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT349), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
_env = omc_FGraph_addForIterator(threadData, _inEnv, _foldId, _expty, _OMC_LIT182, _OMC_LIT78, _OMC_LIT777);
_env = omc_FGraph_addForIterator(threadData, _env, _resultId, _expty, _OMC_LIT182, _OMC_LIT78, _OMC_LIT777);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _foldId, tmpMeta11);
_cr1 = tmpMeta12;
tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta14 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _resultId, tmpMeta13);
_cr2 = tmpMeta14;
tmpMeta15 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr2);
tmpMeta16 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr1);
tmpMeta17 = mmc_mk_box4(8, &Absyn_Exp_BINARY__desc, tmpMeta15, _OMC_LIT778, tmpMeta16);
_exp = tmpMeta17;
tmpMeta[0+0] = _env;
tmpMeta[0+1] = mmc_mk_some(_exp);
goto tmp3_done;
}
case 5: {
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_1,1,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (7 != MMC_STRLEN(tmpMeta18) || strcmp(MMC_STRINGDATA(_OMC_LIT350), MMC_STRINGDATA(tmpMeta18)) != 0) goto tmp3_end;
_env = omc_FGraph_addForIterator(threadData, _inEnv, _foldId, _expty, _OMC_LIT182, _OMC_LIT78, _OMC_LIT777);
_env = omc_FGraph_addForIterator(threadData, _env, _resultId, _expty, _OMC_LIT182, _OMC_LIT78, _OMC_LIT777);
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _foldId, tmpMeta19);
_cr1 = tmpMeta20;
tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta22 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _resultId, tmpMeta21);
_cr2 = tmpMeta22;
tmpMeta23 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr2);
tmpMeta24 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr1);
tmpMeta25 = mmc_mk_box4(8, &Absyn_Exp_BINARY__desc, tmpMeta23, _OMC_LIT779, tmpMeta24);
_exp = tmpMeta25;
tmpMeta[0+0] = _env;
tmpMeta[0+1] = mmc_mk_some(_exp);
goto tmp3_done;
}
case 6: {
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;
_cr = omc_AbsynUtil_pathToCref(threadData, _path);
_env = omc_FGraph_addForIterator(threadData, _inEnv, _foldId, _expty, _OMC_LIT182, _OMC_LIT78, _OMC_LIT777);
_env = omc_FGraph_addForIterator(threadData, _env, _resultId, _resultTy, _OMC_LIT182, _OMC_LIT78, _OMC_LIT777);
tmpMeta26 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta27 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _foldId, tmpMeta26);
_cr1 = tmpMeta27;
tmpMeta28 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta29 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _resultId, tmpMeta28);
_cr2 = tmpMeta29;
tmpMeta31 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr1);
tmpMeta32 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cr2);
tmpMeta30 = mmc_mk_cons(tmpMeta31, mmc_mk_cons(tmpMeta32, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta33 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta34 = mmc_mk_box3(3, &Absyn_FunctionArgs_FUNCTIONARGS__desc, tmpMeta30, tmpMeta33);
tmpMeta35 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta36 = mmc_mk_box4(14, &Absyn_Exp_CALL__desc, _cr, tmpMeta34, tmpMeta35);
_exp = tmpMeta36;
tmpMeta[0+0] = _env;
tmpMeta[0+1] = mmc_mk_some(_exp);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outEnv = tmpMeta[0+0];
_afoldExp = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_afoldExp) { *out_afoldExp = _afoldExp; }
return _outEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deduceReductionIterationRange2(threadData_t *threadData, modelica_metatype _inDimension, modelica_metatype _inCref, modelica_metatype _inType, modelica_integer _inIndex, modelica_metatype *out_outProperties)
{
modelica_metatype _outRange = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _range_ty = NULL;
modelica_metatype _range_const = NULL;
modelica_metatype _enum_path = NULL;
modelica_metatype _enum_start = NULL;
modelica_metatype _enum_end = NULL;
modelica_metatype _enum_lits = NULL;
modelica_integer _sz;
modelica_metatype _size_exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta30;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inDimension;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 4: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
tmpMeta5 = mmc_mk_cons(_inDimension, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta6 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT56, tmpMeta5);
_range_ty = tmpMeta6;
_range_const = _OMC_LIT60;
tmpMeta7 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _range_ty, _OMC_LIT122, mmc_mk_none(), _OMC_LIT123);
tmpMeta1 = tmpMeta7;
goto tmp3_done;
}
case 5: {
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,2,3) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_enum_path = tmpMeta8;
_enum_lits = tmpMeta9;
_enum_start = omc_AbsynUtil_suffixPath(threadData, _enum_path, listHead(_enum_lits));
_enum_end = omc_AbsynUtil_suffixPath(threadData, _enum_path, omc_List_last(threadData, _enum_lits));
tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_box6(8, &DAE_Type_T__ENUMERATION__desc, mmc_mk_none(), _enum_path, _enum_lits, tmpMeta10, tmpMeta11);
_range_ty = tmpMeta12;
tmpMeta13 = mmc_mk_cons(_inDimension, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta14 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _range_ty, tmpMeta13);
_range_ty = tmpMeta14;
_range_const = _OMC_LIT60;
tmpMeta15 = mmc_mk_box3(8, &DAE_Exp_ENUM__LITERAL__desc, _enum_start, mmc_mk_integer(((modelica_integer) 1)));
tmpMeta16 = mmc_mk_box3(8, &DAE_Exp_ENUM__LITERAL__desc, _enum_end, mmc_mk_integer(listLength(_enum_lits)));
tmpMeta17 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _range_ty, tmpMeta15, mmc_mk_none(), tmpMeta16);
tmpMeta1 = tmpMeta17;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta18;
modelica_integer tmp19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmp19 = mmc_unbox_integer(tmpMeta18);
_sz = tmp19;
tmpMeta20 = mmc_mk_cons(_inDimension, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta21 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT89, tmpMeta20);
_range_ty = tmpMeta21;
_range_const = _OMC_LIT60;
tmpMeta22 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_sz));
tmpMeta23 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _range_ty, _OMC_LIT515, mmc_mk_none(), tmpMeta22);
tmpMeta1 = tmpMeta23;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
tmpMeta24 = mmc_mk_box3(9, &DAE_Exp_CREF__desc, _inCref, _inType);
tmpMeta25 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, mmc_mk_integer(_inIndex));
tmpMeta26 = mmc_mk_box3(27, &DAE_Exp_SIZE__desc, tmpMeta24, mmc_mk_some(tmpMeta25));
_size_exp = tmpMeta26;
tmpMeta27 = mmc_mk_cons(_inDimension, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta28 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _OMC_LIT89, tmpMeta27);
_range_ty = tmpMeta28;
_range_const = _OMC_LIT101;
tmpMeta29 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _range_ty, _OMC_LIT515, mmc_mk_none(), _size_exp);
tmpMeta1 = tmpMeta29;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outRange = tmpMeta1;
tmpMeta30 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _range_ty, _range_const);
_outProperties = tmpMeta30;
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outRange;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_deduceReductionIterationRange2(threadData_t *threadData, modelica_metatype _inDimension, modelica_metatype _inCref, modelica_metatype _inType, modelica_metatype _inIndex, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_metatype _outRange = NULL;
tmp1 = mmc_unbox_integer(_inIndex);
_outRange = omc_Static_deduceReductionIterationRange2(threadData, _inDimension, _inCref, _inType, tmp1, out_outProperties);
return _outRange;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_getIteratorIndexedCrefs(threadData_t *threadData, modelica_metatype _inCref, modelica_string _inIterator, modelica_metatype _inCrefs)
{
modelica_metatype _outCrefs = NULL;
modelica_metatype _crefs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCrefs = _inCrefs;
{
modelica_metatype tmp4_1;
tmp4_1 = _inCref;
{
modelica_metatype _subs = NULL;
modelica_integer _idx;
modelica_string _name = NULL;
modelica_string _id = NULL;
modelica_metatype _cref = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 5: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,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));
_id = tmpMeta5;
_subs = tmpMeta6;
_idx = ((modelica_integer) 1);
{
modelica_metatype _sub;
for (tmpMeta7 = _subs; !listEmpty(tmpMeta7); tmpMeta7=MMC_CDR(tmpMeta7))
{
_sub = MMC_CAR(tmpMeta7);
{
modelica_metatype tmp10_1;
tmp10_1 = _sub;
{
volatile mmc_switch_type tmp10;
int tmp11;
tmp10 = 0;
for (; tmp10 < 2; tmp10++) {
switch (MMC_SWITCH_CAST(tmp10)) {
case 0: {
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 (mmc__uniontype__metarecord__typedef__equal(tmp10_1,1,1) == 0) goto tmp9_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp10_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,2,1) == 0) goto tmp9_end;
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,2,2) == 0) goto tmp9_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 3));
if (!listEmpty(tmpMeta15)) goto tmp9_end;
_name = tmpMeta14;
if((stringEqual(_name, _inIterator)))
{
tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta18 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _id, tmpMeta17);
tmpMeta19 = mmc_mk_box2(0, tmpMeta18, mmc_mk_integer(_idx));
tmpMeta16 = mmc_mk_cons(tmpMeta19, _outCrefs);
_outCrefs = tmpMeta16;
}
goto tmp9_done;
}
case 1: {
goto tmp9_done;
}
}
goto tmp9_end;
tmp9_end: ;
}
goto goto_8;
goto_8:;
goto goto_2;
goto tmp9_done;
tmp9_done:;
}
}
;
_idx = ((modelica_integer) 1) + _idx;
}
}
tmpMeta1 = _outCrefs;
goto tmp3_done;
}
case 4: {
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_integer tmp29;
modelica_metatype tmpMeta30;
modelica_metatype tmpMeta31;
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta22 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_id = tmpMeta21;
_subs = tmpMeta22;
_cref = tmpMeta23;
tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
_crefs = omc_Static_getIteratorIndexedCrefs(threadData, _cref, _inIterator, tmpMeta24);
{
modelica_metatype _cr;
for (tmpMeta25 = _crefs; !listEmpty(tmpMeta25); tmpMeta25=MMC_CDR(tmpMeta25))
{
_cr = MMC_CAR(tmpMeta25);
tmpMeta26 = _cr;
tmpMeta27 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 1));
tmpMeta28 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta26), 2));
tmp29 = mmc_unbox_integer(tmpMeta28);
_cref = tmpMeta27;
_idx = tmp29;
tmpMeta31 = mmc_mk_box4(4, &Absyn_ComponentRef_CREF__QUAL__desc, _id, _subs, _cref);
tmpMeta32 = mmc_mk_box2(0, tmpMeta31, mmc_mk_integer(_idx));
tmpMeta30 = mmc_mk_cons(tmpMeta32, _outCrefs);
_outCrefs = tmpMeta30;
}
}
tmpMeta34 = mmc_mk_box3(5, &Absyn_ComponentRef_CREF__IDENT__desc, _id, _subs);
_inCref = tmpMeta34;
_inCrefs = _outCrefs;
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta35;
modelica_metatype tmpMeta36;
modelica_metatype tmpMeta37;
modelica_metatype tmpMeta38;
modelica_metatype tmpMeta39;
modelica_metatype tmpMeta40;
modelica_integer tmp41;
modelica_metatype tmpMeta42;
modelica_metatype tmpMeta43;
modelica_metatype tmpMeta44;
modelica_metatype tmpMeta45;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,1) == 0) goto tmp3_end;
tmpMeta35 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cref = tmpMeta35;
tmpMeta36 = MMC_REFSTRUCTLIT(mmc_nil);
_crefs = omc_Static_getIteratorIndexedCrefs(threadData, _cref, _inIterator, tmpMeta36);
{
modelica_metatype _cr;
for (tmpMeta37 = _crefs; !listEmpty(tmpMeta37); tmpMeta37=MMC_CDR(tmpMeta37))
{
_cr = MMC_CAR(tmpMeta37);
tmpMeta38 = _cr;
tmpMeta39 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 1));
tmpMeta40 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta38), 2));
tmp41 = mmc_unbox_integer(tmpMeta40);
_cref = tmpMeta39;
_idx = tmp41;
tmpMeta43 = mmc_mk_box2(3, &Absyn_ComponentRef_CREF__FULLYQUALIFIED__desc, _cref);
tmpMeta44 = mmc_mk_box2(0, tmpMeta43, mmc_mk_integer(_idx));
tmpMeta42 = mmc_mk_cons(tmpMeta44, _outCrefs);
_outCrefs = tmpMeta42;
}
}
tmpMeta1 = _outCrefs;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
tmpMeta1 = _inCrefs;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCrefs = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outCrefs;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_deduceReductionIterationRange__traverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCrefs, modelica_string _inIterator, modelica_metatype *out_outCrefs)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outCrefs = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outExp = _inExp;
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _cref = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_cref = tmpMeta6;
tmpMeta1 = omc_Static_getIteratorIndexedCrefs(threadData, _cref, _inIterator, _inCrefs);
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inCrefs;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCrefs = tmpMeta1;
_return: OMC_LABEL_UNUSED
if (out_outCrefs) { *out_outCrefs = _outCrefs; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_Static_iteratorIndexedCrefsEqual(threadData_t *threadData, modelica_metatype _inCref1, modelica_metatype _inCref2)
{
modelica_boolean _outEqual;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_integer _idx1;
modelica_integer _idx2;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_integer tmp4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_integer tmp8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = _inCref1;
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmp4 = mmc_unbox_integer(tmpMeta3);
_cr1 = tmpMeta2;
_idx1 = tmp4;
tmpMeta5 = _inCref2;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 1));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmp8 = mmc_unbox_integer(tmpMeta7);
_cr2 = tmpMeta6;
_idx2 = tmp8;
_outEqual = ((_idx1 == _idx2) && omc_AbsynUtil_crefEqual(threadData, _cr1, _cr2));
_return: OMC_LABEL_UNUSED
return _outEqual;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_iteratorIndexedCrefsEqual(threadData_t *threadData, modelica_metatype _inCref1, modelica_metatype _inCref2)
{
modelica_boolean _outEqual;
modelica_metatype out_outEqual;
_outEqual = omc_Static_iteratorIndexedCrefsEqual(threadData, _inCref1, _inCref2);
out_outEqual = mmc_mk_icon(_outEqual);
return out_outEqual;
}
DLLExport
modelica_metatype omc_Static_deduceIterationRange(threadData_t *threadData, modelica_string _inIterator, modelica_metatype _inCrefs, modelica_metatype _inEnv, modelica_metatype _inCache, modelica_metatype _inInfo, modelica_metatype *out_outProperties, modelica_metatype *out_outCache)
{
modelica_metatype _outRange = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype _acref = NULL;
modelica_metatype _cref = NULL;
modelica_integer _idx;
modelica_integer _i1;
modelica_integer _i2;
modelica_metatype _ty = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _range = NULL;
modelica_metatype _ranges = NULL;
modelica_metatype tmpMeta1;
modelica_string _cr_str1 = NULL;
modelica_string _cr_str2 = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_integer tmp7;
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_integer tmp22;
modelica_metatype tmpMeta23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_integer tmp26;
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_ranges = tmpMeta1;
if((listLength(_inCrefs) < ((modelica_integer) 1)))
{
tmpMeta2 = mmc_mk_cons(_inIterator, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT782, tmpMeta2, _inInfo);
}
{
modelica_metatype _cr;
for (tmpMeta3 = _inCrefs; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_cr = MMC_CAR(tmpMeta3);
tmpMeta4 = _cr;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 1));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
tmp7 = mmc_unbox_integer(tmpMeta6);
_acref = tmpMeta5;
_idx = tmp7;
_cref = omc_ComponentReference_toExpCref(threadData, _acref);
{
{
volatile mmc_switch_type tmp10;
int tmp11;
tmp10 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp9_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp10 < 2; tmp10++) {
switch (MMC_SWITCH_CAST(tmp10)) {
case 0: {
_outCache = omc_Lookup_lookupVar(threadData, _outCache, _inEnv, _cref ,NULL ,&_ty, NULL, NULL, NULL, NULL, NULL, NULL);
goto tmp9_done;
}
case 1: {
modelica_metatype tmpMeta12;
tmpMeta12 = mmc_mk_cons(omc_Dump_printComponentRefStr(threadData, _acref), mmc_mk_cons(_OMC_LIT7, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT146, tmpMeta12, _inInfo);
goto tmp9_done;
}
}
goto tmp9_end;
tmp9_end: ;
}
goto goto_8;
tmp9_done:
(void)tmp10;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp9_done2;
goto_8:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp10 < 2) {
goto tmp9_top;
}
MMC_THROW_INTERNAL();
tmp9_done2:;
}
}
;
_dims = omc_Types_getDimensions(threadData, _ty);
if((_idx <= listLength(_dims)))
{
_dim = listGet(_dims, _idx);
_range = omc_Static_deduceReductionIterationRange2(threadData, _dim, _cref, _ty, _idx ,&_outProperties);
}
else
{
_range = _OMC_LIT411;
_outProperties = _OMC_LIT784;
}
tmpMeta13 = mmc_mk_cons(_range, _ranges);
_ranges = tmpMeta13;
}
}
tmpMeta15 = _ranges;
if (listEmpty(tmpMeta15)) MMC_THROW_INTERNAL();
tmpMeta16 = MMC_CAR(tmpMeta15);
tmpMeta17 = MMC_CDR(tmpMeta15);
_outRange = tmpMeta16;
_ranges = tmpMeta17;
_idx = ((modelica_integer) 2);
{
modelica_metatype _r;
for (tmpMeta18 = _ranges; !listEmpty(tmpMeta18); tmpMeta18=MMC_CDR(tmpMeta18))
{
_r = MMC_CAR(tmpMeta18);
if((!omc_Expression_expEqual(threadData, _r, _outRange)))
{
tmpMeta19 = listHead(_inCrefs);
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 1));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmp22 = mmc_unbox_integer(tmpMeta21);
_acref = tmpMeta20;
_i1 = tmp22;
_cr_str1 = omc_Dump_printComponentRefStr(threadData, _acref);
tmpMeta23 = listGet(_inCrefs, _idx);
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 1));
tmpMeta25 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 2));
tmp26 = mmc_unbox_integer(tmpMeta25);
_acref = tmpMeta24;
_i2 = tmp26;
_cr_str2 = omc_Dump_printComponentRefStr(threadData, _acref);
tmpMeta27 = mmc_mk_cons(intString(_i2), mmc_mk_cons(_cr_str2, mmc_mk_cons(intString(_i1), mmc_mk_cons(_cr_str1, MMC_REFSTRUCTLIT(mmc_nil)))));
omc_Error_addSourceMessageAndFail(threadData, _OMC_LIT787, tmpMeta27, _inInfo);
}
_idx = ((modelica_integer) 1) + _idx;
}
}
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
if (out_outCache) { *out_outCache = _outCache; }
return _outRange;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallReductionIterators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIterators, modelica_metatype _inReductionExp, modelica_boolean _inImpl, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outIteratorsEnv, modelica_metatype *out_outIterators, modelica_metatype *out_outDims, modelica_metatype *out_outConst, modelica_boolean *out_outHasGuard)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outIteratorsEnv = NULL;
modelica_metatype _outIterators = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outDims = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _outConst = NULL;
modelica_boolean _outHasGuard;
modelica_string _iter_name = NULL;
modelica_metatype _aiter_exp = NULL;
modelica_metatype _oaguard_exp = NULL;
modelica_metatype _oaiter_exp = NULL;
modelica_metatype _iter_exp = NULL;
modelica_metatype _guard_exp = NULL;
modelica_metatype _full_iter_ty = NULL;
modelica_metatype _iter_ty = NULL;
modelica_metatype _iter_const = NULL;
modelica_metatype _guard_const = NULL;
modelica_metatype _c = NULL;
modelica_metatype _dim = NULL;
modelica_metatype _env = NULL;
modelica_metatype tmpMeta3;
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;
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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_outIteratorsEnv = _inEnv;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outIterators = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outDims = tmpMeta2;
_outConst = _OMC_LIT60;
_outHasGuard = 0;
{
modelica_metatype _iter;
for (tmpMeta3 = _inIterators; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_iter = MMC_CAR(tmpMeta3);
tmpMeta4 = _iter;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 3));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 4));
_iter_name = tmpMeta5;
_oaguard_exp = tmpMeta6;
_oaiter_exp = tmpMeta7;
if(isSome(_oaiter_exp))
{
tmpMeta8 = _oaiter_exp;
if (optionNone(tmpMeta8)) MMC_THROW_INTERNAL();
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
_aiter_exp = tmpMeta9;
tmpMeta14 = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _aiter_exp, _inImpl, _inDoVect, _inPrefix, _inInfo, &tmpMeta10, &tmpMeta11);
_outCache = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_iter_exp = tmpMeta10;
_full_iter_ty = tmpMeta12;
_iter_const = tmpMeta13;
}
else
{
tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta20 = omc_Static_deduceIterationRange(threadData, _iter_name, omc_AbsynUtil_findIteratorIndexedCrefs(threadData, _inReductionExp, _iter_name, tmpMeta19), _inEnv, _outCache, _inInfo, &tmpMeta15, &tmpMeta18);
_iter_exp = tmpMeta20;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 3));
_full_iter_ty = tmpMeta16;
_iter_const = tmpMeta17;
_outCache = tmpMeta18;
}
_c = (omc_FGraph_inFunctionScope(threadData, _inEnv)?_iter_const:_OMC_LIT60);
tmpMeta21 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _full_iter_ty, _c);
_outCache = omc_Ceval_cevalIfConstant(threadData, _outCache, _inEnv, _iter_exp, tmpMeta21, _inImpl, _inInfo ,&_iter_exp ,NULL);
_iter_ty = omc_Types_unliftArrayOrList(threadData, _full_iter_ty ,&_dim);
_env = omc_FGraph_addForIterator(threadData, _inEnv, _iter_name, _iter_ty, _OMC_LIT182, _OMC_LIT100, mmc_mk_some(_iter_const));
_outIteratorsEnv = omc_FGraph_addForIterator(threadData, _outIteratorsEnv, _iter_name, _iter_ty, _OMC_LIT182, _OMC_LIT100, mmc_mk_some(_iter_const));
tmpMeta25 = omc_Static_elabExpOptAndMatchType(threadData, _outCache, _env, _oaguard_exp, _OMC_LIT56, _inImpl, _inDoVect, _inPrefix, _inInfo, &tmpMeta22, &tmpMeta23);
_outCache = tmpMeta25;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta23), 3));
_guard_exp = tmpMeta22;
_guard_const = tmpMeta24;
if(isSome(_guard_exp))
{
_outHasGuard = 1;
_dim = _OMC_LIT20;
}
_outConst = omc_Types_constAnd(threadData, _outConst, omc_Types_constAnd(threadData, _guard_const, _iter_const));
tmpMeta27 = mmc_mk_box5(3, &DAE_ReductionIterator_REDUCTIONITER__desc, _iter_name, _iter_exp, _guard_exp, _iter_ty);
tmpMeta26 = mmc_mk_cons(tmpMeta27, _outIterators);
_outIterators = tmpMeta26;
tmpMeta28 = mmc_mk_cons(_dim, _outDims);
_outDims = tmpMeta28;
}
}
_outIterators = listReverse(_outIterators);
_outDims = listReverse(_outDims);
_return: OMC_LABEL_UNUSED
if (out_outIteratorsEnv) { *out_outIteratorsEnv = _outIteratorsEnv; }
if (out_outIterators) { *out_outIterators = _outIterators; }
if (out_outDims) { *out_outDims = _outDims; }
if (out_outConst) { *out_outConst = _outConst; }
if (out_outHasGuard) { *out_outHasGuard = _outHasGuard; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallReductionIterators(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIterators, modelica_metatype _inReductionExp, modelica_metatype _inImpl, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outIteratorsEnv, modelica_metatype *out_outIterators, modelica_metatype *out_outDims, modelica_metatype *out_outConst, modelica_metatype *out_outHasGuard)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_boolean _outHasGuard;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImpl);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabCallReductionIterators(threadData, _inCache, _inEnv, _inIterators, _inReductionExp, tmp1, tmp2, _inPrefix, _inInfo, out_outIteratorsEnv, out_outIterators, out_outDims, out_outConst, &_outHasGuard);
if (out_outHasGuard) { *out_outHasGuard = mmc_mk_icon(_outHasGuard); }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fixDimsIterType(threadData_t *threadData, modelica_metatype _iterType, modelica_metatype _dims)
{
modelica_metatype _outDims = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _iterType;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,0) == 0) goto tmp3_end;
tmpMeta1 = _dims;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
tmpMeta6 = mmc_mk_cons(listHead(_dims), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta6;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outDims = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outDims;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabCallReduction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inReductionFn, modelica_metatype _inReductionExp, modelica_metatype _inIterType, modelica_metatype _inIterators, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _env = NULL;
modelica_metatype _fold_env = NULL;
modelica_metatype _reduction_iters = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _iter_const = NULL;
modelica_metatype _exp_const = NULL;
modelica_metatype _c = NULL;
modelica_boolean _has_guard_exp;
modelica_metatype _exp = NULL;
modelica_metatype _afold_exp = NULL;
modelica_metatype _fold_exp = NULL;
modelica_metatype _exp_ty = NULL;
modelica_metatype _res_ty = NULL;
modelica_metatype _fn = NULL;
modelica_metatype _v = NULL;
modelica_string _fold_id = NULL;
modelica_string _res_id = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
_env = omc_FGraph_openScope(threadData, _inEnv, _OMC_LIT195, _OMC_LIT241, mmc_mk_none());
_outCache = omc_Static_elabCallReductionIterators(threadData, _inCache, _env, _inIterators, _inReductionExp, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_env ,&_reduction_iters ,&_dims ,&_iter_const ,&_has_guard_exp);
_dims = omc_Static_fixDimsIterType(threadData, _inIterType, _dims);
tmpMeta9 = omc_Static_elabExpInExpression(threadData, _outCache, _env, _inReductionExp, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta5, &tmpMeta6);
_outCache = tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,2) == 0) goto goto_1;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_exp = tmpMeta5;
_exp_ty = tmpMeta7;
_exp_const = tmpMeta8;
_c = omc_Types_constAnd(threadData, _exp_const, _iter_const);
{
modelica_metatype tmp13_1;
tmp13_1 = _inReductionFn;
{
volatile mmc_switch_type tmp13;
int tmp14;
tmp13 = 0;
for (; tmp13 < 2; tmp13++) {
switch (MMC_SWITCH_CAST(tmp13)) {
case 0: {
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp13_1,2,2) == 0) goto tmp12_end;
tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp13_1), 2));
if (6 != MMC_STRLEN(tmpMeta15) || strcmp(MMC_STRINGDATA(_OMC_LIT774), MMC_STRINGDATA(tmpMeta15)) != 0) goto tmp12_end;
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp13_1), 3));
if (!listEmpty(tmpMeta16)) goto tmp12_end;
tmpMeta10 = _OMC_LIT210;
goto tmp12_done;
}
case 1: {
tmpMeta10 = omc_AbsynUtil_crefToPath(threadData, _inReductionFn);
goto tmp12_done;
}
}
goto tmp12_end;
tmp12_end: ;
}
goto goto_11;
goto_11:;
goto goto_1;
goto tmp12_done;
tmp12_done:;
}
}
_fn = tmpMeta10;
_outCache = omc_Static_reductionType(threadData, _outCache, _inEnv, _fn, _exp, _exp_ty, omc_Types_unboxedType(threadData, _exp_ty), _dims, _has_guard_exp, _inInfo ,&_exp ,&_exp_ty ,&_res_ty ,&_v ,&_fn);
tmpMeta17 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _exp_ty, _c);
_outProperties = tmpMeta17;
_fold_id = omc_Util_getTempVariableIndex(threadData);
_res_id = omc_Util_getTempVariableIndex(threadData);
_fold_env = omc_Static_makeReductionFoldExp(threadData, _env, _fn, _exp_ty, _res_ty, _fold_id, _res_id ,&_afold_exp);
_outCache = omc_Static_elabExpOptAndMatchType(threadData, _outCache, _fold_env, _afold_exp, _res_ty, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_fold_exp ,NULL);
tmpMeta18 = mmc_mk_box8(3, &DAE_ReductionInfo_REDUCTIONINFO__desc, _fn, _inIterType, _exp_ty, _v, _fold_id, _res_id, _fold_exp);
tmpMeta19 = mmc_mk_box4(30, &DAE_Exp_REDUCTION__desc, tmpMeta18, _exp, _reduction_iters);
_outExp = tmpMeta19;
goto tmp2_done;
}
case 1: {
modelica_boolean tmp20;
if((listLength(_inIterators) > ((modelica_integer) 1)))
{
omc_Error_addSourceMessage(threadData, _OMC_LIT204, _OMC_LIT790, _inInfo);
}
else
{
tmp20 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp20) goto goto_1;
omc_Debug_traceln(threadData, _OMC_LIT788);
}
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
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabCallReduction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inReductionFn, modelica_metatype _inReductionExp, modelica_metatype _inIterType, modelica_metatype _inIterators, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabCallReduction(threadData, _inCache, _inEnv, _inReductionFn, _inReductionExp, _inIterType, _inIterators, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Static_matrixConstrMaxDim(threadData_t *threadData, modelica_metatype _inTypes)
{
modelica_integer _outMaxDim;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outMaxDim = ((modelica_integer) 2);
{
modelica_metatype _ty;
for (tmpMeta1 = _inTypes; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
{
_ty = MMC_CAR(tmpMeta1);
_outMaxDim = modelica_integer_max((modelica_integer)(omc_Types_numberOfDimensions(threadData, _ty)),(modelica_integer)(_outMaxDim));
}
}
_return: OMC_LABEL_UNUSED
return _outMaxDim;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_matrixConstrMaxDim(threadData_t *threadData, modelica_metatype _inTypes)
{
modelica_integer _outMaxDim;
modelica_metatype out_outMaxDim;
_outMaxDim = omc_Static_matrixConstrMaxDim(threadData, _inTypes);
out_outMaxDim = mmc_mk_icon(_outMaxDim);
return out_outMaxDim;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabMatrixToMatrixExp(threadData_t *threadData, modelica_metatype _inExp)
{
modelica_metatype _outExp = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_metatype _mexpl = NULL;
modelica_metatype _a = NULL;
modelica_integer _d1;
modelica_metatype _expl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_boolean tmp13;
modelica_metatype tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,16,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), 3));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_CAR(tmpMeta9);
tmpMeta11 = MMC_CDR(tmpMeta9);
if (!listEmpty(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_a = tmpMeta6;
_expl = tmpMeta12;
_mexpl = omc_List_map(threadData, _expl, boxvar_Expression_arrayContent);
_d1 = listLength(_mexpl);
tmp13 = omc_Expression_typeBuiltin(threadData, omc_Expression_unliftArray(threadData, omc_Expression_unliftArray(threadData, _a)));
if (1 != tmp13) goto goto_2;
tmpMeta14 = mmc_mk_box4(20, &DAE_Exp_MATRIX__desc, _a, mmc_mk_integer(_d1), _mexpl);
tmpMeta1 = tmpMeta14;
goto tmp3_done;
}
case 1: {
tmpMeta1 = _inExp;
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:;
}
}
_outExp = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fromEquationToAlgAssignment(threadData_t *threadData, modelica_metatype _eq, modelica_metatype _comment, modelica_metatype _info)
{
modelica_metatype _algStatement = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _eq;
{
modelica_string _str = NULL;
modelica_string _strLeft = NULL;
modelica_string _strRight = NULL;
modelica_metatype _left = NULL;
modelica_metatype _right = NULL;
modelica_metatype _e = NULL;
modelica_metatype _algItem = NULL;
modelica_metatype _algItem1 = NULL;
modelica_metatype _algItem2 = NULL;
modelica_metatype _eq2 = NULL;
modelica_metatype _comment2 = NULL;
modelica_metatype _info2 = NULL;
modelica_metatype _res = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _fargs = NULL;
modelica_metatype _algs = NULL;
modelica_metatype _algTrueItems = NULL;
modelica_metatype _algElseItems = NULL;
modelica_metatype _algBranches = NULL;
modelica_metatype _eqTrueItems = NULL;
modelica_metatype _eqElseItems = NULL;
modelica_metatype _eqBranches = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 10; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,2) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
if (!listEmpty(tmpMeta9)) goto tmp3_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,2) == 0) goto tmp3_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
if (!listEmpty(tmpMeta13)) goto tmp3_end;
_strLeft = tmpMeta8;
_strRight = tmpMeta12;
tmp14 = (stringEqual(_strLeft, _strRight));
if (1 != tmp14) goto goto_2;
tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta15;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta16;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_integer tmp20;
modelica_boolean tmp21;
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,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));
_left = tmpMeta16;
_right = tmpMeta17;
tmpMeta18 = omc_AbsynUtil_stripCommentExpressions(threadData, _right);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,4,1) == 0) goto goto_2;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
tmp20 = mmc_unbox_integer(tmpMeta19);
if (1 != tmp20) goto goto_2;
tmp21 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta23 = _left;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta23,2,1) == 0) goto goto_22;
tmp21 = 1;
goto goto_22;
goto_22:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp21) {goto goto_2;}
tmpMeta24 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, _OMC_LIT794, _comment, _info);
_algItem1 = tmpMeta24;
tmpMeta25 = mmc_mk_box3(11, &Absyn_Exp_LUNARY__desc, _OMC_LIT795, _left);
tmpMeta26 = mmc_mk_cons(_algItem1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta27 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta28 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta29 = mmc_mk_box5(4, &Absyn_Algorithm_ALG__IF__desc, tmpMeta25, tmpMeta26, tmpMeta27, tmpMeta28);
tmpMeta30 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, tmpMeta29, _comment, _info);
_algItem2 = tmpMeta30;
tmpMeta31 = mmc_mk_cons(_algItem2, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta31;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta32;
modelica_metatype tmpMeta33;
modelica_metatype tmpMeta34;
modelica_integer tmp35;
modelica_boolean tmp36;
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,1,2) == 0) goto tmp3_end;
tmpMeta32 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta33 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta33,4,1) == 0) goto tmp3_end;
tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta33), 2));
tmp35 = mmc_unbox_integer(tmpMeta34);
if (0 != tmp35) goto tmp3_end;
_left = tmpMeta32;
tmp4 += 3;
tmp36 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmpMeta38 = _left;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta38,2,1) == 0) goto goto_37;
tmp36 = 1;
goto goto_37;
goto_37:;
MMC_CATCH_INTERNAL(mmc_jumper)
if (tmp36) {goto goto_2;}
tmpMeta39 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, _OMC_LIT794, _comment, _info);
_algItem1 = tmpMeta39;
tmpMeta40 = mmc_mk_cons(_algItem1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta41 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta42 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta43 = mmc_mk_box5(4, &Absyn_Algorithm_ALG__IF__desc, _left, tmpMeta40, tmpMeta41, tmpMeta42);
tmpMeta44 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, tmpMeta43, _comment, _info);
_algItem2 = tmpMeta44;
tmpMeta45 = mmc_mk_cons(_algItem2, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta45;
goto tmp3_done;
}
case 3: {
modelica_metatype tmpMeta46;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmp4 += 5;
goto goto_2;
tmpMeta46 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta1 = tmpMeta46;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta47;
modelica_metatype tmpMeta48;
modelica_metatype tmpMeta49;
modelica_metatype tmpMeta50;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta47 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta47,2,2) == 0) goto tmp3_end;
tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta47), 2));
if (4 != MMC_STRLEN(tmpMeta48) || strcmp(MMC_STRINGDATA(_OMC_LIT791), MMC_STRINGDATA(tmpMeta48)) != 0) goto tmp3_end;
tmpMeta49 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, _OMC_LIT794, _comment, _info);
_algItem = tmpMeta49;
tmpMeta50 = mmc_mk_cons(_algItem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta50;
goto tmp3_done;
}
case 5: {
modelica_metatype tmpMeta51;
modelica_metatype tmpMeta52;
modelica_metatype tmpMeta53;
modelica_metatype tmpMeta54;
modelica_metatype tmpMeta55;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta51 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cref = tmpMeta51;
_fargs = tmpMeta52;
tmp4 += 3;
tmpMeta53 = mmc_mk_box3(9, &Absyn_Algorithm_ALG__NORETCALL__desc, _cref, _fargs);
tmpMeta54 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, tmpMeta53, _comment, _info);
_algItem = tmpMeta54;
tmpMeta55 = mmc_mk_cons(_algItem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta55;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta56;
modelica_metatype tmpMeta57;
modelica_metatype tmpMeta58;
modelica_metatype tmpMeta59;
modelica_metatype tmpMeta60;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta57 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_left = tmpMeta56;
_right = tmpMeta57;
tmp4 += 2;
tmpMeta58 = mmc_mk_box3(3, &Absyn_Algorithm_ALG__ASSIGN__desc, _left, _right);
tmpMeta59 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, tmpMeta58, _comment, _info);
_algItem = tmpMeta59;
tmpMeta60 = mmc_mk_cons(_algItem, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta60;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta61;
modelica_metatype tmpMeta62;
modelica_metatype tmpMeta63;
modelica_metatype tmpMeta64;
modelica_metatype tmpMeta65;
modelica_metatype tmpMeta66;
modelica_metatype tmpMeta67;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,7,1) == 0) goto tmp3_end;
tmpMeta61 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta61,0,3) == 0) goto tmp3_end;
tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 2));
tmpMeta63 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 3));
tmpMeta64 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta61), 4));
_eq2 = tmpMeta62;
_comment2 = tmpMeta63;
_info2 = tmpMeta64;
tmp4 += 1;
_algs = omc_Static_fromEquationToAlgAssignment(threadData, _eq2, _comment2, _info2);
tmpMeta65 = mmc_mk_box2(12, &Absyn_Algorithm_ALG__FAILURE__desc, _algs);
tmpMeta66 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, tmpMeta65, _comment, _info);
_res = tmpMeta66;
tmpMeta67 = mmc_mk_cons(_res, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta67;
goto tmp3_done;
}
case 8: {
modelica_metatype tmpMeta68;
modelica_metatype tmpMeta69;
modelica_metatype tmpMeta70;
modelica_metatype tmpMeta71;
modelica_metatype tmpMeta72;
modelica_metatype tmpMeta73;
modelica_metatype tmpMeta74;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,4) == 0) goto tmp3_end;
tmpMeta68 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta69 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta70 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta71 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_e = tmpMeta68;
_eqTrueItems = tmpMeta69;
_eqBranches = tmpMeta70;
_eqElseItems = tmpMeta71;
_algTrueItems = omc_Static_fromEquationsToAlgAssignmentsWork(threadData, _eqTrueItems);
_algElseItems = omc_Static_fromEquationsToAlgAssignmentsWork(threadData, _eqElseItems);
_algBranches = omc_Static_fromEquationBranchesToAlgBranches(threadData, _eqBranches);
tmpMeta72 = mmc_mk_box5(4, &Absyn_Algorithm_ALG__IF__desc, _e, _algTrueItems, _algBranches, _algElseItems);
tmpMeta73 = mmc_mk_box4(3, &Absyn_AlgorithmItem_ALGORITHMITEM__desc, tmpMeta72, _comment, _info);
_res = tmpMeta73;
tmpMeta74 = mmc_mk_cons(_res, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta1 = tmpMeta74;
goto tmp3_done;
}
case 9: {
modelica_metatype tmpMeta75;
_str = omc_Dump_equationName(threadData, _eq);
tmpMeta75 = mmc_mk_cons(_str, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT798, tmpMeta75, _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 < 10) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_algStatement = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _algStatement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fromEquationBranchesToAlgBranches(threadData_t *threadData, modelica_metatype _eqsIn)
{
modelica_metatype _algsOut = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _e = NULL;
modelica_metatype _eqs = NULL;
modelica_metatype _algs = NULL;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_algsOut = tmpMeta1;
{
modelica_metatype _branch;
for (tmpMeta2 = _eqsIn; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_branch = MMC_CAR(tmpMeta2);
tmpMeta3 = _branch;
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 1));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
_e = tmpMeta4;
_eqs = tmpMeta5;
_algs = omc_Static_fromEquationsToAlgAssignmentsWork(threadData, _eqs);
tmpMeta7 = mmc_mk_box2(0, _e, _algs);
tmpMeta6 = mmc_mk_cons(tmpMeta7, _algsOut);
_algsOut = tmpMeta6;
}
}
_algsOut = listReverse(_algsOut);
_return: OMC_LABEL_UNUSED
return _algsOut;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_fromEquationsToAlgAssignmentsWork(threadData_t *threadData, modelica_metatype _eqsIn)
{
modelica_metatype _algsOut = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta10;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_algsOut = tmpMeta1;
{
modelica_metatype _ei;
for (tmpMeta2 = _eqsIn; !listEmpty(tmpMeta2); tmpMeta2=MMC_CDR(tmpMeta2))
{
_ei = MMC_CAR(tmpMeta2);
{
modelica_metatype tmp5_1;
tmp5_1 = _ei;
{
modelica_metatype _eq = NULL;
modelica_metatype _comment = NULL;
modelica_metatype _info = NULL;
modelica_metatype _algs = NULL;
volatile mmc_switch_type tmp5;
int tmp6;
tmp5 = 0;
for (; tmp5 < 2; tmp5++) {
switch (MMC_SWITCH_CAST(tmp5)) {
case 0: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp5_1,0,3) == 0) goto tmp4_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp5_1), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp5_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp5_1), 4));
_eq = tmpMeta7;
_comment = tmpMeta8;
_info = tmpMeta9;
_algs = omc_Static_fromEquationToAlgAssignment(threadData, _eq, _comment, _info);
_algsOut = listAppend(_algs, _algsOut);
goto tmp4_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp5_1,1,1) == 0) goto tmp4_end;
goto tmp4_done;
}
}
goto tmp4_end;
tmp4_end: ;
}
goto goto_3;
goto_3:;
MMC_THROW_INTERNAL();
goto tmp4_done;
tmp4_done:;
}
}
;
}
}
_algsOut = listReverse(_algsOut);
_return: OMC_LABEL_UNUSED
return _algsOut;
}
DLLExport
modelica_metatype omc_Static_fromEquationsToAlgAssignments(threadData_t *threadData, modelica_metatype _cp)
{
modelica_metatype _algsOut = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _cp;
{
modelica_metatype _rest = NULL;
modelica_metatype _alg = NULL;
modelica_string _str = NULL;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 8: {
modelica_metatype tmpMeta5;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,1) == 0) goto tmp3_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_alg = tmpMeta5;
tmpMeta1 = _alg;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_rest = tmpMeta6;
tmpMeta1 = omc_Static_fromEquationsToAlgAssignmentsWork(threadData, _rest);
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
modelica_metatype tmpMeta7;
_str = omc_Dump_unparseClassPart(threadData, _cp);
tmpMeta7 = stringAppend(_OMC_LIT799,_str);
omc_Error_addInternalError(threadData, tmpMeta7, _OMC_LIT800);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_algsOut = tmpMeta1;
_return: OMC_LABEL_UNUSED
return _algsOut;
}
DLLExport
modelica_metatype omc_Static_elabListExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpList, modelica_metatype _inProp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExpList;
{
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _types = NULL;
modelica_metatype _c = NULL;
modelica_metatype _ty = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _OMC_LIT801;
tmpMeta[0+2] = _inProp;
goto tmp3_done;
}
case 1: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
tmpMeta6 = _inProp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,2) == 0) goto goto_2;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,17,1) == 0) goto goto_2;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_c = tmpMeta8;
_outCache = omc_Static_elabExpList(threadData, _inCache, _inEnv, _inExpList, _inImplicit, _inDoVect, _inPrefix, _inInfo, _OMC_LIT42 ,&_expl ,&_props);
{
modelica_metatype __omcQ_24tmpVar101;
modelica_metatype* tmp10;
modelica_metatype tmpMeta11;
modelica_metatype __omcQ_24tmpVar100;
modelica_integer tmp12;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
_p_loopVar = _props;
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar101 = tmpMeta11;
tmp10 = &__omcQ_24tmpVar101;
while(1) {
tmp12 = 1;
if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp12--;
}
if (tmp12 == 0) {
__omcQ_24tmpVar100 = omc_Types_getPropType(threadData, _p);
*tmp10 = mmc_mk_cons(__omcQ_24tmpVar100,0);
tmp10 = &MMC_CDR(*tmp10);
} else if (tmp12 == 1) {
break;
} else {
goto goto_2;
}
}
*tmp10 = mmc_mk_nil();
tmpMeta9 = __omcQ_24tmpVar101;
}
_types = tmpMeta9;
_expl = omc_Types_listMatchSuperType(threadData, _expl, _types, 1 ,&_ty);
tmpMeta13 = mmc_mk_box2(20, &DAE_Type_T__METALIST__desc, _ty);
tmpMeta14 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta13, _c);
_outProperties = tmpMeta14;
tmpMeta15 = mmc_mk_box2(31, &DAE_Exp_LIST__desc, _expl);
tmpMeta[0+0] = _outCache;
tmpMeta[0+1] = tmpMeta15;
tmpMeta[0+2] = _outProperties;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp16;
tmp16 = omc_Flags_isSet(threadData, _OMC_LIT35);
if (1 != tmp16) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT802);
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabListExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpList, modelica_metatype _inProp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabListExp(threadData, _inCache, _inEnv, _inExpList, _inProp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabExpCrefNoEvalList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties, modelica_metatype *out_outAttributes)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _outAttributes = NULL;
modelica_metatype tmpMeta3;
modelica_integer _num_err;
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _props = NULL;
modelica_metatype tmpMeta4;
modelica_metatype _attr = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_boolean tmp23;
modelica_metatype tmpMeta24;
modelica_metatype tmpMeta25;
modelica_metatype tmpMeta26;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outProperties = tmpMeta2;
tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
_outAttributes = tmpMeta3;
_num_err = omc_Error_getNumErrorMessages(threadData);
tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
_props = tmpMeta4;
{
modelica_metatype _e;
for (tmpMeta5 = _inExpl; !listEmpty(tmpMeta5); tmpMeta5=MMC_CDR(tmpMeta5))
{
_e = MMC_CAR(tmpMeta5);
{
{
volatile mmc_switch_type tmp8;
int tmp9;
tmp8 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp7_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp8 < 2; tmp8++) {
switch (MMC_SWITCH_CAST(tmp8)) {
case 0: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta10 = _e;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,1) == 0) goto goto_6;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
_cr = tmpMeta11;
_outCache = omc_Static_elabCrefNoEval(threadData, _outCache, _inEnv, _cr, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_exp ,&_prop ,&_attr);
tmpMeta12 = mmc_mk_cons(_exp, _outExpl);
_outExpl = tmpMeta12;
tmpMeta13 = mmc_mk_cons(_attr, _outAttributes);
_outAttributes = tmpMeta13;
tmpMeta14 = mmc_mk_cons(_prop, _props);
_props = tmpMeta14;
goto tmp7_done;
}
case 1: {
modelica_boolean tmp15;
modelica_metatype tmpMeta16;
tmp15 = (_num_err == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp15) goto goto_6;
tmpMeta16 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _e), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT805, tmpMeta16, _inInfo);
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
tmp7_done:
(void)tmp8;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp7_done2;
goto_6:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp8 < 2) {
goto tmp7_top;
}
MMC_THROW_INTERNAL();
tmp7_done2:;
}
}
;
}
}
if((!omc_Flags_getConfigBool(threadData, _OMC_LIT809)))
{
{
modelica_metatype _p;
for (tmpMeta18 = _props; !listEmpty(tmpMeta18); tmpMeta18=MMC_CDR(tmpMeta18))
{
_p = MMC_CAR(tmpMeta18);
tmpMeta19 = _p;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 3));
_ty = tmpMeta20;
_c = tmpMeta21;
tmp23 = (modelica_boolean)omc_Types_isParameter(threadData, _c);
if(tmp23)
{
tmpMeta22 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT52);
tmpMeta24 = tmpMeta22;
}
else
{
tmpMeta24 = _p;
}
_p = tmpMeta24;
tmpMeta25 = mmc_mk_cons(_p, _outProperties);
_outProperties = tmpMeta25;
}
}
}
else
{
_outProperties = listReverse(_props);
}
_outExpl = listReverse(_outExpl);
_outAttributes = listReverse(_outAttributes);
_return: OMC_LABEL_UNUSED
if (out_outExpl) { *out_outExpl = _outExpl; }
if (out_outProperties) { *out_outProperties = _outProperties; }
if (out_outAttributes) { *out_outAttributes = _outAttributes; }
return _outCache;
}
modelica_metatype boxptr_Static_elabExpCrefNoEvalList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties, modelica_metatype *out_outAttributes)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExpCrefNoEvalList(threadData, _inCache, _inEnv, _inExpl, tmp1, tmp2, _inPrefix, _inInfo, out_outExpl, out_outProperties, out_outAttributes);
return _outCache;
}
DLLExport
void omc_Static_checkAssignmentToInputs(threadData_t *threadData, modelica_metatype _inExpCrefs, modelica_metatype _inAttributes, modelica_metatype _inEnv, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if(omc_FGraph_inFunctionScope(threadData, _inEnv))
{
omc_List_threadMap1__0(threadData, _inExpCrefs, _inAttributes, boxvar_Static_checkAssignmentToInput2, _inInfo);
}
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC void omc_Static_checkAssignmentToInput2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inAttributes, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _inExp;
tmp3_2 = _inAttributes;
{
modelica_metatype _cr = NULL;
modelica_string _cr_str = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,2,1) == 0) goto tmp2_end;
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_2), 5));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,0) == 0) goto tmp2_end;
_cr = tmpMeta5;
_cr_str = omc_Dump_printComponentRefStr(threadData, _cr);
tmpMeta7 = mmc_mk_cons(_OMC_LIT813, mmc_mk_cons(_cr_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT812, tmpMeta7, _inInfo);
goto goto_1;
goto tmp2_done;
}
case 1: {
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
DLLExport
void omc_Static_checkAssignmentToInput(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inAttributes, modelica_metatype _inEnv, modelica_boolean _inAllowTopLevelInputs, modelica_metatype _inInfo)
{
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
if((((!_inAllowTopLevelInputs) && omc_FGraph_inFunctionScope(threadData, _inEnv)) && (!omc_Config_acceptParModelicaGrammar(threadData))))
{
omc_Static_checkAssignmentToInput2(threadData, _inExp, _inAttributes, _inInfo);
}
_return: OMC_LABEL_UNUSED
return;
}
void boxptr_Static_checkAssignmentToInput(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inAttributes, modelica_metatype _inEnv, modelica_metatype _inAllowTopLevelInputs, modelica_metatype _inInfo)
{
modelica_integer tmp1;
tmp1 = mmc_unbox_integer(_inAllowTopLevelInputs);
omc_Static_checkAssignmentToInput(threadData, _inExp, _inAttributes, _inEnv, tmp1, _inInfo);
return;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExpInExpression2(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype *out_outProperties)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inProperties;
{
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,14,2) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
if (listEmpty(tmpMeta7)) goto tmp3_end;
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,1,1) == 0) goto tmp3_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
if (listEmpty(tmpMeta11)) goto tmp3_end;
tmpMeta12 = MMC_CAR(tmpMeta11);
tmpMeta13 = MMC_CDR(tmpMeta11);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,1) == 0) goto tmp3_end;
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
_ty = tmpMeta8;
_c = tmpMeta14;
tmpMeta15 = mmc_mk_box4(25, &DAE_Exp_TSUB__desc, _inExp, mmc_mk_integer(((modelica_integer) 1)), _ty);
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
tmpMeta[0+0] = tmpMeta15;
tmpMeta[0+1] = tmpMeta16;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inProperties;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExp;
}
DLLExport
modelica_metatype omc_Static_elabExpInExpression(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _performVectorization, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _inExp, _inImplicit, _performVectorization, _inPrefix, _info ,&_outExp ,&_outProperties);
_outExp = omc_Static_elabExpInExpression2(threadData, _outExp, _outProperties ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabExpInExpression(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _performVectorization, modelica_metatype _inPrefix, modelica_metatype _info, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_performVectorization);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _info, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__List(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _es = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _types = NULL;
modelica_metatype _consts = NULL;
modelica_metatype _c = NULL;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,22,1) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_es = tmpMeta2;
if(listEmpty(_es))
{
_outExp = _OMC_LIT801;
_outProperties = _OMC_LIT815;
}
else
{
_outCache = omc_Static_elabExpList(threadData, _inCache, _inEnv, _es, _inImplicit, _inDoVect, _inPrefix, _inInfo, _OMC_LIT42 ,&_expl ,&_props);
{
modelica_metatype __omcQ_24tmpVar103;
modelica_metatype* tmp4;
modelica_metatype tmpMeta5;
modelica_metatype __omcQ_24tmpVar102;
modelica_integer tmp6;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
_p_loopVar = _props;
tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar103 = tmpMeta5;
tmp4 = &__omcQ_24tmpVar103;
while(1) {
tmp6 = 1;
if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp6--;
}
if (tmp6 == 0) {
__omcQ_24tmpVar102 = omc_Types_getPropType(threadData, _p);
*tmp4 = mmc_mk_cons(__omcQ_24tmpVar102,0);
tmp4 = &MMC_CDR(*tmp4);
} else if (tmp6 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp4 = mmc_mk_nil();
tmpMeta3 = __omcQ_24tmpVar103;
}
_types = tmpMeta3;
_consts = omc_Types_getConstList(threadData, _props);
_c = omc_List_fold(threadData, _consts, boxvar_Types_constAnd, _OMC_LIT60);
_ty = omc_Types_boxIfUnboxedType(threadData, omc_List_reduce(threadData, _types, boxvar_Types_superType));
_expl = omc_Types_matchTypes(threadData, _expl, _types, _ty, 1, NULL);
tmpMeta7 = mmc_mk_box2(31, &DAE_Exp_LIST__desc, _expl);
_outExp = tmpMeta7;
tmpMeta8 = mmc_mk_box2(20, &DAE_Type_T__METALIST__desc, _ty);
tmpMeta9 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, tmpMeta8, _c);
_outProperties = tmpMeta9;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__List(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__List(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Cons(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ty1 = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _c1 = NULL;
modelica_metatype _c2 = NULL;
modelica_string _exp_str = NULL;
modelica_string _ty1_str = NULL;
modelica_string _ty2_str = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,20,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_e1 = tmpMeta2;
_e2 = tmpMeta3;
tmpMeta4 = mmc_mk_cons(_e1, mmc_mk_cons(_e2, MMC_REFSTRUCTLIT(mmc_nil)));
tmpMeta5 = omc_MetaUtil_transformArrayNodesToListNodes(threadData, tmpMeta4);
if (listEmpty(tmpMeta5)) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_CAR(tmpMeta5);
tmpMeta7 = MMC_CDR(tmpMeta5);
if (listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) MMC_THROW_INTERNAL();
_e1 = tmpMeta6;
_e2 = tmpMeta8;
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _e1, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_exp1 ,&_prop1);
tmpMeta15 = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _e2, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta10, &tmpMeta11);
_outCache = tmpMeta15;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,17,1) == 0) MMC_THROW_INTERNAL();
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_exp2 = tmpMeta10;
_ty2 = tmpMeta13;
_c2 = tmpMeta14;
{
{
volatile mmc_switch_type tmp18;
int tmp19;
tmp18 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp17_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp18 < 2; tmp18++) {
switch (MMC_SWITCH_CAST(tmp18)) {
case 0: {
modelica_metatype tmpMeta20;
modelica_metatype tmpMeta21;
modelica_metatype tmpMeta22;
modelica_metatype tmpMeta23;
_ty1 = omc_Types_getUniontypeIfMetarecordReplaceAllSubtypes(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2 = omc_Types_getUniontypeIfMetarecordReplaceAllSubtypes(threadData, _ty2);
_c1 = omc_Types_propAllConst(threadData, _prop1);
_ty = omc_Types_getUniontypeIfMetarecordReplaceAllSubtypes(threadData, omc_Types_superType(threadData, omc_Types_boxIfUnboxedType(threadData, _ty1), omc_Types_boxIfUnboxedType(threadData, _ty2)));
_exp1 = omc_Types_matchType(threadData, _exp1, _ty1, _ty, 1, NULL);
tmpMeta20 = mmc_mk_box2(20, &DAE_Type_T__METALIST__desc, _ty);
_ty = tmpMeta20;
tmpMeta21 = mmc_mk_box2(20, &DAE_Type_T__METALIST__desc, _ty2);
_exp2 = omc_Types_matchType(threadData, _exp2, _ty, tmpMeta21, 1, NULL);
tmpMeta22 = mmc_mk_box3(32, &DAE_Exp_CONS__desc, _exp1, _exp2);
_outExp = tmpMeta22;
tmpMeta23 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, omc_Types_constAnd(threadData, _c1, _c2));
_outProperties = tmpMeta23;
goto tmp17_done;
}
case 1: {
modelica_metatype tmpMeta24;
_exp_str = omc_Dump_printExpStr(threadData, _inExp);
_ty1_str = omc_Types_unparseType(threadData, omc_Types_getPropType(threadData, _prop1));
_ty2_str = omc_Types_unparseType(threadData, _ty2);
tmpMeta24 = mmc_mk_cons(_exp_str, mmc_mk_cons(_ty1_str, mmc_mk_cons(_ty2_str, MMC_REFSTRUCTLIT(mmc_nil))));
omc_Error_addSourceMessage(threadData, _OMC_LIT818, tmpMeta24, _inInfo);
goto goto_16;
goto tmp17_done;
}
}
goto tmp17_end;
tmp17_end: ;
}
goto goto_16;
tmp17_done:
(void)tmp18;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp17_done2;
goto_16:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp18 < 2) {
goto tmp17_top;
}
MMC_THROW_INTERNAL();
tmp17_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Cons(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Cons(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Code(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ty2 = NULL;
modelica_metatype _cn = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,18,1) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_cn = tmpMeta2;
_ty = omc_Static_elabCodeType(threadData, _cn);
_ty2 = omc_Types_simplifyType(threadData, _ty);
tmpMeta3 = mmc_mk_box3(28, &DAE_Exp_CODE__desc, _cn, _ty2);
_outExp = tmpMeta3;
tmpMeta4 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT60);
_outProperties = tmpMeta4;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Code(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Code(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Matrix__realCast(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inProperties, modelica_metatype *out_outProperties)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ty = NULL;
modelica_metatype tmpMeta1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_ty = omc_Types_getPropType(threadData, _inProperties);
if(omc_Types_isInteger(threadData, _ty))
{
_ty = omc_Types_setArrayElementType(threadData, _ty, _OMC_LIT131);
_outProperties = omc_Types_setPropType(threadData, _inProperties, _ty);
_ty = omc_Types_simplifyType(threadData, _ty);
tmpMeta1 = mmc_mk_box3(23, &DAE_Exp_CAST__desc, _ty, _inExp);
_outExp = omc_ExpressionSimplify_simplify1(threadData, tmpMeta1, NULL);
}
else
{
_outExp = _inExp;
_outProperties = _inProperties;
}
_return: OMC_LABEL_UNUSED
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Matrix(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _ess = NULL;
modelica_metatype _dess = NULL;
modelica_metatype _dess2 = NULL;
modelica_metatype _props = NULL;
modelica_metatype _tps = NULL;
modelica_metatype _tys = NULL;
modelica_metatype _tys2 = NULL;
modelica_integer _nmax;
modelica_boolean _have_real;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _dim1 = NULL;
modelica_metatype _dim2 = NULL;
modelica_metatype _expl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,14,1) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_ess = tmpMeta2;
_outCache = omc_Static_elabExpListList(threadData, _inCache, _inEnv, _ess, _inImplicit, _inDoVect, _inPrefix, _inInfo, _OMC_LIT42 ,&_dess ,&_props);
{
modelica_metatype __omcQ_24tmpVar107;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype __omcQ_24tmpVar106;
modelica_integer tmp9;
modelica_metatype _pl_loopVar = 0;
modelica_metatype _pl;
_pl_loopVar = _props;
tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar107 = tmpMeta4;
while(1) {
tmp9 = 1;
if (!listEmpty(_pl_loopVar)) {
_pl = MMC_CAR(_pl_loopVar);
_pl_loopVar = MMC_CDR(_pl_loopVar);
tmp9--;
}
if (tmp9 == 0) {
{
modelica_metatype __omcQ_24tmpVar105;
modelica_metatype* tmp6;
modelica_metatype tmpMeta7;
modelica_metatype __omcQ_24tmpVar104;
modelica_integer tmp8;
modelica_metatype _p_loopVar = 0;
modelica_metatype _p;
_p_loopVar = _pl;
tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
__omcQ_24tmpVar105 = tmpMeta7;
tmp6 = &__omcQ_24tmpVar105;
while(1) {
tmp8 = 1;
if (!listEmpty(_p_loopVar)) {
_p = MMC_CAR(_p_loopVar);
_p_loopVar = MMC_CDR(_p_loopVar);
tmp8--;
}
if (tmp8 == 0) {
__omcQ_24tmpVar104 = omc_Types_getPropType(threadData, _p);
*tmp6 = mmc_mk_cons(__omcQ_24tmpVar104,0);
tmp6 = &MMC_CDR(*tmp6);
} else if (tmp8 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
*tmp6 = mmc_mk_nil();
tmpMeta5 = __omcQ_24tmpVar105;
}
__omcQ_24tmpVar106 = tmpMeta5;
__omcQ_24tmpVar107 = listAppend(__omcQ_24tmpVar106, __omcQ_24tmpVar107);
} else if (tmp9 == 1) {
break;
} else {
MMC_THROW_INTERNAL();
}
}
tmpMeta3 = __omcQ_24tmpVar107;
}
_tys = tmpMeta3;
_nmax = omc_Static_matrixConstrMaxDim(threadData, _tys);
_have_real = omc_Types_containReal(threadData, _tys);
if(_have_real)
{
_dess = omc_List_threadMapList__2(threadData, _dess, _props, boxvar_Static_elabExp__Matrix__realCast ,&_props);
}
tmpMeta16 = omc_Static_elabMatrixSemi(threadData, _outCache, _inEnv, _dess, _props, _inImplicit, _have_real, _nmax, _inDoVect, _inPrefix, _inInfo, &tmpMeta10, &tmpMeta11, &tmpMeta14, &tmpMeta15);
_outCache = tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_outExp = tmpMeta10;
_ty = tmpMeta12;
_c = tmpMeta13;
_dim1 = tmpMeta14;
_dim2 = tmpMeta15;
_outExp = omc_Static_elabMatrixToMatrixExp(threadData, _outExp);
_ty = omc_Types_unliftArray(threadData, omc_Types_unliftArray(threadData, _ty));
tmpMeta17 = mmc_mk_cons(_dim2, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta18 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta17);
_ty = tmpMeta18;
tmpMeta19 = mmc_mk_cons(_dim1, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta20 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta19);
_ty = tmpMeta20;
tmpMeta21 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta21;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Matrix(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Matrix(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Array(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _es = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _arr_ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,1) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (!listEmpty(tmpMeta6)) goto tmp3_end;
if (!omc_Config_acceptMetaModelicaGrammar(threadData)) goto tmp3_end;
tmpMeta[0+0] = _OMC_LIT801;
tmpMeta[0+1] = _OMC_LIT815;
goto tmp3_done;
}
case 1: {
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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,1) == 0) goto tmp3_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_es = tmpMeta7;
_outCache = omc_Static_elabExpList(threadData, _inCache, _inEnv, _es, _inImplicit, _inDoVect, _inPrefix, _inInfo, _OMC_LIT42 ,&_expl ,&_props);
tmpMeta11 = omc_Static_elabArray(threadData, _expl, _props, _inPrefix, _inInfo, &tmpMeta8);
_expl = tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) goto goto_2;
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
_ty = tmpMeta9;
_c = tmpMeta10;
tmpMeta13 = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(listLength(_expl)));
tmpMeta12 = mmc_mk_cons(tmpMeta13, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta14 = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta12);
_arr_ty = tmpMeta14;
tmpMeta15 = mmc_mk_box4(19, &DAE_Exp_ARRAY__desc, omc_Types_simplifyType(threadData, _arr_ty), mmc_mk_boolean((!omc_Types_isArray(threadData, _ty))), _expl);
_exp = tmpMeta15;
omc_InstMeta_checkArrayType(threadData, _ty);
_exp = omc_Static_elabMatrixToMatrixExp(threadData, _exp);
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _arr_ty, _c);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = tmpMeta16;
goto tmp3_done;
}
case 2: {
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,1) == 0) goto tmp3_end;
tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_es = tmpMeta17;
if (!omc_Config_acceptMetaModelicaGrammar(threadData)) goto tmp3_end;
tmpMeta18 = mmc_mk_box2(25, &Absyn_Exp_LIST__desc, _es);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, tmpMeta18, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
tmpMeta[0+0] = _outExp;
tmpMeta[0+1] = _outProperties;
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:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Array(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Array(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Range(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _start = NULL;
modelica_metatype _step = NULL;
modelica_metatype _stop = NULL;
modelica_metatype _ostep = NULL;
modelica_metatype _start_exp = NULL;
modelica_metatype _step_exp = NULL;
modelica_metatype _stop_exp = NULL;
modelica_metatype _ostep_exp = NULL;
modelica_metatype _start_ty = NULL;
modelica_metatype _step_ty = NULL;
modelica_metatype _stop_ty = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ostep_ty = NULL;
modelica_metatype _start_c = NULL;
modelica_metatype _step_c = NULL;
modelica_metatype _stop_c = NULL;
modelica_metatype _c = 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;
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;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_ostep_exp = mmc_mk_none();
_ostep_ty = mmc_mk_none();
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,15,3) == 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));
_start = tmpMeta2;
_ostep = tmpMeta3;
_stop = tmpMeta4;
tmpMeta9 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _start, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta5, &tmpMeta6);
_outCache = tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
_start_exp = tmpMeta5;
_start_ty = tmpMeta7;
_start_c = tmpMeta8;
tmpMeta14 = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _stop, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta10, &tmpMeta11);
_outCache = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 3));
_stop_exp = tmpMeta10;
_stop_ty = tmpMeta12;
_stop_c = tmpMeta13;
_c = omc_Types_constAnd(threadData, _start_c, _stop_c);
if(isSome(_ostep))
{
tmpMeta15 = _ostep;
if (optionNone(tmpMeta15)) MMC_THROW_INTERNAL();
tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 1));
_step = tmpMeta16;
tmpMeta21 = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _step, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta17, &tmpMeta18);
_outCache = tmpMeta21;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta18,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 2));
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta18), 3));
_step_exp = tmpMeta17;
_step_ty = tmpMeta19;
_step_c = tmpMeta20;
_ostep_exp = mmc_mk_some(_step_exp);
_ostep_ty = mmc_mk_some(_step_ty);
_c = omc_Types_constAnd(threadData, _c, _step_c);
}
if(omc_Types_isBoxedType(threadData, _start_ty))
{
_start_exp = omc_Types_matchType(threadData, _start_exp, _start_ty, omc_Types_unboxedType(threadData, _start_ty), 1 ,&_start_ty);
}
if(omc_Types_isBoxedType(threadData, _stop_ty))
{
_stop_exp = omc_Types_matchType(threadData, _stop_exp, _stop_ty, omc_Types_unboxedType(threadData, _stop_ty), 1 ,&_stop_ty);
}
_start_exp = omc_Static_deoverloadRange(threadData, _start_exp, _start_ty, _ostep_exp, _ostep_ty, _stop_exp, _stop_ty, _inInfo ,&_ostep_exp ,&_stop_exp ,&_ety);
_outCache = omc_Static_elabRangeType(threadData, _outCache, _inEnv, _start_exp, _ostep_exp, _stop_exp, _start_ty, _ety, _c, _inImplicit ,&_ty);
tmpMeta22 = mmc_mk_box5(21, &DAE_Exp_RANGE__desc, _ty, _start_exp, _ostep_exp, _stop_exp);
_outExp = tmpMeta22;
tmpMeta23 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _c);
_outProperties = tmpMeta23;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Range(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Range(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabExpLHS(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
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,16,1) == 0) goto tmp3_end;
tmpMeta[0+0] = omc_Static_elabExp__Tuple__LHS__RHS(threadData, _inCache, _inEnv, _inExp, _inImplicit, _inDoVect, _inPrefix, _inInfo, 1, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = omc_Static_elabExp(threadData, _inCache, _inEnv, _inExp, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta[0+1], &tmpMeta[0+2]);
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];
_outExp = tmpMeta[0+1];
_outProperties = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabExpLHS(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExpLHS(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Tuple__LHS__RHS(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_boolean _isLhs, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _el = NULL;
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _types = NULL;
modelica_metatype _consts = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,16,1) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_el = tmpMeta2;
if((listLength(_el) == ((modelica_integer) 1)))
{
_outCache = omc_Static_elabExp(threadData, _outCache, _inEnv, listGet(_el, ((modelica_integer) 1)), _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
goto _return;
}
_outCache = omc_Static_elabTuple(threadData, _outCache, _inEnv, _el, _inImplicit, _inDoVect, _inPrefix, _inInfo, _isLhs ,&_expl ,&_props);
_types = omc_Static_splitProps(threadData, _props ,&_consts);
_outExp = omc_Static_fixTupleMetaModelica(threadData, _expl, _types, _consts ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Tuple__LHS__RHS(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _isLhs, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_integer tmp3;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
tmp3 = mmc_unbox_integer(_isLhs);
_outCache = omc_Static_elabExp__Tuple__LHS__RHS(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, tmp3, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Tuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, 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 = _inCache;
_outCache = omc_Static_elabExp__Tuple__LHS__RHS(threadData, _inCache, _inEnv, _inExp, _inImplicit, _inDoVect, _inPrefix, _inInfo, 0 ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Tuple(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Tuple(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__PartEvalFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _pos_args = NULL;
modelica_metatype _named_args = NULL;
modelica_metatype _path = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _tty = NULL;
modelica_metatype _tty2 = NULL;
modelica_metatype _args = NULL;
modelica_metatype _consts = NULL;
modelica_metatype _slots = NULL;
modelica_metatype _c = 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;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,12,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 3));
_cref = tmpMeta2;
_pos_args = tmpMeta4;
_named_args = tmpMeta5;
if((listEmpty(_pos_args) && listEmpty(_named_args)))
{
tmpMeta6 = mmc_mk_box2(5, &Absyn_Exp_CREF__desc, _cref);
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, tmpMeta6, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
else
{
_path = omc_AbsynUtil_crefToPath(threadData, _cref);
tmpMeta10 = omc_Lookup_lookupFunctionsInEnv(threadData, _inCache, _inEnv, _path, _inInfo, &tmpMeta7);
_outCache = tmpMeta10;
if (listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
tmpMeta8 = MMC_CAR(tmpMeta7);
tmpMeta9 = MMC_CDR(tmpMeta7);
if (!listEmpty(tmpMeta9)) MMC_THROW_INTERNAL();
_tty = tmpMeta8;
_tty = omc_Types_makeFunctionPolymorphicReference(threadData, _tty);
tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta12 = mmc_mk_cons(_tty, MMC_REFSTRUCTLIT(mmc_nil));
_outCache = omc_Static_elabTypes(threadData, _outCache, _inEnv, _pos_args, _named_args, tmpMeta11, tmpMeta12, 1, 1, _inImplicit, _inPrefix, _inInfo ,&_args ,&_consts ,NULL ,&_tty ,NULL ,&_slots);
if((!omc_Types_isFunctionPointer(threadData, _tty)))
{
_outCache = omc_Inst_makeFullyQualified(threadData, _outCache, _inEnv, _path ,&_path);
tmpMeta14 = omc_Static_instantiateDaeFunction(threadData, _outCache, _inEnv, _path, 0, mmc_mk_none(), 1, &tmpMeta13);
_outCache = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,0,0) == 0) MMC_THROW_INTERNAL();
}
_tty2 = omc_Static_stripExtraArgsFromType(threadData, _slots, _tty);
_tty2 = omc_Types_makeFunctionPolymorphicReference(threadData, _tty2);
_ty = omc_Types_simplifyType(threadData, _tty2);
_tty = omc_Types_simplifyType(threadData, _tty);
_c = omc_List_fold(threadData, _consts, boxvar_Types_constAnd, _OMC_LIT60);
tmpMeta15 = mmc_mk_box5(18, &DAE_Exp_PARTEVALFUNCTION__desc, _path, _args, _ty, _tty);
_outExp = tmpMeta15;
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _tty2, _c);
_outProperties = tmpMeta16;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__PartEvalFunction(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__PartEvalFunction(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Comment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _exp = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,24,3) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_exp = tmpMeta2;
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _exp, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Comment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Comment(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Dot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
modelica_string _s = NULL;
modelica_metatype _ty = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_string tmp6 = 0;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,23,2) == 0) goto tmp3_end;
{
modelica_metatype tmp9_1;
tmp9_1 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 3)));
{
volatile mmc_switch_type tmp9;
int tmp10;
tmp9 = 0;
for (; tmp9 < 2; tmp9++) {
switch (MMC_SWITCH_CAST(tmp9)) {
case 0: {
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp9_1,2,1) == 0) goto tmp8_end;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp9_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,2,2) == 0) goto tmp8_end;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_s = tmpMeta12;
tmp6 = _s;
goto tmp8_done;
}
case 1: {
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
tmpMeta14 = stringAppend(_OMC_LIT820,omc_Dump_printExpStr(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 3)))));
tmpMeta13 = mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT819, tmpMeta13, _inInfo);
goto goto_7;
goto tmp8_done;
}
}
goto tmp8_end;
tmp8_end: ;
}
goto goto_7;
goto_7:;
goto goto_2;
goto tmp8_done;
tmp8_done:;
}
}
_s = tmp6;
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 2))), _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_ty = omc_Types_getPropType(threadData, _outProperties);
{
modelica_metatype tmp17_1;
tmp17_1 = _ty;
{
modelica_metatype _names = NULL;
modelica_integer _i;
volatile mmc_switch_type tmp17;
int tmp18;
tmp17 = 0;
for (; tmp17 < 2; tmp17++) {
switch (MMC_SWITCH_CAST(tmp17)) {
case 0: {
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(tmp17_1,14,2) == 0) goto tmp16_end;
tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp17_1), 3));
if (optionNone(tmpMeta19)) goto tmp16_end;
tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 1));
_names = tmpMeta20;
if((!listMember(_s, _names)))
{
tmpMeta22 = stringAppend(_OMC_LIT821,_s);
tmpMeta23 = stringAppend(tmpMeta22,_OMC_LIT822);
tmpMeta24 = stringAppend(tmpMeta23,omc_Types_unparseType(threadData, _ty));
tmpMeta21 = mmc_mk_cons(tmpMeta24, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT819, tmpMeta21, _inInfo);
goto goto_15;
}
_i = omc_List_position(threadData, _s, _names);
tmpMeta25 = mmc_mk_box4(25, &DAE_Exp_TSUB__desc, _outExp, mmc_mk_integer(_i), listGet((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2))), _i));
_outExp = tmpMeta25;
tmpMeta26 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, listGet((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_ty), 2))), _i), omc_Types_propAllConst(threadData, _outProperties));
_outProperties = tmpMeta26;
goto tmp16_done;
}
case 1: {
modelica_metatype tmpMeta27;
modelica_metatype tmpMeta28;
modelica_metatype tmpMeta29;
modelica_metatype tmpMeta30;
tmpMeta28 = stringAppend(_OMC_LIT823,omc_ExpressionDump_printExpStr(threadData, _outExp));
tmpMeta29 = stringAppend(tmpMeta28,_OMC_LIT824);
tmpMeta30 = stringAppend(tmpMeta29,omc_Types_unparseType(threadData, _ty));
tmpMeta27 = mmc_mk_cons(tmpMeta30, MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT819, tmpMeta27, _inInfo);
goto goto_15;
goto tmp16_done;
}
}
goto tmp16_end;
tmp16_end: ;
}
goto goto_15;
goto_15:;
goto goto_2;
goto tmp16_done;
tmp16_done:;
}
}
;
tmpMeta[0+0] = _outExp;
tmpMeta[0+1] = _outProperties;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Dot(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Dot(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Call(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _func_name = NULL;
modelica_metatype _args = NULL;
modelica_metatype _arg = NULL;
modelica_string _last_id = NULL;
modelica_metatype _type_vars = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,11,3) == 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));
_func_name = tmpMeta2;
_args = tmpMeta3;
_type_vars = tmpMeta4;
{
modelica_metatype tmp7_1;
tmp7_1 = _args;
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
for (; tmp7 < 2; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,0,2) == 0) goto tmp6_end;
_outCache = omc_Static_elabCall(threadData, _inCache, _inEnv, _func_name, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_args), 2))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_args), 3))), _type_vars, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_outExp = omc_ExpressionSimplify_simplify1(threadData, _outExp, NULL);
goto tmp6_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp7_1,1,3) == 0) goto tmp6_end;
_outCache = omc_Static_elabCallReduction(threadData, _inCache, _inEnv, _func_name, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_args), 2))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_args), 3))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_args), 4))), _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
goto_5:;
MMC_THROW_INTERNAL();
goto tmp6_done;
tmp6_done:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Call(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Call(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__If(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _cond_e = NULL;
modelica_metatype _true_e = NULL;
modelica_metatype _false_e = NULL;
modelica_metatype _cond_exp = NULL;
modelica_metatype _true_exp = NULL;
modelica_metatype _false_exp = NULL;
modelica_metatype _cond_prop = NULL;
modelica_metatype _true_prop = NULL;
modelica_metatype _false_prop = NULL;
modelica_metatype _cache = NULL;
modelica_boolean _b;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = omc_AbsynUtil_canonIfExp(threadData, _inExp);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,10,4) == 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));
_cond_e = tmpMeta2;
_true_e = tmpMeta3;
_false_e = tmpMeta4;
_cache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _cond_e, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_cond_exp ,&_cond_prop);
{
{
volatile mmc_switch_type tmp7;
int tmp8;
tmp7 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp6_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp7 < 3; tmp7++) {
switch (MMC_SWITCH_CAST(tmp7)) {
case 0: {
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT825);
_outCache = omc_Static_elabExpInExpression(threadData, _cache, _inEnv, _true_e, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_true_exp ,&_true_prop);
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _false_e, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_false_exp ,&_false_prop);
_outCache = omc_Static_makeIfExp(threadData, _outCache, _inEnv, _cond_exp, _cond_prop, _true_exp, _true_prop, _false_exp, _false_prop, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT825);
goto tmp6_done;
}
case 1: {
modelica_boolean tmp9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_integer tmp12;
modelica_metatype tmpMeta13;
modelica_metatype tmpMeta14;
omc_ErrorExt_setCheckpoint(threadData, _OMC_LIT826);
tmp9 = omc_Types_isParameterOrConstant(threadData, omc_Types_propAllConst(threadData, _cond_prop));
if (1 != tmp9) goto goto_5;
tmpMeta13 = mmc_mk_box2(3, &Absyn_Msg_MSG__desc, _inInfo);
tmpMeta14 = omc_Ceval_ceval(threadData, _cache, _inEnv, _cond_exp, _inImplicit, tmpMeta13, ((modelica_integer) 0), &tmpMeta10);
_outCache = tmpMeta14;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,3,1) == 0) goto goto_5;
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
tmp12 = mmc_unbox_integer(tmpMeta11);
_b = tmp12;
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, (_b?_true_e:_false_e), _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT826);
omc_ErrorExt_rollBack(threadData, _OMC_LIT825);
goto tmp6_done;
}
case 2: {
omc_ErrorExt_rollBack(threadData, _OMC_LIT826);
omc_ErrorExt_delCheckpoint(threadData, _OMC_LIT825);
goto goto_5;
goto tmp6_done;
}
}
goto tmp6_end;
tmp6_end: ;
}
goto goto_5;
tmp6_done:
(void)tmp7;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp6_done2;
goto_5:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp7 < 3) {
goto tmp6_top;
}
MMC_THROW_INTERNAL();
tmp6_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__If(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__If(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__LUnary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _op = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_op = tmpMeta2;
_e = tmpMeta3;
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _e, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_outCache = omc_OperatorOverloading_unary(threadData, _outCache, _inEnv, _op, _outProperties, _outExp, _inExp, _e, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__LUnary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__LUnary(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Unary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_metatype _op = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = 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 = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,6,2) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 3));
_op = tmpMeta2;
_e = tmpMeta3;
tmpMeta8 = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta4, &tmpMeta5);
_outCache = tmpMeta8;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 3));
_outExp = tmpMeta4;
_outProperties = tmpMeta5;
_ty = tmpMeta6;
_c = tmpMeta7;
if((!(valueEq(_op, _OMC_LIT827) && omc_Types_isIntegerOrRealOrSubTypeOfEither(threadData, omc_Types_arrayElementType(threadData, _ty)))))
{
_outCache = omc_OperatorOverloading_unary(threadData, _outCache, _inEnv, _op, _outProperties, _outExp, _inExp, _e, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Unary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Unary(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Binary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e1 = NULL;
modelica_metatype _e2 = NULL;
modelica_metatype _op = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
{
modelica_metatype tmp3_1;
tmp3_1 = _inExp;
{
int tmp3;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp3_1))) {
case 8: {
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,3) == 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), 4));
_e1 = tmpMeta4;
_op = tmpMeta5;
_e2 = tmpMeta6;
goto tmp2_done;
}
case 10: {
modelica_metatype tmpMeta7;
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,7,3) == 0) goto tmp2_end;
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
_e1 = tmpMeta7;
_op = tmpMeta8;
_e2 = tmpMeta9;
goto tmp2_done;
}
case 12: {
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,3) == 0) goto tmp2_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
_e1 = tmpMeta10;
_op = tmpMeta11;
_e2 = tmpMeta12;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_outCache = omc_Static_elabExpInExpression(threadData, _inCache, _inEnv, _e1, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_exp1 ,&_prop1);
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _e2, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_exp2 ,&_prop2);
_outCache = omc_OperatorOverloading_binary(threadData, _outCache, _inEnv, _op, _prop1, _exp1, _prop2, _exp2, _inExp, _e1, _e2, _inImplicit, _inPrefix, _inInfo ,&_outExp ,&_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Binary(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Binary(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__Cref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = 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;
modelica_metatype tmpMeta11;
modelica_boolean tmp12;
modelica_metatype tmpMeta13;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = _inExp;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
_cr = tmpMeta2;
tmpMeta7 = omc_Static_elabCref(threadData, _inCache, _inEnv, _cr, _inImplicit, _inDoVect, _inPrefix, _inInfo, &tmpMeta3);
_outCache = tmpMeta7;
if (optionNone(tmpMeta3)) MMC_THROW_INTERNAL();
tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 1));
tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 1));
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta4), 2));
_outExp = tmpMeta5;
_outProperties = tmpMeta6;
if((!omc_Flags_getConfigBool(threadData, _OMC_LIT809)))
{
tmpMeta8 = _outProperties;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,2) == 0) MMC_THROW_INTERNAL();
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 2));
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 3));
_ty = tmpMeta9;
_c = tmpMeta10;
tmp12 = (modelica_boolean)omc_Types_isParameter(threadData, _c);
if(tmp12)
{
tmpMeta11 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _ty, _OMC_LIT52);
tmpMeta13 = tmpMeta11;
}
else
{
tmpMeta13 = _outProperties;
}
_outProperties = tmpMeta13;
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__Cref(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__Cref(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExp__BuiltinType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
{
modelica_metatype tmp4_1;
tmp4_1 = _inExp;
{
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 3: {
modelica_metatype tmpMeta5;
tmpMeta5 = mmc_mk_box2(3, &DAE_Exp_ICONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 2))));
tmpMeta[0+0] = tmpMeta5;
tmpMeta[0+1] = _OMC_LIT657;
goto tmp3_done;
}
case 4: {
modelica_metatype tmpMeta6;
tmpMeta6 = mmc_mk_box2(4, &DAE_Exp_RCONST__desc, mmc_mk_real(stringReal((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 2))))));
tmpMeta[0+0] = tmpMeta6;
tmpMeta[0+1] = _OMC_LIT706;
goto tmp3_done;
}
case 6: {
modelica_metatype tmpMeta7;
tmpMeta7 = mmc_mk_box2(5, &DAE_Exp_SCONST__desc, omc_System_unescapedString(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 2)))));
tmpMeta[0+0] = tmpMeta7;
tmpMeta[0+1] = _OMC_LIT406;
goto tmp3_done;
}
case 7: {
modelica_metatype tmpMeta8;
tmpMeta8 = mmc_mk_box2(6, &DAE_Exp_BCONST__desc, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inExp), 2))));
tmpMeta[0+0] = tmpMeta8;
tmpMeta[0+1] = _OMC_LIT469;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outExp = tmpMeta[0+0];
_outProperties = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExp__BuiltinType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp__BuiltinType(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _e = NULL;
modelica_integer _num_errmsgs;
modelica_metatype _exp = NULL;
modelica_metatype _exp1 = NULL;
modelica_metatype _exp2 = NULL;
modelica_metatype _prop1 = NULL;
modelica_metatype _prop2 = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_fnptr _elabfunc;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
_e = (omc_BackendInterface_noRewriteRulesFrontEnd(threadData)?_inExp:omc_BackendInterface_rewriteFrontEnd(threadData, _inExp, NULL));
_num_errmsgs = omc_Error_getNumErrorMessages(threadData);
{
{
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_fnptr tmp5 = 0;
{
modelica_metatype tmp8_1;
tmp8_1 = _e;
{
int tmp8;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp8_1))) {
case 20: {
modelica_metatype tmpMeta9;
tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
omc_Error_addSourceMessage(threadData, _OMC_LIT830, tmpMeta9, _inInfo);
goto goto_6;
goto tmp7_done;
}
case 5: {
tmp5 = boxvar_Static_elabExp__Cref;
goto tmp7_done;
}
case 8: {
tmp5 = boxvar_Static_elabExp__Binary;
goto tmp7_done;
}
case 9: {
tmp5 = boxvar_Static_elabExp__Unary;
goto tmp7_done;
}
case 10: {
tmp5 = boxvar_Static_elabExp__Binary;
goto tmp7_done;
}
case 11: {
tmp5 = boxvar_Static_elabExp__LUnary;
goto tmp7_done;
}
case 12: {
tmp5 = boxvar_Static_elabExp__Binary;
goto tmp7_done;
}
case 13: {
tmp5 = boxvar_Static_elabExp__If;
goto tmp7_done;
}
case 14: {
tmp5 = boxvar_Static_elabExp__Call;
goto tmp7_done;
}
case 15: {
tmp5 = boxvar_Static_elabExp__PartEvalFunction;
goto tmp7_done;
}
case 19: {
tmp5 = boxvar_Static_elabExp__Tuple;
goto tmp7_done;
}
case 18: {
tmp5 = boxvar_Static_elabExp__Range;
goto tmp7_done;
}
case 16: {
tmp5 = boxvar_Static_elabExp__Array;
goto tmp7_done;
}
case 17: {
tmp5 = boxvar_Static_elabExp__Matrix;
goto tmp7_done;
}
case 21: {
tmp5 = boxvar_Static_elabExp__Code;
goto tmp7_done;
}
case 23: {
tmp5 = boxvar_Static_elabExp__Cons;
goto tmp7_done;
}
case 25: {
tmp5 = boxvar_Static_elabExp__List;
goto tmp7_done;
}
case 24: {
tmp5 = boxvar_Patternm_elabMatchExpression;
goto tmp7_done;
}
case 26: {
tmp5 = boxvar_Static_elabExp__Dot;
goto tmp7_done;
}
case 27: {
tmp5 = boxvar_Static_elabExp__Comment;
goto tmp7_done;
}
default:
tmp7_default: OMC_LABEL_UNUSED; {
tmp5 = boxvar_Static_elabExp__BuiltinType;
goto tmp7_done;
}
}
goto tmp7_end;
tmp7_end: ;
}
goto goto_6;
goto_6:;
goto goto_1;
goto tmp7_done;
tmp7_done:;
}
}
_elabfunc = (modelica_fnptr) tmp5;
_outCache = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_elabfunc), 2))) ? ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_elabfunc), 1)))) (threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_elabfunc), 2))), _inCache, _inEnv, _e, mmc_mk_boolean(_inImplicit), mmc_mk_boolean(_inDoVect), _inPrefix, _inInfo ,&_outExp ,&_outProperties) : ((modelica_metatype(*)(threadData_t*, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype, modelica_metatype)) (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_elabfunc), 1)))) (threadData, _inCache, _inEnv, _e, mmc_mk_boolean(_inImplicit), mmc_mk_boolean(_inDoVect), _inPrefix, _inInfo ,&_outExp ,&_outProperties);
goto tmp2_done;
}
case 1: {
modelica_boolean tmp10;
modelica_metatype tmpMeta11;
tmp10 = (_num_errmsgs == omc_Error_getNumErrorMessages(threadData));
if (1 != tmp10) goto goto_1;
tmpMeta11 = mmc_mk_cons(omc_Dump_printExpStr(threadData, _e), MMC_REFSTRUCTLIT(mmc_nil));
omc_Error_addSourceMessage(threadData, _OMC_LIT805, 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 < 2) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
;
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabExp(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExp(threadData, _inCache, _inEnv, _inExp, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_Static_elabExpOptAndMatchType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inDefaultType, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExp = NULL;
modelica_metatype _outProperties = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _dexp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype tmpMeta1;
modelica_metatype tmpMeta2;
modelica_metatype tmpMeta3;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _inDefaultType, _OMC_LIT60);
_outProperties = tmpMeta1;
if(isSome(_inExp))
{
tmpMeta2 = _inExp;
if (optionNone(tmpMeta2)) MMC_THROW_INTERNAL();
tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
_exp = tmpMeta3;
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _exp, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_dexp ,&_prop);
_dexp = omc_Types_matchProp(threadData, _dexp, _prop, _outProperties, 1 ,&_outProperties);
_outExp = mmc_mk_some(_dexp);
}
else
{
_outExp = mmc_mk_none();
}
_return: OMC_LABEL_UNUSED
if (out_outExp) { *out_outExp = _outExp; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExpOptAndMatchType(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExp, modelica_metatype _inDefaultType, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype *out_outExp, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExpOptAndMatchType(threadData, _inCache, _inEnv, _inExp, _inDefaultType, tmp1, tmp2, _inPrefix, _inInfo, out_outExp, out_outProperties);
return _outCache;
}
DLLExport
modelica_metatype omc_Static_elabExpListList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inLastType, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _expl = NULL;
modelica_metatype _props = NULL;
modelica_metatype _last_ty = NULL;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta4;
modelica_metatype tmpMeta5;
modelica_metatype tmpMeta6;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outProperties = tmpMeta2;
_last_ty = _inLastType;
{
modelica_metatype _lst;
for (tmpMeta3 = _inExpl; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_lst = MMC_CAR(tmpMeta3);
_outCache = omc_Static_elabExpList(threadData, _outCache, _inEnv, _lst, _inImplicit, _inDoVect, _inPrefix, _inInfo, _last_ty ,&_expl ,&_props);
tmpMeta4 = mmc_mk_cons(_expl, _outExpl);
_outExpl = tmpMeta4;
tmpMeta5 = mmc_mk_cons(_props, _outProperties);
_outProperties = tmpMeta5;
_last_ty = omc_Types_getPropType(threadData, listHead(_props));
}
}
_outExpl = listReverse(_outExpl);
_outProperties = listReverse(_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExpl) { *out_outExpl = _outExpl; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabExpListList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inLastType, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExpListList(threadData, _inCache, _inEnv, _inExpl, tmp1, tmp2, _inPrefix, _inInfo, _inLastType, out_outExpl, out_outProperties);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_Static_elabExpList__enum(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inLastType)
{
modelica_integer _outIndex;
modelica_integer tmp1 = 0;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inLastType;
{
modelica_metatype _cr = NULL;
modelica_metatype _path = NULL;
modelica_metatype _path1 = NULL;
modelica_metatype _path2 = NULL;
modelica_string _name = NULL;
modelica_metatype _names = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 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;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,1) == 0) goto tmp3_end;
_path2 = tmpMeta6;
_names = tmpMeta7;
_cr = tmpMeta8;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
tmpMeta11 = omc_AbsynUtil_splitQualAndIdentPath(threadData, _path, &tmpMeta9);
_path1 = tmpMeta11;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,1,1) == 0) goto goto_2;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
_name = tmpMeta10;
tmp12 = omc_AbsynUtil_pathEqual(threadData, _path1, _path2);
if (1 != tmp12) goto goto_2;
tmp1 = omc_List_position(threadData, _name, _names);
goto tmp3_done;
}
case 1: {
tmp1 = ((modelica_integer) -1);
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outIndex = tmp1;
_return: OMC_LABEL_UNUSED
return _outIndex;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_Static_elabExpList__enum(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inLastType)
{
modelica_integer _outIndex;
modelica_metatype out_outIndex;
_outIndex = omc_Static_elabExpList__enum(threadData, _inExp, _inLastType);
out_outIndex = mmc_mk_icon(_outIndex);
return out_outIndex;
}
DLLExport
modelica_metatype omc_Static_elabExpList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_boolean _inImplicit, modelica_boolean _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inLastType, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outExpl = NULL;
modelica_metatype tmpMeta1;
modelica_metatype _outProperties = NULL;
modelica_metatype tmpMeta2;
modelica_metatype _exp = NULL;
modelica_metatype _prop = NULL;
modelica_metatype _last_ty = NULL;
modelica_metatype tmpMeta3;
modelica_metatype tmpMeta17;
modelica_metatype tmpMeta18;
modelica_metatype tmpMeta19;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = _inCache;
tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
_outExpl = tmpMeta1;
tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
_outProperties = tmpMeta2;
_last_ty = _inLastType;
{
modelica_metatype _e;
for (tmpMeta3 = _inExpl; !listEmpty(tmpMeta3); tmpMeta3=MMC_CDR(tmpMeta3))
{
_e = MMC_CAR(tmpMeta3);
{
volatile modelica_metatype tmp6_1;volatile modelica_metatype tmp6_2;
tmp6_1 = _e;
tmp6_2 = _last_ty;
{
modelica_metatype _cr = NULL;
modelica_metatype _path = NULL;
modelica_metatype _path1 = NULL;
modelica_metatype _path2 = NULL;
modelica_string _name = NULL;
modelica_metatype _names = NULL;
modelica_integer _idx;
volatile mmc_switch_type tmp6;
int tmp7;
tmp6 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp5_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp6 < 2; tmp6++) {
switch (MMC_SWITCH_CAST(tmp6)) {
case 0: {
modelica_metatype tmpMeta8;
modelica_metatype tmpMeta9;
modelica_metatype tmpMeta10;
modelica_metatype tmpMeta11;
modelica_metatype tmpMeta12;
modelica_metatype tmpMeta13;
modelica_boolean tmp14;
modelica_metatype tmpMeta15;
modelica_metatype tmpMeta16;
if (mmc__uniontype__metarecord__typedef__equal(tmp6_2,5,5) == 0) goto tmp5_end;
tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_2), 3));
tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_2), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,2,1) == 0) goto tmp5_end;
tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp6_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,0,1) == 0) goto tmp5_end;
_path2 = tmpMeta8;
_names = tmpMeta9;
_cr = tmpMeta10;
_path = omc_AbsynUtil_crefToPath(threadData, _cr);
tmpMeta13 = omc_AbsynUtil_splitQualAndIdentPath(threadData, _path, &tmpMeta11);
_path1 = tmpMeta13;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) goto goto_4;
tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
_name = tmpMeta12;
tmp14 = omc_AbsynUtil_pathEqual(threadData, _path1, _path2);
if (1 != tmp14) goto goto_4;
_idx = omc_List_position(threadData, _name, _names);
tmpMeta15 = mmc_mk_box3(8, &DAE_Exp_ENUM__LITERAL__desc, _path, mmc_mk_integer(_idx));
_exp = tmpMeta15;
tmpMeta16 = mmc_mk_box3(3, &DAE_Properties_PROP__desc, _last_ty, _OMC_LIT60);
_prop = tmpMeta16;
goto tmp5_done;
}
case 1: {
_outCache = omc_Static_elabExpInExpression(threadData, _outCache, _inEnv, _e, _inImplicit, _inDoVect, _inPrefix, _inInfo ,&_exp ,&_prop);
_last_ty = omc_Types_getPropType(threadData, _prop);
goto tmp5_done;
}
}
goto tmp5_end;
tmp5_end: ;
}
goto goto_4;
tmp5_done:
(void)tmp6;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp5_done2;
goto_4:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp6 < 2) {
goto tmp5_top;
}
MMC_THROW_INTERNAL();
tmp5_done2:;
}
}
;
tmpMeta17 = mmc_mk_cons(_exp, _outExpl);
_outExpl = tmpMeta17;
tmpMeta18 = mmc_mk_cons(_prop, _outProperties);
_outProperties = tmpMeta18;
}
}
_outExpl = listReverse(_outExpl);
_outProperties = listReverse(_outProperties);
_return: OMC_LABEL_UNUSED
if (out_outExpl) { *out_outExpl = _outExpl; }
if (out_outProperties) { *out_outProperties = _outProperties; }
return _outCache;
}
modelica_metatype boxptr_Static_elabExpList(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inExpl, modelica_metatype _inImplicit, modelica_metatype _inDoVect, modelica_metatype _inPrefix, modelica_metatype _inInfo, modelica_metatype _inLastType, modelica_metatype *out_outExpl, modelica_metatype *out_outProperties)
{
modelica_integer tmp1;
modelica_integer tmp2;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inImplicit);
tmp2 = mmc_unbox_integer(_inDoVect);
_outCache = omc_Static_elabExpList(threadData, _inCache, _inEnv, _inExpl, tmp1, tmp2, _inPrefix, _inInfo, _inLastType, out_outExpl, out_outProperties);
return _outCache;
}
