#ifdef OMC_BASE_FILE
#define OMC_FILE OMC_BASE_FILE
#else
#define OMC_FILE "/home/mahge/dev/OpenModelica/OMCompiler/Compiler/boot/build/tmp/CevalFunction.c"
#endif
#include "omc_simulation_settings.h"
#include "CevalFunction.h"
#define _OMC_LIT0_data ","
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,1,_OMC_LIT0_data);
#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
#define _OMC_LIT1_data "}, {"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT1,4,_OMC_LIT1_data);
#define _OMC_LIT1 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT1)
#define _OMC_LIT2_data "{"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,1,_OMC_LIT2_data);
#define _OMC_LIT2 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)
#define _OMC_LIT3_data "}"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT3,1,_OMC_LIT3_data);
#define _OMC_LIT3 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT3)
#define _OMC_LIT4_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT4,0,_OMC_LIT4_data);
#define _OMC_LIT4 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT4)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT5,1,5) {&ErrorTypes_MessageType_TRANSLATION__desc,}};
#define _OMC_LIT5 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT5)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT6,1,4) {&ErrorTypes_Severity_ERROR__desc,}};
#define _OMC_LIT6 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT6)
#define _OMC_LIT7_data "Cyclically dependent constants or parameters found in scope %s: %s (ignore with -d=ignoreCycles)."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT7,97,_OMC_LIT7_data);
#define _OMC_LIT7 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT7)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT8,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT7}};
#define _OMC_LIT8 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT8)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT9,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(170)),_OMC_LIT5,_OMC_LIT6,_OMC_LIT8}};
#define _OMC_LIT9 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "Internal error %s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,17,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT11,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT10}};
#define _OMC_LIT11 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT11)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT12,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(63)),_OMC_LIT5,_OMC_LIT6,_OMC_LIT11}};
#define _OMC_LIT12 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT12)
#define _OMC_LIT13_data "Different iterators in CevalFunction.compareIterators."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT13,54,_OMC_LIT13_data);
#define _OMC_LIT13 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT13)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT14,2,1) {_OMC_LIT13,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT14 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT14)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT15,1,16) {&Values_Value_NORETCALL__desc,}};
#define _OMC_LIT15 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT15)
#define _OMC_LIT16_data "failtrace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT16,9,_OMC_LIT16_data);
#define _OMC_LIT16 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "Sets whether to print a failtrace or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,41,_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,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT16,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT18}};
#define _OMC_LIT19 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT19)
#define _OMC_LIT20_data "- CevalFunction.getRecordVarBindingAndName failed on variable "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT20,62,_OMC_LIT20_data);
#define _OMC_LIT20 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT20)
#define _OMC_LIT21_data "\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT21,1,_OMC_LIT21_data);
#define _OMC_LIT21 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT21)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,2,3) {&Values_Value_INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT22 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT23,0.0);
#define _OMC_LIT23 MMC_REFREALLIT(_OMC_LIT_STRUCT23)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT24,2,4) {&Values_Value_REAL__desc,_OMC_LIT23}};
#define _OMC_LIT24 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,2,5) {&Values_Value_STRING__desc,_OMC_LIT4}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT26,2,6) {&Values_Value_BOOL__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT26 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT26)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT27,2,4) {&Absyn_Path_IDENT__desc,_OMC_LIT4}};
#define _OMC_LIT27 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT27)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT28,3,7) {&Values_Value_ENUM__LITERAL__desc,_OMC_LIT27,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT28 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT28)
#define _OMC_LIT29_data "- CevalFunction.generateDefaultBinding failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT29,46,_OMC_LIT29_data);
#define _OMC_LIT29 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT29)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT30,1,3) {&DAE_BindingSource_BINDING__FROM__DEFAULT__VALUE__desc,}};
#define _OMC_LIT30 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT30)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT31,1,4) {&FCore_Status_VAR__TYPED__desc,}};
#define _OMC_LIT31 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT31)
#define _OMC_LIT32_data "- CevalFunction.assignVector failed on: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT32,40,_OMC_LIT32_data);
#define _OMC_LIT32 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT32)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT33,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0))}};
#define _OMC_LIT33 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT33)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT34,2,1) {_OMC_LIT33,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT34 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT34)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT35,2,3) {&DAE_Dimension_DIM__INTEGER__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT35 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT35)
#define _OMC_LIT36_data "- CevalFunction.appendDimensions2 failed\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT36,41,_OMC_LIT36_data);
#define _OMC_LIT36 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT36)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT37,1,3) {&DAE_Binding_UNBOUND__desc,}};
#define _OMC_LIT37 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT37)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT38,1,6) {&SCode_Variability_CONST__desc,}};
#define _OMC_LIT38 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT38)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT39,1,3) {&DAE_Const_C__CONST__desc,}};
#define _OMC_LIT39 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT39)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT40,1,1) {_OMC_LIT39}};
#define _OMC_LIT40 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "$functionEvaluation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,19,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT42,2,24) {&FCore_Data_ND__desc,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT42 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT42)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT43,1,6) {&DAE_ConnectorType_NON__CONNECTOR__desc,}};
#define _OMC_LIT43 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT43)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT44,1,5) {&SCode_Parallelism_NON__PARALLEL__desc,}};
#define _OMC_LIT44 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT44)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT45,1,3) {&SCode_Variability_VAR__desc,}};
#define _OMC_LIT45 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT45)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT46,1,5) {&Absyn_Direction_BIDIR__desc,}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT47,1,6) {&Absyn_InnerOuter_NOT__INNER__OUTER__desc,}};
#define _OMC_LIT47 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT47)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT48,1,3) {&SCode_Visibility_PUBLIC__desc,}};
#define _OMC_LIT48 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT48)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT49,7,3) {&DAE_Attributes_ATTR__desc,_OMC_LIT43,_OMC_LIT44,_OMC_LIT45,_OMC_LIT46,_OMC_LIT47,_OMC_LIT48}};
#define _OMC_LIT49 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT49)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT50,1,4) {&SCode_Redeclare_NOT__REDECLARE__desc,}};
#define _OMC_LIT50 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT50)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT51,1,4) {&SCode_Final_NOT__FINAL__desc,}};
#define _OMC_LIT51 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,1,4) {&SCode_Replaceable_NOT__REPLACEABLE__desc,}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT53,6,3) {&SCode_Prefixes_PREFIXES__desc,_OMC_LIT48,_OMC_LIT50,_OMC_LIT51,_OMC_LIT47,_OMC_LIT52}};
#define _OMC_LIT53 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT53)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT54,1,3) {&SCode_ConnectorType_POTENTIAL__desc,}};
#define _OMC_LIT54 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT54)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT55,1,3) {&Absyn_IsField_NONFIELD__desc,}};
#define _OMC_LIT55 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT55)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT56,7,3) {&SCode_Attributes_ATTR__desc,MMC_REFSTRUCTLIT(mmc_nil),_OMC_LIT54,_OMC_LIT44,_OMC_LIT45,_OMC_LIT46,_OMC_LIT55}};
#define _OMC_LIT56 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT56)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT57,3,3) {&Absyn_TypeSpec_TPATH__desc,_OMC_LIT27,MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT57 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT57)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT58,1,5) {&SCode_Mod_NOMOD__desc,}};
#define _OMC_LIT58 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT58)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT59,3,3) {&SCode_Comment_COMMENT__desc,MMC_REFSTRUCTLIT(mmc_none),MMC_REFSTRUCTLIT(mmc_none)}};
#define _OMC_LIT59 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT59)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT60,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT4,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_LIT23}};
#define _OMC_LIT60 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT60)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT61,1,5) {&DAE_Mod_NOMOD__desc,}};
#define _OMC_LIT61 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT61)
#define _OMC_LIT62_data "- CevalFunction.extendEnvWithFunctionVars failed for:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT62,53,_OMC_LIT62_data);
#define _OMC_LIT62 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,1,4) {&SCode_Encapsulated_NOT__ENCAPSULATED__desc,}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT64,1,3) {&FCore_ScopeType_FUNCTION__SCOPE__desc,}};
#define _OMC_LIT64 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT64)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT65,1,1) {_OMC_LIT64}};
#define _OMC_LIT65 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT65)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT66,2,3) {&Absyn_Msg_MSG__desc,_OMC_LIT60}};
#define _OMC_LIT66 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,1,18) {&Values_Value_META__FAIL__desc,}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
#define _OMC_LIT68_data "- CevalFunction.extractLhsComponentRef failed on "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT68,49,_OMC_LIT68_data);
#define _OMC_LIT68 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,1,3) {&CevalFunction_LoopControl_NEXT__desc,}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
#define _OMC_LIT70_data "- evaluateForStatement not implemented for:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT70,43,_OMC_LIT70_data);
#define _OMC_LIT70 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT70)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT71,1,5) {&CevalFunction_LoopControl_RETURN__desc,}};
#define _OMC_LIT71 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT71)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT72,1,4) {&CevalFunction_LoopControl_BREAK__desc,}};
#define _OMC_LIT72 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT72)
#define _OMC_LIT73_data "- CevalFunction.evaluateStatement failed for:"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT73,45,_OMC_LIT73_data);
#define _OMC_LIT73 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "dgeev"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,5,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
#define _OMC_LIT75_data "dgegv"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT75,5,_OMC_LIT75_data);
#define _OMC_LIT75 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT75)
#define _OMC_LIT76_data "dgels"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT76,5,_OMC_LIT76_data);
#define _OMC_LIT76 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT76)
#define _OMC_LIT77_data "dgelsx"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT77,6,_OMC_LIT77_data);
#define _OMC_LIT77 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT77)
#define _OMC_LIT78_data "dgelsy"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT78,6,_OMC_LIT78_data);
#define _OMC_LIT78 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT78)
#define _OMC_LIT79_data "dgesv"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT79,5,_OMC_LIT79_data);
#define _OMC_LIT79 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT79)
#define _OMC_LIT80_data "dgglse"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT80,6,_OMC_LIT80_data);
#define _OMC_LIT80 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT80)
#define _OMC_LIT81_data "dgtsv"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT81,5,_OMC_LIT81_data);
#define _OMC_LIT81 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT81)
#define _OMC_LIT82_data "dgbsv"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT82,5,_OMC_LIT82_data);
#define _OMC_LIT82 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT82)
#define _OMC_LIT83_data "dgesvd"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT83,6,_OMC_LIT83_data);
#define _OMC_LIT83 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data "dgetrf"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,6,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data "dgetrs"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,6,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
#define _OMC_LIT86_data "dgetri"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT86,6,_OMC_LIT86_data);
#define _OMC_LIT86 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data "dgeqpf"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,6,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "dorgqr"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,6,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,1,11) {&DAE_Type_T__UNKNOWN__desc,}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
#define _OMC_LIT90_data "- CevalFunction.evaluateExtInputArg failed on "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT90,46,_OMC_LIT90_data);
#define _OMC_LIT90 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT90)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT91,1,7) {&DAE_Dimension_DIM__UNKNOWN__desc,}};
#define _OMC_LIT91 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data "- CevalFunction.pairFuncParamsWithArgs failed because of too few input arguments.\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,82,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
#define _OMC_LIT93_data "- CevalFunction.evaluateFunction failed.\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT93,41,_OMC_LIT93_data);
#define _OMC_LIT93 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT93)
#define _OMC_LIT94_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT94,1,_OMC_LIT94_data);
#define _OMC_LIT94 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT94)
#define _OMC_LIT95_data "- CevalFunction.evaluate failed for function: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT95,46,_OMC_LIT95_data);
#define _OMC_LIT95 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "partial "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,8,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
#include "util/modelica.h"
#include "CevalFunction_includes.h"
#if !defined(PROTECTED_FUNCTION_STATIC)
#define PROTECTED_FUNCTION_STATIC
#endif
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_optimizeExpTraverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_optimizeExpTraverser,2,0) {(void*) boxptr_CevalFunction_optimizeExpTraverser,0}};
#define boxvar_CevalFunction_optimizeExpTraverser MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_optimizeExpTraverser)
PROTECTED_FUNCTION_STATIC void omc_CevalFunction_checkCyclicalComponents(threadData_t *threadData, modelica_metatype _inCycles, modelica_metatype _inSource);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_checkCyclicalComponents,2,0) {(void*) boxptr_CevalFunction_checkCyclicalComponents,0}};
#define boxvar_CevalFunction_checkCyclicalComponents MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_checkCyclicalComponents)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_CevalFunction_isElementEqual(threadData_t *threadData, modelica_metatype _inElement1, modelica_metatype _inElement2);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_isElementEqual(threadData_t *threadData, modelica_metatype _inElement1, modelica_metatype _inElement2);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_isElementEqual,2,0) {(void*) boxptr_CevalFunction_isElementEqual,0}};
#define boxvar_CevalFunction_isElementEqual MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_isElementEqual)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_CevalFunction_isElementNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inElement);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_isElementNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inElement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_isElementNamed,2,0) {(void*) boxptr_CevalFunction_isElementNamed,0}};
#define boxvar_CevalFunction_isElementNamed MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_isElementNamed)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_compareIterators(threadData_t *threadData, modelica_metatype _inRiters, modelica_metatype _inIters);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_compareIterators,2,0) {(void*) boxptr_CevalFunction_compareIterators,0}};
#define boxvar_CevalFunction_compareIterators MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_compareIterators)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependenciesTraverserExit(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inArg, modelica_metatype *out_outArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependenciesTraverserExit,2,0) {(void*) boxptr_CevalFunction_getElementDependenciesTraverserExit,0}};
#define boxvar_CevalFunction_getElementDependenciesTraverserExit MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependenciesTraverserExit)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependenciesTraverserEnter(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inArg, modelica_metatype *out_outArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependenciesTraverserEnter,2,0) {(void*) boxptr_CevalFunction_getElementDependenciesTraverserEnter,0}};
#define boxvar_CevalFunction_getElementDependenciesTraverserEnter MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependenciesTraverserEnter)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependenciesFromDims(threadData_t *threadData, modelica_metatype _inDimension, modelica_metatype _inArg, modelica_metatype *out_outArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependenciesFromDims,2,0) {(void*) boxptr_CevalFunction_getElementDependenciesFromDims,0}};
#define boxvar_CevalFunction_getElementDependenciesFromDims MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependenciesFromDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependencies(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inAllElements);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependencies,2,0) {(void*) boxptr_CevalFunction_getElementDependencies,0}};
#define boxvar_CevalFunction_getElementDependencies MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getElementDependencies)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_sortFunctionVarsByDependency(threadData_t *threadData, modelica_metatype _inFuncVars, modelica_metatype _inSource);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_sortFunctionVarsByDependency,2,0) {(void*) boxptr_CevalFunction_sortFunctionVarsByDependency,0}};
#define boxvar_CevalFunction_sortFunctionVarsByDependency MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_sortFunctionVarsByDependency)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_boxReturnValue(threadData_t *threadData, modelica_metatype _inReturnValues);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_boxReturnValue,2,0) {(void*) boxptr_CevalFunction_boxReturnValue,0}};
#define boxvar_CevalFunction_boxReturnValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_boxReturnValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordComponentValue(threadData_t *threadData, modelica_metatype _inVars, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordComponentValue,2,0) {(void*) boxptr_CevalFunction_getRecordComponentValue,0}};
#define boxvar_CevalFunction_getRecordComponentValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordComponentValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordValue(threadData_t *threadData, modelica_metatype _inRecordName, modelica_metatype _inType, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordValue,2,0) {(void*) boxptr_CevalFunction_getRecordValue,0}};
#define boxvar_CevalFunction_getRecordValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getVariableValue(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inType, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getVariableValue,2,0) {(void*) boxptr_CevalFunction_getVariableValue,0}};
#define boxvar_CevalFunction_getVariableValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getVariableValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getFunctionReturnValue(threadData_t *threadData, modelica_metatype _inOutputVar, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getFunctionReturnValue,2,0) {(void*) boxptr_CevalFunction_getFunctionReturnValue,0}};
#define boxvar_CevalFunction_getFunctionReturnValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getFunctionReturnValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordVarBindingAndName(threadData_t *threadData, modelica_metatype _inVar, modelica_string *out_outName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordVarBindingAndName,2,0) {(void*) boxptr_CevalFunction_getRecordVarBindingAndName,0}};
#define boxvar_CevalFunction_getRecordVarBindingAndName MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordVarBindingAndName)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_generateDefaultBinding(threadData_t *threadData, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_generateDefaultBinding,2,0) {(void*) boxptr_CevalFunction_generateDefaultBinding,0}};
#define boxvar_CevalFunction_generateDefaultBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_generateDefaultBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getBindingOrDefault(threadData_t *threadData, modelica_metatype _inBinding, modelica_metatype _inType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getBindingOrDefault,2,0) {(void*) boxptr_CevalFunction_getBindingOrDefault,0}};
#define boxvar_CevalFunction_getBindingOrDefault MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getBindingOrDefault)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getBindingValueOpt(threadData_t *threadData, modelica_metatype _inBinding);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getBindingValueOpt,2,0) {(void*) boxptr_CevalFunction_getBindingValueOpt,0}};
#define boxvar_CevalFunction_getBindingValueOpt MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getBindingValueOpt)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getVariableTypeAndValue(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inEnv, modelica_metatype *out_outValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getVariableTypeAndValue,2,0) {(void*) boxptr_CevalFunction_getVariableTypeAndValue,0}};
#define boxvar_CevalFunction_getVariableTypeAndValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getVariableTypeAndValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getVariableTypeAndBinding(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inEnv, modelica_metatype *out_outBinding);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getVariableTypeAndBinding,2,0) {(void*) boxptr_CevalFunction_getVariableTypeAndBinding,0}};
#define boxvar_CevalFunction_getVariableTypeAndBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getVariableTypeAndBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateRecordComponentValue(threadData_t *threadData, modelica_string _inComponentId, modelica_metatype _inComponentValue, modelica_metatype _inRecordValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_updateRecordComponentValue,2,0) {(void*) boxptr_CevalFunction_updateRecordComponentValue,0}};
#define boxvar_CevalFunction_updateRecordComponentValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_updateRecordComponentValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateRecordComponentBinding(threadData_t *threadData, modelica_metatype _inVar, modelica_string _inComponentId, modelica_metatype _inValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_updateRecordComponentBinding,2,0) {(void*) boxptr_CevalFunction_updateRecordComponentBinding,0}};
#define boxvar_CevalFunction_updateRecordComponentBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_updateRecordComponentBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateRecordBinding(threadData_t *threadData, modelica_metatype _inVar, modelica_metatype _inValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_updateRecordBinding,2,0) {(void*) boxptr_CevalFunction_updateRecordBinding,0}};
#define boxvar_CevalFunction_updateRecordBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_updateRecordBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateVariableBinding(threadData_t *threadData, modelica_metatype _inVariableCref, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inNewValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_updateVariableBinding,2,0) {(void*) boxptr_CevalFunction_updateVariableBinding,0}};
#define boxvar_CevalFunction_updateVariableBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_updateVariableBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignWholeDim(threadData_t *threadData, modelica_metatype _inNewValues, modelica_metatype _inOldValues, modelica_metatype _inSubscripts, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignWholeDim,2,0) {(void*) boxptr_CevalFunction_assignWholeDim,0}};
#define boxvar_CevalFunction_assignWholeDim MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignWholeDim)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignSlice(threadData_t *threadData, modelica_metatype _inNewValues, modelica_metatype _inOldValues, modelica_metatype _inIndices, modelica_metatype _inSubscripts, modelica_integer _inIndex, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_assignSlice(threadData_t *threadData, modelica_metatype _inNewValues, modelica_metatype _inOldValues, modelica_metatype _inIndices, modelica_metatype _inSubscripts, modelica_metatype _inIndex, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignSlice,2,0) {(void*) boxptr_CevalFunction_assignSlice,0}};
#define boxvar_CevalFunction_assignSlice MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignSlice)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignRecordComponents(threadData_t *threadData, modelica_metatype _inVars, modelica_metatype _inValues, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignRecordComponents,2,0) {(void*) boxptr_CevalFunction_assignRecordComponents,0}};
#define boxvar_CevalFunction_assignRecordComponents MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignRecordComponents)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignRecord(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inValue, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignRecord,2,0) {(void*) boxptr_CevalFunction_assignRecord,0}};
#define boxvar_CevalFunction_assignRecord MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignRecord)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignTuple(threadData_t *threadData, modelica_metatype _inLhsCrefs, modelica_metatype _inRhsValues, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignTuple,2,0) {(void*) boxptr_CevalFunction_assignTuple,0}};
#define boxvar_CevalFunction_assignTuple MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignTuple)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignVariable(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inNewValue, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignVariable,2,0) {(void*) boxptr_CevalFunction_assignVariable,0}};
#define boxvar_CevalFunction_assignVariable MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignVariable)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_appendDimensions2(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inDims, modelica_metatype _inBindingDims, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_appendDimensions2,2,0) {(void*) boxptr_CevalFunction_appendDimensions2,0}};
#define boxvar_CevalFunction_appendDimensions2 MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_appendDimensions2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_appendDimensions(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inOptBinding, modelica_metatype _inDims, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_appendDimensions,2,0) {(void*) boxptr_CevalFunction_appendDimensions,0}};
#define boxvar_CevalFunction_appendDimensions MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_appendDimensions)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithForScope(threadData_t *threadData, modelica_string _inIterName, modelica_metatype _inIterType, modelica_metatype _inEnv, modelica_metatype *out_outIterType, modelica_metatype *out_outIterCref);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithForScope,2,0) {(void*) boxptr_CevalFunction_extendEnvWithForScope,0}};
#define boxvar_CevalFunction_extendEnvWithForScope MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithForScope)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithRecordVar(threadData_t *threadData, modelica_metatype _inVar, modelica_metatype _inOptValue, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithRecordVar,2,0) {(void*) boxptr_CevalFunction_extendEnvWithRecordVar,0}};
#define boxvar_CevalFunction_extendEnvWithRecordVar MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithRecordVar)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordValues(threadData_t *threadData, modelica_metatype _inOptValue, modelica_metatype _inRecordType);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordValues,2,0) {(void*) boxptr_CevalFunction_getRecordValues,0}};
#define boxvar_CevalFunction_getRecordValues MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_getRecordValues)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_makeRecordEnvironment(threadData_t *threadData, modelica_metatype _inRecordType, modelica_metatype _inOptValue, modelica_metatype _inCache, modelica_metatype _inGraph, modelica_metatype *out_outRecordEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_makeRecordEnvironment,2,0) {(void*) boxptr_CevalFunction_makeRecordEnvironment,0}};
#define boxvar_CevalFunction_makeRecordEnvironment MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_makeRecordEnvironment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_makeBinding(threadData_t *threadData, modelica_metatype _inBindingValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_makeBinding,2,0) {(void*) boxptr_CevalFunction_makeBinding,0}};
#define boxvar_CevalFunction_makeBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_makeBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_makeFunctionVariable(threadData_t *threadData, modelica_string _inName, modelica_metatype _inType, modelica_metatype _inBinding);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_makeFunctionVariable,2,0) {(void*) boxptr_CevalFunction_makeFunctionVariable,0}};
#define boxvar_CevalFunction_makeFunctionVariable MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_makeFunctionVariable)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithVar(threadData_t *threadData, modelica_string _inName, modelica_metatype _inType, modelica_metatype _inOptValue, modelica_metatype _inDims, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithVar,2,0) {(void*) boxptr_CevalFunction_extendEnvWithVar,0}};
#define boxvar_CevalFunction_extendEnvWithVar MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithVar)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inBindingValue, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithElement,2,0) {(void*) boxptr_CevalFunction_extendEnvWithElement,0}};
#define boxvar_CevalFunction_extendEnvWithElement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateBinding(threadData_t *threadData, modelica_metatype _inBinding, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateBinding,2,0) {(void*) boxptr_CevalFunction_evaluateBinding,0}};
#define boxvar_CevalFunction_evaluateBinding MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateBinding)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithFunctionVar(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFuncParam, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithFunctionVar,2,0) {(void*) boxptr_CevalFunction_extendEnvWithFunctionVar,0}};
#define boxvar_CevalFunction_extendEnvWithFunctionVar MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithFunctionVar)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithFunctionVars(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFuncParams, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithFunctionVars,2,0) {(void*) boxptr_CevalFunction_extendEnvWithFunctionVars,0}};
#define boxvar_CevalFunction_extendEnvWithFunctionVars MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extendEnvWithFunctionVars)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_setupFunctionEnvironment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_string _inFuncName, modelica_metatype _inFuncParams, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_setupFunctionEnvironment,2,0) {(void*) boxptr_CevalFunction_setupFunctionEnvironment,0}};
#define boxvar_CevalFunction_setupFunctionEnvironment MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_setupFunctionEnvironment)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_cevalExpList(threadData_t *threadData, modelica_metatype _inExpLst, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_cevalExpList,2,0) {(void*) boxptr_CevalFunction_cevalExpList,0}};
#define boxvar_CevalFunction_cevalExpList MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_cevalExpList)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_cevalExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_cevalExp,2,0) {(void*) boxptr_CevalFunction_cevalExp,0}};
#define boxvar_CevalFunction_cevalExp MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_cevalExp)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extractLhsComponentRef(threadData_t *threadData, modelica_metatype _inExp);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_extractLhsComponentRef,2,0) {(void*) boxptr_CevalFunction_extractLhsComponentRef,0}};
#define boxvar_CevalFunction_extractLhsComponentRef MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_extractLhsComponentRef)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateWhileStatement(threadData_t *threadData, modelica_metatype _inCondition, modelica_metatype _inStatements, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateWhileStatement,2,0) {(void*) boxptr_CevalFunction_evaluateWhileStatement,0}};
#define boxvar_CevalFunction_evaluateWhileStatement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateWhileStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateForLoopArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIter, modelica_metatype _inIterType, modelica_metatype _inValues, modelica_metatype _inStatements, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateForLoopArray,2,0) {(void*) boxptr_CevalFunction_evaluateForLoopArray,0}};
#define boxvar_CevalFunction_evaluateForLoopArray MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateForLoopArray)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateForStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateForStatement,2,0) {(void*) boxptr_CevalFunction_evaluateForStatement,0}};
#define boxvar_CevalFunction_evaluateForStatement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateForStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateIfStatement2(threadData_t *threadData, modelica_boolean _inCondition, modelica_metatype _inStatements, modelica_metatype _inElse, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_evaluateIfStatement2(threadData_t *threadData, modelica_metatype _inCondition, modelica_metatype _inStatements, modelica_metatype _inElse, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateIfStatement2,2,0) {(void*) boxptr_CevalFunction_evaluateIfStatement2,0}};
#define boxvar_CevalFunction_evaluateIfStatement2 MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateIfStatement2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateIfStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateIfStatement,2,0) {(void*) boxptr_CevalFunction_evaluateIfStatement,0}};
#define boxvar_CevalFunction_evaluateIfStatement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateIfStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateTupleAssignStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateTupleAssignStatement,2,0) {(void*) boxptr_CevalFunction_evaluateTupleAssignStatement,0}};
#define boxvar_CevalFunction_evaluateTupleAssignStatement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateTupleAssignStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateStatements2(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateStatements2,2,0) {(void*) boxptr_CevalFunction_evaluateStatements2,0}};
#define boxvar_CevalFunction_evaluateStatements2 MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateStatements2)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateStatements(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateStatements,2,0) {(void*) boxptr_CevalFunction_evaluateStatements,0}};
#define boxvar_CevalFunction_evaluateStatements MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateStatements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateStatement,2,0) {(void*) boxptr_CevalFunction_evaluateStatement,0}};
#define boxvar_CevalFunction_evaluateStatement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateStatement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateElement,2,0) {(void*) boxptr_CevalFunction_evaluateElement,0}};
#define boxvar_CevalFunction_evaluateElement MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateElement)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateElements(threadData_t *threadData, modelica_metatype _inElements, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateElements,2,0) {(void*) boxptr_CevalFunction_evaluateElements,0}};
#define boxvar_CevalFunction_evaluateElements MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateElements)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExternalFunc(threadData_t *threadData, modelica_string _inFuncName, modelica_metatype _inFuncArgs, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExternalFunc,2,0) {(void*) boxptr_CevalFunction_evaluateExternalFunc,0}};
#define boxvar_CevalFunction_evaluateExternalFunc MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExternalFunc)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_unliftExtOutputValue(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inValue, modelica_metatype _inEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_unliftExtOutputValue,2,0) {(void*) boxptr_CevalFunction_unliftExtOutputValue,0}};
#define boxvar_CevalFunction_unliftExtOutputValue MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_unliftExtOutputValue)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignExtOutputs(threadData_t *threadData, modelica_metatype _inArgs, modelica_metatype _inValues, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_assignExtOutputs,2,0) {(void*) boxptr_CevalFunction_assignExtOutputs,0}};
#define boxvar_CevalFunction_assignExtOutputs MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_assignExtOutputs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtOutputArg(threadData_t *threadData, modelica_metatype _inArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtOutputArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtOutputArg,0}};
#define boxvar_CevalFunction_evaluateExtOutputArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtOutputArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtRealMatrixArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtRealMatrixArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtRealMatrixArg,0}};
#define boxvar_CevalFunction_evaluateExtRealMatrixArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtRealMatrixArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtRealArrayArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtRealArrayArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtRealArrayArg,0}};
#define boxvar_CevalFunction_evaluateExtRealArrayArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtRealArrayArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtIntArrayArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtIntArrayArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtIntArrayArg,0}};
#define boxvar_CevalFunction_evaluateExtIntArrayArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtIntArrayArg)
PROTECTED_FUNCTION_STATIC modelica_string omc_CevalFunction_evaluateExtStringArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtStringArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtStringArg,0}};
#define boxvar_CevalFunction_evaluateExtStringArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtStringArg)
PROTECTED_FUNCTION_STATIC modelica_real omc_CevalFunction_evaluateExtRealArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_evaluateExtRealArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtRealArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtRealArg,0}};
#define boxvar_CevalFunction_evaluateExtRealArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtRealArg)
PROTECTED_FUNCTION_STATIC modelica_integer omc_CevalFunction_evaluateExtIntArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_evaluateExtIntArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtIntArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtIntArg,0}};
#define boxvar_CevalFunction_evaluateExtIntArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtIntArg)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtInputArg(threadData_t *threadData, modelica_metatype _inArgument, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtInputArg,2,0) {(void*) boxptr_CevalFunction_evaluateExtInputArg,0}};
#define boxvar_CevalFunction_evaluateExtInputArg MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateExtInputArg)
PROTECTED_FUNCTION_STATIC modelica_boolean omc_CevalFunction_isCrefNamed(threadData_t *threadData, modelica_string _inName, modelica_metatype _inCref);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_isCrefNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inCref);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_isCrefNamed,2,0) {(void*) boxptr_CevalFunction_isCrefNamed,0}};
#define boxvar_CevalFunction_isCrefNamed MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_isCrefNamed)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_removeSelfReferentialDim(threadData_t *threadData, modelica_metatype _inDim, modelica_string _inName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_removeSelfReferentialDim,2,0) {(void*) boxptr_CevalFunction_removeSelfReferentialDim,0}};
#define boxvar_CevalFunction_removeSelfReferentialDim MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_removeSelfReferentialDim)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_removeSelfReferentialDims(threadData_t *threadData, modelica_metatype _inElement);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_removeSelfReferentialDims,2,0) {(void*) boxptr_CevalFunction_removeSelfReferentialDims,0}};
#define boxvar_CevalFunction_removeSelfReferentialDims MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_removeSelfReferentialDims)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_pairFuncParamsWithArgs(threadData_t *threadData, modelica_metatype _inElements, modelica_metatype _inValues);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_pairFuncParamsWithArgs,2,0) {(void*) boxptr_CevalFunction_pairFuncParamsWithArgs,0}};
#define boxvar_CevalFunction_pairFuncParamsWithArgs MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_pairFuncParamsWithArgs)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateFunctionDefinition(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_string _inFuncName, modelica_metatype _inFunc, modelica_metatype _inFuncType, modelica_metatype _inFuncArgs, modelica_metatype _inSource, modelica_metatype *out_outResult);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateFunctionDefinition,2,0) {(void*) boxptr_CevalFunction_evaluateFunctionDefinition,0}};
#define boxvar_CevalFunction_evaluateFunctionDefinition MMC_REFSTRUCTLIT(boxvar_lit_CevalFunction_evaluateFunctionDefinition)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_optimizeExpTraverser(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inEnv;
{
modelica_metatype _cref = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _sub_exps = NULL;
modelica_metatype _subs = NULL;
modelica_metatype _env = NULL;
modelica_metatype _exp = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,21,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],6,2) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 3));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_cref = tmpMeta[3];
_ety = tmpMeta[4];
_sub_exps = tmpMeta[5];
_env = tmp4_2;
_subs = omc_List_map(threadData, _sub_exps, boxvar_Expression_makeIndexSubscript);
_cref = omc_ComponentReference_subscriptCref(threadData, _cref, _subs);
_exp = omc_Expression_makeCrefExp(threadData, _cref, _ety);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 1: {
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,22,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],19,1) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmp6 = mmc_unbox_integer(tmpMeta[6]);
if (1 != tmp6) goto tmp3_end;
_exp = tmpMeta[4];
_env = tmp4_2;
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 2: {
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inEnv;
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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC void omc_CevalFunction_checkCyclicalComponents(threadData_t *threadData, modelica_metatype _inCycles, modelica_metatype _inSource)
{
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inCycles;
{
modelica_metatype _cycles = NULL;
modelica_metatype _elements = NULL;
modelica_metatype _crefs = NULL;
modelica_metatype _names = NULL;
modelica_metatype _cycles_strs = NULL;
modelica_string _cycles_str = NULL;
modelica_string _scope_str = NULL;
modelica_metatype _info = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
goto tmp2_done;
}
case 1: {
_cycles = omc_Graph_findCycles(threadData, _inCycles, boxvar_CevalFunction_isElementEqual);
_elements = omc_List_mapList(threadData, _cycles, boxvar_Util_tuple21);
_crefs = omc_List_mapList(threadData, _elements, boxvar_DAEUtil_varCref);
_names = omc_List_mapList(threadData, _crefs, boxvar_ComponentReference_printComponentRefStr);
_cycles_strs = omc_List_map1(threadData, _names, boxvar_stringDelimitList, _OMC_LIT0);
_cycles_str = stringDelimitList(_cycles_strs, _OMC_LIT1);
tmpMeta[0] = stringAppend(_OMC_LIT2,_cycles_str);
tmpMeta[1] = stringAppend(tmpMeta[0],_OMC_LIT3);
_cycles_str = tmpMeta[1];
_scope_str = _OMC_LIT4;
_info = omc_ElementSource_getElementSourceFileInfo(threadData, _inSource);
tmpMeta[0] = mmc_mk_cons(_scope_str, mmc_mk_cons(_cycles_str, MMC_REFSTRUCTLIT(mmc_nil)));
omc_Error_addSourceMessage(threadData, _OMC_LIT9, tmpMeta[0], _info);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
;
_return: OMC_LABEL_UNUSED
return;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_CevalFunction_isElementEqual(threadData_t *threadData, modelica_metatype _inElement1, modelica_metatype _inElement2)
{
modelica_boolean _isEqual;
modelica_metatype _cr1 = NULL;
modelica_metatype _cr2 = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[0] = _inElement1;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,13) == 0) MMC_THROW_INTERNAL();
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_cr1 = tmpMeta[2];
tmpMeta[0] = _inElement2;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,13) == 0) MMC_THROW_INTERNAL();
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_cr2 = tmpMeta[2];
_isEqual = omc_ComponentReference_crefEqualWithoutSubs(threadData, _cr1, _cr2);
_return: OMC_LABEL_UNUSED
return _isEqual;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_isElementEqual(threadData_t *threadData, modelica_metatype _inElement1, modelica_metatype _inElement2)
{
modelica_boolean _isEqual;
modelica_metatype out_isEqual;
_isEqual = omc_CevalFunction_isElementEqual(threadData, _inElement1, _inElement2);
out_isEqual = mmc_mk_icon(_isEqual);
return out_isEqual;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_CevalFunction_isElementNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inElement)
{
modelica_boolean _isNamed;
modelica_metatype _name = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[0] = _inElement;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,13) == 0) MMC_THROW_INTERNAL();
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_name = tmpMeta[2];
_isNamed = omc_ComponentReference_crefEqualWithoutSubs(threadData, _name, _inName);
_return: OMC_LABEL_UNUSED
return _isNamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_isElementNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inElement)
{
modelica_boolean _isNamed;
modelica_metatype out_isNamed;
_isNamed = omc_CevalFunction_isElementNamed(threadData, _inName, _inElement);
out_isNamed = mmc_mk_icon(_isNamed);
return out_isNamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_compareIterators(threadData_t *threadData, modelica_metatype _inRiters, modelica_metatype _inIters)
{
modelica_metatype _outIters = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;volatile modelica_metatype tmp3_2;
tmp3_1 = _inRiters;
tmp3_2 = _inIters;
{
modelica_string _id1 = NULL;
modelica_string _id2 = NULL;
modelica_metatype _riters = NULL;
modelica_metatype _iters = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_boolean tmp5;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_CAR(tmp3_1);
tmpMeta[2] = MMC_CDR(tmp3_1);
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
if (listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta[4] = MMC_CAR(tmp3_2);
tmpMeta[5] = MMC_CDR(tmp3_2);
_id1 = tmpMeta[3];
_riters = tmpMeta[2];
_id2 = tmpMeta[4];
_iters = tmpMeta[5];
tmp3 += 1;
tmp5 = (stringEqual(_id1, _id2));
if (1 != tmp5) goto goto_1;
tmpMeta[0] = omc_CevalFunction_compareIterators(threadData, _riters, _iters);
goto tmp2_done;
}
case 1: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[0] = _inIters;
goto tmp2_done;
}
case 2: {
omc_Error_addMessage(threadData, _OMC_LIT12, _OMC_LIT14);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 3) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
_outIters = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outIters;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependenciesTraverserExit(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inArg, modelica_metatype *out_outArg)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outArg = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inArg;
{
modelica_metatype _exp = NULL;
modelica_metatype _all_el = NULL;
modelica_metatype _accum_el = NULL;
modelica_metatype _iters = NULL;
modelica_metatype _riters = 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,27,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_exp = tmp4_1;
_riters = tmpMeta[2];
_all_el = tmpMeta[3];
_accum_el = tmpMeta[4];
_iters = tmpMeta[5];
_iters = omc_CevalFunction_compareIterators(threadData, listReverse(_riters), _iters);
tmpMeta[2] = mmc_mk_box3(0, _all_el, _accum_el, _iters);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inArg;
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];
_outArg = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outArg) { *out_outArg = _outArg; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependenciesTraverserEnter(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inArg, modelica_metatype *out_outArg)
{
modelica_metatype _outExp = NULL;
modelica_metatype _outArg = NULL;
modelica_metatype tmpMeta[9] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inExp;
tmp4_2 = _inArg;
{
modelica_metatype _exp = NULL;
modelica_metatype _cref = NULL;
modelica_metatype _all_el = NULL;
modelica_metatype _accum_el = NULL;
modelica_metatype _e = NULL;
modelica_string _iter = NULL;
modelica_metatype _iters = NULL;
modelica_metatype _riters = 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;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (listEmpty(tmpMeta[4])) goto tmp3_end;
tmpMeta[5] = MMC_CAR(tmpMeta[4]);
tmpMeta[6] = MMC_CDR(tmpMeta[4]);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta[7] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[7],1,3) == 0) goto tmp3_end;
tmpMeta[8] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[7]), 2));
_all_el = tmpMeta[2];
_accum_el = tmpMeta[3];
_iters = tmpMeta[4];
_exp = tmp4_1;
_iter = tmpMeta[8];
tmp6 = omc_List_isMemberOnTrue(threadData, _iter, _iters, boxvar_stringEqual);
if (1 != tmp6) goto goto_2;
tmpMeta[2] = mmc_mk_box3(0, _all_el, _accum_el, _iters);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_exp = tmp4_1;
_cref = tmpMeta[2];
_all_el = tmpMeta[3];
_accum_el = tmpMeta[4];
_iters = tmpMeta[5];
tmp4 += 1;
tmpMeta[4] = omc_List_deleteMemberOnTrue(threadData, _cref, _all_el, boxvar_CevalFunction_isElementNamed, &tmpMeta[2]);
_all_el = tmpMeta[4];
if (optionNone(tmpMeta[2])) goto goto_2;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 1));
_e = tmpMeta[3];
tmpMeta[2] = mmc_mk_cons(_e, _accum_el);
tmpMeta[3] = mmc_mk_box3(0, _all_el, tmpMeta[2], _iters);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = tmpMeta[3];
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,27,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_exp = tmp4_1;
_riters = tmpMeta[2];
_all_el = tmpMeta[3];
_accum_el = tmpMeta[4];
_iters = tmpMeta[5];
_iters = listAppend(omc_List_map(threadData, _riters, boxvar_Expression_reductionIterName), _iters);
tmpMeta[2] = mmc_mk_box3(0, _all_el, _accum_el, _iters);
tmpMeta[0+0] = _exp;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 3: {
tmpMeta[0+0] = _inExp;
tmpMeta[0+1] = _inArg;
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];
_outArg = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outArg) { *out_outArg = _outArg; }
return _outExp;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependenciesFromDims(threadData_t *threadData, modelica_metatype _inDimension, modelica_metatype _inArg, modelica_metatype *out_outArg)
{
modelica_metatype _outDimension = NULL;
modelica_metatype _outArg = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _arg = NULL;
modelica_metatype _dim_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: {
_dim_exp = omc_Expression_dimensionSizeExp(threadData, _inDimension);
omc_Expression_traverseExpBidir(threadData, _dim_exp, boxvar_CevalFunction_getElementDependenciesTraverserEnter, boxvar_CevalFunction_getElementDependenciesTraverserExit, _inArg ,&_arg);
tmpMeta[0+0] = _inDimension;
tmpMeta[0+1] = _arg;
goto tmp3_done;
}
case 1: {
tmpMeta[0+0] = _inDimension;
tmpMeta[0+1] = _inArg;
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:;
}
}
_outDimension = tmpMeta[0+0];
_outArg = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outArg) { *out_outArg = _outArg; }
return _outDimension;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getElementDependencies(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inAllElements)
{
modelica_metatype _outDependencies = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inElement;
{
modelica_metatype _bind_exp = NULL;
modelica_metatype _deps = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _arg = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,13) == 0) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 8));
if (optionNone(tmpMeta[2])) goto tmp2_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 1));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 9));
_bind_exp = tmpMeta[3];
_dims = tmpMeta[4];
tmpMeta[3] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[4] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[5] = mmc_mk_box3(0, _inAllElements, tmpMeta[3], tmpMeta[4]);
omc_Expression_traverseExpBidir(threadData, _bind_exp, boxvar_CevalFunction_getElementDependenciesTraverserEnter, boxvar_CevalFunction_getElementDependenciesTraverserExit, tmpMeta[5], &tmpMeta[1]);
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_arg = tmpMeta[1];
_deps = tmpMeta[2];
omc_List_mapFold(threadData, _dims, boxvar_CevalFunction_getElementDependenciesFromDims, _arg, &tmpMeta[1]);
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_deps = tmpMeta[2];
tmpMeta[0] = _deps;
goto tmp2_done;
}
case 1: {
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,13) == 0) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 9));
_dims = tmpMeta[2];
tmpMeta[3] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[4] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[5] = mmc_mk_box3(0, _inAllElements, tmpMeta[3], tmpMeta[4]);
omc_List_mapFold(threadData, _dims, boxvar_CevalFunction_getElementDependenciesFromDims, tmpMeta[5], &tmpMeta[1]);
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_deps = tmpMeta[2];
tmpMeta[0] = _deps;
goto tmp2_done;
}
case 2: {
tmpMeta[1] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
tmp2_done:
(void)tmp3;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp2_done2;
goto_1:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp3 < 3) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
_outDependencies = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outDependencies;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_sortFunctionVarsByDependency(threadData_t *threadData, modelica_metatype _inFuncVars, modelica_metatype _inSource)
{
modelica_metatype _outFuncVars = NULL;
modelica_metatype _cycles = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outFuncVars = omc_Graph_topologicalSort(threadData, omc_Graph_buildGraph(threadData, _inFuncVars, boxvar_CevalFunction_getElementDependencies, _inFuncVars), boxvar_CevalFunction_isElementEqual ,&_cycles);
omc_CevalFunction_checkCyclicalComponents(threadData, _cycles, _inSource);
_return: OMC_LABEL_UNUSED
return _outFuncVars;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_boxReturnValue(threadData_t *threadData, modelica_metatype _inReturnValues)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inReturnValues;
{
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[0] = _OMC_LIT15;
goto tmp2_done;
}
case 1: {
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_CAR(tmp3_1);
tmpMeta[2] = MMC_CDR(tmp3_1);
if (!listEmpty(tmpMeta[2])) goto tmp2_end;
_val = tmpMeta[1];
tmpMeta[0] = _val;
goto tmp2_done;
}
case 2: {
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_CAR(tmp3_1);
tmpMeta[2] = MMC_CDR(tmp3_1);
tmpMeta[1] = mmc_mk_box2(11, &Values_Value_TUPLE__desc, _inReturnValues);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordComponentValue(threadData_t *threadData, modelica_metatype _inVars, modelica_metatype _inEnv)
{
modelica_metatype _outValues = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inVars;
{
modelica_metatype _val = NULL;
modelica_metatype _oval = NULL;
modelica_string _id = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _binding = NULL;
modelica_metatype _tvbinding = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],9,3) == 0) goto tmp2_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],3,1) == 0) goto tmp2_end;
_id = tmpMeta[1];
_ty = tmpMeta[2];
tmpMeta[1] = mmc_mk_box2(4, &Absyn_Path_IDENT__desc, _id);
tmpMeta[0] = omc_CevalFunction_getRecordValue(threadData, tmpMeta[1], _ty, _inEnv);
goto tmp2_done;
}
case 1: {
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 5));
_id = tmpMeta[1];
_ty = tmpMeta[2];
_tvbinding = tmpMeta[3];
omc_Lookup_lookupIdentLocal(threadData, omc_FCore_emptyCache(threadData), _inEnv, _id, &tmpMeta[1], NULL, NULL, NULL, NULL);
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 5));
_binding = tmpMeta[2];
_oval = omc_CevalFunction_getBindingValueOpt(threadData, _binding);
if(isNone(_oval))
{
_oval = omc_CevalFunction_getBindingValueOpt(threadData, _tvbinding);
}
if(isSome(_oval))
{
tmpMeta[1] = _oval;
if (optionNone(tmpMeta[1])) goto goto_1;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 1));
_val = tmpMeta[2];
}
else
{
_val = omc_CevalFunction_generateDefaultBinding(threadData, _ty);
}
tmpMeta[0] = _val;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValues = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValues;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordValue(threadData_t *threadData, modelica_metatype _inRecordName, modelica_metatype _inType, modelica_metatype _inEnv)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _inRecordName;
tmp3_2 = _inType;
{
modelica_metatype _vars = NULL;
modelica_metatype _vals = NULL;
modelica_metatype _var_names = NULL;
modelica_string _id = NULL;
modelica_metatype _p = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 1; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,1,1) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp3_2,9,3) == 0) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_2), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],3,1) == 0) goto tmp2_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_2), 3));
_id = tmpMeta[1];
_p = tmpMeta[3];
_vars = tmpMeta[4];
omc_Lookup_lookupIdentLocal(threadData, omc_FCore_emptyCache(threadData), _inEnv, _id ,NULL ,NULL ,NULL ,NULL ,&_env);
_vals = omc_List_map1(threadData, _vars, boxvar_CevalFunction_getRecordComponentValue, _env);
_var_names = omc_List_map(threadData, _vars, boxvar_Types_getVarName);
tmpMeta[1] = mmc_mk_box5(13, &Values_Value_RECORD__desc, _p, _vals, _var_names, mmc_mk_integer(((modelica_integer) -1)));
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getVariableValue(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inType, modelica_metatype _inEnv)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inType;
{
modelica_metatype _val = NULL;
modelica_metatype _p = 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: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,3) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],3,1) == 0) goto tmp2_end;
_p = omc_ComponentReference_crefToPath(threadData, _inCref);
tmpMeta[0] = omc_CevalFunction_getRecordValue(threadData, _p, _inType, _inEnv);
goto tmp2_done;
}
case 1: {
omc_CevalFunction_getVariableTypeAndValue(threadData, _inCref, _inEnv ,&_val);
tmpMeta[0] = _val;
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:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getFunctionReturnValue(threadData_t *threadData, modelica_metatype _inOutputVar, modelica_metatype _inEnv)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inOutputVar;
{
modelica_metatype _cr = NULL;
modelica_metatype _ty = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 1; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,13) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 7));
_cr = tmpMeta[1];
_ty = tmpMeta[2];
tmpMeta[0] = omc_CevalFunction_getVariableValue(threadData, _cr, _ty, _inEnv);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordVarBindingAndName(threadData_t *threadData, modelica_metatype _inVar, modelica_string *out_outName)
{
modelica_metatype _outBinding = NULL;
modelica_string _outName = NULL;
modelica_string tmp1_c1 __attribute__((unused)) = 0;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inVar;
{
modelica_string _name = NULL;
modelica_metatype _ty = 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 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_name = tmpMeta[2];
_ty = tmpMeta[3];
_binding = tmpMeta[4];
_val = omc_CevalFunction_getBindingOrDefault(threadData, _binding, _ty);
tmpMeta[0+0] = _val;
tmp1_c1 = _name;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp6;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_name = tmpMeta[2];
tmp6 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp6) goto goto_2;
tmpMeta[2] = stringAppend(_OMC_LIT20,_name);
tmpMeta[3] = stringAppend(tmpMeta[2],_OMC_LIT21);
omc_Debug_traceln(threadData, tmpMeta[3]);
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:;
}
}
_outBinding = tmpMeta[0+0];
_outName = tmp1_c1;
_return: OMC_LABEL_UNUSED
if (out_outName) { *out_outName = _outName; }
return _outBinding;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_generateDefaultBinding(threadData_t *threadData, modelica_metatype _inType)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inType;
{
modelica_metatype _dim = NULL;
modelica_integer _int_dim;
modelica_metatype _dims = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _values = NULL;
modelica_metatype _value = NULL;
modelica_metatype _path = NULL;
modelica_metatype _vars = NULL;
modelica_metatype _var_names = 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 < 8; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,1) == 0) goto tmp2_end;
tmp3 += 6;
tmpMeta[0] = _OMC_LIT22;
goto tmp2_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,1,1) == 0) goto tmp2_end;
tmp3 += 5;
tmpMeta[0] = _OMC_LIT24;
goto tmp2_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,2,1) == 0) goto tmp2_end;
tmp3 += 4;
tmpMeta[0] = _OMC_LIT25;
goto tmp2_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmp3 += 3;
tmpMeta[0] = _OMC_LIT26;
goto tmp2_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,5) == 0) goto tmp2_end;
tmp3 += 2;
tmpMeta[0] = _OMC_LIT28;
goto tmp2_done;
}
case 5: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,6,2) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
if (listEmpty(tmpMeta[2])) goto tmp2_end;
tmpMeta[3] = MMC_CAR(tmpMeta[2]);
tmpMeta[4] = MMC_CDR(tmpMeta[2]);
if (!listEmpty(tmpMeta[4])) goto tmp2_end;
_ty = tmpMeta[1];
_dim = tmpMeta[3];
tmp3 += 1;
_int_dim = omc_Expression_dimensionSize(threadData, _dim);
_value = omc_CevalFunction_generateDefaultBinding(threadData, _ty);
_values = omc_List_fill(threadData, _value, _int_dim);
_dims = omc_ValuesUtil_valueDimensions(threadData, _value);
tmpMeta[1] = mmc_mk_cons(mmc_mk_integer(_int_dim), _dims);
tmpMeta[2] = mmc_mk_box3(8, &Values_Value_ARRAY__desc, _values, tmpMeta[1]);
tmpMeta[0] = tmpMeta[2];
goto tmp2_done;
}
case 6: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,9,3) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],3,1) == 0) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
_path = tmpMeta[2];
_vars = tmpMeta[3];
_values = omc_List_map__2(threadData, _vars, boxvar_CevalFunction_getRecordVarBindingAndName ,&_var_names);
tmpMeta[1] = mmc_mk_box5(13, &Values_Value_RECORD__desc, _path, _values, _var_names, mmc_mk_integer(((modelica_integer) -1)));
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
case 7: {
modelica_boolean tmp5;
tmp5 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp5) goto goto_1;
omc_Debug_trace(threadData, _OMC_LIT29);
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 < 8) {
goto tmp2_top;
}
MMC_THROW_INTERNAL();
tmp2_done2:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getBindingOrDefault(threadData_t *threadData, modelica_metatype _inBinding, modelica_metatype _inType)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inBinding;
{
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,2,2) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_val = tmpMeta[1];
tmpMeta[0] = _val;
goto tmp2_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,1,4) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
if (optionNone(tmpMeta[1])) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 1));
_val = tmpMeta[2];
tmpMeta[0] = _val;
goto tmp2_done;
}
case 2: {
tmpMeta[0] = omc_CevalFunction_generateDefaultBinding(threadData, _inType);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getBindingValueOpt(threadData_t *threadData, modelica_metatype _inBinding)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inBinding;
{
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 3; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,2,2) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_val = tmpMeta[1];
tmpMeta[0] = mmc_mk_some(_val);
goto tmp2_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,1,4) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
if (optionNone(tmpMeta[1])) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 1));
_val = tmpMeta[2];
tmpMeta[0] = mmc_mk_some(_val);
goto tmp2_done;
}
case 2: {
tmpMeta[0] = mmc_mk_none();
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getVariableTypeAndValue(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inEnv, modelica_metatype *out_outValue)
{
modelica_metatype _outType = NULL;
modelica_metatype _outValue = NULL;
modelica_metatype _binding = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outType = omc_CevalFunction_getVariableTypeAndBinding(threadData, _inCref, _inEnv ,&_binding);
_outValue = omc_CevalFunction_getBindingOrDefault(threadData, _binding, _outType);
_return: OMC_LABEL_UNUSED
if (out_outValue) { *out_outValue = _outValue; }
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getVariableTypeAndBinding(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inEnv, modelica_metatype *out_outBinding)
{
modelica_metatype _outType = NULL;
modelica_metatype _outBinding = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
omc_Lookup_lookupVar(threadData, omc_FCore_emptyCache(threadData), _inEnv, _inCref ,NULL ,&_outType ,&_outBinding ,NULL ,NULL ,NULL ,NULL ,NULL);
_return: OMC_LABEL_UNUSED
if (out_outBinding) { *out_outBinding = _outBinding; }
return _outType;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateRecordComponentValue(threadData_t *threadData, modelica_string _inComponentId, modelica_metatype _inComponentValue, modelica_metatype _inRecordValue)
{
modelica_metatype _outRecordValue = NULL;
modelica_metatype _name = NULL;
modelica_metatype _vals = NULL;
modelica_metatype _comps = NULL;
modelica_integer _pos;
modelica_integer tmp1;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[0] = _inRecordValue;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[0],10,4) == 0) MMC_THROW_INTERNAL();
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 2));
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 3));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 4));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 5));
tmp1 = mmc_unbox_integer(tmpMeta[4]);
if (-1 != tmp1) MMC_THROW_INTERNAL();
_name = tmpMeta[1];
_vals = tmpMeta[2];
_comps = tmpMeta[3];
_pos = omc_List_position(threadData, _inComponentId, _comps);
_vals = omc_List_replaceAt(threadData, _inComponentValue, _pos, _vals);
tmpMeta[0] = mmc_mk_box5(13, &Values_Value_RECORD__desc, _name, _vals, _comps, mmc_mk_integer(((modelica_integer) -1)));
_outRecordValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outRecordValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateRecordComponentBinding(threadData_t *threadData, modelica_metatype _inVar, modelica_string _inComponentId, modelica_metatype _inValue)
{
modelica_metatype _outVar = NULL;
modelica_metatype _val = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outVar = _inVar;
_val = omc_CevalFunction_getBindingOrDefault(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_outVar), 5))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_outVar), 4))));
_val = omc_CevalFunction_updateRecordComponentValue(threadData, _inComponentId, _inValue, _val);
tmpMeta[1] = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _val, _OMC_LIT30);
tmpMeta[0] = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta[0]), MMC_UNTAGPTR(_outVar), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta[0]))[5] = tmpMeta[1];
_outVar = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outVar;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateRecordBinding(threadData_t *threadData, modelica_metatype _inVar, modelica_metatype _inValue)
{
modelica_metatype _outVar = NULL;
modelica_string _name = NULL;
modelica_metatype _attr = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _c = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outVar = _inVar;
tmpMeta[1] = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _inValue, _OMC_LIT30);
tmpMeta[0] = MMC_TAGPTR(mmc_alloc_words(8));
memcpy(MMC_UNTAGPTR(tmpMeta[0]), MMC_UNTAGPTR(_outVar), 8*sizeof(modelica_metatype));
((modelica_metatype*)MMC_UNTAGPTR(tmpMeta[0]))[5] = tmpMeta[1];
_outVar = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outVar;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_updateVariableBinding(threadData_t *threadData, modelica_metatype _inVariableCref, modelica_metatype _inEnv, modelica_metatype _inType, modelica_metatype _inNewValue)
{
modelica_metatype _outEnv = NULL;
modelica_string _var_name = NULL;
modelica_metatype _var = NULL;
modelica_metatype tmpMeta[1] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_var_name = omc_ComponentReference_crefStr(threadData, _inVariableCref);
tmpMeta[0] = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _inNewValue, _OMC_LIT30);
_var = omc_CevalFunction_makeFunctionVariable(threadData, _var_name, _inType, tmpMeta[0]);
_outEnv = omc_FGraph_updateComp(threadData, _inEnv, _var, _OMC_LIT31, omc_FGraph_empty(threadData));
_return: OMC_LABEL_UNUSED
return _outEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignWholeDim(threadData_t *threadData, modelica_metatype _inNewValues, modelica_metatype _inOldValues, modelica_metatype _inSubscripts, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outResult = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inNewValues;
tmp4_2 = _inOldValues;
{
modelica_metatype _v1 = NULL;
modelica_metatype _v2 = NULL;
modelica_metatype _vl1 = NULL;
modelica_metatype _vl2 = NULL;
modelica_metatype _cache = 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[2] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 1: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_1);
tmpMeta[3] = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_2);
tmpMeta[5] = MMC_CDR(tmp4_2);
_v1 = tmpMeta[2];
_vl1 = tmpMeta[3];
_v2 = tmpMeta[4];
_vl2 = tmpMeta[5];
_cache = omc_CevalFunction_assignVector(threadData, _v1, _v2, _inSubscripts, _inCache, _inEnv ,&_v1);
_cache = omc_CevalFunction_assignWholeDim(threadData, _vl1, _vl2, _inSubscripts, _inCache, _inEnv ,&_vl1);
tmpMeta[2] = mmc_mk_cons(_v1, _vl1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[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];
_outResult = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignSlice(threadData_t *threadData, modelica_metatype _inNewValues, modelica_metatype _inOldValues, modelica_metatype _inIndices, modelica_metatype _inSubscripts, modelica_integer _inIndex, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outResult = NULL;
modelica_metatype tmpMeta[8] __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 = _inNewValues;
tmp4_2 = _inOldValues;
tmp4_3 = _inIndices;
{
modelica_metatype _v1 = NULL;
modelica_metatype _v2 = NULL;
modelica_metatype _index = NULL;
modelica_metatype _vl1 = NULL;
modelica_metatype _vl2 = NULL;
modelica_metatype _rest_indices = 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_3)) goto tmp3_end;
tmp4 += 2;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inOldValues;
goto tmp3_done;
}
case 1: {
modelica_boolean tmp6;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_3);
tmpMeta[5] = MMC_CDR(tmp4_3);
_v2 = tmpMeta[2];
_vl2 = tmpMeta[3];
_index = tmpMeta[4];
_vl1 = tmp4_1;
tmp6 = (_inIndex < omc_ValuesUtil_valueInteger(threadData, _index));
if (1 != tmp6) goto goto_2;
_cache = omc_CevalFunction_assignSlice(threadData, _vl1, _vl2, _inIndices, _inSubscripts, ((modelica_integer) 1) + _inIndex, _inCache, _inEnv ,&_vl1);
tmpMeta[2] = mmc_mk_cons(_v2, _vl1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 2: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_1);
tmpMeta[3] = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_2);
tmpMeta[5] = MMC_CDR(tmp4_2);
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmp4_3);
tmpMeta[7] = MMC_CDR(tmp4_3);
_v1 = tmpMeta[2];
_vl1 = tmpMeta[3];
_v2 = tmpMeta[4];
_vl2 = tmpMeta[5];
_rest_indices = tmpMeta[7];
_cache = omc_CevalFunction_assignVector(threadData, _v1, _v2, _inSubscripts, _inCache, _inEnv ,&_v1);
_cache = omc_CevalFunction_assignSlice(threadData, _vl1, _vl2, _rest_indices, _inSubscripts, ((modelica_integer) 1) + _inIndex, _inCache, _inEnv ,&_vl1);
tmpMeta[2] = mmc_mk_cons(_v1, _vl1);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[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];
_outResult = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_assignSlice(threadData_t *threadData, modelica_metatype _inNewValues, modelica_metatype _inOldValues, modelica_metatype _inIndices, modelica_metatype _inSubscripts, modelica_metatype _inIndex, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inIndex);
_outCache = omc_CevalFunction_assignSlice(threadData, _inNewValues, _inOldValues, _inIndices, _inSubscripts, tmp1, _inCache, _inEnv, out_outResult);
return _outCache;
}
DLLExport
modelica_metatype omc_CevalFunction_assignVector(threadData_t *threadData, modelica_metatype _inNewValue, modelica_metatype _inOldValue, modelica_metatype _inSubscripts, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outResult)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outResult = NULL;
modelica_metatype tmpMeta[8] __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 = _inNewValue;
tmp4_2 = _inOldValue;
tmp4_3 = _inSubscripts;
{
modelica_metatype _e = NULL;
modelica_metatype _index = NULL;
modelica_metatype _val = NULL;
modelica_metatype _values = NULL;
modelica_metatype _values2 = NULL;
modelica_metatype _old_values = NULL;
modelica_metatype _old_values2 = NULL;
modelica_metatype _indices = NULL;
modelica_metatype _dims = NULL;
modelica_integer _i;
modelica_metatype _sub = NULL;
modelica_metatype _rest_subs = 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 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_3)) goto tmp3_end;
tmp4 += 4;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inNewValue;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_3);
tmpMeta[5] = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[4],2,1) == 0) goto tmp3_end;
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[4]), 2));
_values = tmpMeta[2];
_dims = tmpMeta[3];
_e = tmpMeta[6];
_rest_subs = tmpMeta[5];
tmp4 += 2;
_cache = omc_CevalFunction_cevalExp(threadData, _e, _inCache, _inEnv ,&_index);
_i = omc_ValuesUtil_valueInteger(threadData, _index);
_val = listGet(_values, _i);
_cache = omc_CevalFunction_assignVector(threadData, _inNewValue, _val, _rest_subs, _cache, _inEnv ,&_val);
_values = omc_List_replaceAt(threadData, _val, _i, _values);
tmpMeta[2] = mmc_mk_box3(8, &Values_Value_ARRAY__desc, _values, _dims);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 2: {
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[5] = MMC_CAR(tmp4_3);
tmpMeta[6] = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[5],1,1) == 0) goto tmp3_end;
tmpMeta[7] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[5]), 2));
_values = tmpMeta[2];
_old_values = tmpMeta[3];
_dims = tmpMeta[4];
_e = tmpMeta[7];
_rest_subs = tmpMeta[6];
tmp4 += 1;
tmpMeta[7] = omc_CevalFunction_cevalExp(threadData, _e, _inCache, _inEnv, &tmpMeta[2]);
_cache = tmpMeta[7];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],5,2) == 0) goto goto_2;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
if (listEmpty(tmpMeta[3])) goto goto_2;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[4],0,1) == 0) goto goto_2;
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[4]), 2));
tmp6 = mmc_unbox_integer(tmpMeta[6]);
_indices = tmpMeta[3];
_i = tmp6;
_old_values = omc_List_splitr(threadData, _old_values, ((modelica_integer) -1) + _i ,&_old_values2);
_cache = omc_CevalFunction_assignSlice(threadData, _values, _old_values2, _indices, _rest_subs, _i, _cache, _inEnv ,&_values2);
_values = omc_List_append__reverse(threadData, _old_values, _values2);
tmpMeta[2] = mmc_mk_box3(8, &Values_Value_ARRAY__desc, _values, _dims);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,5,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[5] = MMC_CAR(tmp4_3);
tmpMeta[6] = MMC_CDR(tmp4_3);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[5],0,0) == 0) goto tmp3_end;
_values = tmpMeta[2];
_values2 = tmpMeta[3];
_dims = tmpMeta[4];
_rest_subs = tmpMeta[6];
_cache = omc_CevalFunction_assignWholeDim(threadData, _values, _values2, _rest_subs, _inCache, _inEnv ,&_values);
tmpMeta[2] = mmc_mk_box3(8, &Values_Value_ARRAY__desc, _values, _dims);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 4: {
modelica_boolean tmp7;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_3);
tmpMeta[3] = MMC_CDR(tmp4_3);
_sub = tmpMeta[2];
tmp7 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp7) goto goto_2;
fputs(MMC_STRINGDATA(_OMC_LIT32),stdout);
tmpMeta[2] = stringAppend(omc_ExpressionDump_printSubscriptStr(threadData, _sub),_OMC_LIT21);
fputs(MMC_STRINGDATA(tmpMeta[2]),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 < 5) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outResult = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignRecordComponents(threadData_t *threadData, modelica_metatype _inVars, modelica_metatype _inValues, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[8] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inVars;
tmp4_2 = _inValues;
{
modelica_metatype _rest_vars = NULL;
modelica_metatype _val = NULL;
modelica_metatype _rest_vals = NULL;
modelica_string _name = NULL;
modelica_metatype _cr = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
goto tmp3_done;
}
case 1: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_1);
tmpMeta[3] = MMC_CDR(tmp4_1);
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 4));
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmp4_2);
tmpMeta[7] = MMC_CDR(tmp4_2);
_name = tmpMeta[4];
_ty = tmpMeta[5];
_rest_vars = tmpMeta[3];
_val = tmpMeta[6];
_rest_vals = tmpMeta[7];
tmpMeta[2] = MMC_REFSTRUCTLIT(mmc_nil);
_cr = omc_ComponentReference_makeCrefIdent(threadData, _name, _ty, tmpMeta[2]);
_cache = omc_CevalFunction_assignVariable(threadData, _cr, _val, _inCache, _inEnv ,&_env);
_inVars = _rest_vars;
_inValues = _rest_vals;
_inCache = _cache;
_inEnv = _env;
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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignRecord(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inValue, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inType;
tmp4_2 = _inValue;
{
modelica_metatype _values = NULL;
modelica_metatype _vars = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,10,4) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
_vars = tmpMeta[2];
_values = tmpMeta[3];
tmpMeta[0+0] = omc_CevalFunction_assignRecordComponents(threadData, _vars, _values, _inCache, _inEnv, &tmpMeta[0+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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignTuple(threadData_t *threadData, modelica_metatype _inLhsCrefs, modelica_metatype _inRhsValues, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inLhsCrefs;
tmp4_2 = _inRhsValues;
tmp4_3 = _inCache;
tmp4_4 = _inEnv;
{
modelica_metatype _cr = NULL;
modelica_metatype _rest_crefs = NULL;
modelica_metatype _value = NULL;
modelica_metatype _rest_vals = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = 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;
_cache = tmp4_3;
_env = tmp4_4;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 1: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_1);
tmpMeta[3] = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_2);
tmpMeta[5] = MMC_CDR(tmp4_2);
_cr = tmpMeta[2];
_rest_crefs = tmpMeta[3];
_value = tmpMeta[4];
_rest_vals = tmpMeta[5];
_cache = tmp4_3;
_env = tmp4_4;
_cache = omc_CevalFunction_assignVariable(threadData, _cr, _value, _cache, _env ,&_env);
_inLhsCrefs = _rest_crefs;
_inRhsValues = _rest_vals;
_inCache = _cache;
_inEnv = _env;
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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignVariable(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inNewValue, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inCref;
{
modelica_metatype _cr = NULL;
modelica_metatype _cr_rest = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _subs = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _ety = NULL;
modelica_metatype _val = NULL;
modelica_metatype _var = NULL;
modelica_metatype _inst_status = NULL;
modelica_string _id = NULL;
modelica_string _comp_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 < 5; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,0) == 0) goto tmp3_end;
tmp4 += 4;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],9,3) == 0) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[4],3,1) == 0) goto tmp3_end;
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!listEmpty(tmpMeta[5])) goto tmp3_end;
_id = tmpMeta[2];
_ety = tmpMeta[3];
omc_Lookup_lookupIdentLocal(threadData, _inCache, _inEnv, _id ,&_var ,NULL ,NULL ,&_inst_status ,&_env);
_cache = omc_CevalFunction_assignRecord(threadData, _ety, _inNewValue, _inCache, _env ,&_env);
_var = omc_CevalFunction_updateRecordBinding(threadData, _var, _inNewValue);
_env = omc_FGraph_updateComp(threadData, _inEnv, _var, _inst_status, _env);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!listEmpty(tmpMeta[2])) goto tmp3_end;
_cr = tmp4_1;
_ty = omc_Types_unflattenArrayType(threadData, omc_Expression_typeof(threadData, omc_ValuesUtil_valueExp(threadData, _inNewValue, mmc_mk_none())));
_env = omc_CevalFunction_updateVariableBinding(threadData, _cr, _inEnv, _ty, _inNewValue);
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_subs = tmpMeta[2];
tmp4 += 1;
_cr = omc_ComponentReference_crefStripSubs(threadData, _inCref);
_ty = omc_CevalFunction_getVariableTypeAndValue(threadData, _cr, _inEnv ,&_val);
_cache = omc_CevalFunction_assignVector(threadData, _inNewValue, _val, _subs, _inCache, _inEnv ,&_val);
_env = omc_CevalFunction_updateVariableBinding(threadData, _cr, _inEnv, _ty, _val);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,4) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
if (!listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 5));
_id = tmpMeta[2];
_cr_rest = tmpMeta[4];
omc_Lookup_lookupIdentLocal(threadData, _inCache, _inEnv, _id ,&_var ,NULL ,NULL ,&_inst_status ,&_env);
_cache = omc_CevalFunction_assignVariable(threadData, _cr_rest, _inNewValue, _inCache, _env ,&_env);
_comp_id = omc_ComponentReference_crefFirstIdent(threadData, _cr_rest);
_var = omc_CevalFunction_updateRecordComponentBinding(threadData, _var, _comp_id, _inNewValue);
_env = omc_FGraph_updateComp(threadData, _inEnv, _var, _inst_status, _env);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_appendDimensions2(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inDims, modelica_metatype _inBindingDims, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outType)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outType = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;volatile modelica_metatype tmp4_3;
tmp4_1 = _inType;
tmp4_2 = _inDims;
tmp4_3 = _inBindingDims;
{
modelica_metatype _rest_dims = NULL;
modelica_metatype _dim_exp = NULL;
modelica_metatype _dim_val = NULL;
modelica_integer _dim_int;
modelica_metatype _dim = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _bind_dims = 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 < 8; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
_ty = tmp4_1;
tmp4 += 7;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _ty;
goto tmp3_done;
}
case 1: {
modelica_integer tmp6;
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_3);
tmpMeta[3] = MMC_CDR(tmp4_3);
tmp6 = mmc_unbox_integer(tmpMeta[2]);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_2);
tmpMeta[5] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[4],4,0) == 0) goto tmp3_end;
_dim_int = tmp6;
_bind_dims = tmpMeta[3];
_rest_dims = tmpMeta[5];
_ty = tmp4_1;
_dim = omc_Expression_intDimension(threadData, _dim_int);
_cache = omc_CevalFunction_appendDimensions2(threadData, _ty, _rest_dims, _bind_dims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[3] = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta[2]);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[3];
goto tmp3_done;
}
case 2: {
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],4,0) == 0) goto tmp3_end;
_rest_dims = tmpMeta[3];
_ty = tmp4_1;
_bind_dims = tmp4_3;
tmp4 += 4;
_cache = omc_CevalFunction_appendDimensions2(threadData, _ty, _rest_dims, _bind_dims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, _OMC_LIT34);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[2];
goto tmp3_done;
}
case 3: {
modelica_integer tmp7;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],0,1) == 0) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
tmp7 = mmc_unbox_integer(tmpMeta[4]);
_dim_int = tmp7;
_rest_dims = tmpMeta[3];
_ty = tmp4_1;
_bind_dims = tmp4_3;
tmp4 += 3;
tmpMeta[2] = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim_int));
_dim = tmpMeta[2];
_bind_dims = omc_List_stripFirst(threadData, _bind_dims);
_cache = omc_CevalFunction_appendDimensions2(threadData, _ty, _rest_dims, _bind_dims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[3] = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta[2]);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[3];
goto tmp3_done;
}
case 4: {
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],1,0) == 0) goto tmp3_end;
_rest_dims = tmpMeta[3];
_ty = tmp4_1;
_bind_dims = tmp4_3;
tmp4 += 2;
_dim = _OMC_LIT35;
_bind_dims = omc_List_stripFirst(threadData, _bind_dims);
_cache = omc_CevalFunction_appendDimensions2(threadData, _ty, _rest_dims, _bind_dims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[3] = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta[2]);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[3];
goto tmp3_done;
}
case 5: {
modelica_integer tmp8;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],2,3) == 0) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 4));
tmp8 = mmc_unbox_integer(tmpMeta[4]);
_dim_int = tmp8;
_rest_dims = tmpMeta[3];
_ty = tmp4_1;
_bind_dims = tmp4_3;
tmp4 += 1;
tmpMeta[2] = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim_int));
_dim = tmpMeta[2];
_bind_dims = omc_List_stripFirst(threadData, _bind_dims);
_cache = omc_CevalFunction_appendDimensions2(threadData, _ty, _rest_dims, _bind_dims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[3] = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta[2]);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[3];
goto tmp3_done;
}
case 6: {
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],3,1) == 0) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
_dim_exp = tmpMeta[4];
_rest_dims = tmpMeta[3];
_ty = tmp4_1;
_bind_dims = tmp4_3;
_cache = omc_CevalFunction_cevalExp(threadData, _dim_exp, _inCache, _inEnv ,&_dim_val);
_dim_int = omc_ValuesUtil_valueInteger(threadData, _dim_val);
tmpMeta[2] = mmc_mk_box2(3, &DAE_Dimension_DIM__INTEGER__desc, mmc_mk_integer(_dim_int));
_dim = tmpMeta[2];
_bind_dims = omc_List_stripFirst(threadData, _bind_dims);
_cache = omc_CevalFunction_appendDimensions2(threadData, _ty, _rest_dims, _bind_dims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_cons(_dim, MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[3] = mmc_mk_box3(9, &DAE_Type_T__ARRAY__desc, _ty, tmpMeta[2]);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = tmpMeta[3];
goto tmp3_done;
}
case 7: {
modelica_boolean tmp9;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
tmp9 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp9) goto goto_2;
omc_Debug_trace(threadData, _OMC_LIT36);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 8) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outType = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outType) { *out_outType = _outType; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_appendDimensions(threadData_t *threadData, modelica_metatype _inType, modelica_metatype _inOptBinding, modelica_metatype _inDims, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outType)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outType = NULL;
modelica_metatype _binding_dims = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_binding_dims = omc_ValuesUtil_valueDimensions(threadData, omc_Util_getOptionOrDefault(threadData, _inOptBinding, _OMC_LIT22));
_outCache = omc_CevalFunction_appendDimensions2(threadData, _inType, _inDims, _binding_dims, _inCache, _inEnv ,&_outType);
_return: OMC_LABEL_UNUSED
if (out_outType) { *out_outType = _outType; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithForScope(threadData_t *threadData, modelica_string _inIterName, modelica_metatype _inIterType, modelica_metatype _inEnv, modelica_metatype *out_outIterType, modelica_metatype *out_outIterCref)
{
modelica_metatype _outEnv = NULL;
modelica_metatype _outIterType = NULL;
modelica_metatype _outIterCref = NULL;
modelica_metatype _iter_cr = NULL;
modelica_metatype tmpMeta[1] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outIterType = omc_Types_expTypetoTypesType(threadData, _inIterType);
_outEnv = omc_FGraph_addForIterator(threadData, _inEnv, _inIterName, _outIterType, _OMC_LIT37, _OMC_LIT38, _OMC_LIT40);
tmpMeta[0] = MMC_REFSTRUCTLIT(mmc_nil);
_outIterCref = omc_ComponentReference_makeCrefIdent(threadData, _inIterName, _inIterType, tmpMeta[0]);
_return: OMC_LABEL_UNUSED
if (out_outIterType) { *out_outIterType = _outIterType; }
if (out_outIterCref) { *out_outIterCref = _outIterCref; }
return _outEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithRecordVar(threadData_t *threadData, modelica_metatype _inVar, modelica_metatype _inOptValue, modelica_metatype _inEnv)
{
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _inVar;
tmp3_2 = _inEnv;
{
modelica_string _name = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 1; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_2), 1));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_2), 2));
_name = tmpMeta[1];
_ty = tmpMeta[2];
_cache = tmpMeta[3];
_env = tmpMeta[4];
tmpMeta[1] = MMC_REFSTRUCTLIT(mmc_nil);
_cache = omc_CevalFunction_extendEnvWithVar(threadData, _name, _ty, _inOptValue, tmpMeta[1], _cache, _env ,&_env);
tmpMeta[1] = mmc_mk_box2(0, _cache, _env);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outEnv = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outEnv;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_getRecordValues(threadData_t *threadData, modelica_metatype _inOptValue, modelica_metatype _inRecordType)
{
modelica_metatype _outValues = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _inOptValue;
tmp3_2 = _inRecordType;
{
modelica_metatype _vals = NULL;
modelica_metatype _vars = NULL;
modelica_integer _n;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (optionNone(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],10,4) == 0) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 3));
_vals = tmpMeta[2];
tmpMeta[0] = omc_List_map(threadData, _vals, boxvar_Util_makeOption);
goto tmp2_done;
}
case 1: {
if (!optionNone(tmp3_1)) goto tmp2_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_2,9,3) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_2), 3));
_vars = tmpMeta[1];
_n = listLength(_vars);
tmpMeta[0] = omc_List_fill(threadData, mmc_mk_none(), _n);
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outValues = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValues;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_makeRecordEnvironment(threadData_t *threadData, modelica_metatype _inRecordType, modelica_metatype _inOptValue, modelica_metatype _inCache, modelica_metatype _inGraph, modelica_metatype *out_outRecordEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outRecordEnv = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inRecordType;
{
modelica_metatype _var_lst = NULL;
modelica_metatype _vals = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _graph = NULL;
modelica_metatype _parent = NULL;
modelica_metatype _child = NULL;
modelica_metatype _node = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,9,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],3,1) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_var_lst = tmpMeta[3];
_parent = omc_FGraph_lastScopeRef(threadData, _inGraph);
tmpMeta[2] = mmc_mk_cons(_parent, MMC_REFSTRUCTLIT(mmc_nil));
_graph = omc_FGraph_node(threadData, _inGraph, _OMC_LIT41, tmpMeta[2], _OMC_LIT42 ,&_node);
_child = omc_FNode_toRef(threadData, _node);
omc_FNode_addChildRef(threadData, _parent, _OMC_LIT41, _child, 0);
_graph = omc_FGraph_pushScopeRef(threadData, _graph, _child);
_vals = omc_CevalFunction_getRecordValues(threadData, _inOptValue, _inRecordType);
tmpMeta[2] = mmc_mk_box2(0, _inCache, _graph);
tmpMeta[3] = omc_List_threadFold(threadData, _var_lst, _vals, boxvar_CevalFunction_extendEnvWithRecordVar, tmpMeta[2]);
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 1));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
_cache = tmpMeta[4];
_graph = tmpMeta[5];
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _graph;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outRecordEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outRecordEnv) { *out_outRecordEnv = _outRecordEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_makeBinding(threadData_t *threadData, modelica_metatype _inBindingValue)
{
modelica_metatype _outBinding = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inBindingValue;
{
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (optionNone(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 1));
_val = tmpMeta[1];
tmpMeta[1] = mmc_mk_box3(5, &DAE_Binding_VALBOUND__desc, _val, _OMC_LIT30);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
case 1: {
if (!optionNone(tmp3_1)) goto tmp2_end;
tmpMeta[0] = _OMC_LIT37;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outBinding = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outBinding;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_makeFunctionVariable(threadData_t *threadData, modelica_string _inName, modelica_metatype _inType, modelica_metatype _inBinding)
{
modelica_metatype _outVar = NULL;
modelica_metatype tmpMeta[1] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[0] = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _inName, _OMC_LIT49, _inType, _inBinding, mmc_mk_boolean(0), mmc_mk_none());
_outVar = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outVar;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithVar(threadData_t *threadData, modelica_string _inName, modelica_metatype _inType, modelica_metatype _inOptValue, modelica_metatype _inDims, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
{
modelica_metatype _ty = NULL;
modelica_metatype _var = NULL;
modelica_metatype _binding = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _record_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_boolean tmp6;
tmp6 = omc_Types_isRecord(threadData, _inType);
if (1 != tmp6) goto goto_2;
_binding = omc_CevalFunction_makeBinding(threadData, _inOptValue);
_cache = omc_CevalFunction_appendDimensions(threadData, _inType, _inOptValue, _inDims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _inName, _OMC_LIT49, _ty, _binding, mmc_mk_boolean(0), mmc_mk_none());
_var = tmpMeta[2];
_cache = omc_CevalFunction_makeRecordEnvironment(threadData, _inType, _inOptValue, _cache, _inEnv ,&_record_env);
tmpMeta[2] = mmc_mk_box9(6, &SCode_Element_COMPONENT__desc, _inName, _OMC_LIT53, _OMC_LIT56, _OMC_LIT57, _OMC_LIT58, _OMC_LIT59, mmc_mk_none(), _OMC_LIT60);
_env = omc_FGraph_mkComponentNode(threadData, _inEnv, _var, tmpMeta[2], _OMC_LIT61, _OMC_LIT31, _record_env);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
case 1: {
_binding = omc_CevalFunction_makeBinding(threadData, _inOptValue);
_cache = omc_CevalFunction_appendDimensions(threadData, _inType, _inOptValue, _inDims, _inCache, _inEnv ,&_ty);
tmpMeta[2] = mmc_mk_box7(3, &DAE_Var_TYPES__VAR__desc, _inName, _OMC_LIT49, _ty, _binding, mmc_mk_boolean(0), mmc_mk_none());
_var = tmpMeta[2];
tmpMeta[2] = mmc_mk_box9(6, &SCode_Element_COMPONENT__desc, _inName, _OMC_LIT53, _OMC_LIT56, _OMC_LIT57, _OMC_LIT58, _OMC_LIT59, mmc_mk_none(), _OMC_LIT60);
_env = omc_FGraph_mkComponentNode(threadData, _inEnv, _var, tmpMeta[2], _OMC_LIT61, _OMC_LIT31, omc_FGraph_empty(threadData));
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inBindingValue, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_metatype _cr = NULL;
modelica_string _name = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _dims = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,13) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 9));
_cr = tmpMeta[2];
_ty = tmpMeta[3];
_dims = tmpMeta[4];
_name = omc_ComponentReference_crefStr(threadData, _cr);
tmpMeta[0+0] = omc_CevalFunction_extendEnvWithVar(threadData, _name, _ty, _inBindingValue, _dims, _inCache, _inEnv, &tmpMeta[0+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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateBinding(threadData_t *threadData, modelica_metatype _inBinding, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_metatype _outValue = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inBinding;
{
modelica_metatype _binding_exp = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _val = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (optionNone(tmp4_1)) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 1));
_binding_exp = tmpMeta[2];
_cache = omc_CevalFunction_cevalExp(threadData, _binding_exp, _inCache, _inEnv ,&_val);
tmpMeta[0+0] = mmc_mk_some(_val);
tmpMeta[0+1] = _cache;
goto tmp3_done;
}
case 1: {
if (!optionNone(tmp4_1)) goto tmp3_end;
tmpMeta[0+0] = mmc_mk_none();
tmpMeta[0+1] = _inCache;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outValue = tmpMeta[0+0];
_outCache = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithFunctionVar(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFuncParam, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inEnv;
tmp4_2 = _inFuncParam;
{
modelica_metatype _e = NULL;
modelica_metatype _val = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _binding_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 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (optionNone(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 1));
_e = tmpMeta[2];
_val = tmpMeta[3];
_env = tmp4_1;
tmp4 += 1;
tmpMeta[0+0] = omc_CevalFunction_extendEnvWithElement(threadData, _e, _val, _inCache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],0,13) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 8));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
if (!optionNone(tmpMeta[4])) goto tmp3_end;
_e = tmpMeta[2];
_binding_exp = tmpMeta[3];
_env = tmp4_1;
_val = omc_CevalFunction_evaluateBinding(threadData, _binding_exp, _inCache, _inEnv ,&_cache);
tmpMeta[0+0] = omc_CevalFunction_extendEnvWithElement(threadData, _e, _val, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
modelica_boolean tmp6;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
_e = tmpMeta[2];
tmp6 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp6) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT62);
tmpMeta[2] = mmc_mk_cons(_e, MMC_REFSTRUCTLIT(mmc_nil));
omc_Debug_traceln(threadData, omc_DAEDump_dumpElementsStr(threadData, tmpMeta[2]));
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extendEnvWithFunctionVars(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFuncParams, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = 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 = _inCache;
tmp4_2 = _inEnv;
tmp4_3 = _inFuncParams;
{
modelica_metatype _param = NULL;
modelica_metatype _rest_params = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (!listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
goto tmp3_done;
}
case 1: {
if (listEmpty(tmp4_3)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_3);
tmpMeta[3] = MMC_CDR(tmp4_3);
_param = tmpMeta[2];
_rest_params = tmpMeta[3];
_cache = tmp4_1;
_env = tmp4_2;
_cache = omc_CevalFunction_extendEnvWithFunctionVar(threadData, _cache, _env, _param ,&_env);
_inCache = _cache;
_inEnv = _env;
_inFuncParams = _rest_params;
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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_setupFunctionEnvironment(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_string _inFuncName, modelica_metatype _inFuncParams, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outEnv = omc_FGraph_openScope(threadData, _inEnv, _OMC_LIT63, _inFuncName, _OMC_LIT65);
_outCache = omc_CevalFunction_extendEnvWithFunctionVars(threadData, _inCache, _outEnv, _inFuncParams ,&_outEnv);
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_cevalExpList(threadData_t *threadData, modelica_metatype _inExpLst, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outValue)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outValue = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Ceval_cevalList(threadData, _inCache, _inEnv, _inExpLst, 1, _OMC_LIT66, ((modelica_integer) 0) ,&_outValue);
_return: OMC_LABEL_UNUSED
if (out_outValue) { *out_outValue = _outValue; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_cevalExp(threadData_t *threadData, modelica_metatype _inExp, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outValue)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outValue = NULL;
modelica_boolean tmp1;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_Ceval_ceval(threadData, _inCache, _inEnv, _inExp, 1, _OMC_LIT66, ((modelica_integer) 0) ,&_outValue);
tmp1 = valueEq(_OMC_LIT67, _outValue);
if (0 != tmp1) MMC_THROW_INTERNAL();
_return: OMC_LABEL_UNUSED
if (out_outValue) { *out_outValue = _outValue; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_extractLhsComponentRef(threadData_t *threadData, modelica_metatype _inExp)
{
modelica_metatype _outCref = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inExp;
{
modelica_metatype _cref = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,6,2) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_cref = tmpMeta[1];
tmpMeta[0] = _cref;
goto tmp2_done;
}
case 1: {
modelica_boolean tmp5;
tmp5 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp5) goto goto_1;
tmpMeta[1] = stringAppend(_OMC_LIT68,omc_ExpressionDump_printExpStr(threadData, _inExp));
omc_Debug_traceln(threadData, tmpMeta[1]);
goto goto_1;
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outCref = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateWhileStatement(threadData_t *threadData, modelica_metatype _inCondition, modelica_metatype _inStatements, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inLoopControl;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _loop_ctrl = NULL;
modelica_boolean _b;
int tmp4;
{
switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
case 4: {
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 5: {
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
default:
tmp3_default: OMC_LABEL_UNUSED; {
modelica_integer tmp5;
tmpMeta[5] = omc_CevalFunction_cevalExp(threadData, _inCondition, _inCache, _inEnv, &tmpMeta[3]);
_cache = tmpMeta[5];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],3,1) == 0) goto goto_2;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
tmp5 = mmc_unbox_integer(tmpMeta[4]);
_b = tmp5;
if(_b)
{
_cache = omc_CevalFunction_evaluateStatements(threadData, _inStatements, _cache, _inEnv ,&_env ,&_loop_ctrl);
_cache = omc_CevalFunction_evaluateWhileStatement(threadData, _inCondition, _inStatements, _cache, _env, _loop_ctrl ,&_env ,&_loop_ctrl);
}
else
{
_loop_ctrl = _OMC_LIT69;
_env = _inEnv;
}
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _loop_ctrl;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateForLoopArray(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inIter, modelica_metatype _inIterType, modelica_metatype _inValues, modelica_metatype _inStatements, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inEnv;
tmp4_2 = _inValues;
tmp4_3 = _inLoopControl;
{
modelica_metatype _value = NULL;
modelica_metatype _rest_vals = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _loop_ctrl = NULL;
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_3,1,0) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,0) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
case 2: {
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
case 3: {
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[3] = MMC_CAR(tmp4_2);
tmpMeta[4] = MMC_CDR(tmp4_2);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
_value = tmpMeta[3];
_rest_vals = tmpMeta[4];
_env = tmp4_1;
_env = omc_CevalFunction_updateVariableBinding(threadData, _inIter, _env, _inIterType, _value);
_cache = omc_CevalFunction_evaluateStatements(threadData, _inStatements, _inCache, _env ,&_env ,&_loop_ctrl);
_inCache = _cache;
_inEnv = _env;
_inValues = _rest_vals;
_inLoopControl = _loop_ctrl;
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];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateForStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inStatement;
tmp4_2 = _inEnv;
{
modelica_metatype _ety = NULL;
modelica_metatype _ty = NULL;
modelica_string _iter_name = NULL;
modelica_metatype _range = NULL;
modelica_metatype _statements = NULL;
modelica_metatype _range_vals = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _iter_cr = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp3_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp4 < 2; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,7) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 7));
_ety = tmpMeta[3];
_iter_name = tmpMeta[4];
_range = tmpMeta[5];
_statements = tmpMeta[6];
_env = tmp4_2;
tmpMeta[5] = omc_CevalFunction_cevalExp(threadData, _range, _inCache, _env, &tmpMeta[3]);
_cache = tmpMeta[5];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],5,2) == 0) goto goto_2;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
_range_vals = tmpMeta[4];
_env = omc_CevalFunction_extendEnvWithForScope(threadData, _iter_name, _ety, _env ,&_ty ,&_iter_cr);
tmpMeta[0+0] = omc_CevalFunction_evaluateForLoopArray(threadData, _cache, _env, _iter_cr, _ty, _range_vals, _statements, _OMC_LIT69, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 1: {
modelica_boolean tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,7) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
_range = tmpMeta[3];
tmp6 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp6) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT70);
omc_Debug_traceln(threadData, omc_ExpressionDump_printExpStr(threadData, _range));
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 2) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateIfStatement2(threadData_t *threadData, modelica_boolean _inCondition, modelica_metatype _inStatements, modelica_metatype _inElse, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_boolean tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inCondition;
tmp4_2 = _inStatements;
tmp4_3 = _inElse;
tmp4_4 = _inEnv;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _statements = NULL;
modelica_metatype _condition = NULL;
modelica_boolean _bool_condition;
modelica_metatype _else_branch = 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;
_statements = tmp4_2;
_env = tmp4_4;
tmpMeta[0+0] = omc_CevalFunction_evaluateStatements(threadData, _statements, _inCache, _env, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 1: {
if (0 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,2,1) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
_statements = tmpMeta[3];
_env = tmp4_4;
tmpMeta[0+0] = omc_CevalFunction_evaluateStatements(threadData, _statements, _inCache, _env, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 2: {
modelica_integer tmp6;
if (0 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,1,3) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 3));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_3), 4));
_condition = tmpMeta[3];
_statements = tmpMeta[4];
_else_branch = tmpMeta[5];
_env = tmp4_4;
tmpMeta[5] = omc_CevalFunction_cevalExp(threadData, _condition, _inCache, _env, &tmpMeta[3]);
_cache = tmpMeta[5];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],3,1) == 0) goto goto_2;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
tmp6 = mmc_unbox_integer(tmpMeta[4]);
_bool_condition = tmp6;
_inCondition = _bool_condition;
_inStatements = _statements;
_inElse = _else_branch;
_inCache = _cache;
_inEnv = _env;
goto _tailrecursive;
goto tmp3_done;
}
case 3: {
if (0 != tmp4_1) goto tmp3_end;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_3,0,0) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
goto_2:;
MMC_THROW_INTERNAL();
goto tmp3_done;
tmp3_done:;
}
}
_outCache = tmpMeta[0+0];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_evaluateIfStatement2(threadData_t *threadData, modelica_metatype _inCondition, modelica_metatype _inStatements, modelica_metatype _inElse, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_integer tmp1;
modelica_metatype _outCache = NULL;
tmp1 = mmc_unbox_integer(_inCondition);
_outCache = omc_CevalFunction_evaluateIfStatement2(threadData, tmp1, _inStatements, _inElse, _inCache, _inEnv, out_outEnv, out_outLoopControl);
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateIfStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inStatement;
{
modelica_metatype _cond = NULL;
modelica_metatype _stmts = NULL;
modelica_metatype _else_branch = NULL;
modelica_metatype _cache = NULL;
modelica_boolean _bool_cond;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,4) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cond = tmpMeta[3];
_stmts = tmpMeta[4];
_else_branch = tmpMeta[5];
tmpMeta[5] = omc_CevalFunction_cevalExp(threadData, _cond, _inCache, _inEnv, &tmpMeta[3]);
_cache = tmpMeta[5];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],3,1) == 0) goto goto_2;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
tmp6 = mmc_unbox_integer(tmpMeta[4]);
_bool_cond = tmp6;
tmpMeta[0+0] = omc_CevalFunction_evaluateIfStatement2(threadData, _bool_cond, _stmts, _else_branch, _cache, _inEnv, &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];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateTupleAssignStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inStatement;
tmp4_2 = _inEnv;
{
modelica_metatype _lhs_expl = NULL;
modelica_metatype _rhs = NULL;
modelica_metatype _rhs_vals = NULL;
modelica_metatype _lhs_crefs = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_lhs_expl = tmpMeta[2];
_rhs = tmpMeta[3];
_env = tmp4_2;
tmpMeta[4] = omc_CevalFunction_cevalExp(threadData, _rhs, _inCache, _env, &tmpMeta[2]);
_cache = tmpMeta[4];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],8,1) == 0) goto goto_2;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[2]), 2));
_rhs_vals = tmpMeta[3];
_lhs_crefs = omc_List_map(threadData, _lhs_expl, boxvar_CevalFunction_extractLhsComponentRef);
tmpMeta[0+0] = omc_CevalFunction_assignTuple(threadData, _lhs_crefs, _rhs_vals, _cache, _env, &tmpMeta[0+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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateStatements2(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inStatement;
tmp4_2 = _inLoopControl;
{
modelica_metatype _stmt = NULL;
modelica_metatype _rest_stmts = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _loop_ctrl = NULL;
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_2,1,0) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
case 2: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
case 3: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[3] = MMC_CAR(tmp4_1);
tmpMeta[4] = MMC_CDR(tmp4_1);
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
_stmt = tmpMeta[3];
_rest_stmts = tmpMeta[4];
_cache = omc_CevalFunction_evaluateStatement(threadData, _stmt, _inCache, _inEnv ,&_env ,&_loop_ctrl);
_inStatement = _rest_stmts;
_inCache = _cache;
_inEnv = _env;
_inLoopControl = _loop_ctrl;
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];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateStatements(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_outCache = omc_CevalFunction_evaluateStatements2(threadData, _inStatement, _inCache, _inEnv, _OMC_LIT69 ,&_outEnv ,&_outLoopControl);
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateStatement(threadData_t *threadData, modelica_metatype _inStatement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[10] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
tmp4_1 = _inStatement;
tmp4_2 = _inCache;
tmp4_3 = _inEnv;
{
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _lhs = NULL;
modelica_metatype _rhs = NULL;
modelica_metatype _condition = NULL;
modelica_metatype _lhs_cref = NULL;
modelica_metatype _rhs_val = NULL;
modelica_metatype _v = NULL;
modelica_metatype _exps = NULL;
modelica_metatype _vals = NULL;
modelica_metatype _statements = NULL;
modelica_metatype _tailCall = NULL;
modelica_string _var = NULL;
modelica_metatype _vars = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 12; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,4) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_lhs = tmpMeta[3];
_rhs = tmpMeta[4];
_cache = tmp4_2;
_env = tmp4_3;
_cache = omc_CevalFunction_cevalExp(threadData, _rhs, _cache, _env ,&_rhs_val);
_lhs_cref = omc_CevalFunction_extractLhsComponentRef(threadData, _lhs);
_cache = omc_CevalFunction_assignVariable(threadData, _lhs_cref, _rhs_val, _cache, _env ,&_env);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,4) == 0) goto tmp3_end;
_cache = omc_CevalFunction_evaluateTupleAssignStatement(threadData, _inStatement, _inCache, _inEnv ,&_env);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,4) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_lhs = tmpMeta[3];
_rhs = tmpMeta[4];
_env = tmp4_3;
_cache = omc_CevalFunction_cevalExp(threadData, _rhs, _inCache, _env ,&_rhs_val);
_lhs_cref = omc_CevalFunction_extractLhsComponentRef(threadData, _lhs);
_cache = omc_CevalFunction_assignVariable(threadData, _lhs_cref, _rhs_val, _cache, _env ,&_env);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,3,4) == 0) goto tmp3_end;
tmpMeta[0+0] = omc_CevalFunction_evaluateIfStatement(threadData, _inStatement, _inCache, _inEnv, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 4: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,4,7) == 0) goto tmp3_end;
tmpMeta[0+0] = omc_CevalFunction_evaluateForStatement(threadData, _inStatement, _inCache, _inEnv, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 5: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,6,3) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
_condition = tmpMeta[3];
_statements = tmpMeta[4];
tmpMeta[0+0] = omc_CevalFunction_evaluateWhileStatement(threadData, _condition, _statements, _inCache, _inEnv, _OMC_LIT69, &tmpMeta[0+1], &tmpMeta[0+2]);
goto tmp3_done;
}
case 6: {
modelica_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,4) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_condition = tmpMeta[3];
tmpMeta[5] = omc_CevalFunction_cevalExp(threadData, _condition, _inCache, _inEnv, &tmpMeta[3]);
_cache = tmpMeta[5];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],3,1) == 0) goto goto_2;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
tmp6 = mmc_unbox_integer(tmpMeta[4]);
if (1 != tmp6) goto goto_2;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 7: {
modelica_integer tmp7;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,8,4) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_condition = tmpMeta[3];
tmpMeta[5] = omc_CevalFunction_cevalExp(threadData, _condition, _inCache, _inEnv, &tmpMeta[3]);
_cache = tmpMeta[5];
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],3,1) == 0) goto goto_2;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
tmp7 = mmc_unbox_integer(tmpMeta[4]);
if (1 != tmp7) goto goto_2;
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 8: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,11,2) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],13,3) == 0) goto tmp3_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 3));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 4));
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[5]), 8));
_rhs = tmpMeta[3];
_exps = tmpMeta[4];
_tailCall = tmpMeta[6];
_cache = omc_CevalFunction_cevalExpList(threadData, _exps, _inCache, _inEnv ,&_vals);
_cache = omc_CevalFunction_cevalExp(threadData, _rhs, _cache, _inEnv ,&_v);
{
modelica_metatype tmp11_1;
tmp11_1 = _tailCall;
{
volatile mmc_switch_type tmp11;
int tmp12;
tmp11 = 0;
for (; tmp11 < 4; tmp11++) {
switch (MMC_SWITCH_CAST(tmp11)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,0,0) == 0) goto tmp10_end;
tmpMeta[3+0] = _cache;
tmpMeta[3+1] = _inEnv;
tmpMeta[3+2] = _OMC_LIT69;
goto tmp10_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,1,2) == 0) goto tmp10_end;
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 3));
if (!listEmpty(tmpMeta[6])) goto tmp10_end;
tmpMeta[3+0] = _cache;
tmpMeta[3+1] = _inEnv;
tmpMeta[3+2] = _OMC_LIT71;
goto tmp10_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,1,2) == 0) goto tmp10_end;
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 3));
if (listEmpty(tmpMeta[6])) goto tmp10_end;
tmpMeta[7] = MMC_CAR(tmpMeta[6]);
tmpMeta[8] = MMC_CDR(tmpMeta[6]);
if (!listEmpty(tmpMeta[8])) goto tmp10_end;
_var = tmpMeta[7];
_cache = omc_CevalFunction_assignVariable(threadData, omc_ComponentReference_makeUntypedCrefIdent(threadData, _var), _v, _cache, _inEnv ,&_env);
tmpMeta[3+0] = _cache;
tmpMeta[3+1] = _env;
tmpMeta[3+2] = _OMC_LIT71;
goto tmp10_done;
}
case 3: {
if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,1,2) == 0) goto tmp10_end;
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp11_1), 3));
_vars = tmpMeta[6];
tmpMeta[6] = _v;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[6],8,1) == 0) goto goto_9;
tmpMeta[7] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[6]), 2));
_vals = tmpMeta[7];
{
modelica_metatype _val;
for (tmpMeta[6] = _vals; !listEmpty(tmpMeta[6]); tmpMeta[6]=MMC_CDR(tmpMeta[6]))
{
_val = MMC_CAR(tmpMeta[6]);
tmpMeta[7] = _vars;
if (listEmpty(tmpMeta[7])) goto goto_9;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
_var = tmpMeta[8];
_vars = tmpMeta[9];
_cache = omc_CevalFunction_assignVariable(threadData, omc_ComponentReference_makeUntypedCrefIdent(threadData, _var), _val, _cache, _inEnv ,&_env);
}
}
tmpMeta[3+0] = _cache;
tmpMeta[3+1] = _env;
tmpMeta[3+2] = _OMC_LIT71;
goto tmp10_done;
}
}
goto tmp10_end;
tmp10_end: ;
}
goto goto_9;
goto_9:;
goto goto_2;
goto tmp10_done;
tmp10_done:;
}
}
_cache = tmpMeta[3+0];
_env = tmpMeta[3+1];
_outLoopControl = tmpMeta[3+2];
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _env;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 9: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,12,1) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT71;
goto tmp3_done;
}
case 10: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,13,1) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT72;
goto tmp3_done;
}
case 11: {
modelica_boolean tmp13;
tmp13 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp13) goto goto_2;
omc_Debug_traceln(threadData, _OMC_LIT73);
omc_Debug_traceln(threadData, omc_DAEDump_ppStatementStr(threadData, _inStatement));
goto goto_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];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateElement(threadData_t *threadData, modelica_metatype _inElement, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;
tmp4_1 = _inElement;
{
modelica_metatype _env = NULL;
modelica_metatype _sl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 1; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,15,2) == 0) goto tmp3_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
_sl = tmpMeta[4];
tmpMeta[5] = mmc_mk_box2(0, boxvar_CevalFunction_optimizeExpTraverser, _inEnv);
tmpMeta[6] = omc_DAEUtil_traverseDAEEquationsStmts(threadData, _sl, boxvar_Expression_traverseSubexpressionsHelper, tmpMeta[5], &tmpMeta[3]);
_sl = tmpMeta[6];
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
_env = tmpMeta[4];
tmpMeta[0+0] = omc_CevalFunction_evaluateStatements(threadData, _sl, _inCache, _env, &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];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateElements(threadData_t *threadData, modelica_metatype _inElements, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inLoopControl, modelica_metatype *out_outEnv, modelica_metatype *out_outLoopControl)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype _outLoopControl = NULL;
modelica_metatype tmpMeta[5] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;
tmp4_1 = _inElements;
tmp4_2 = _inLoopControl;
{
modelica_metatype _elem = NULL;
modelica_metatype _rest_elems = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _loop_ctrl = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 3; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _inLoopControl;
goto tmp3_done;
}
case 1: {
if (!listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
tmpMeta[0+2] = _OMC_LIT69;
goto tmp3_done;
}
case 2: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[3] = MMC_CAR(tmp4_1);
tmpMeta[4] = MMC_CDR(tmp4_1);
_elem = tmpMeta[3];
_rest_elems = tmpMeta[4];
_cache = omc_CevalFunction_evaluateElement(threadData, _elem, _inCache, _inEnv ,&_env ,&_loop_ctrl);
_inElements = _rest_elems;
_inCache = _cache;
_inEnv = _env;
_inLoopControl = _loop_ctrl;
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];
_outEnv = tmpMeta[0+1];
_outLoopControl = tmpMeta[0+2];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
if (out_outLoopControl) { *out_outLoopControl = _outLoopControl; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExternalFunc(threadData_t *threadData, modelica_string _inFuncName, modelica_metatype _inFuncArgs, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[36] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_string tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inFuncName;
tmp4_2 = _inFuncArgs;
tmp4_3 = _inCache;
tmp4_4 = _inEnv;
{
modelica_metatype _arg_JOBU = NULL;
modelica_metatype _arg_JOBVL = NULL;
modelica_metatype _arg_JOBVR = NULL;
modelica_metatype _arg_JOBVT = NULL;
modelica_metatype _arg_TRANS = NULL;
modelica_metatype _arg_INFO = NULL;
modelica_metatype _arg_K = NULL;
modelica_metatype _arg_KL = NULL;
modelica_metatype _arg_KU = NULL;
modelica_metatype _arg_LDA = NULL;
modelica_metatype _arg_LDAB = NULL;
modelica_metatype _arg_LDB = NULL;
modelica_metatype _arg_LDU = NULL;
modelica_metatype _arg_LDVL = NULL;
modelica_metatype _arg_LDVR = NULL;
modelica_metatype _arg_LDVT = NULL;
modelica_metatype _arg_LWORK = NULL;
modelica_metatype _arg_M = NULL;
modelica_metatype _arg_N = NULL;
modelica_metatype _arg_NRHS = NULL;
modelica_metatype _arg_P = NULL;
modelica_metatype _arg_RANK = NULL;
modelica_metatype _arg_RCOND = NULL;
modelica_metatype _arg_IPIV = NULL;
modelica_metatype _arg_JPVT = NULL;
modelica_metatype _arg_ALPHAI = NULL;
modelica_metatype _arg_ALPHAR = NULL;
modelica_metatype _arg_BETA = NULL;
modelica_metatype _arg_C = NULL;
modelica_metatype _arg_D = NULL;
modelica_metatype _arg_DL = NULL;
modelica_metatype _arg_DU = NULL;
modelica_metatype _arg_TAU = NULL;
modelica_metatype _arg_WI = NULL;
modelica_metatype _arg_WORK = NULL;
modelica_metatype _arg_WR = NULL;
modelica_metatype _arg_X = NULL;
modelica_metatype _arg_A = NULL;
modelica_metatype _arg_AB = NULL;
modelica_metatype _arg_B = NULL;
modelica_metatype _arg_S = NULL;
modelica_metatype _arg_U = NULL;
modelica_metatype _arg_VL = NULL;
modelica_metatype _arg_VR = NULL;
modelica_metatype _arg_VT = NULL;
modelica_metatype _val_INFO = NULL;
modelica_metatype _val_RANK = NULL;
modelica_metatype _val_IPIV = NULL;
modelica_metatype _val_JPVT = NULL;
modelica_metatype _val_ALPHAI = NULL;
modelica_metatype _val_ALPHAR = NULL;
modelica_metatype _val_BETA = NULL;
modelica_metatype _val_C = NULL;
modelica_metatype _val_D = NULL;
modelica_metatype _val_DL = NULL;
modelica_metatype _val_DU = NULL;
modelica_metatype _val_TAU = NULL;
modelica_metatype _val_WI = NULL;
modelica_metatype _val_WORK = NULL;
modelica_metatype _val_WR = NULL;
modelica_metatype _val_X = NULL;
modelica_metatype _val_A = NULL;
modelica_metatype _val_AB = NULL;
modelica_metatype _val_B = NULL;
modelica_metatype _val_S = NULL;
modelica_metatype _val_U = NULL;
modelica_metatype _val_VL = NULL;
modelica_metatype _val_VR = NULL;
modelica_metatype _val_VT = NULL;
modelica_integer _INFO;
modelica_integer _K;
modelica_integer _KL;
modelica_integer _KU;
modelica_integer _LDA;
modelica_integer _LDAB;
modelica_integer _LDB;
modelica_integer _LDU;
modelica_integer _LDVL;
modelica_integer _LDVR;
modelica_integer _LDVT;
modelica_integer _LWORK;
modelica_integer _M;
modelica_integer _N;
modelica_integer _NRHS;
modelica_integer _P;
modelica_integer _RANK;
modelica_real _RCOND;
modelica_string _JOBU = NULL;
modelica_string _JOBVL = NULL;
modelica_string _JOBVR = NULL;
modelica_string _JOBVT = NULL;
modelica_string _TRANS = NULL;
modelica_metatype _IPIV = NULL;
modelica_metatype _JPVT = NULL;
modelica_metatype _ALPHAI = NULL;
modelica_metatype _ALPHAR = NULL;
modelica_metatype _BETA = NULL;
modelica_metatype _C = NULL;
modelica_metatype _D = NULL;
modelica_metatype _DL = NULL;
modelica_metatype _DU = NULL;
modelica_metatype _TAU = NULL;
modelica_metatype _WI = NULL;
modelica_metatype _WORK = NULL;
modelica_metatype _WR = NULL;
modelica_metatype _X = NULL;
modelica_metatype _S = NULL;
modelica_metatype _A = NULL;
modelica_metatype _AB = NULL;
modelica_metatype _B = NULL;
modelica_metatype _U = NULL;
modelica_metatype _VL = NULL;
modelica_metatype _VR = NULL;
modelica_metatype _VT = NULL;
modelica_metatype _arg_out = NULL;
modelica_metatype _val_out = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
volatile mmc_switch_type tmp4;
int tmp5;
tmp4 = 0;
for (; tmp4 < 16; tmp4++) {
switch (MMC_SWITCH_CAST(tmp4)) {
case 0: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT74), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (listEmpty(tmpMeta[25])) goto tmp3_end;
tmpMeta[26] = MMC_CAR(tmpMeta[25]);
tmpMeta[27] = MMC_CDR(tmpMeta[25]);
if (listEmpty(tmpMeta[27])) goto tmp3_end;
tmpMeta[28] = MMC_CAR(tmpMeta[27]);
tmpMeta[29] = MMC_CDR(tmpMeta[27]);
if (!listEmpty(tmpMeta[29])) goto tmp3_end;
_arg_JOBVL = tmpMeta[2];
_arg_JOBVR = tmpMeta[4];
_arg_N = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_WR = tmpMeta[12];
_arg_WI = tmpMeta[14];
_arg_VL = tmpMeta[16];
_arg_LDVL = tmpMeta[18];
_arg_VR = tmpMeta[20];
_arg_LDVR = tmpMeta[22];
_arg_WORK = tmpMeta[24];
_arg_LWORK = tmpMeta[26];
_arg_INFO = tmpMeta[28];
_cache = tmp4_3;
_env = tmp4_4;
_JOBVL = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_JOBVL, _cache, _env ,&_cache);
_JOBVR = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_JOBVR, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_LDVL = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDVL, _cache, _env ,&_cache);
_LDVR = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDVR, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgeev(threadData, _JOBVL, _JOBVR, _N, _A, _LDA, _LDVL, _LDVR, _WORK, _LWORK ,&_WR ,&_WI ,&_VL ,&_VR ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_WR = omc_ValuesUtil_makeRealArray(threadData, _WR);
_val_WI = omc_ValuesUtil_makeRealArray(threadData, _WI);
_val_VL = omc_ValuesUtil_makeRealMatrix(threadData, _VL);
_val_VR = omc_ValuesUtil_makeRealMatrix(threadData, _VR);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_WR, mmc_mk_cons(_arg_WI, mmc_mk_cons(_arg_VL, mmc_mk_cons(_arg_VR, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_WR, mmc_mk_cons(_val_WI, mmc_mk_cons(_val_VL, mmc_mk_cons(_val_VR, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT75), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (listEmpty(tmpMeta[25])) goto tmp3_end;
tmpMeta[26] = MMC_CAR(tmpMeta[25]);
tmpMeta[27] = MMC_CDR(tmpMeta[25]);
if (listEmpty(tmpMeta[27])) goto tmp3_end;
tmpMeta[28] = MMC_CAR(tmpMeta[27]);
tmpMeta[29] = MMC_CDR(tmpMeta[27]);
if (listEmpty(tmpMeta[29])) goto tmp3_end;
tmpMeta[30] = MMC_CAR(tmpMeta[29]);
tmpMeta[31] = MMC_CDR(tmpMeta[29]);
if (listEmpty(tmpMeta[31])) goto tmp3_end;
tmpMeta[32] = MMC_CAR(tmpMeta[31]);
tmpMeta[33] = MMC_CDR(tmpMeta[31]);
if (listEmpty(tmpMeta[33])) goto tmp3_end;
tmpMeta[34] = MMC_CAR(tmpMeta[33]);
tmpMeta[35] = MMC_CDR(tmpMeta[33]);
if (!listEmpty(tmpMeta[35])) goto tmp3_end;
_arg_JOBVL = tmpMeta[2];
_arg_JOBVR = tmpMeta[4];
_arg_N = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_ALPHAR = tmpMeta[16];
_arg_ALPHAI = tmpMeta[18];
_arg_BETA = tmpMeta[20];
_arg_VL = tmpMeta[22];
_arg_LDVL = tmpMeta[24];
_arg_VR = tmpMeta[26];
_arg_LDVR = tmpMeta[28];
_arg_WORK = tmpMeta[30];
_arg_LWORK = tmpMeta[32];
_arg_INFO = tmpMeta[34];
_cache = tmp4_3;
_env = tmp4_4;
_JOBVL = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_JOBVL, _cache, _env ,&_cache);
_JOBVR = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_JOBVR, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_LDVL = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDVL, _cache, _env ,&_cache);
_LDVR = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDVR, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_ALPHAR = omc_Lapack_dgegv(threadData, _JOBVL, _JOBVR, _N, _A, _LDA, _B, _LDB, _LDVL, _LDVR, _WORK, _LWORK ,&_ALPHAI ,&_BETA ,&_VL ,&_VR ,&_WORK ,&_INFO);
_val_ALPHAR = omc_ValuesUtil_makeRealArray(threadData, _ALPHAR);
_val_ALPHAI = omc_ValuesUtil_makeRealArray(threadData, _ALPHAI);
_val_BETA = omc_ValuesUtil_makeRealArray(threadData, _BETA);
_val_VL = omc_ValuesUtil_makeRealMatrix(threadData, _VL);
_val_VR = omc_ValuesUtil_makeRealMatrix(threadData, _VR);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_ALPHAR, mmc_mk_cons(_arg_ALPHAI, mmc_mk_cons(_arg_BETA, mmc_mk_cons(_arg_VL, mmc_mk_cons(_arg_VR, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_ALPHAR, mmc_mk_cons(_val_ALPHAI, mmc_mk_cons(_val_BETA, mmc_mk_cons(_val_VL, mmc_mk_cons(_val_VR, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 2: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT76), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (!listEmpty(tmpMeta[23])) goto tmp3_end;
_arg_TRANS = tmpMeta[2];
_arg_M = tmpMeta[4];
_arg_N = tmpMeta[6];
_arg_NRHS = tmpMeta[8];
_arg_A = tmpMeta[10];
_arg_LDA = tmpMeta[12];
_arg_B = tmpMeta[14];
_arg_LDB = tmpMeta[16];
_arg_WORK = tmpMeta[18];
_arg_LWORK = tmpMeta[20];
_arg_INFO = tmpMeta[22];
_cache = tmp4_3;
_env = tmp4_4;
_TRANS = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_TRANS, _cache, _env ,&_cache);
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgels(threadData, _TRANS, _M, _N, _NRHS, _A, _LDA, _B, _LDB, _WORK, _LWORK ,&_B ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_B, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 3: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT77), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (!listEmpty(tmpMeta[25])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_NRHS = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_JPVT = tmpMeta[16];
_arg_RCOND = tmpMeta[18];
_arg_RANK = tmpMeta[20];
_arg_WORK = tmpMeta[22];
_arg_INFO = tmpMeta[24];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_JPVT = omc_CevalFunction_evaluateExtIntArrayArg(threadData, _arg_JPVT, _cache, _env ,&_cache);
_RCOND = omc_CevalFunction_evaluateExtRealArg(threadData, _arg_RCOND, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgelsx(threadData, _M, _N, _NRHS, _A, _LDA, _B, _LDB, _JPVT, _RCOND, _WORK ,&_B ,&_JPVT ,&_RANK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_JPVT = omc_ValuesUtil_makeIntArray(threadData, _JPVT);
_val_RANK = omc_ValuesUtil_makeInteger(threadData, _RANK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_JPVT, mmc_mk_cons(_arg_RANK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_B, mmc_mk_cons(_val_JPVT, mmc_mk_cons(_val_RANK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 4: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT77), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (listEmpty(tmpMeta[25])) goto tmp3_end;
tmpMeta[26] = MMC_CAR(tmpMeta[25]);
tmpMeta[27] = MMC_CDR(tmpMeta[25]);
if (!listEmpty(tmpMeta[27])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_NRHS = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_JPVT = tmpMeta[16];
_arg_RCOND = tmpMeta[18];
_arg_RANK = tmpMeta[20];
_arg_WORK = tmpMeta[22];
_arg_INFO = tmpMeta[26];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_JPVT = omc_CevalFunction_evaluateExtIntArrayArg(threadData, _arg_JPVT, _cache, _env ,&_cache);
_RCOND = omc_CevalFunction_evaluateExtRealArg(threadData, _arg_RCOND, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgelsx(threadData, _M, _N, _NRHS, _A, _LDA, _B, _LDB, _JPVT, _RCOND, _WORK ,&_B ,&_JPVT ,&_RANK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_JPVT = omc_ValuesUtil_makeIntArray(threadData, _JPVT);
_val_RANK = omc_ValuesUtil_makeInteger(threadData, _RANK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_JPVT, mmc_mk_cons(_arg_RANK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_B, mmc_mk_cons(_val_JPVT, mmc_mk_cons(_val_RANK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 5: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT78), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (listEmpty(tmpMeta[25])) goto tmp3_end;
tmpMeta[26] = MMC_CAR(tmpMeta[25]);
tmpMeta[27] = MMC_CDR(tmpMeta[25]);
if (!listEmpty(tmpMeta[27])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_NRHS = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_JPVT = tmpMeta[16];
_arg_RCOND = tmpMeta[18];
_arg_RANK = tmpMeta[20];
_arg_WORK = tmpMeta[22];
_arg_LWORK = tmpMeta[24];
_arg_INFO = tmpMeta[26];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_JPVT = omc_CevalFunction_evaluateExtIntArrayArg(threadData, _arg_JPVT, _cache, _env ,&_cache);
_RCOND = omc_CevalFunction_evaluateExtRealArg(threadData, _arg_RCOND, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgelsy(threadData, _M, _N, _NRHS, _A, _LDA, _B, _LDB, _JPVT, _RCOND, _WORK, _LWORK ,&_B ,&_JPVT ,&_RANK ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_JPVT = omc_ValuesUtil_makeIntArray(threadData, _JPVT);
_val_RANK = omc_ValuesUtil_makeInteger(threadData, _RANK);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_JPVT, mmc_mk_cons(_arg_RANK, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_B, mmc_mk_cons(_val_JPVT, mmc_mk_cons(_val_RANK, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 6: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT79), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (!listEmpty(tmpMeta[17])) goto tmp3_end;
_arg_N = tmpMeta[2];
_arg_NRHS = tmpMeta[4];
_arg_A = tmpMeta[6];
_arg_LDA = tmpMeta[8];
_arg_IPIV = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_INFO = tmpMeta[16];
_cache = tmp4_3;
_env = tmp4_4;
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_A = omc_Lapack_dgesv(threadData, _N, _NRHS, _A, _LDA, _B, _LDB ,&_IPIV ,&_B ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_IPIV = omc_ValuesUtil_makeIntArray(threadData, _IPIV);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_IPIV, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_IPIV, mmc_mk_cons(_val_B, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 7: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT80), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (listEmpty(tmpMeta[25])) goto tmp3_end;
tmpMeta[26] = MMC_CAR(tmpMeta[25]);
tmpMeta[27] = MMC_CDR(tmpMeta[25]);
if (!listEmpty(tmpMeta[27])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_P = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_C = tmpMeta[16];
_arg_D = tmpMeta[18];
_arg_X = tmpMeta[20];
_arg_WORK = tmpMeta[22];
_arg_LWORK = tmpMeta[24];
_arg_INFO = tmpMeta[26];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_P = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_P, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_C = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_C, _cache, _env ,&_cache);
_D = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_D, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgglse(threadData, _M, _N, _P, _A, _LDA, _B, _LDB, _C, _D, _WORK, _LWORK ,&_B ,&_C ,&_D ,&_X ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_C = omc_ValuesUtil_makeRealArray(threadData, _C);
_val_D = omc_ValuesUtil_makeRealArray(threadData, _D);
_val_X = omc_ValuesUtil_makeRealArray(threadData, _X);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_C, mmc_mk_cons(_arg_D, mmc_mk_cons(_arg_X, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_B, mmc_mk_cons(_val_C, mmc_mk_cons(_val_D, mmc_mk_cons(_val_X, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 8: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT81), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (!listEmpty(tmpMeta[17])) goto tmp3_end;
_arg_N = tmpMeta[2];
_arg_NRHS = tmpMeta[4];
_arg_DL = tmpMeta[6];
_arg_D = tmpMeta[8];
_arg_DU = tmpMeta[10];
_arg_B = tmpMeta[12];
_arg_LDB = tmpMeta[14];
_arg_INFO = tmpMeta[16];
_cache = tmp4_3;
_env = tmp4_4;
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_DL = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_DL, _cache, _env ,&_cache);
_D = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_D, _cache, _env ,&_cache);
_DU = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_DU, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_DL = omc_Lapack_dgtsv(threadData, _N, _NRHS, _DL, _D, _DU, _B, _LDB ,&_D ,&_DU ,&_B ,&_INFO);
_val_DL = omc_ValuesUtil_makeRealArray(threadData, _DL);
_val_D = omc_ValuesUtil_makeRealArray(threadData, _D);
_val_DU = omc_ValuesUtil_makeRealArray(threadData, _DU);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_DL, mmc_mk_cons(_arg_D, mmc_mk_cons(_arg_DU, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_DL, mmc_mk_cons(_val_D, mmc_mk_cons(_val_DU, mmc_mk_cons(_val_B, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 9: {
if (5 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT82), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (!listEmpty(tmpMeta[21])) goto tmp3_end;
_arg_N = tmpMeta[2];
_arg_KL = tmpMeta[4];
_arg_KU = tmpMeta[6];
_arg_NRHS = tmpMeta[8];
_arg_AB = tmpMeta[10];
_arg_LDAB = tmpMeta[12];
_arg_IPIV = tmpMeta[14];
_arg_B = tmpMeta[16];
_arg_LDB = tmpMeta[18];
_arg_INFO = tmpMeta[20];
_cache = tmp4_3;
_env = tmp4_4;
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_KL = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_KL, _cache, _env ,&_cache);
_KU = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_KU, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_AB = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_AB, _cache, _env ,&_cache);
_LDAB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDAB, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_AB = omc_Lapack_dgbsv(threadData, _N, _KL, _KU, _NRHS, _AB, _LDAB, _B, _LDB ,&_IPIV ,&_B ,&_INFO);
_val_AB = omc_ValuesUtil_makeRealMatrix(threadData, _AB);
_val_IPIV = omc_ValuesUtil_makeIntArray(threadData, _IPIV);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_AB, mmc_mk_cons(_arg_IPIV, mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_AB, mmc_mk_cons(_val_IPIV, mmc_mk_cons(_val_B, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 10: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT83), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (listEmpty(tmpMeta[19])) goto tmp3_end;
tmpMeta[20] = MMC_CAR(tmpMeta[19]);
tmpMeta[21] = MMC_CDR(tmpMeta[19]);
if (listEmpty(tmpMeta[21])) goto tmp3_end;
tmpMeta[22] = MMC_CAR(tmpMeta[21]);
tmpMeta[23] = MMC_CDR(tmpMeta[21]);
if (listEmpty(tmpMeta[23])) goto tmp3_end;
tmpMeta[24] = MMC_CAR(tmpMeta[23]);
tmpMeta[25] = MMC_CDR(tmpMeta[23]);
if (listEmpty(tmpMeta[25])) goto tmp3_end;
tmpMeta[26] = MMC_CAR(tmpMeta[25]);
tmpMeta[27] = MMC_CDR(tmpMeta[25]);
if (listEmpty(tmpMeta[27])) goto tmp3_end;
tmpMeta[28] = MMC_CAR(tmpMeta[27]);
tmpMeta[29] = MMC_CDR(tmpMeta[27]);
if (!listEmpty(tmpMeta[29])) goto tmp3_end;
_arg_JOBU = tmpMeta[2];
_arg_JOBVT = tmpMeta[4];
_arg_M = tmpMeta[6];
_arg_N = tmpMeta[8];
_arg_A = tmpMeta[10];
_arg_LDA = tmpMeta[12];
_arg_S = tmpMeta[14];
_arg_U = tmpMeta[16];
_arg_LDU = tmpMeta[18];
_arg_VT = tmpMeta[20];
_arg_LDVT = tmpMeta[22];
_arg_WORK = tmpMeta[24];
_arg_LWORK = tmpMeta[26];
_arg_INFO = tmpMeta[28];
_cache = tmp4_3;
_env = tmp4_4;
_JOBU = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_JOBU, _cache, _env ,&_cache);
_JOBVT = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_JOBVT, _cache, _env ,&_cache);
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_LDU = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDU, _cache, _env ,&_cache);
_LDVT = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDVT, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgesvd(threadData, _JOBU, _JOBVT, _M, _N, _A, _LDA, _LDU, _LDVT, _WORK, _LWORK ,&_S ,&_U ,&_VT ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_S = omc_ValuesUtil_makeRealArray(threadData, _S);
_val_U = omc_ValuesUtil_makeRealMatrix(threadData, _U);
_val_VT = omc_ValuesUtil_makeRealMatrix(threadData, _VT);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_S, mmc_mk_cons(_arg_U, mmc_mk_cons(_arg_VT, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)))))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_S, mmc_mk_cons(_val_U, mmc_mk_cons(_val_VT, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)))))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 11: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT84), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (!listEmpty(tmpMeta[13])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_A = tmpMeta[6];
_arg_LDA = tmpMeta[8];
_arg_IPIV = tmpMeta[10];
_arg_INFO = tmpMeta[12];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_A = omc_Lapack_dgetrf(threadData, _M, _N, _A, _LDA ,&_IPIV ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_IPIV = omc_ValuesUtil_makeIntArray(threadData, _IPIV);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_IPIV, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_IPIV, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 12: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT85), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (!listEmpty(tmpMeta[19])) goto tmp3_end;
_arg_TRANS = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_NRHS = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_IPIV = tmpMeta[12];
_arg_B = tmpMeta[14];
_arg_LDB = tmpMeta[16];
_arg_INFO = tmpMeta[18];
_cache = tmp4_3;
_env = tmp4_4;
_TRANS = omc_CevalFunction_evaluateExtStringArg(threadData, _arg_TRANS, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_NRHS = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_NRHS, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_IPIV = omc_CevalFunction_evaluateExtIntArrayArg(threadData, _arg_IPIV, _cache, _env ,&_cache);
_B = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_B, _cache, _env ,&_cache);
_LDB = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDB, _cache, _env ,&_cache);
_B = omc_Lapack_dgetrs(threadData, _TRANS, _N, _NRHS, _A, _LDA, _IPIV, _B, _LDB ,&_INFO);
_val_B = omc_ValuesUtil_makeRealMatrix(threadData, _B);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_B, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_B, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 13: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT86), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (!listEmpty(tmpMeta[15])) goto tmp3_end;
_arg_N = tmpMeta[2];
_arg_A = tmpMeta[4];
_arg_LDA = tmpMeta[6];
_arg_IPIV = tmpMeta[8];
_arg_WORK = tmpMeta[10];
_arg_LWORK = tmpMeta[12];
_arg_INFO = tmpMeta[14];
_cache = tmp4_3;
_env = tmp4_4;
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_IPIV = omc_CevalFunction_evaluateExtIntArrayArg(threadData, _arg_IPIV, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgetri(threadData, _N, _A, _LDA, _IPIV, _WORK, _LWORK ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 14: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT87), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (!listEmpty(tmpMeta[17])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_A = tmpMeta[6];
_arg_LDA = tmpMeta[8];
_arg_JPVT = tmpMeta[10];
_arg_TAU = tmpMeta[12];
_arg_WORK = tmpMeta[14];
_arg_INFO = tmpMeta[16];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_JPVT = omc_CevalFunction_evaluateExtIntArrayArg(threadData, _arg_JPVT, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_A = omc_Lapack_dgeqpf(threadData, _M, _N, _A, _LDA, _JPVT, _WORK ,&_JPVT ,&_TAU ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_JPVT = omc_ValuesUtil_makeIntArray(threadData, _JPVT);
_val_TAU = omc_ValuesUtil_makeRealArray(threadData, _TAU);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_JPVT, mmc_mk_cons(_arg_TAU, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_JPVT, mmc_mk_cons(_val_TAU, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil)))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+1]);
goto tmp3_done;
}
case 15: {
if (6 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT88), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_2);
tmpMeta[3] = MMC_CDR(tmp4_2);
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
if (listEmpty(tmpMeta[5])) goto tmp3_end;
tmpMeta[6] = MMC_CAR(tmpMeta[5]);
tmpMeta[7] = MMC_CDR(tmpMeta[5]);
if (listEmpty(tmpMeta[7])) goto tmp3_end;
tmpMeta[8] = MMC_CAR(tmpMeta[7]);
tmpMeta[9] = MMC_CDR(tmpMeta[7]);
if (listEmpty(tmpMeta[9])) goto tmp3_end;
tmpMeta[10] = MMC_CAR(tmpMeta[9]);
tmpMeta[11] = MMC_CDR(tmpMeta[9]);
if (listEmpty(tmpMeta[11])) goto tmp3_end;
tmpMeta[12] = MMC_CAR(tmpMeta[11]);
tmpMeta[13] = MMC_CDR(tmpMeta[11]);
if (listEmpty(tmpMeta[13])) goto tmp3_end;
tmpMeta[14] = MMC_CAR(tmpMeta[13]);
tmpMeta[15] = MMC_CDR(tmpMeta[13]);
if (listEmpty(tmpMeta[15])) goto tmp3_end;
tmpMeta[16] = MMC_CAR(tmpMeta[15]);
tmpMeta[17] = MMC_CDR(tmpMeta[15]);
if (listEmpty(tmpMeta[17])) goto tmp3_end;
tmpMeta[18] = MMC_CAR(tmpMeta[17]);
tmpMeta[19] = MMC_CDR(tmpMeta[17]);
if (!listEmpty(tmpMeta[19])) goto tmp3_end;
_arg_M = tmpMeta[2];
_arg_N = tmpMeta[4];
_arg_K = tmpMeta[6];
_arg_A = tmpMeta[8];
_arg_LDA = tmpMeta[10];
_arg_TAU = tmpMeta[12];
_arg_WORK = tmpMeta[14];
_arg_LWORK = tmpMeta[16];
_arg_INFO = tmpMeta[18];
_cache = tmp4_3;
_env = tmp4_4;
_M = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_M, _cache, _env ,&_cache);
_N = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_N, _cache, _env ,&_cache);
_K = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_K, _cache, _env ,&_cache);
_A = omc_CevalFunction_evaluateExtRealMatrixArg(threadData, _arg_A, _cache, _env ,&_cache);
_LDA = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LDA, _cache, _env ,&_cache);
_TAU = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_TAU, _cache, _env ,&_cache);
_WORK = omc_CevalFunction_evaluateExtRealArrayArg(threadData, _arg_WORK, _cache, _env ,&_cache);
_LWORK = omc_CevalFunction_evaluateExtIntArg(threadData, _arg_LWORK, _cache, _env ,&_cache);
_A = omc_Lapack_dorgqr(threadData, _M, _N, _K, _A, _LDA, _TAU, _WORK, _LWORK ,&_WORK ,&_INFO);
_val_A = omc_ValuesUtil_makeRealMatrix(threadData, _A);
_val_WORK = omc_ValuesUtil_makeRealArray(threadData, _WORK);
_val_INFO = omc_ValuesUtil_makeInteger(threadData, _INFO);
tmpMeta[2] = mmc_mk_cons(_arg_A, mmc_mk_cons(_arg_WORK, mmc_mk_cons(_arg_INFO, MMC_REFSTRUCTLIT(mmc_nil))));
_arg_out = tmpMeta[2];
tmpMeta[2] = mmc_mk_cons(_val_A, mmc_mk_cons(_val_WORK, mmc_mk_cons(_val_INFO, MMC_REFSTRUCTLIT(mmc_nil))));
_val_out = tmpMeta[2];
tmpMeta[0+0] = omc_CevalFunction_assignExtOutputs(threadData, _arg_out, _val_out, _cache, _env, &tmpMeta[0+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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_unliftExtOutputValue(threadData_t *threadData, modelica_metatype _inCref, modelica_metatype _inValue, modelica_metatype _inEnv)
{
modelica_metatype _outValue = NULL;
modelica_metatype tmpMeta[7] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inValue;
{
modelica_metatype _ty = NULL;
modelica_metatype _vals = NULL;
modelica_integer _dim;
modelica_metatype _dims = 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_integer tmp5;
modelica_boolean tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,5,2) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (listEmpty(tmpMeta[1])) goto tmp2_end;
tmpMeta[2] = MMC_CAR(tmpMeta[1]);
tmpMeta[3] = MMC_CDR(tmpMeta[1]);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[2],5,2) == 0) goto tmp2_end;
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
if (listEmpty(tmpMeta[4])) goto tmp2_end;
tmpMeta[5] = MMC_CAR(tmpMeta[4]);
tmpMeta[6] = MMC_CDR(tmpMeta[4]);
tmp5 = mmc_unbox_integer(tmpMeta[5]);
_vals = tmpMeta[1];
_dim = tmp5;
tmpMeta[1] = omc_CevalFunction_getVariableTypeAndBinding(threadData, _inCref, _inEnv, NULL);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],6,2) == 0) goto goto_1;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 3));
_ty = tmpMeta[2];
_dims = tmpMeta[3];
tmp6 = omc_Types_isNonscalarArray(threadData, _ty, _dims);
if (0 != tmp6) goto goto_1;
_vals = omc_List_map(threadData, _vals, boxvar_ValuesUtil_arrayScalar);
tmpMeta[1] = mmc_mk_cons(mmc_mk_integer(_dim), MMC_REFSTRUCTLIT(mmc_nil));
tmpMeta[2] = mmc_mk_box3(8, &Values_Value_ARRAY__desc, _vals, tmpMeta[1]);
tmpMeta[0] = tmpMeta[2];
goto tmp2_done;
}
case 1: {
tmpMeta[0] = _inValue;
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:;
}
}
_outValue = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_assignExtOutputs(threadData_t *threadData, modelica_metatype _inArgs, modelica_metatype _inValues, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outEnv)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outEnv = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
tmp4_1 = _inArgs;
tmp4_2 = _inValues;
tmp4_3 = _inCache;
tmp4_4 = _inEnv;
{
modelica_metatype _arg = NULL;
modelica_metatype _val = NULL;
modelica_metatype _rest_args = NULL;
modelica_metatype _rest_vals = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = 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 (!listEmpty(tmp4_1)) goto tmp3_end;
if (!listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[0+0] = _inCache;
tmpMeta[0+1] = _inEnv;
goto tmp3_done;
}
case 1: {
if (listEmpty(tmp4_1)) goto tmp3_end;
tmpMeta[2] = MMC_CAR(tmp4_1);
tmpMeta[3] = MMC_CDR(tmp4_1);
if (listEmpty(tmp4_2)) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmp4_2);
tmpMeta[5] = MMC_CDR(tmp4_2);
_arg = tmpMeta[2];
_rest_args = tmpMeta[3];
_val = tmpMeta[4];
_rest_vals = tmpMeta[5];
_cache = tmp4_3;
_env = tmp4_4;
_cr = omc_CevalFunction_evaluateExtOutputArg(threadData, _arg);
_val = omc_CevalFunction_unliftExtOutputValue(threadData, _cr, _val, _env);
_cache = omc_CevalFunction_assignVariable(threadData, _cr, _val, _cache, _env ,&_env);
_inArgs = _rest_args;
_inValues = _rest_vals;
_inCache = _cache;
_inEnv = _env;
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];
_outEnv = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outEnv) { *out_outEnv = _outEnv; }
return _outCache;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtOutputArg(threadData_t *threadData, modelica_metatype _inArg)
{
modelica_metatype _outCref = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[0] = _inArg;
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[0],0,3) == 0) MMC_THROW_INTERNAL();
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[0]), 2));
_outCref = tmpMeta[1];
_return: OMC_LABEL_UNUSED
return _outCref;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtRealMatrixArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_metatype _outValue = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype _val = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_val = omc_CevalFunction_evaluateExtInputArg(threadData, _inArg, _inCache, _inEnv ,&_outCache);
_outValue = omc_ValuesUtil_matrixValueReals(threadData, _val);
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtRealArrayArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_metatype _outValue = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype _val = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_val = omc_CevalFunction_evaluateExtInputArg(threadData, _inArg, _inCache, _inEnv ,&_outCache);
_outValue = omc_ValuesUtil_arrayValueReals(threadData, _val);
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtIntArrayArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_metatype _outValue = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype _val = NULL;
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
_val = omc_CevalFunction_evaluateExtInputArg(threadData, _inArg, _inCache, _inEnv ,&_outCache);
_outValue = omc_ValuesUtil_arrayValueInts(threadData, _val);
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_string omc_CevalFunction_evaluateExtStringArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_string _outValue = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[1] = omc_CevalFunction_evaluateExtInputArg(threadData, _inArg, _inCache, _inEnv, &tmpMeta[0]);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],2,1) == 0) MMC_THROW_INTERNAL();
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
_outValue = tmpMeta[2];
_outCache = tmpMeta[0];
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_real omc_CevalFunction_evaluateExtRealArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_real _outValue;
modelica_metatype _outCache = NULL;
modelica_real tmp1;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[1] = omc_CevalFunction_evaluateExtInputArg(threadData, _inArg, _inCache, _inEnv, &tmpMeta[0]);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],1,1) == 0) MMC_THROW_INTERNAL();
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
tmp1 = mmc_unbox_real(tmpMeta[2]);
_outValue = tmp1;
_outCache = tmpMeta[0];
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_evaluateExtRealArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_real _outValue;
modelica_metatype out_outValue;
_outValue = omc_CevalFunction_evaluateExtRealArg(threadData, _inArg, _inCache, _inEnv, out_outCache);
out_outValue = mmc_mk_rcon(_outValue);
return out_outValue;
}
PROTECTED_FUNCTION_STATIC modelica_integer omc_CevalFunction_evaluateExtIntArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_integer _outValue;
modelica_metatype _outCache = NULL;
modelica_integer tmp1;
modelica_metatype tmpMeta[3] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
tmpMeta[1] = omc_CevalFunction_evaluateExtInputArg(threadData, _inArg, _inCache, _inEnv, &tmpMeta[0]);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,1) == 0) MMC_THROW_INTERNAL();
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
tmp1 = mmc_unbox_integer(tmpMeta[2]);
_outValue = tmp1;
_outCache = tmpMeta[0];
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_evaluateExtIntArg(threadData_t *threadData, modelica_metatype _inArg, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_integer _outValue;
modelica_metatype out_outValue;
_outValue = omc_CevalFunction_evaluateExtIntArg(threadData, _inArg, _inCache, _inEnv, out_outCache);
out_outValue = mmc_mk_icon(_outValue);
return out_outValue;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateExtInputArg(threadData_t *threadData, modelica_metatype _inArgument, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype *out_outCache)
{
modelica_metatype _outValue = NULL;
modelica_metatype _outCache = NULL;
modelica_metatype tmpMeta[4] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
tmp4_1 = _inArgument;
tmp4_2 = _inCache;
{
modelica_metatype _cref = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _exp = NULL;
modelica_metatype _val = NULL;
modelica_metatype _cache = NULL;
modelica_string _err_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: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cref = tmpMeta[2];
_ty = tmpMeta[3];
tmp4 += 2;
_val = omc_CevalFunction_getVariableValue(threadData, _cref, _ty, _inEnv);
tmpMeta[0+0] = _val;
tmpMeta[0+1] = _inCache;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_exp = tmpMeta[2];
_cache = tmp4_2;
tmp4 += 1;
_cache = omc_CevalFunction_cevalExp(threadData, _exp, _cache, _inEnv ,&_val);
tmpMeta[0+0] = _val;
tmpMeta[0+1] = _cache;
goto tmp3_done;
}
case 2: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,3) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
_cref = tmpMeta[2];
_exp = tmpMeta[3];
_cache = tmp4_2;
tmpMeta[2] = mmc_mk_box3(9, &DAE_Exp_CREF__desc, _cref, _OMC_LIT89);
tmpMeta[3] = mmc_mk_box3(27, &DAE_Exp_SIZE__desc, tmpMeta[2], mmc_mk_some(_exp));
_exp = tmpMeta[3];
_cache = omc_CevalFunction_cevalExp(threadData, _exp, _cache, _inEnv ,&_val);
tmpMeta[0+0] = _val;
tmpMeta[0+1] = _cache;
goto tmp3_done;
}
case 3: {
modelica_boolean tmp6;
tmp6 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp6) goto goto_2;
_err_str = omc_DAEDump_dumpExtArgStr(threadData, _inArgument);
tmpMeta[2] = stringAppend(_OMC_LIT90,_err_str);
omc_Debug_traceln(threadData, tmpMeta[2]);
goto goto_2;
goto tmp3_done;
}
}
goto tmp3_end;
tmp3_end: ;
}
goto goto_2;
tmp3_done:
(void)tmp4;
MMC_RESTORE_INTERNAL(mmc_jumper);
goto tmp3_done2;
goto_2:;
MMC_CATCH_INTERNAL(mmc_jumper);
if (++tmp4 < 4) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outValue = tmpMeta[0+0];
_outCache = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outCache) { *out_outCache = _outCache; }
return _outValue;
}
PROTECTED_FUNCTION_STATIC modelica_boolean omc_CevalFunction_isCrefNamed(threadData_t *threadData, modelica_string _inName, modelica_metatype _inCref)
{
modelica_boolean _outIsNamed;
modelica_boolean tmp1 = 0;
modelica_metatype tmpMeta[1] __attribute__((unused)) = {0};
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: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,3) == 0) goto tmp3_end;
tmpMeta[0] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_name = tmpMeta[0];
tmp1 = (stringEqual(_inName, _name));
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:;
}
}
_outIsNamed = tmp1;
_return: OMC_LABEL_UNUSED
return _outIsNamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CevalFunction_isCrefNamed(threadData_t *threadData, modelica_metatype _inName, modelica_metatype _inCref)
{
modelica_boolean _outIsNamed;
modelica_metatype out_outIsNamed;
_outIsNamed = omc_CevalFunction_isCrefNamed(threadData, _inName, _inCref);
out_outIsNamed = mmc_mk_icon(_outIsNamed);
return out_outIsNamed;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_removeSelfReferentialDim(threadData_t *threadData, modelica_metatype _inDim, modelica_string _inName)
{
modelica_metatype _outDim = NULL;
modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp3_1;
tmp3_1 = _inDim;
{
modelica_metatype _exp = NULL;
modelica_metatype _crefs = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
MMC_TRY_INTERNAL(mmc_jumper)
tmp2_top:
threadData->mmc_jumper = &new_mmc_jumper;
for (; tmp3 < 2; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
modelica_boolean tmp5;
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,3,1) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
_exp = tmpMeta[1];
_crefs = omc_Expression_extractCrefsFromExp(threadData, _exp);
tmp5 = omc_List_isMemberOnTrue(threadData, _inName, _crefs, boxvar_CevalFunction_isCrefNamed);
if (1 != tmp5) goto goto_1;
tmpMeta[0] = _OMC_LIT91;
goto tmp2_done;
}
case 1: {
tmpMeta[0] = _inDim;
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:;
}
}
_outDim = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outDim;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_removeSelfReferentialDims(threadData_t *threadData, modelica_metatype _inElement)
{
modelica_metatype _outElement = NULL;
modelica_metatype tmpMeta[15] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;
tmp3_1 = _inElement;
{
modelica_metatype _cref = NULL;
modelica_metatype _vk = NULL;
modelica_metatype _vd = NULL;
modelica_metatype _vp = NULL;
modelica_metatype _vv = NULL;
modelica_metatype _ty = NULL;
modelica_metatype _bind = NULL;
modelica_metatype _dims = NULL;
modelica_metatype _ct = NULL;
modelica_metatype _es = NULL;
modelica_metatype _va = NULL;
modelica_metatype _cmt = NULL;
modelica_metatype _io = NULL;
modelica_string _name = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 1; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (mmc__uniontype__metarecord__typedef__equal(tmp3_1,0,13) == 0) goto tmp2_end;
tmpMeta[1] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 2));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],1,3) == 0) goto tmp2_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 3));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 4));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 5));
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 6));
tmpMeta[7] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 7));
tmpMeta[8] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 8));
tmpMeta[9] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 9));
tmpMeta[10] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 10));
tmpMeta[11] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 11));
tmpMeta[12] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 12));
tmpMeta[13] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 13));
tmpMeta[14] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp3_1), 14));
_cref = tmpMeta[1];
_name = tmpMeta[2];
_vk = tmpMeta[3];
_vd = tmpMeta[4];
_vp = tmpMeta[5];
_vv = tmpMeta[6];
_ty = tmpMeta[7];
_bind = tmpMeta[8];
_dims = tmpMeta[9];
_ct = tmpMeta[10];
_es = tmpMeta[11];
_va = tmpMeta[12];
_cmt = tmpMeta[13];
_io = tmpMeta[14];
_dims = omc_List_map1(threadData, _dims, boxvar_CevalFunction_removeSelfReferentialDim, _name);
tmpMeta[1] = mmc_mk_box14(3, &DAE_Element_VAR__desc, _cref, _vk, _vd, _vp, _vv, _ty, _bind, _dims, _ct, _es, _va, _cmt, _io);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outElement = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outElement;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_pairFuncParamsWithArgs(threadData_t *threadData, modelica_metatype _inElements, modelica_metatype _inValues)
{
modelica_metatype _outFunctionVars = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
modelica_metatype tmp3_1;modelica_metatype tmp3_2;
tmp3_1 = _inElements;
tmp3_2 = _inValues;
{
modelica_metatype _var = NULL;
modelica_metatype _rest_vars = NULL;
modelica_metatype _val = NULL;
modelica_metatype _rest_vals = NULL;
modelica_metatype _params = NULL;
volatile mmc_switch_type tmp3;
int tmp4;
tmp3 = 0;
for (; tmp3 < 4; tmp3++) {
switch (MMC_SWITCH_CAST(tmp3)) {
case 0: {
if (!listEmpty(tmp3_1)) goto tmp2_end;
if (!listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta[1] = MMC_REFSTRUCTLIT(mmc_nil);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
case 1: {
modelica_boolean tmp5;
if (!listEmpty(tmp3_2)) goto tmp2_end;
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_CAR(tmp3_1);
tmpMeta[2] = MMC_CDR(tmp3_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[1],0,13) == 0) goto tmp2_end;
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[1]), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],0,0) == 0) goto tmp2_end;
tmp5 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp5) goto goto_1;
omc_Debug_trace(threadData, _OMC_LIT92);
goto goto_1;
goto tmp2_done;
}
case 2: {
if (listEmpty(tmp3_2)) goto tmp2_end;
tmpMeta[1] = MMC_CAR(tmp3_2);
tmpMeta[2] = MMC_CDR(tmp3_2);
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[3] = MMC_CAR(tmp3_1);
tmpMeta[4] = MMC_CDR(tmp3_1);
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[3],0,13) == 0) goto tmp2_end;
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 4));
if (mmc__uniontype__metarecord__typedef__equal(tmpMeta[5],0,0) == 0) goto tmp2_end;
_val = tmpMeta[1];
_rest_vals = tmpMeta[2];
_var = tmpMeta[3];
_rest_vars = tmpMeta[4];
_params = omc_CevalFunction_pairFuncParamsWithArgs(threadData, _rest_vars, _rest_vals);
tmpMeta[2] = mmc_mk_box2(0, _var, mmc_mk_some(_val));
tmpMeta[1] = mmc_mk_cons(tmpMeta[2], _params);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
case 3: {
if (listEmpty(tmp3_1)) goto tmp2_end;
tmpMeta[1] = MMC_CAR(tmp3_1);
tmpMeta[2] = MMC_CDR(tmp3_1);
_var = tmpMeta[1];
_rest_vars = tmpMeta[2];
_params = omc_CevalFunction_pairFuncParamsWithArgs(threadData, _rest_vars, _inValues);
tmpMeta[2] = mmc_mk_box2(0, _var, mmc_mk_none());
tmpMeta[1] = mmc_mk_cons(tmpMeta[2], _params);
tmpMeta[0] = tmpMeta[1];
goto tmp2_done;
}
}
goto tmp2_end;
tmp2_end: ;
}
goto goto_1;
goto_1:;
MMC_THROW_INTERNAL();
goto tmp2_done;
tmp2_done:;
}
}
_outFunctionVars = tmpMeta[0];
_return: OMC_LABEL_UNUSED
return _outFunctionVars;
}
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CevalFunction_evaluateFunctionDefinition(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_string _inFuncName, modelica_metatype _inFunc, modelica_metatype _inFuncType, modelica_metatype _inFuncArgs, modelica_metatype _inSource, modelica_metatype *out_outResult)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outResult = NULL;
modelica_metatype tmpMeta[6] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inFunc;
{
modelica_metatype _body = NULL;
modelica_metatype _vars = NULL;
modelica_metatype _output_vars = NULL;
modelica_metatype _func_params = NULL;
modelica_metatype _cache = NULL;
modelica_metatype _env = NULL;
modelica_metatype _return_values = NULL;
modelica_metatype _return_value = NULL;
modelica_string _ext_fun_name = NULL;
modelica_metatype _ext_fun_args = 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_1,0,1) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
_body = tmpMeta[2];
tmp4 += 1;
_vars = omc_List_splitOnFirstMatch(threadData, _body, boxvar_DAEUtil_isNotVar ,&_body);
_vars = omc_List_map(threadData, _vars, boxvar_CevalFunction_removeSelfReferentialDims);
_output_vars = omc_List_filterOnTrue(threadData, _vars, boxvar_DAEUtil_isOutputVar);
_func_params = omc_CevalFunction_pairFuncParamsWithArgs(threadData, _vars, _inFuncArgs);
_func_params = omc_CevalFunction_sortFunctionVarsByDependency(threadData, _func_params, _inSource);
_cache = omc_CevalFunction_setupFunctionEnvironment(threadData, _inCache, _inEnv, _inFuncName, _func_params ,&_env);
_cache = omc_CevalFunction_evaluateElements(threadData, _body, _cache, _env, _OMC_LIT69 ,&_env ,NULL);
_return_values = omc_List_map1(threadData, _output_vars, boxvar_CevalFunction_getFunctionReturnValue, _env);
_return_value = omc_CevalFunction_boxReturnValue(threadData, _return_values);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _return_value;
goto tmp3_done;
}
case 1: {
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,2) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
tmpMeta[4] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 2));
tmpMeta[5] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta[3]), 3));
_body = tmpMeta[2];
_ext_fun_name = tmpMeta[4];
_ext_fun_args = tmpMeta[5];
_vars = omc_List_splitOnFirstMatch(threadData, _body, boxvar_DAEUtil_isNotVar, NULL);
_vars = omc_List_map(threadData, _vars, boxvar_CevalFunction_removeSelfReferentialDims);
_output_vars = omc_List_filterOnTrue(threadData, _vars, boxvar_DAEUtil_isOutputVar);
_func_params = omc_CevalFunction_pairFuncParamsWithArgs(threadData, _vars, _inFuncArgs);
_func_params = omc_CevalFunction_sortFunctionVarsByDependency(threadData, _func_params, _inSource);
_cache = omc_CevalFunction_setupFunctionEnvironment(threadData, _inCache, _inEnv, _inFuncName, _func_params ,&_env);
_cache = omc_CevalFunction_evaluateExternalFunc(threadData, _ext_fun_name, _ext_fun_args, _cache, _env ,&_env);
_return_values = omc_List_map1(threadData, _output_vars, boxvar_CevalFunction_getFunctionReturnValue, _env);
_return_value = omc_CevalFunction_boxReturnValue(threadData, _return_values);
tmpMeta[0+0] = _cache;
tmpMeta[0+1] = _return_value;
goto tmp3_done;
}
case 2: {
modelica_boolean tmp6;
tmp6 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp6) goto goto_2;
omc_Debug_trace(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 < 3) {
goto tmp3_top;
}
MMC_THROW_INTERNAL();
tmp3_done2:;
}
}
_outCache = tmpMeta[0+0];
_outResult = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outCache;
}
DLLExport
modelica_metatype omc_CevalFunction_evaluate(threadData_t *threadData, modelica_metatype _inCache, modelica_metatype _inEnv, modelica_metatype _inFunction, modelica_metatype _inFunctionArguments, modelica_metatype *out_outResult)
{
modelica_metatype _outCache = NULL;
modelica_metatype _outResult = NULL;
modelica_metatype tmpMeta[9] __attribute__((unused)) = {0};
MMC_SO();
_tailrecursive: OMC_LABEL_UNUSED
{
volatile modelica_metatype tmp4_1;
tmp4_1 = _inFunction;
{
modelica_metatype _p = NULL;
modelica_metatype _func = NULL;
modelica_metatype _ty = NULL;
modelica_string _func_name = NULL;
modelica_boolean _partialPrefix;
modelica_metatype _src = 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_integer tmp6;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,10) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 4));
tmpMeta[7] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmp6 = mmc_unbox_integer(tmpMeta[7]);
if (0 != tmp6) goto tmp3_end;
tmpMeta[8] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 10));
_p = tmpMeta[2];
_func = tmpMeta[4];
_ty = tmpMeta[6];
_src = tmpMeta[8];
_func_name = omc_AbsynUtil_pathString(threadData, _p, _OMC_LIT94, 1, 0);
tmpMeta[0+0] = omc_CevalFunction_evaluateFunctionDefinition(threadData, _inCache, _inEnv, _func_name, _func, _ty, _inFunctionArguments, _src, &tmpMeta[0+1]);
goto tmp3_done;
}
case 1: {
modelica_integer tmp7;
modelica_boolean tmp8;
if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,10) == 0) goto tmp3_end;
tmpMeta[2] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 2));
tmpMeta[3] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 3));
if (listEmpty(tmpMeta[3])) goto tmp3_end;
tmpMeta[4] = MMC_CAR(tmpMeta[3]);
tmpMeta[5] = MMC_CDR(tmpMeta[3]);
tmpMeta[6] = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_1), 6));
tmp7 = mmc_unbox_integer(tmpMeta[6]);
_p = tmpMeta[2];
_partialPrefix = tmp7;
tmp8 = omc_Flags_isSet(threadData, _OMC_LIT19);
if (1 != tmp8) goto goto_2;
tmpMeta[2] = stringAppend(_OMC_LIT95,(_partialPrefix?_OMC_LIT96:_OMC_LIT4));
tmpMeta[3] = stringAppend(tmpMeta[2],omc_AbsynUtil_pathString(threadData, _p, _OMC_LIT94, 1, 0));
omc_Debug_traceln(threadData, tmpMeta[3]);
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];
_outResult = tmpMeta[0+1];
_return: OMC_LABEL_UNUSED
if (out_outResult) { *out_outResult = _outResult; }
return _outCache;
}
