#include "omc_simulation_settings.h"
#include "OpenModelicaScriptingAPI.h"
#define _OMC_LIT0_data "loadFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,8,_OMC_LIT0_data);
#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
#define _OMC_LIT1_data "<interactive>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT1,13,_OMC_LIT1_data);
#define _OMC_LIT1 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT1)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT2,0.0);
#define _OMC_LIT2 MMC_REFREALLIT(_OMC_LIT_STRUCT2)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT3,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT1,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT2}};
#define _OMC_LIT3 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT3)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT4,2,3) {&Absyn_Msg_MSG__desc,_OMC_LIT3}};
#define _OMC_LIT4 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)
#define _OMC_LIT5_data "loadFiles"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT5,9,_OMC_LIT5_data);
#define _OMC_LIT5 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT5)
#define _OMC_LIT6_data "parseEncryptedPackage"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT6,21,_OMC_LIT6_data);
#define _OMC_LIT6 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT6)
#define _OMC_LIT7_data "loadEncryptedPackage"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT7,20,_OMC_LIT7_data);
#define _OMC_LIT7 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT7)
#define _OMC_LIT8_data "reloadClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT8,11,_OMC_LIT8_data);
#define _OMC_LIT8 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT8)
#define _OMC_LIT9_data "loadString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT9,10,_OMC_LIT9_data);
#define _OMC_LIT9 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "loadClassContentString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,22,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
#define _OMC_LIT11_data "parseString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT11,11,_OMC_LIT11_data);
#define _OMC_LIT11 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT11)
#define _OMC_LIT12_data "parseFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT12,9,_OMC_LIT12_data);
#define _OMC_LIT12 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT12)
#define _OMC_LIT13_data "loadFileInteractiveQualified"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT13,28,_OMC_LIT13_data);
#define _OMC_LIT13 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT13)
#define _OMC_LIT14_data "loadFileInteractive"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT14,19,_OMC_LIT14_data);
#define _OMC_LIT14 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT14)
#define _OMC_LIT15_data "system"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT15,6,_OMC_LIT15_data);
#define _OMC_LIT15 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT15)
#define _OMC_LIT16_data "system_parallel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT16,15,_OMC_LIT16_data);
#define _OMC_LIT16 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "saveAll"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,7,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
#define _OMC_LIT18_data "help"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT18,4,_OMC_LIT18_data);
#define _OMC_LIT18 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT18)
#define _OMC_LIT19_data "clear"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT19,5,_OMC_LIT19_data);
#define _OMC_LIT19 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT19)
#define _OMC_LIT20_data "clearProgram"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT20,12,_OMC_LIT20_data);
#define _OMC_LIT20 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT20)
#define _OMC_LIT21_data "clearVariables"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT21,14,_OMC_LIT21_data);
#define _OMC_LIT21 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT21)
#define _OMC_LIT22_data "generateHeader"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT22,14,_OMC_LIT22_data);
#define _OMC_LIT22 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT22)
#define _OMC_LIT23_data "generateJuliaHeader"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT23,19,_OMC_LIT23_data);
#define _OMC_LIT23 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT23)
#define _OMC_LIT24_data "generateSeparateCode"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT24,20,_OMC_LIT24_data);
#define _OMC_LIT24 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT24)
#define _OMC_LIT25_data "generateSeparateCodeDependencies"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT25,32,_OMC_LIT25_data);
#define _OMC_LIT25 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT25)
#define _OMC_LIT26_data "generateSeparateCodeDependenciesMakefile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT26,40,_OMC_LIT26_data);
#define _OMC_LIT26 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT26)
#define _OMC_LIT27_data "getLinker"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT27,9,_OMC_LIT27_data);
#define _OMC_LIT27 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT27)
#define _OMC_LIT28_data "setLinker"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT28,9,_OMC_LIT28_data);
#define _OMC_LIT28 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT28)
#define _OMC_LIT29_data "getLinkerFlags"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT29,14,_OMC_LIT29_data);
#define _OMC_LIT29 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT29)
#define _OMC_LIT30_data "setLinkerFlags"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT30,14,_OMC_LIT30_data);
#define _OMC_LIT30 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT30)
#define _OMC_LIT31_data "getCompiler"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT31,11,_OMC_LIT31_data);
#define _OMC_LIT31 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT31)
#define _OMC_LIT32_data "setCompiler"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT32,11,_OMC_LIT32_data);
#define _OMC_LIT32 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT32)
#define _OMC_LIT33_data "getCFlags"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT33,9,_OMC_LIT33_data);
#define _OMC_LIT33 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT33)
#define _OMC_LIT34_data "setCFlags"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT34,9,_OMC_LIT34_data);
#define _OMC_LIT34 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT34)
#define _OMC_LIT35_data "getCXXCompiler"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT35,14,_OMC_LIT35_data);
#define _OMC_LIT35 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT35)
#define _OMC_LIT36_data "setCXXCompiler"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT36,14,_OMC_LIT36_data);
#define _OMC_LIT36 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT36)
#define _OMC_LIT37_data "setTempDirectoryPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT37,20,_OMC_LIT37_data);
#define _OMC_LIT37 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT37)
#define _OMC_LIT38_data "getTempDirectoryPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT38,20,_OMC_LIT38_data);
#define _OMC_LIT38 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT38)
#define _OMC_LIT39_data "getEnvironmentVar"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT39,17,_OMC_LIT39_data);
#define _OMC_LIT39 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT39)
#define _OMC_LIT40_data "setEnvironmentVar"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT40,17,_OMC_LIT40_data);
#define _OMC_LIT40 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "setInstallationDirectoryPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,28,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
#define _OMC_LIT42_data "getInstallationDirectoryPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT42,28,_OMC_LIT42_data);
#define _OMC_LIT42 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT42)
#define _OMC_LIT43_data "setModelicaPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT43,15,_OMC_LIT43_data);
#define _OMC_LIT43 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT43)
#define _OMC_LIT44_data "getModelicaPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT44,15,_OMC_LIT44_data);
#define _OMC_LIT44 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT44)
#define _OMC_LIT45_data "getHomeDirectoryPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT45,20,_OMC_LIT45_data);
#define _OMC_LIT45 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT45)
#define _OMC_LIT46_data "setCompilerFlags"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT46,16,_OMC_LIT46_data);
#define _OMC_LIT46 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "enableNewInstantiation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,22,_OMC_LIT47_data);
#define _OMC_LIT47 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT47)
#define _OMC_LIT48_data "disableNewInstantiation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT48,23,_OMC_LIT48_data);
#define _OMC_LIT48 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT48)
#define _OMC_LIT49_data "clearDebugFlags"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT49,15,_OMC_LIT49_data);
#define _OMC_LIT49 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data "getMatchingAlgorithm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,20,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
#define _OMC_LIT51_data "getAvailableMatchingAlgorithms"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT51,30,_OMC_LIT51_data);
#define _OMC_LIT51 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT51)
#define _OMC_LIT52_data "getIndexReductionMethod"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT52,23,_OMC_LIT52_data);
#define _OMC_LIT52 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT52)
#define _OMC_LIT53_data "getAvailableIndexReductionMethods"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT53,33,_OMC_LIT53_data);
#define _OMC_LIT53 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "getTearingMethod"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,16,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
#define _OMC_LIT55_data "getAvailableTearingMethods"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT55,26,_OMC_LIT55_data);
#define _OMC_LIT55 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT55)
#define _OMC_LIT56_data "setCommandLineOptions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT56,21,_OMC_LIT56_data);
#define _OMC_LIT56 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT56)
#define _OMC_LIT57_data "getCommandLineOptions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT57,21,_OMC_LIT57_data);
#define _OMC_LIT57 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT57)
#define _OMC_LIT58_data "getConfigFlagValidOptions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT58,25,_OMC_LIT58_data);
#define _OMC_LIT58 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT58)
#define _OMC_LIT59_data "clearCommandLineOptions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT59,23,_OMC_LIT59_data);
#define _OMC_LIT59 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT59)
#define _OMC_LIT60_data "getVersion"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT60,10,_OMC_LIT60_data);
#define _OMC_LIT60 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT60)
#define _OMC_LIT61_data "regularFileExists"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT61,17,_OMC_LIT61_data);
#define _OMC_LIT61 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT61)
#define _OMC_LIT62_data "directoryExists"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT62,15,_OMC_LIT62_data);
#define _OMC_LIT62 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT62)
#define _OMC_LIT63_data "stat"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT63,4,_OMC_LIT63_data);
#define _OMC_LIT63 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT63)
#define _OMC_LIT64_data "readFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT64,8,_OMC_LIT64_data);
#define _OMC_LIT64 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT64)
#define _OMC_LIT65_data "writeFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT65,9,_OMC_LIT65_data);
#define _OMC_LIT65 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT65)
#define _OMC_LIT66_data "compareFilesAndMove"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT66,19,_OMC_LIT66_data);
#define _OMC_LIT66 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT66)
#define _OMC_LIT67_data "compareFiles"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT67,12,_OMC_LIT67_data);
#define _OMC_LIT67 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT67)
#define _OMC_LIT68_data "alarm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT68,5,_OMC_LIT68_data);
#define _OMC_LIT68 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT68)
#define _OMC_LIT69_data "getErrorString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT69,14,_OMC_LIT69_data);
#define _OMC_LIT69 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT69)
#define _OMC_LIT70_data "countMessages"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT70,13,_OMC_LIT70_data);
#define _OMC_LIT70 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT70)
#define _OMC_LIT71_data "clearMessages"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT71,13,_OMC_LIT71_data);
#define _OMC_LIT71 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT71)
#define _OMC_LIT72_data "runScript"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT72,9,_OMC_LIT72_data);
#define _OMC_LIT72 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT72)
#define _OMC_LIT73_data "echo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT73,4,_OMC_LIT73_data);
#define _OMC_LIT73 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "getAnnotationVersion"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,20,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
#define _OMC_LIT75_data "getNoSimplify"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT75,13,_OMC_LIT75_data);
#define _OMC_LIT75 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT75)
#define _OMC_LIT76_data "setNoSimplify"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT76,13,_OMC_LIT76_data);
#define _OMC_LIT76 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT76)
#define _OMC_LIT77_data "getVectorizationLimit"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT77,21,_OMC_LIT77_data);
#define _OMC_LIT77 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT77)
#define _OMC_LIT78_data "getDefaultOpenCLDevice"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT78,22,_OMC_LIT78_data);
#define _OMC_LIT78 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT78)
#define _OMC_LIT79_data "setShowAnnotations"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT79,18,_OMC_LIT79_data);
#define _OMC_LIT79 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT79)
#define _OMC_LIT80_data "getShowAnnotations"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT80,18,_OMC_LIT80_data);
#define _OMC_LIT80 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT80)
#define _OMC_LIT81_data "getOrderConnections"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT81,19,_OMC_LIT81_data);
#define _OMC_LIT81 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT81)
#define _OMC_LIT82_data "getLanguageStandard"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT82,19,_OMC_LIT82_data);
#define _OMC_LIT82 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT82)
#define _OMC_LIT83_data "getAstAsCorbaString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT83,19,_OMC_LIT83_data);
#define _OMC_LIT83 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data "cd"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,2,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data "mkdir"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,5,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
#define _OMC_LIT86_data "copy"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT86,4,_OMC_LIT86_data);
#define _OMC_LIT86 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data "remove"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,6,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data "checkModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,10,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
#define _OMC_LIT89_data "checkAllModelsRecursive"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT89,23,_OMC_LIT89_data);
#define _OMC_LIT89 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT89)
#define _OMC_LIT90_data "instantiateModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT90,16,_OMC_LIT90_data);
#define _OMC_LIT90 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT90)
#define _OMC_LIT91_data "generateCode"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT91,12,_OMC_LIT91_data);
#define _OMC_LIT91 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data "loadModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,9,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
#define _OMC_LIT93_data "deleteFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT93,10,_OMC_LIT93_data);
#define _OMC_LIT93 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT93)
#define _OMC_LIT94_data "saveModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT94,9,_OMC_LIT94_data);
#define _OMC_LIT94 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT94)
#define _OMC_LIT95_data "saveTotalModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT95,14,_OMC_LIT95_data);
#define _OMC_LIT95 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "saveTotalModelDebug"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,19,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
#define _OMC_LIT97_data "save"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT97,4,_OMC_LIT97_data);
#define _OMC_LIT97 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT97)
#define _OMC_LIT98_data "translateGraphics"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT98,17,_OMC_LIT98_data);
#define _OMC_LIT98 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT98)
#define _OMC_LIT99_data "dumpXMLDAE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT99,10,_OMC_LIT99_data);
#define _OMC_LIT99 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT99)
#define _OMC_LIT100_data "convertUnits"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT100,12,_OMC_LIT100_data);
#define _OMC_LIT100 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT100)
#define _OMC_LIT101_data "getDerivedUnits"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT101,15,_OMC_LIT101_data);
#define _OMC_LIT101 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "listVariables"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,13,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
#define _OMC_LIT103_data "strtok"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT103,6,_OMC_LIT103_data);
#define _OMC_LIT103 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "stringSplit"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,11,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
#define _OMC_LIT105_data "stringReplace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT105,13,_OMC_LIT105_data);
#define _OMC_LIT105 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT105)
#define _OMC_LIT106_data "listFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT106,8,_OMC_LIT106_data);
#define _OMC_LIT106 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT106)
#define _OMC_LIT107_data "exportToFigaro"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT107,14,_OMC_LIT107_data);
#define _OMC_LIT107 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT107)
#define _OMC_LIT108_data "inferBindings"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT108,13,_OMC_LIT108_data);
#define _OMC_LIT108 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT108)
#define _OMC_LIT109_data "generateVerificationScenarios"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT109,29,_OMC_LIT109_data);
#define _OMC_LIT109 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT109)
#define _OMC_LIT110_data "rewriteBlockCall"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT110,16,_OMC_LIT110_data);
#define _OMC_LIT110 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT110)
#define _OMC_LIT111_data "realpath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT111,8,_OMC_LIT111_data);
#define _OMC_LIT111 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT111)
#define _OMC_LIT112_data "uriToFilename"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT112,13,_OMC_LIT112_data);
#define _OMC_LIT112 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT112)
#define _OMC_LIT113_data "getLoadedLibraries"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT113,18,_OMC_LIT113_data);
#define _OMC_LIT113 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT113)
#define _OMC_LIT114_data "solveLinearSystem"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT114,17,_OMC_LIT114_data);
#define _OMC_LIT114 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT114)
#define _OMC_LIT115_data "importFMU"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT115,9,_OMC_LIT115_data);
#define _OMC_LIT115 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT115)
#define _OMC_LIT116_data "importFMUModelDescription"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT116,25,_OMC_LIT116_data);
#define _OMC_LIT116 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT116)
#define _OMC_LIT117_data "translateModelFMU"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT117,17,_OMC_LIT117_data);
#define _OMC_LIT117 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT117)
#define _OMC_LIT118_data "buildModelFMU"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT118,13,_OMC_LIT118_data);
#define _OMC_LIT118 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT118)
#define _OMC_LIT119_data "buildEncryptedPackage"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT119,21,_OMC_LIT119_data);
#define _OMC_LIT119 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT119)
#define _OMC_LIT120_data "buildLabel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT120,10,_OMC_LIT120_data);
#define _OMC_LIT120 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT120)
#define _OMC_LIT121_data "reduceTerms"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT121,11,_OMC_LIT121_data);
#define _OMC_LIT121 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT121)
#define _OMC_LIT122_data "createModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT122,11,_OMC_LIT122_data);
#define _OMC_LIT122 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT122)
#define _OMC_LIT123_data "newModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT123,8,_OMC_LIT123_data);
#define _OMC_LIT123 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT123)
#define _OMC_LIT124_data "moveClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT124,9,_OMC_LIT124_data);
#define _OMC_LIT124 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT124)
#define _OMC_LIT125_data "moveClassToTop"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT125,14,_OMC_LIT125_data);
#define _OMC_LIT125 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT125)
#define _OMC_LIT126_data "moveClassToBottom"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT126,17,_OMC_LIT126_data);
#define _OMC_LIT126 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT126)
#define _OMC_LIT127_data "copyClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT127,9,_OMC_LIT127_data);
#define _OMC_LIT127 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT127)
#define _OMC_LIT128_data "renameClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT128,11,_OMC_LIT128_data);
#define _OMC_LIT128 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT128)
#define _OMC_LIT129_data "deleteClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT129,11,_OMC_LIT129_data);
#define _OMC_LIT129 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT129)
#define _OMC_LIT130_data "refactorClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT130,13,_OMC_LIT130_data);
#define _OMC_LIT130 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT130)
#define _OMC_LIT131_data "getSourceFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT131,13,_OMC_LIT131_data);
#define _OMC_LIT131 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT131)
#define _OMC_LIT132_data "setSourceFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT132,13,_OMC_LIT132_data);
#define _OMC_LIT132 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT132)
#define _OMC_LIT133_data "isShortDefinition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT133,17,_OMC_LIT133_data);
#define _OMC_LIT133 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT133)
#define _OMC_LIT134_data "setClassComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT134,15,_OMC_LIT134_data);
#define _OMC_LIT134 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT134)
#define _OMC_LIT135_data "getClassNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT135,13,_OMC_LIT135_data);
#define _OMC_LIT135 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT135)
#define _OMC_LIT136_data "getUsedClassNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT136,17,_OMC_LIT136_data);
#define _OMC_LIT136 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT136)
#define _OMC_LIT137_data "getPackages"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT137,11,_OMC_LIT137_data);
#define _OMC_LIT137 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT137)
#define _OMC_LIT138_data "getAllSubtypeOf"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT138,15,_OMC_LIT138_data);
#define _OMC_LIT138 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT138)
#define _OMC_LIT139_data "getReplaceableChoices"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT139,21,_OMC_LIT139_data);
#define _OMC_LIT139 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT139)
#define _OMC_LIT140_data "plotAll"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT140,7,_OMC_LIT140_data);
#define _OMC_LIT140 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT140)
#define _OMC_LIT141_data "readSimulationResultSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT141,24,_OMC_LIT141_data);
#define _OMC_LIT141 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT141)
#define _OMC_LIT142_data "readSimulationResultVars"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT142,24,_OMC_LIT142_data);
#define _OMC_LIT142 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT142)
#define _OMC_LIT143_data "filterSimulationResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT143,23,_OMC_LIT143_data);
#define _OMC_LIT143 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT143)
#define _OMC_LIT144_data "compareSimulationResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT144,24,_OMC_LIT144_data);
#define _OMC_LIT144 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT144)
#define _OMC_LIT145_data "deltaSimulationResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT145,22,_OMC_LIT145_data);
#define _OMC_LIT145 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT145)
#define _OMC_LIT146_data "diffSimulationResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT146,21,_OMC_LIT146_data);
#define _OMC_LIT146 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT146)
#define _OMC_LIT147_data "diffSimulationResultsHtml"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT147,25,_OMC_LIT147_data);
#define _OMC_LIT147 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT147)
#define _OMC_LIT148_data "checkTaskGraph"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT148,14,_OMC_LIT148_data);
#define _OMC_LIT148 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT148)
#define _OMC_LIT149_data "checkCodeGraph"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT149,14,_OMC_LIT149_data);
#define _OMC_LIT149 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT149)
#define _OMC_LIT150_data "closeSimulationResultFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT150,25,_OMC_LIT150_data);
#define _OMC_LIT150 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT150)
#define _OMC_LIT151_data "deleteComponent"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT151,15,_OMC_LIT151_data);
#define _OMC_LIT151 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT151)
#define _OMC_LIT152_data "getParameterNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT152,17,_OMC_LIT152_data);
#define _OMC_LIT152 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT152)
#define _OMC_LIT153_data "getParameterValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT153,17,_OMC_LIT153_data);
#define _OMC_LIT153 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT153)
#define _OMC_LIT154_data "getComponents"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT154,13,_OMC_LIT154_data);
#define _OMC_LIT154 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT154)
#define _OMC_LIT155_data "getElements"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT155,11,_OMC_LIT155_data);
#define _OMC_LIT155 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT155)
#define _OMC_LIT156_data "getComponentModifierNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT156,25,_OMC_LIT156_data);
#define _OMC_LIT156 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT156)
#define _OMC_LIT157_data "getComponentModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT157,25,_OMC_LIT157_data);
#define _OMC_LIT157 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT157)
#define _OMC_LIT158_data "getComponentModifierValues"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT158,26,_OMC_LIT158_data);
#define _OMC_LIT158 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT158)
#define _OMC_LIT159_data "removeComponentModifiers"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT159,24,_OMC_LIT159_data);
#define _OMC_LIT159 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT159)
#define _OMC_LIT160_data "getElementModifierNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT160,23,_OMC_LIT160_data);
#define _OMC_LIT160 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT160)
#define _OMC_LIT161_data "getExtendsModifierNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT161,23,_OMC_LIT161_data);
#define _OMC_LIT161 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT161)
#define _OMC_LIT162_data "getElementModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT162,23,_OMC_LIT162_data);
#define _OMC_LIT162 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT162)
#define _OMC_LIT163_data "getElementModifierValues"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT163,24,_OMC_LIT163_data);
#define _OMC_LIT163 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT163)
#define _OMC_LIT164_data "removeElementModifiers"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT164,22,_OMC_LIT164_data);
#define _OMC_LIT164 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT164)
#define _OMC_LIT165_data "isExtendsModifierFinal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT165,22,_OMC_LIT165_data);
#define _OMC_LIT165 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT165)
#define _OMC_LIT166_data "getComponentCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT166,17,_OMC_LIT166_data);
#define _OMC_LIT166 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT166)
#define _OMC_LIT167_data "getNthComponentCondition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT167,24,_OMC_LIT167_data);
#define _OMC_LIT167 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT167)
#define _OMC_LIT168_data "getElementAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT168,20,_OMC_LIT168_data);
#define _OMC_LIT168 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT168)
#define _OMC_LIT169_data "getInstantiatedParametersAndValues"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT169,34,_OMC_LIT169_data);
#define _OMC_LIT169 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT169)
#define _OMC_LIT170_data "removeExtendsModifiers"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT170,22,_OMC_LIT170_data);
#define _OMC_LIT170 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT170)
#define _OMC_LIT171_data "getComponentComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT171,19,_OMC_LIT171_data);
#define _OMC_LIT171 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT171)
#define _OMC_LIT172_data "setComponentComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT172,19,_OMC_LIT172_data);
#define _OMC_LIT172 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT172)
#define _OMC_LIT173_data "setComponentProperties"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT173,22,_OMC_LIT173_data);
#define _OMC_LIT173 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT173)
#define _OMC_LIT174_data "getConnectorCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT174,17,_OMC_LIT174_data);
#define _OMC_LIT174 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT174)
#define _OMC_LIT175_data "updateConnectionAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT175,26,_OMC_LIT175_data);
#define _OMC_LIT175 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT175)
#define _OMC_LIT176_data "updateConnectionNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT176,21,_OMC_LIT176_data);
#define _OMC_LIT176 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT176)
#define _OMC_LIT177_data "getConnectionCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT177,18,_OMC_LIT177_data);
#define _OMC_LIT177 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT177)
#define _OMC_LIT178_data "getNthConnection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT178,16,_OMC_LIT178_data);
#define _OMC_LIT178 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT178)
#define _OMC_LIT179_data "getConnectionList"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT179,17,_OMC_LIT179_data);
#define _OMC_LIT179 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT179)
#define _OMC_LIT180_data "getAlgorithmCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT180,17,_OMC_LIT180_data);
#define _OMC_LIT180 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT180)
#define _OMC_LIT181_data "getNthAlgorithm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT181,15,_OMC_LIT181_data);
#define _OMC_LIT181 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT181)
#define _OMC_LIT182_data "getInitialAlgorithmCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT182,24,_OMC_LIT182_data);
#define _OMC_LIT182 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT182)
#define _OMC_LIT183_data "getNthInitialAlgorithm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT183,22,_OMC_LIT183_data);
#define _OMC_LIT183 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT183)
#define _OMC_LIT184_data "getAlgorithmItemsCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT184,22,_OMC_LIT184_data);
#define _OMC_LIT184 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT184)
#define _OMC_LIT185_data "getNthAlgorithmItem"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT185,19,_OMC_LIT185_data);
#define _OMC_LIT185 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT185)
#define _OMC_LIT186_data "getInitialAlgorithmItemsCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT186,29,_OMC_LIT186_data);
#define _OMC_LIT186 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT186)
#define _OMC_LIT187_data "getNthInitialAlgorithmItem"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT187,26,_OMC_LIT187_data);
#define _OMC_LIT187 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT187)
#define _OMC_LIT188_data "getEquationCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT188,16,_OMC_LIT188_data);
#define _OMC_LIT188 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT188)
#define _OMC_LIT189_data "getNthEquation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT189,14,_OMC_LIT189_data);
#define _OMC_LIT189 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT189)
#define _OMC_LIT190_data "getInitialEquationCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT190,23,_OMC_LIT190_data);
#define _OMC_LIT190 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT190)
#define _OMC_LIT191_data "getNthInitialEquation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT191,21,_OMC_LIT191_data);
#define _OMC_LIT191 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT191)
#define _OMC_LIT192_data "getEquationItemsCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT192,21,_OMC_LIT192_data);
#define _OMC_LIT192 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT192)
#define _OMC_LIT193_data "getNthEquationItem"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT193,18,_OMC_LIT193_data);
#define _OMC_LIT193 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT193)
#define _OMC_LIT194_data "getInitialEquationItemsCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT194,28,_OMC_LIT194_data);
#define _OMC_LIT194 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT194)
#define _OMC_LIT195_data "getNthInitialEquationItem"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT195,25,_OMC_LIT195_data);
#define _OMC_LIT195 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT195)
#define _OMC_LIT196_data "getAnnotationCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT196,18,_OMC_LIT196_data);
#define _OMC_LIT196 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT196)
#define _OMC_LIT197_data "getNthAnnotationString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT197,22,_OMC_LIT197_data);
#define _OMC_LIT197 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT197)
#define _OMC_LIT198_data "getImportCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT198,14,_OMC_LIT198_data);
#define _OMC_LIT198 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT198)
#define _OMC_LIT199_data "getMMfileTotalDependencies"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT199,26,_OMC_LIT199_data);
#define _OMC_LIT199 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT199)
#define _OMC_LIT200_data "getImportedNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT200,16,_OMC_LIT200_data);
#define _OMC_LIT200 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT200)
#define _OMC_LIT201_data "getNthImport"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT201,12,_OMC_LIT201_data);
#define _OMC_LIT201 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT201)
#define _OMC_LIT202_data "iconv"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT202,5,_OMC_LIT202_data);
#define _OMC_LIT202 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT202)
#define _OMC_LIT203_data "getDocumentationAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT203,26,_OMC_LIT203_data);
#define _OMC_LIT203 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT203)
#define _OMC_LIT204_data "setDocumentationAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT204,26,_OMC_LIT204_data);
#define _OMC_LIT204 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT204)
#define _OMC_LIT205_data "getTimeStamp"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT205,12,_OMC_LIT205_data);
#define _OMC_LIT205 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT205)
#define _OMC_LIT206_data "stringTypeName"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT206,14,_OMC_LIT206_data);
#define _OMC_LIT206 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT206)
#define _OMC_LIT207_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT207,1,_OMC_LIT207_data);
#define _OMC_LIT207 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT207)
#define _OMC_LIT208_data "typeNameString"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT208,14,_OMC_LIT208_data);
#define _OMC_LIT208 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT208)
#define _OMC_LIT209_data "typeNameStrings"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT209,15,_OMC_LIT209_data);
#define _OMC_LIT209 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT209)
#define _OMC_LIT210_data "getClassComment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT210,15,_OMC_LIT210_data);
#define _OMC_LIT210 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT210)
#define _OMC_LIT211_data "dirname"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT211,7,_OMC_LIT211_data);
#define _OMC_LIT211 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT211)
#define _OMC_LIT212_data "basename"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT212,8,_OMC_LIT212_data);
#define _OMC_LIT212 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT212)
#define _OMC_LIT213_data "existClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT213,10,_OMC_LIT213_data);
#define _OMC_LIT213 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT213)
#define _OMC_LIT214_data "getClassRestriction"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT214,19,_OMC_LIT214_data);
#define _OMC_LIT214 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT214)
#define _OMC_LIT215_data "isType"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT215,6,_OMC_LIT215_data);
#define _OMC_LIT215 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT215)
#define _OMC_LIT216_data "isPackage"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT216,9,_OMC_LIT216_data);
#define _OMC_LIT216 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT216)
#define _OMC_LIT217_data "isClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT217,7,_OMC_LIT217_data);
#define _OMC_LIT217 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT217)
#define _OMC_LIT218_data "isRecord"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT218,8,_OMC_LIT218_data);
#define _OMC_LIT218 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT218)
#define _OMC_LIT219_data "isBlock"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT219,7,_OMC_LIT219_data);
#define _OMC_LIT219 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT219)
#define _OMC_LIT220_data "isFunction"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT220,10,_OMC_LIT220_data);
#define _OMC_LIT220 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT220)
#define _OMC_LIT221_data "isPartial"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT221,9,_OMC_LIT221_data);
#define _OMC_LIT221 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT221)
#define _OMC_LIT222_data "isReplaceable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT222,13,_OMC_LIT222_data);
#define _OMC_LIT222 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT222)
#define _OMC_LIT223_data "isRedeclare"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT223,11,_OMC_LIT223_data);
#define _OMC_LIT223 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT223)
#define _OMC_LIT224_data "isModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT224,7,_OMC_LIT224_data);
#define _OMC_LIT224 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT224)
#define _OMC_LIT225_data "isConnector"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT225,11,_OMC_LIT225_data);
#define _OMC_LIT225 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT225)
#define _OMC_LIT226_data "isOptimization"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT226,14,_OMC_LIT226_data);
#define _OMC_LIT226 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT226)
#define _OMC_LIT227_data "isEnumeration"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT227,13,_OMC_LIT227_data);
#define _OMC_LIT227 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT227)
#define _OMC_LIT228_data "isOperator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT228,10,_OMC_LIT228_data);
#define _OMC_LIT228 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT228)
#define _OMC_LIT229_data "isOperatorRecord"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT229,16,_OMC_LIT229_data);
#define _OMC_LIT229 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT229)
#define _OMC_LIT230_data "isOperatorFunction"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT230,18,_OMC_LIT230_data);
#define _OMC_LIT230 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT230)
#define _OMC_LIT231_data "isProtectedClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT231,16,_OMC_LIT231_data);
#define _OMC_LIT231 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT231)
#define _OMC_LIT232_data "getBuiltinType"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT232,14,_OMC_LIT232_data);
#define _OMC_LIT232 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT232)
#define _OMC_LIT233_data "isPrimitive"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT233,11,_OMC_LIT233_data);
#define _OMC_LIT233 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT233)
#define _OMC_LIT234_data "isParameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT234,11,_OMC_LIT234_data);
#define _OMC_LIT234 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT234)
#define _OMC_LIT235_data "isConstant"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT235,10,_OMC_LIT235_data);
#define _OMC_LIT235 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT235)
#define _OMC_LIT236_data "isProtected"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT236,11,_OMC_LIT236_data);
#define _OMC_LIT236 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT236)
#define _OMC_LIT237_data "getInheritanceCount"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT237,19,_OMC_LIT237_data);
#define _OMC_LIT237 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT237)
#define _OMC_LIT238_data "getInheritedClasses"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT238,19,_OMC_LIT238_data);
#define _OMC_LIT238 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT238)
#define _OMC_LIT239_data "getNthInheritedClass"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT239,20,_OMC_LIT239_data);
#define _OMC_LIT239 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT239)
#define _OMC_LIT240_data "isExperiment"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT240,12,_OMC_LIT240_data);
#define _OMC_LIT240 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT240)
#define _OMC_LIT241_data "getSimulationOptions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT241,20,_OMC_LIT241_data);
#define _OMC_LIT241 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT241)
#define _OMC_LIT242_data "getAnnotationNamedModifiers"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT242,27,_OMC_LIT242_data);
#define _OMC_LIT242 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT242)
#define _OMC_LIT243_data "getAnnotationModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT243,26,_OMC_LIT243_data);
#define _OMC_LIT243 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT243)
#define _OMC_LIT244_data "classAnnotationExists"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT244,21,_OMC_LIT244_data);
#define _OMC_LIT244 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT244)
#define _OMC_LIT245_data "getBooleanClassAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT245,25,_OMC_LIT245_data);
#define _OMC_LIT245 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT245)
#define _OMC_LIT246_data "extendsFrom"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT246,11,_OMC_LIT246_data);
#define _OMC_LIT246 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT246)
#define _OMC_LIT247_data "searchClassNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT247,16,_OMC_LIT247_data);
#define _OMC_LIT247 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT247)
#define _OMC_LIT248_data "getAvailableLibraries"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT248,21,_OMC_LIT248_data);
#define _OMC_LIT248 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT248)
#define _OMC_LIT249_data "getAvailableLibraryVersions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT249,27,_OMC_LIT249_data);
#define _OMC_LIT249 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT249)
#define _OMC_LIT250_data "installPackage"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT250,14,_OMC_LIT250_data);
#define _OMC_LIT250 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT250)
#define _OMC_LIT251_data "updatePackageIndex"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT251,18,_OMC_LIT251_data);
#define _OMC_LIT251 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT251)
#define _OMC_LIT252_data "getAvailablePackageVersions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT252,27,_OMC_LIT252_data);
#define _OMC_LIT252 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT252)
#define _OMC_LIT253_data "getAvailablePackageConversionsTo"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT253,32,_OMC_LIT253_data);
#define _OMC_LIT253 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT253)
#define _OMC_LIT254_data "getAvailablePackageConversionsFrom"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT254,34,_OMC_LIT254_data);
#define _OMC_LIT254 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT254)
#define _OMC_LIT255_data "upgradeInstalledPackages"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT255,24,_OMC_LIT255_data);
#define _OMC_LIT255 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT255)
#define _OMC_LIT256_data "getUses"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT256,7,_OMC_LIT256_data);
#define _OMC_LIT256 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT256)
#define _OMC_LIT257_data "getConversionsFromVersions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT257,26,_OMC_LIT257_data);
#define _OMC_LIT257 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT257)
#define _OMC_LIT258_data "getDerivedClassModifierNames"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT258,28,_OMC_LIT258_data);
#define _OMC_LIT258 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT258)
#define _OMC_LIT259_data "getDerivedClassModifierValue"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT259,28,_OMC_LIT259_data);
#define _OMC_LIT259 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT259)
#define _OMC_LIT260_data "generateEntryPoint"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT260,18,_OMC_LIT260_data);
#define _OMC_LIT260 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT260)
#define _OMC_LIT261_data "numProcessors"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT261,13,_OMC_LIT261_data);
#define _OMC_LIT261 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT261)
#define _OMC_LIT262_data "runScriptParallel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT262,17,_OMC_LIT262_data);
#define _OMC_LIT262 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT262)
#define _OMC_LIT263_data "exit"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT263,4,_OMC_LIT263_data);
#define _OMC_LIT263 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT263)
#define _OMC_LIT264_data "threadWorkFailed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT264,16,_OMC_LIT264_data);
#define _OMC_LIT264 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT264)
#define _OMC_LIT265_data "getMemorySize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT265,13,_OMC_LIT265_data);
#define _OMC_LIT265 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT265)
#define _OMC_LIT266_data "GC_gcollect_and_unmap"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT266,21,_OMC_LIT266_data);
#define _OMC_LIT266 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT266)
#define _OMC_LIT267_data "GC_expand_hp"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT267,12,_OMC_LIT267_data);
#define _OMC_LIT267 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT267)
#define _OMC_LIT268_data "GC_set_max_heap_size"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT268,20,_OMC_LIT268_data);
#define _OMC_LIT268 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT268)
#define _OMC_LIT269_data "checkInterfaceOfPackages"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT269,24,_OMC_LIT269_data);
#define _OMC_LIT269 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT269)
#define _OMC_LIT270_data "sortStrings"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT270,11,_OMC_LIT270_data);
#define _OMC_LIT270 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT270)
#define _OMC_LIT271_data "getClassInformation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT271,19,_OMC_LIT271_data);
#define _OMC_LIT271 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT271)
#define _OMC_LIT272_data "getDefaultComponentName"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT272,23,_OMC_LIT272_data);
#define _OMC_LIT272 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT272)
#define _OMC_LIT273_data "getDefaultComponentPrefixes"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT273,27,_OMC_LIT273_data);
#define _OMC_LIT273 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT273)
#define _OMC_LIT274_data "getEnumerationLiterals"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT274,22,_OMC_LIT274_data);
#define _OMC_LIT274 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT274)
#define _OMC_LIT275_data "getTransitions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT275,14,_OMC_LIT275_data);
#define _OMC_LIT275 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT275)
#define _OMC_LIT276_data "deleteTransition"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT276,16,_OMC_LIT276_data);
#define _OMC_LIT276 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT276)
#define _OMC_LIT277_data "getInitialStates"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT277,16,_OMC_LIT277_data);
#define _OMC_LIT277 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT277)
#define _OMC_LIT278_data "deleteInitialState"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT278,18,_OMC_LIT278_data);
#define _OMC_LIT278 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT278)
#define _OMC_LIT279_data "generateScriptingAPI"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT279,20,_OMC_LIT279_data);
#define _OMC_LIT279 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT279)
#define _OMC_LIT280_data "runConversionScript"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT280,19,_OMC_LIT280_data);
#define _OMC_LIT280 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT280)
#define _OMC_LIT281_data "convertPackageToLibrary"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT281,23,_OMC_LIT281_data);
#define _OMC_LIT281 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT281)
#define _OMC_LIT282_data "getModelInstance"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT282,16,_OMC_LIT282_data);
#define _OMC_LIT282 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT282)
#define _OMC_LIT283_data "getModelInstanceAnnotation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT283,26,_OMC_LIT283_data);
#define _OMC_LIT283 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT283)
#define _OMC_LIT284_data "modifierToJSON"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT284,14,_OMC_LIT284_data);
#define _OMC_LIT284 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT284)
#define _OMC_LIT285_data "storeAST"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT285,8,_OMC_LIT285_data);
#define _OMC_LIT285 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT285)
#define _OMC_LIT286_data "restoreAST"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT286,10,_OMC_LIT286_data);
#define _OMC_LIT286 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT286)
#define _OMC_LIT287_data "qualifyPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT287,11,_OMC_LIT287_data);
#define _OMC_LIT287 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT287)
#define _OMC_LIT288_data "getDefinitions"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT288,14,_OMC_LIT288_data);
#define _OMC_LIT288 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT288)
#define _OMC_LIT289_data "reverseLookup"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT289,13,_OMC_LIT289_data);
#define _OMC_LIT289 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT289)
#define _OMC_LIT290_data "loadOMSimulator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT290,15,_OMC_LIT290_data);
#define _OMC_LIT290 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT290)
#define _OMC_LIT291_data "unloadOMSimulator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT291,17,_OMC_LIT291_data);
#define _OMC_LIT291 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT291)
#define _OMC_LIT292_data "oms_addBus"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT292,10,_OMC_LIT292_data);
#define _OMC_LIT292 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT292)
#define _OMC_LIT293_data "oms_addConnection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT293,17,_OMC_LIT293_data);
#define _OMC_LIT293 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT293)
#define _OMC_LIT294_data "oms_addConnectorToBus"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT294,21,_OMC_LIT294_data);
#define _OMC_LIT294 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT294)
#define _OMC_LIT295_data "oms_addConnectorToTLMBus"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT295,24,_OMC_LIT295_data);
#define _OMC_LIT295 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT295)
#define _OMC_LIT296_data "oms_addDynamicValueIndicator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT296,28,_OMC_LIT296_data);
#define _OMC_LIT296 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT296)
#define _OMC_LIT297_data "oms_addEventIndicator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT297,21,_OMC_LIT297_data);
#define _OMC_LIT297 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT297)
#define _OMC_LIT298_data "oms_addExternalModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT298,20,_OMC_LIT298_data);
#define _OMC_LIT298 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT298)
#define _OMC_LIT299_data "oms_addSignalsToResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT299,23,_OMC_LIT299_data);
#define _OMC_LIT299 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT299)
#define _OMC_LIT300_data "oms_addStaticValueIndicator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT300,27,_OMC_LIT300_data);
#define _OMC_LIT300 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT300)
#define _OMC_LIT301_data "oms_addSubModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT301,15,_OMC_LIT301_data);
#define _OMC_LIT301 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT301)
#define _OMC_LIT302_data "oms_addTimeIndicator"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT302,20,_OMC_LIT302_data);
#define _OMC_LIT302 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT302)
#define _OMC_LIT303_data "oms_addTLMConnection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT303,20,_OMC_LIT303_data);
#define _OMC_LIT303 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT303)
#define _OMC_LIT304_data "oms_compareSimulationResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT304,28,_OMC_LIT304_data);
#define _OMC_LIT304 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT304)
#define _OMC_LIT305_data "oms_copySystem"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT305,14,_OMC_LIT305_data);
#define _OMC_LIT305 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT305)
#define _OMC_LIT306_data "oms_delete"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT306,10,_OMC_LIT306_data);
#define _OMC_LIT306 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT306)
#define _OMC_LIT307_data "oms_deleteConnection"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT307,20,_OMC_LIT307_data);
#define _OMC_LIT307 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT307)
#define _OMC_LIT308_data "oms_deleteConnectorFromBus"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT308,26,_OMC_LIT308_data);
#define _OMC_LIT308 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT308)
#define _OMC_LIT309_data "oms_deleteConnectorFromTLMBus"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT309,29,_OMC_LIT309_data);
#define _OMC_LIT309 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT309)
#define _OMC_LIT310_data "oms_export"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT310,10,_OMC_LIT310_data);
#define _OMC_LIT310 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT310)
#define _OMC_LIT311_data "oms_exportDependencyGraphs"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT311,26,_OMC_LIT311_data);
#define _OMC_LIT311 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT311)
#define _OMC_LIT312_data "oms_exportSnapshot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT312,18,_OMC_LIT312_data);
#define _OMC_LIT312 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT312)
#define _OMC_LIT313_data "oms_extractFMIKind"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT313,18,_OMC_LIT313_data);
#define _OMC_LIT313 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT313)
#define _OMC_LIT314_data "oms_getBoolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT314,14,_OMC_LIT314_data);
#define _OMC_LIT314 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT314)
#define _OMC_LIT315_data "oms_getFixedStepSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT315,20,_OMC_LIT315_data);
#define _OMC_LIT315 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT315)
#define _OMC_LIT316_data "oms_getInteger"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT316,14,_OMC_LIT316_data);
#define _OMC_LIT316 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT316)
#define _OMC_LIT317_data "oms_getModelState"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT317,17,_OMC_LIT317_data);
#define _OMC_LIT317 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT317)
#define _OMC_LIT318_data "oms_getReal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT318,11,_OMC_LIT318_data);
#define _OMC_LIT318 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT318)
#define _OMC_LIT319_data "oms_getSolver"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT319,13,_OMC_LIT319_data);
#define _OMC_LIT319 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT319)
#define _OMC_LIT320_data "oms_getStartTime"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT320,16,_OMC_LIT320_data);
#define _OMC_LIT320 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT320)
#define _OMC_LIT321_data "oms_getStopTime"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT321,15,_OMC_LIT321_data);
#define _OMC_LIT321 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT321)
#define _OMC_LIT322_data "oms_getSubModelPath"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT322,19,_OMC_LIT322_data);
#define _OMC_LIT322 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT322)
#define _OMC_LIT323_data "oms_getSystemType"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT323,17,_OMC_LIT323_data);
#define _OMC_LIT323 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT323)
#define _OMC_LIT324_data "oms_getTolerance"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT324,16,_OMC_LIT324_data);
#define _OMC_LIT324 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT324)
#define _OMC_LIT325_data "oms_getVariableStepSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT325,23,_OMC_LIT325_data);
#define _OMC_LIT325 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT325)
#define _OMC_LIT326_data "oms_importFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT326,14,_OMC_LIT326_data);
#define _OMC_LIT326 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT326)
#define _OMC_LIT327_data "oms_importSnapshot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT327,18,_OMC_LIT327_data);
#define _OMC_LIT327 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT327)
#define _OMC_LIT328_data "oms_initialize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT328,14,_OMC_LIT328_data);
#define _OMC_LIT328 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT328)
#define _OMC_LIT329_data "oms_instantiate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT329,15,_OMC_LIT329_data);
#define _OMC_LIT329 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT329)
#define _OMC_LIT330_data "oms_list"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT330,8,_OMC_LIT330_data);
#define _OMC_LIT330 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT330)
#define _OMC_LIT331_data "oms_listUnconnectedConnectors"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT331,29,_OMC_LIT331_data);
#define _OMC_LIT331 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT331)
#define _OMC_LIT332_data "oms_loadSnapshot"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT332,16,_OMC_LIT332_data);
#define _OMC_LIT332 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT332)
#define _OMC_LIT333_data "oms_newModel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT333,12,_OMC_LIT333_data);
#define _OMC_LIT333 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT333)
#define _OMC_LIT334_data "oms_removeSignalsFromResults"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT334,28,_OMC_LIT334_data);
#define _OMC_LIT334 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT334)
#define _OMC_LIT335_data "oms_rename"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT335,10,_OMC_LIT335_data);
#define _OMC_LIT335 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT335)
#define _OMC_LIT336_data "oms_reset"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT336,9,_OMC_LIT336_data);
#define _OMC_LIT336 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT336)
#define _OMC_LIT337_data "oms_RunFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT337,11,_OMC_LIT337_data);
#define _OMC_LIT337 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT337)
#define _OMC_LIT338_data "oms_setBoolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT338,14,_OMC_LIT338_data);
#define _OMC_LIT338 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT338)
#define _OMC_LIT339_data "oms_setCommandLineOption"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT339,24,_OMC_LIT339_data);
#define _OMC_LIT339 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT339)
#define _OMC_LIT340_data "oms_setFixedStepSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT340,20,_OMC_LIT340_data);
#define _OMC_LIT340 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT340)
#define _OMC_LIT341_data "oms_setInteger"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT341,14,_OMC_LIT341_data);
#define _OMC_LIT341 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT341)
#define _OMC_LIT342_data "oms_setLogFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT342,14,_OMC_LIT342_data);
#define _OMC_LIT342 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT342)
#define _OMC_LIT343_data "oms_setLoggingInterval"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT343,22,_OMC_LIT343_data);
#define _OMC_LIT343 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT343)
#define _OMC_LIT344_data "oms_setLoggingLevel"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT344,19,_OMC_LIT344_data);
#define _OMC_LIT344 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT344)
#define _OMC_LIT345_data "oms_setReal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT345,11,_OMC_LIT345_data);
#define _OMC_LIT345 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT345)
#define _OMC_LIT346_data "oms_setRealInputDerivative"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT346,26,_OMC_LIT346_data);
#define _OMC_LIT346 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT346)
#define _OMC_LIT347_data "oms_setResultFile"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT347,17,_OMC_LIT347_data);
#define _OMC_LIT347 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT347)
#define _OMC_LIT348_data "oms_setSignalFilter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT348,19,_OMC_LIT348_data);
#define _OMC_LIT348 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT348)
#define _OMC_LIT349_data "oms_setStartTime"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT349,16,_OMC_LIT349_data);
#define _OMC_LIT349 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT349)
#define _OMC_LIT350_data "oms_setStopTime"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT350,15,_OMC_LIT350_data);
#define _OMC_LIT350 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT350)
#define _OMC_LIT351_data "oms_setTempDirectory"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT351,20,_OMC_LIT351_data);
#define _OMC_LIT351 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT351)
#define _OMC_LIT352_data "oms_setTLMPositionAndOrientation"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT352,32,_OMC_LIT352_data);
#define _OMC_LIT352 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT352)
#define _OMC_LIT353_data "oms_setTLMSocketData"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT353,20,_OMC_LIT353_data);
#define _OMC_LIT353 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT353)
#define _OMC_LIT354_data "oms_setTolerance"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT354,16,_OMC_LIT354_data);
#define _OMC_LIT354 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT354)
#define _OMC_LIT355_data "oms_setVariableStepSize"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT355,23,_OMC_LIT355_data);
#define _OMC_LIT355 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT355)
#define _OMC_LIT356_data "oms_setWorkingDirectory"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT356,23,_OMC_LIT356_data);
#define _OMC_LIT356 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT356)
#define _OMC_LIT357_data "oms_simulate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT357,12,_OMC_LIT357_data);
#define _OMC_LIT357 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT357)
#define _OMC_LIT358_data "oms_stepUntil"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT358,13,_OMC_LIT358_data);
#define _OMC_LIT358 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT358)
#define _OMC_LIT359_data "oms_terminate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT359,13,_OMC_LIT359_data);
#define _OMC_LIT359 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT359)
#define _OMC_LIT360_data "oms_getVersion"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT360,14,_OMC_LIT360_data);
#define _OMC_LIT360 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT360)
#include "util/modelica.h"

#include "OpenModelicaScriptingAPI_includes.h"



DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_loadFile(threadData_t *threadData, modelica_string _fileName, modelica_string _encoding, modelica_boolean _uses, modelica_boolean _notify, modelica_boolean _requireExactVersion, modelica_boolean _allowWithin)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_uses));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_notify));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_requireExactVersion));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_allowWithin));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT0, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadFile(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _encoding, modelica_metatype _uses, modelica_metatype _notify, modelica_metatype _requireExactVersion, modelica_metatype _allowWithin)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_uses);
  tmp2 = mmc_unbox_integer(_notify);
  tmp3 = mmc_unbox_integer(_requireExactVersion);
  tmp4 = mmc_unbox_integer(_allowWithin);
  _res = omc_OpenModelicaScriptingAPI_loadFile(threadData, _fileName, _encoding, tmp1, tmp2, tmp3, tmp4);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_loadFiles(threadData_t *threadData, modelica_metatype _fileNames, modelica_string _encoding, modelica_integer _numThreads, modelica_boolean _uses, modelica_boolean _notify, modelica_boolean _requireExactVersion, modelica_boolean _allowWithin)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  {
    modelica_metatype __omcQ_24tmpVar5;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_metatype tmpMeta8;
    modelica_metatype __omcQ_24tmpVar4;
    modelica_integer tmp9;
    modelica_metatype _fileNames_iter_loopVar = 0;
    modelica_metatype _fileNames_iter;
    _fileNames_iter_loopVar = _fileNames;
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar5 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar5;
    while(1) {
      tmp9 = 1;
      if (!listEmpty(_fileNames_iter_loopVar)) {
        _fileNames_iter = MMC_CAR(_fileNames_iter_loopVar);
        _fileNames_iter_loopVar = MMC_CDR(_fileNames_iter_loopVar);
        tmp9--;
      }
      if (tmp9 == 0) {
        tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileNames_iter);
        __omcQ_24tmpVar4 = tmpMeta8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar4,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp9 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar5;
  }
  tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta11 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_numThreads));
  tmpMeta12 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_uses));
  tmpMeta13 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_notify));
  tmpMeta14 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_requireExactVersion));
  tmpMeta15 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_allowWithin));
  tmpMeta4 = mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta5), mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, mmc_mk_cons(tmpMeta15, MMC_REFSTRUCTLIT(mmc_nil))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT5, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadFiles(threadData_t *threadData, modelica_metatype _fileNames, modelica_metatype _encoding, modelica_metatype _numThreads, modelica_metatype _uses, modelica_metatype _notify, modelica_metatype _requireExactVersion, modelica_metatype _allowWithin)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_integer tmp5;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_numThreads);
  tmp2 = mmc_unbox_integer(_uses);
  tmp3 = mmc_unbox_integer(_notify);
  tmp4 = mmc_unbox_integer(_requireExactVersion);
  tmp5 = mmc_unbox_integer(_allowWithin);
  _res = omc_OpenModelicaScriptingAPI_loadFiles(threadData, _fileNames, _encoding, tmp1, tmp2, tmp3, tmp4, tmp5);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_parseEncryptedPackage(threadData_t *threadData, modelica_string _fileName, modelica_string _workdir)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _workdir);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT6, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar7;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar6;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar7 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar7;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar6 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar6,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar7;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_loadEncryptedPackage(threadData_t *threadData, modelica_string _fileName, modelica_string _workdir, modelica_boolean _skipUnzip, modelica_boolean _uses, modelica_boolean _notify, modelica_boolean _requireExactVersion)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _workdir);
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_skipUnzip));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_uses));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_notify));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_requireExactVersion));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT7, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadEncryptedPackage(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _workdir, modelica_metatype _skipUnzip, modelica_metatype _uses, modelica_metatype _notify, modelica_metatype _requireExactVersion)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_skipUnzip);
  tmp2 = mmc_unbox_integer(_uses);
  tmp3 = mmc_unbox_integer(_notify);
  tmp4 = mmc_unbox_integer(_requireExactVersion);
  _res = omc_OpenModelicaScriptingAPI_loadEncryptedPackage(threadData, _fileName, _workdir, tmp1, tmp2, tmp3, tmp4);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_reloadClass(threadData_t *threadData, modelica_string _name, modelica_string _encoding)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _name));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT8, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_reloadClass(threadData_t *threadData, modelica_metatype _name, modelica_metatype _encoding)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_reloadClass(threadData, _name, _encoding);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_loadString(threadData_t *threadData, modelica_string _data, modelica_string _filename, modelica_string _encoding, modelica_boolean _merge, modelica_boolean _uses, modelica_boolean _notify, modelica_boolean _requireExactVersion)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _data);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_merge));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_uses));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_notify));
  tmpMeta11 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_requireExactVersion));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT9, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadString(threadData_t *threadData, modelica_metatype _data, modelica_metatype _filename, modelica_metatype _encoding, modelica_metatype _merge, modelica_metatype _uses, modelica_metatype _notify, modelica_metatype _requireExactVersion)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_merge);
  tmp2 = mmc_unbox_integer(_uses);
  tmp3 = mmc_unbox_integer(_notify);
  tmp4 = mmc_unbox_integer(_requireExactVersion);
  _res = omc_OpenModelicaScriptingAPI_loadString(threadData, _data, _filename, _encoding, tmp1, tmp2, tmp3, tmp4);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_loadClassContentString(threadData_t *threadData, modelica_string _data, modelica_string _className, modelica_integer _offsetX, modelica_integer _offsetY)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _data);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta8 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_offsetX));
  tmpMeta9 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_offsetY));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT10, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadClassContentString(threadData_t *threadData, modelica_metatype _data, modelica_metatype _className, modelica_metatype _offsetX, modelica_metatype _offsetY)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_offsetX);
  tmp2 = mmc_unbox_integer(_offsetY);
  _res = omc_OpenModelicaScriptingAPI_loadClassContentString(threadData, _data, _className, tmp1, tmp2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_parseString(threadData_t *threadData, modelica_string _data, modelica_string _filename)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _data);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT11, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar9;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar8;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar9 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar9;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar8 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar8,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar9;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_parseFile(threadData_t *threadData, modelica_string _filename, modelica_string _encoding)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT12, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar11;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar10;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar11 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar11;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar10 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar10,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar11;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_loadFileInteractiveQualified(threadData_t *threadData, modelica_string _filename, modelica_string _encoding)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT13, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar13;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar12;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar13 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar13;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar12 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar12,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar13;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_loadFileInteractive(threadData_t *threadData, modelica_string _filename, modelica_string _encoding, modelica_boolean _uses, modelica_boolean _notify, modelica_boolean _requireExactVersion)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _encoding);
  tmpMeta4 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_uses));
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_notify));
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_requireExactVersion));
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT14, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar15;
    modelica_metatype* tmp8;
    modelica_metatype tmpMeta9;
    modelica_string __omcQ_24tmpVar14;
    modelica_integer tmp10;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar15 = tmpMeta9; /* defaultValue */
    tmp8 = &__omcQ_24tmpVar15;
    while(1) {
      tmp10 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp10--;
      }
      if (tmp10 == 0) {
        __omcQ_24tmpVar14 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp8 = mmc_mk_cons(__omcQ_24tmpVar14,0);
        tmp8 = &MMC_CDR(*tmp8);
      } else if (tmp10 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp8 = mmc_mk_nil();
    tmpMeta7 = __omcQ_24tmpVar15;
  }
  _res = tmpMeta7;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadFileInteractive(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _encoding, modelica_metatype _uses, modelica_metatype _notify, modelica_metatype _requireExactVersion)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_uses);
  tmp2 = mmc_unbox_integer(_notify);
  tmp3 = mmc_unbox_integer(_requireExactVersion);
  _res = omc_OpenModelicaScriptingAPI_loadFileInteractive(threadData, _filename, _encoding, tmp1, tmp2, tmp3);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_system(threadData_t *threadData, modelica_string _callStr, modelica_string _outputFile)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _callStr);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _outputFile);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT15, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_system(threadData_t *threadData, modelica_metatype _callStr, modelica_metatype _outputFile)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_system(threadData, _callStr, _outputFile);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_system__parallel(threadData_t *threadData, modelica_metatype _callStr, modelica_integer _numThreads)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  {
    modelica_metatype __omcQ_24tmpVar19;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_metatype tmpMeta5;
    modelica_metatype __omcQ_24tmpVar18;
    modelica_integer tmp6;
    modelica_metatype _callStr_iter_loopVar = 0;
    modelica_metatype _callStr_iter;
    _callStr_iter_loopVar = _callStr;
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar19 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar19;
    while(1) {
      tmp6 = 1;
      if (!listEmpty(_callStr_iter_loopVar)) {
        _callStr_iter = MMC_CAR(_callStr_iter_loopVar);
        _callStr_iter_loopVar = MMC_CDR(_callStr_iter_loopVar);
        tmp6--;
      }
      if (tmp6 == 0) {
        tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _callStr_iter);
        __omcQ_24tmpVar18 = tmpMeta5;
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar18,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp6 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar19;
  }
  tmpMeta7 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_numThreads));
  tmpMeta1 = mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta2), mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT16, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar21;
    modelica_metatype* tmp9;
    modelica_metatype tmpMeta10;
    modelica_metatype tmpMeta11;
    modelica_metatype __omcQ_24tmpVar20;
    modelica_integer tmp16;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar21 = tmpMeta10; /* defaultValue */
    tmp9 = &__omcQ_24tmpVar21;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        { /* match expression */
          modelica_metatype tmp14_1;
          tmp14_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp14;
            int tmp15;
            tmp14 = 0;
            for (; tmp14 < 1; tmp14++) {
              switch (MMC_SWITCH_CAST(tmp14)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp14_1,0,1) == 0) goto tmp13_end;
                
                /* Pattern matching succeeded */
                tmpMeta11 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp13_done;
              }
              }
              goto tmp13_end;
              tmp13_end: ;
            }
            goto goto_12;
            goto_12:;
            MMC_THROW_INTERNAL();
            goto tmp13_done;
            tmp13_done:;
          }
        }__omcQ_24tmpVar20 = tmpMeta11;
        *tmp9 = mmc_mk_cons(__omcQ_24tmpVar20,0);
        tmp9 = &MMC_CDR(*tmp9);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp9 = mmc_mk_nil();
    tmpMeta8 = __omcQ_24tmpVar21;
  }
  _res = tmpMeta8;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_system__parallel(threadData_t *threadData, modelica_metatype _callStr, modelica_metatype _numThreads)
{
  modelica_integer tmp1;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_numThreads);
  _res = omc_OpenModelicaScriptingAPI_system__parallel(threadData, _callStr, tmp1);
  /* skip box _res; list<#Integer> */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_saveAll(threadData_t *threadData, modelica_string _fileName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT17, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_saveAll(threadData_t *threadData, modelica_metatype _fileName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_saveAll(threadData, _fileName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_help(threadData_t *threadData, modelica_string _topic)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _topic);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT18, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_clear(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT19, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_clear(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_clear(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_clearProgram(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT20, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_clearProgram(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_clearProgram(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_clearVariables(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT21, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_clearVariables(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_clearVariables(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateHeader(threadData_t *threadData, modelica_string _fileName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT22, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateHeader(threadData_t *threadData, modelica_metatype _fileName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_generateHeader(threadData, _fileName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateJuliaHeader(threadData_t *threadData, modelica_string _fileName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT23, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateJuliaHeader(threadData_t *threadData, modelica_metatype _fileName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_generateJuliaHeader(threadData, _fileName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateSeparateCode(threadData_t *threadData, modelica_string _className, modelica_boolean _cleanCache)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_cleanCache));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT24, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateSeparateCode(threadData_t *threadData, modelica_metatype _className, modelica_metatype _cleanCache)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_cleanCache);
  _res = omc_OpenModelicaScriptingAPI_generateSeparateCode(threadData, _className, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_generateSeparateCodeDependencies(threadData_t *threadData, modelica_string _stampSuffix)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _stampSuffix);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT25, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar23;
    modelica_metatype* tmp4;
    modelica_metatype tmpMeta5;
    modelica_string tmp6 = 0;
    modelica_string __omcQ_24tmpVar22;
    modelica_integer tmp11;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar23 = tmpMeta5; /* defaultValue */
    tmp4 = &__omcQ_24tmpVar23;
    while(1) {
      tmp11 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp11--;
      }
      if (tmp11 == 0) {
        { /* match expression */
          modelica_metatype tmp9_1;
          tmp9_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp9;
            int tmp10;
            tmp9 = 0;
            for (; tmp9 < 1; tmp9++) {
              switch (MMC_SWITCH_CAST(tmp9)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp9_1,2,1) == 0) goto tmp8_end;
                
                /* Pattern matching succeeded */
                tmp6 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp8_done;
              }
              }
              goto tmp8_end;
              tmp8_end: ;
            }
            goto goto_7;
            goto_7:;
            MMC_THROW_INTERNAL();
            goto tmp8_done;
            tmp8_done:;
          }
        }__omcQ_24tmpVar22 = tmp6;
        *tmp4 = mmc_mk_cons(__omcQ_24tmpVar22,0);
        tmp4 = &MMC_CDR(*tmp4);
      } else if (tmp11 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp4 = mmc_mk_nil();
    tmpMeta3 = __omcQ_24tmpVar23;
  }
  _res = tmpMeta3;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateSeparateCodeDependenciesMakefile(threadData_t *threadData, modelica_string _filename, modelica_string _directory, modelica_string _suffix)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _directory);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _suffix);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT26, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateSeparateCodeDependenciesMakefile(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _directory, modelica_metatype _suffix)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_generateSeparateCodeDependenciesMakefile(threadData, _filename, _directory, _suffix);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getLinker(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT27, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setLinker(threadData_t *threadData, modelica_string _linker)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _linker);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT28, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setLinker(threadData_t *threadData, modelica_metatype _linker)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setLinker(threadData, _linker);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getLinkerFlags(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT29, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setLinkerFlags(threadData_t *threadData, modelica_string _linkerFlags)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _linkerFlags);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT30, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setLinkerFlags(threadData_t *threadData, modelica_metatype _linkerFlags)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setLinkerFlags(threadData, _linkerFlags);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getCompiler(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT31, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setCompiler(threadData_t *threadData, modelica_string _compiler)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _compiler);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT32, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setCompiler(threadData_t *threadData, modelica_metatype _compiler)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setCompiler(threadData, _compiler);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getCFlags(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT33, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setCFlags(threadData_t *threadData, modelica_string _inString)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _inString);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT34, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setCFlags(threadData_t *threadData, modelica_metatype _inString)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setCFlags(threadData, _inString);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getCXXCompiler(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT35, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setCXXCompiler(threadData_t *threadData, modelica_string _compiler)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _compiler);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT36, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setCXXCompiler(threadData_t *threadData, modelica_metatype _compiler)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setCXXCompiler(threadData, _compiler);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setTempDirectoryPath(threadData_t *threadData, modelica_string _tempDirectoryPath)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _tempDirectoryPath);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT37, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setTempDirectoryPath(threadData_t *threadData, modelica_metatype _tempDirectoryPath)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setTempDirectoryPath(threadData, _tempDirectoryPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getTempDirectoryPath(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT38, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getEnvironmentVar(threadData_t *threadData, modelica_string _var)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _var);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT39, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setEnvironmentVar(threadData_t *threadData, modelica_string _var, modelica_string _value)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _var);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _value);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT40, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setEnvironmentVar(threadData_t *threadData, modelica_metatype _var, modelica_metatype _value)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setEnvironmentVar(threadData, _var, _value);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setInstallationDirectoryPath(threadData_t *threadData, modelica_string _installationDirectoryPath)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _installationDirectoryPath);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT41, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setInstallationDirectoryPath(threadData_t *threadData, modelica_metatype _installationDirectoryPath)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setInstallationDirectoryPath(threadData, _installationDirectoryPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getInstallationDirectoryPath(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT42, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setModelicaPath(threadData_t *threadData, modelica_string _modelicaPath)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _modelicaPath);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT43, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setModelicaPath(threadData_t *threadData, modelica_metatype _modelicaPath)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setModelicaPath(threadData, _modelicaPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getModelicaPath(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT44, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getHomeDirectoryPath(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT45, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setCompilerFlags(threadData_t *threadData, modelica_string _compilerFlags)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _compilerFlags);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT46, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setCompilerFlags(threadData_t *threadData, modelica_metatype _compilerFlags)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setCompilerFlags(threadData, _compilerFlags);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_enableNewInstantiation(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT47, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_enableNewInstantiation(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_enableNewInstantiation(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_disableNewInstantiation(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT48, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_disableNewInstantiation(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_disableNewInstantiation(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_clearDebugFlags(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT49, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_clearDebugFlags(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_clearDebugFlags(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getMatchingAlgorithm(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT50, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailableMatchingAlgorithms(threadData_t *threadData, modelica_metatype *out_res2)
{
  modelica_metatype _res1 = NULL;
  modelica_metatype _res2 = NULL;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype _res2_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta17;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res1_arr has no default value.
  // _res2_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT51, tmpMeta7, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (!listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2_arr = tmpMeta5;

  {
    modelica_metatype __omcQ_24tmpVar25;
    modelica_metatype* tmp9;
    modelica_metatype tmpMeta10;
    modelica_string tmp11 = 0;
    modelica_string __omcQ_24tmpVar24;
    modelica_integer tmp16;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar25 = tmpMeta10; /* defaultValue */
    tmp9 = &__omcQ_24tmpVar25;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        { /* match expression */
          modelica_metatype tmp14_1;
          tmp14_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp14;
            int tmp15;
            tmp14 = 0;
            for (; tmp14 < 1; tmp14++) {
              switch (MMC_SWITCH_CAST(tmp14)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp14_1,2,1) == 0) goto tmp13_end;
                
                /* Pattern matching succeeded */
                tmp11 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp13_done;
              }
              }
              goto tmp13_end;
              tmp13_end: ;
            }
            goto goto_12;
            goto_12:;
            MMC_THROW_INTERNAL();
            goto tmp13_done;
            tmp13_done:;
          }
        }__omcQ_24tmpVar24 = tmp11;
        *tmp9 = mmc_mk_cons(__omcQ_24tmpVar24,0);
        tmp9 = &MMC_CDR(*tmp9);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp9 = mmc_mk_nil();
    tmpMeta8 = __omcQ_24tmpVar25;
  }
  _res1 = tmpMeta8;

  {
    modelica_metatype __omcQ_24tmpVar27;
    modelica_metatype* tmp18;
    modelica_metatype tmpMeta19;
    modelica_string tmp20 = 0;
    modelica_string __omcQ_24tmpVar26;
    modelica_integer tmp25;
    modelica_metatype _res2_arr_iter_loopVar = 0;
    modelica_metatype _res2_arr_iter;
    _res2_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res2_arr);
    tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar27 = tmpMeta19; /* defaultValue */
    tmp18 = &__omcQ_24tmpVar27;
    while(1) {
      tmp25 = 1;
      if (!listEmpty(_res2_arr_iter_loopVar)) {
        _res2_arr_iter = MMC_CAR(_res2_arr_iter_loopVar);
        _res2_arr_iter_loopVar = MMC_CDR(_res2_arr_iter_loopVar);
        tmp25--;
      }
      if (tmp25 == 0) {
        { /* match expression */
          modelica_metatype tmp23_1;
          tmp23_1 = _res2_arr_iter;
          {
            volatile mmc_switch_type tmp23;
            int tmp24;
            tmp23 = 0;
            for (; tmp23 < 1; tmp23++) {
              switch (MMC_SWITCH_CAST(tmp23)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp23_1,2,1) == 0) goto tmp22_end;
                
                /* Pattern matching succeeded */
                tmp20 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res2_arr_iter), 2)));
                goto tmp22_done;
              }
              }
              goto tmp22_end;
              tmp22_end: ;
            }
            goto goto_21;
            goto_21:;
            MMC_THROW_INTERNAL();
            goto tmp22_done;
            tmp22_done:;
          }
        }__omcQ_24tmpVar26 = tmp20;
        *tmp18 = mmc_mk_cons(__omcQ_24tmpVar26,0);
        tmp18 = &MMC_CDR(*tmp18);
      } else if (tmp25 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp18 = mmc_mk_nil();
    tmpMeta17 = __omcQ_24tmpVar27;
  }
  _res2 = tmpMeta17;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getIndexReductionMethod(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT52, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailableIndexReductionMethods(threadData_t *threadData, modelica_metatype *out_res2)
{
  modelica_metatype _res1 = NULL;
  modelica_metatype _res2 = NULL;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype _res2_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta17;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res1_arr has no default value.
  // _res2_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT53, tmpMeta7, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (!listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2_arr = tmpMeta5;

  {
    modelica_metatype __omcQ_24tmpVar29;
    modelica_metatype* tmp9;
    modelica_metatype tmpMeta10;
    modelica_string tmp11 = 0;
    modelica_string __omcQ_24tmpVar28;
    modelica_integer tmp16;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar29 = tmpMeta10; /* defaultValue */
    tmp9 = &__omcQ_24tmpVar29;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        { /* match expression */
          modelica_metatype tmp14_1;
          tmp14_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp14;
            int tmp15;
            tmp14 = 0;
            for (; tmp14 < 1; tmp14++) {
              switch (MMC_SWITCH_CAST(tmp14)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp14_1,2,1) == 0) goto tmp13_end;
                
                /* Pattern matching succeeded */
                tmp11 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp13_done;
              }
              }
              goto tmp13_end;
              tmp13_end: ;
            }
            goto goto_12;
            goto_12:;
            MMC_THROW_INTERNAL();
            goto tmp13_done;
            tmp13_done:;
          }
        }__omcQ_24tmpVar28 = tmp11;
        *tmp9 = mmc_mk_cons(__omcQ_24tmpVar28,0);
        tmp9 = &MMC_CDR(*tmp9);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp9 = mmc_mk_nil();
    tmpMeta8 = __omcQ_24tmpVar29;
  }
  _res1 = tmpMeta8;

  {
    modelica_metatype __omcQ_24tmpVar31;
    modelica_metatype* tmp18;
    modelica_metatype tmpMeta19;
    modelica_string tmp20 = 0;
    modelica_string __omcQ_24tmpVar30;
    modelica_integer tmp25;
    modelica_metatype _res2_arr_iter_loopVar = 0;
    modelica_metatype _res2_arr_iter;
    _res2_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res2_arr);
    tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar31 = tmpMeta19; /* defaultValue */
    tmp18 = &__omcQ_24tmpVar31;
    while(1) {
      tmp25 = 1;
      if (!listEmpty(_res2_arr_iter_loopVar)) {
        _res2_arr_iter = MMC_CAR(_res2_arr_iter_loopVar);
        _res2_arr_iter_loopVar = MMC_CDR(_res2_arr_iter_loopVar);
        tmp25--;
      }
      if (tmp25 == 0) {
        { /* match expression */
          modelica_metatype tmp23_1;
          tmp23_1 = _res2_arr_iter;
          {
            volatile mmc_switch_type tmp23;
            int tmp24;
            tmp23 = 0;
            for (; tmp23 < 1; tmp23++) {
              switch (MMC_SWITCH_CAST(tmp23)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp23_1,2,1) == 0) goto tmp22_end;
                
                /* Pattern matching succeeded */
                tmp20 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res2_arr_iter), 2)));
                goto tmp22_done;
              }
              }
              goto tmp22_end;
              tmp22_end: ;
            }
            goto goto_21;
            goto_21:;
            MMC_THROW_INTERNAL();
            goto tmp22_done;
            tmp22_done:;
          }
        }__omcQ_24tmpVar30 = tmp20;
        *tmp18 = mmc_mk_cons(__omcQ_24tmpVar30,0);
        tmp18 = &MMC_CDR(*tmp18);
      } else if (tmp25 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp18 = mmc_mk_nil();
    tmpMeta17 = __omcQ_24tmpVar31;
  }
  _res2 = tmpMeta17;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getTearingMethod(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT54, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailableTearingMethods(threadData_t *threadData, modelica_metatype *out_res2)
{
  modelica_metatype _res1 = NULL;
  modelica_metatype _res2 = NULL;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype _res2_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta17;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res1_arr has no default value.
  // _res2_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT55, tmpMeta7, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (!listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2_arr = tmpMeta5;

  {
    modelica_metatype __omcQ_24tmpVar33;
    modelica_metatype* tmp9;
    modelica_metatype tmpMeta10;
    modelica_string tmp11 = 0;
    modelica_string __omcQ_24tmpVar32;
    modelica_integer tmp16;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar33 = tmpMeta10; /* defaultValue */
    tmp9 = &__omcQ_24tmpVar33;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        { /* match expression */
          modelica_metatype tmp14_1;
          tmp14_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp14;
            int tmp15;
            tmp14 = 0;
            for (; tmp14 < 1; tmp14++) {
              switch (MMC_SWITCH_CAST(tmp14)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp14_1,2,1) == 0) goto tmp13_end;
                
                /* Pattern matching succeeded */
                tmp11 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp13_done;
              }
              }
              goto tmp13_end;
              tmp13_end: ;
            }
            goto goto_12;
            goto_12:;
            MMC_THROW_INTERNAL();
            goto tmp13_done;
            tmp13_done:;
          }
        }__omcQ_24tmpVar32 = tmp11;
        *tmp9 = mmc_mk_cons(__omcQ_24tmpVar32,0);
        tmp9 = &MMC_CDR(*tmp9);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp9 = mmc_mk_nil();
    tmpMeta8 = __omcQ_24tmpVar33;
  }
  _res1 = tmpMeta8;

  {
    modelica_metatype __omcQ_24tmpVar35;
    modelica_metatype* tmp18;
    modelica_metatype tmpMeta19;
    modelica_string tmp20 = 0;
    modelica_string __omcQ_24tmpVar34;
    modelica_integer tmp25;
    modelica_metatype _res2_arr_iter_loopVar = 0;
    modelica_metatype _res2_arr_iter;
    _res2_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res2_arr);
    tmpMeta19 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar35 = tmpMeta19; /* defaultValue */
    tmp18 = &__omcQ_24tmpVar35;
    while(1) {
      tmp25 = 1;
      if (!listEmpty(_res2_arr_iter_loopVar)) {
        _res2_arr_iter = MMC_CAR(_res2_arr_iter_loopVar);
        _res2_arr_iter_loopVar = MMC_CDR(_res2_arr_iter_loopVar);
        tmp25--;
      }
      if (tmp25 == 0) {
        { /* match expression */
          modelica_metatype tmp23_1;
          tmp23_1 = _res2_arr_iter;
          {
            volatile mmc_switch_type tmp23;
            int tmp24;
            tmp23 = 0;
            for (; tmp23 < 1; tmp23++) {
              switch (MMC_SWITCH_CAST(tmp23)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp23_1,2,1) == 0) goto tmp22_end;
                
                /* Pattern matching succeeded */
                tmp20 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res2_arr_iter), 2)));
                goto tmp22_done;
              }
              }
              goto tmp22_end;
              tmp22_end: ;
            }
            goto goto_21;
            goto_21:;
            MMC_THROW_INTERNAL();
            goto tmp22_done;
            tmp22_done:;
          }
        }__omcQ_24tmpVar34 = tmp20;
        *tmp18 = mmc_mk_cons(__omcQ_24tmpVar34,0);
        tmp18 = &MMC_CDR(*tmp18);
      } else if (tmp25 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp18 = mmc_mk_nil();
    tmpMeta17 = __omcQ_24tmpVar35;
  }
  _res2 = tmpMeta17;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setCommandLineOptions(threadData_t *threadData, modelica_string _options)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _options);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT56, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setCommandLineOptions(threadData_t *threadData, modelica_metatype _options)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setCommandLineOptions(threadData, _options);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getCommandLineOptions(threadData_t *threadData)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT57, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar37;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_string tmp5 = 0;
    modelica_string __omcQ_24tmpVar36;
    modelica_integer tmp10;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar37 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar37;
    while(1) {
      tmp10 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp10--;
      }
      if (tmp10 == 0) {
        { /* match expression */
          modelica_metatype tmp8_1;
          tmp8_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp8;
            int tmp9;
            tmp8 = 0;
            for (; tmp8 < 1; tmp8++) {
              switch (MMC_SWITCH_CAST(tmp8)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,2,1) == 0) goto tmp7_end;
                
                /* Pattern matching succeeded */
                tmp5 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp7_done;
              }
              }
              goto tmp7_end;
              tmp7_end: ;
            }
            goto goto_6;
            goto_6:;
            MMC_THROW_INTERNAL();
            goto tmp7_done;
            tmp7_done:;
          }
        }__omcQ_24tmpVar36 = tmp5;
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar36,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp10 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar37;
  }
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getConfigFlagValidOptions(threadData_t *threadData, modelica_string _flag, modelica_string *out_res2, modelica_metatype *out_res3)
{
  modelica_metatype _res1 = NULL;
  modelica_string _res2 = NULL;
  modelica_metatype _res3 = NULL;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype _res3_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta21;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  // _res1_arr has no default value.
  // _res3_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _flag);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT58, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
  if (listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_CAR(tmpMeta6);
  tmpMeta9 = MMC_CDR(tmpMeta6);
  if (!listEmpty(tmpMeta9)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2 = tmpMeta7;
  _res3_arr = tmpMeta8;

  {
    modelica_metatype __omcQ_24tmpVar39;
    modelica_metatype* tmp13;
    modelica_metatype tmpMeta14;
    modelica_string tmp15 = 0;
    modelica_string __omcQ_24tmpVar38;
    modelica_integer tmp20;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar39 = tmpMeta14; /* defaultValue */
    tmp13 = &__omcQ_24tmpVar39;
    while(1) {
      tmp20 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp20--;
      }
      if (tmp20 == 0) {
        { /* match expression */
          modelica_metatype tmp18_1;
          tmp18_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp18;
            int tmp19;
            tmp18 = 0;
            for (; tmp18 < 1; tmp18++) {
              switch (MMC_SWITCH_CAST(tmp18)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp18_1,2,1) == 0) goto tmp17_end;
                
                /* Pattern matching succeeded */
                tmp15 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp17_done;
              }
              }
              goto tmp17_end;
              tmp17_end: ;
            }
            goto goto_16;
            goto_16:;
            MMC_THROW_INTERNAL();
            goto tmp17_done;
            tmp17_done:;
          }
        }__omcQ_24tmpVar38 = tmp15;
        *tmp13 = mmc_mk_cons(__omcQ_24tmpVar38,0);
        tmp13 = &MMC_CDR(*tmp13);
      } else if (tmp20 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp13 = mmc_mk_nil();
    tmpMeta12 = __omcQ_24tmpVar39;
  }
  _res1 = tmpMeta12;

  {
    modelica_metatype __omcQ_24tmpVar41;
    modelica_metatype* tmp22;
    modelica_metatype tmpMeta23;
    modelica_string tmp24 = 0;
    modelica_string __omcQ_24tmpVar40;
    modelica_integer tmp29;
    modelica_metatype _res3_arr_iter_loopVar = 0;
    modelica_metatype _res3_arr_iter;
    _res3_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res3_arr);
    tmpMeta23 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar41 = tmpMeta23; /* defaultValue */
    tmp22 = &__omcQ_24tmpVar41;
    while(1) {
      tmp29 = 1;
      if (!listEmpty(_res3_arr_iter_loopVar)) {
        _res3_arr_iter = MMC_CAR(_res3_arr_iter_loopVar);
        _res3_arr_iter_loopVar = MMC_CDR(_res3_arr_iter_loopVar);
        tmp29--;
      }
      if (tmp29 == 0) {
        { /* match expression */
          modelica_metatype tmp27_1;
          tmp27_1 = _res3_arr_iter;
          {
            volatile mmc_switch_type tmp27;
            int tmp28;
            tmp27 = 0;
            for (; tmp27 < 1; tmp27++) {
              switch (MMC_SWITCH_CAST(tmp27)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp27_1,2,1) == 0) goto tmp26_end;
                
                /* Pattern matching succeeded */
                tmp24 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res3_arr_iter), 2)));
                goto tmp26_done;
              }
              }
              goto tmp26_end;
              tmp26_end: ;
            }
            goto goto_25;
            goto_25:;
            MMC_THROW_INTERNAL();
            goto tmp26_done;
            tmp26_done:;
          }
        }__omcQ_24tmpVar40 = tmp24;
        *tmp22 = mmc_mk_cons(__omcQ_24tmpVar40,0);
        tmp22 = &MMC_CDR(*tmp22);
      } else if (tmp29 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp22 = mmc_mk_nil();
    tmpMeta21 = __omcQ_24tmpVar41;
  }
  _res3 = tmpMeta21;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  return _res1;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_clearCommandLineOptions(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT59, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_clearCommandLineOptions(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_clearCommandLineOptions(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getVersion(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT60, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_regularFileExists(threadData_t *threadData, modelica_string _fileName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT61, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_regularFileExists(threadData_t *threadData, modelica_metatype _fileName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_regularFileExists(threadData, _fileName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_directoryExists(threadData_t *threadData, modelica_string _dirName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _dirName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT62, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_directoryExists(threadData_t *threadData, modelica_metatype _dirName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_directoryExists(threadData, _dirName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_stat(threadData_t *threadData, modelica_string _fileName, modelica_real *out_res2, modelica_real *out_res3)
{
  modelica_boolean _res1;
  modelica_real _res2;
  modelica_real _res3;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_real tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_real tmp14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta16 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta15 = mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT63, tmpMeta15, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_real(tmpMeta9);
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_CAR(tmpMeta8);
  tmpMeta12 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
  tmp14 = mmc_unbox_real(tmpMeta13);
  if (!listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Boolean */;
  _res2 = tmp10  /* pattern as ty=Real */;
  _res3 = tmp14  /* pattern as ty=Real */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_stat(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype *out_res2, modelica_metatype *out_res3)
{
  modelica_real _res2;
  modelica_real _res3;
  modelica_boolean _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_stat(threadData, _fileName, &_res2, &_res3);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_rcon(_res2); }
  if (out_res3) { *out_res3 = mmc_mk_rcon(_res3); }
  return out_res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_readFile(threadData_t *threadData, modelica_string _fileName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT64, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_writeFile(threadData_t *threadData, modelica_string _fileName, modelica_string _data, modelica_boolean _append)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _data);
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_append));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT65, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_writeFile(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _data, modelica_metatype _append)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_append);
  _res = omc_OpenModelicaScriptingAPI_writeFile(threadData, _fileName, _data, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_compareFilesAndMove(threadData_t *threadData, modelica_string _newFile, modelica_string _oldFile)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newFile);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _oldFile);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT66, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_compareFilesAndMove(threadData_t *threadData, modelica_metatype _newFile, modelica_metatype _oldFile)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_compareFilesAndMove(threadData, _newFile, _oldFile);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_compareFiles(threadData_t *threadData, modelica_string _file1, modelica_string _file2)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _file1);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _file2);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT67, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_compareFiles(threadData_t *threadData, modelica_metatype _file1, modelica_metatype _file2)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_compareFiles(threadData, _file1, _file2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_alarm(threadData_t *threadData, modelica_integer _seconds)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_seconds));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT68, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_alarm(threadData_t *threadData, modelica_metatype _seconds)
{
  modelica_integer tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_seconds);
  _res = omc_OpenModelicaScriptingAPI_alarm(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getErrorString(threadData_t *threadData, modelica_boolean _warningsAsErrors)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_warningsAsErrors));
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT69, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getErrorString(threadData_t *threadData, modelica_metatype _warningsAsErrors)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_warningsAsErrors);
  _res = omc_OpenModelicaScriptingAPI_getErrorString(threadData, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_countMessages(threadData_t *threadData, modelica_integer *out_res2, modelica_integer *out_res3)
{
  modelica_integer _res1;
  modelica_integer _res2;
  modelica_integer _res3;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_integer tmp14;
  modelica_metatype tmpMeta15;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT70, tmpMeta15, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_CAR(tmpMeta8);
  tmpMeta12 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
  tmp14 = mmc_unbox_integer(tmpMeta13);
  if (!listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Integer */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _res3 = tmp14  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_countMessages(threadData_t *threadData, modelica_metatype *out_res2, modelica_metatype *out_res3)
{
  modelica_integer _res2;
  modelica_integer _res3;
  modelica_integer _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_countMessages(threadData, &_res2, &_res3);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  if (out_res3) { *out_res3 = mmc_mk_icon(_res3); }
  return out_res1;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_clearMessages(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT71, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_clearMessages(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_clearMessages(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_runScript(threadData_t *threadData, modelica_string _fileName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT72, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_echo(threadData_t *threadData, modelica_boolean _setEcho)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_setEcho));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT73, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_echo(threadData_t *threadData, modelica_metatype _setEcho)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_setEcho);
  _res = omc_OpenModelicaScriptingAPI_echo(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getAnnotationVersion(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT74, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_getNoSimplify(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT75, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNoSimplify(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getNoSimplify(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setNoSimplify(threadData_t *threadData, modelica_boolean _noSimplify)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_noSimplify));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT76, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setNoSimplify(threadData_t *threadData, modelica_metatype _noSimplify)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_noSimplify);
  _res = omc_OpenModelicaScriptingAPI_setNoSimplify(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getVectorizationLimit(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT77, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getVectorizationLimit(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getVectorizationLimit(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getDefaultOpenCLDevice(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT78, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getDefaultOpenCLDevice(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getDefaultOpenCLDevice(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setShowAnnotations(threadData_t *threadData, modelica_boolean _show)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_show));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT79, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setShowAnnotations(threadData_t *threadData, modelica_metatype _show)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_show);
  _res = omc_OpenModelicaScriptingAPI_setShowAnnotations(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_getShowAnnotations(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT80, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getShowAnnotations(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getShowAnnotations(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_getOrderConnections(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT81, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getOrderConnections(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getOrderConnections(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getLanguageStandard(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT82, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getAstAsCorbaString(threadData_t *threadData, modelica_string _fileName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT83, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_cd(threadData_t *threadData, modelica_string _newWorkingDirectory)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newWorkingDirectory);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT84, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_mkdir(threadData_t *threadData, modelica_string _newDirectory)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newDirectory);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT85, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_mkdir(threadData_t *threadData, modelica_metatype _newDirectory)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_mkdir(threadData, _newDirectory);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_copy(threadData_t *threadData, modelica_string _source, modelica_string _destination)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _source);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _destination);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT86, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_copy(threadData_t *threadData, modelica_metatype _source, modelica_metatype _destination)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_copy(threadData, _source, _destination);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_remove(threadData_t *threadData, modelica_string _path)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _path);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT87, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_remove(threadData_t *threadData, modelica_metatype _path)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_remove(threadData, _path);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_checkModel(threadData_t *threadData, modelica_string _className)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT88, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_checkAllModelsRecursive(threadData_t *threadData, modelica_string _className, modelica_boolean _checkProtected)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_checkProtected));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT89, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_checkAllModelsRecursive(threadData_t *threadData, modelica_metatype _className, modelica_metatype _checkProtected)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_checkProtected);
  _res = omc_OpenModelicaScriptingAPI_checkAllModelsRecursive(threadData, _className, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_instantiateModel(threadData_t *threadData, modelica_string _className)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT90, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateCode(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT91, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateCode(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_generateCode(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_loadModel(threadData_t *threadData, modelica_string _className, modelica_metatype _priorityVersion, modelica_boolean _notify, modelica_string _languageStandard, modelica_boolean _requireExactVersion)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  {
    modelica_metatype __omcQ_24tmpVar45;
    modelica_metatype* tmp8;
    modelica_metatype tmpMeta9;
    modelica_metatype tmpMeta10;
    modelica_metatype __omcQ_24tmpVar44;
    modelica_integer tmp11;
    modelica_metatype _priorityVersion_iter_loopVar = 0;
    modelica_metatype _priorityVersion_iter;
    _priorityVersion_iter_loopVar = _priorityVersion;
    tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar45 = tmpMeta9; /* defaultValue */
    tmp8 = &__omcQ_24tmpVar45;
    while(1) {
      tmp11 = 1;
      if (!listEmpty(_priorityVersion_iter_loopVar)) {
        _priorityVersion_iter = MMC_CAR(_priorityVersion_iter_loopVar);
        _priorityVersion_iter_loopVar = MMC_CDR(_priorityVersion_iter_loopVar);
        tmp11--;
      }
      if (tmp11 == 0) {
        tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _priorityVersion_iter);
        __omcQ_24tmpVar44 = tmpMeta10;
        *tmp8 = mmc_mk_cons(__omcQ_24tmpVar44,0);
        tmp8 = &MMC_CDR(*tmp8);
      } else if (tmp11 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp8 = mmc_mk_nil();
    tmpMeta7 = __omcQ_24tmpVar45;
  }
  tmpMeta12 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_notify));
  tmpMeta13 = mmc_mk_box2(5, &Values_Value_STRING__desc, _languageStandard);
  tmpMeta14 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_requireExactVersion));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta7), mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT92, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadModel(threadData_t *threadData, modelica_metatype _className, modelica_metatype _priorityVersion, modelica_metatype _notify, modelica_metatype _languageStandard, modelica_metatype _requireExactVersion)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_notify);
  tmp2 = mmc_unbox_integer(_requireExactVersion);
  _res = omc_OpenModelicaScriptingAPI_loadModel(threadData, _className, _priorityVersion, tmp1, _languageStandard, tmp2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_deleteFile(threadData_t *threadData, modelica_string _fileName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT93, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_deleteFile(threadData_t *threadData, modelica_metatype _fileName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_deleteFile(threadData, _fileName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_saveModel(threadData_t *threadData, modelica_string _fileName, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT94, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_saveModel(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_saveModel(threadData, _fileName, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_saveTotalModel(threadData_t *threadData, modelica_string _fileName, modelica_string _className, modelica_boolean _stripAnnotations, modelica_boolean _stripComments, modelica_boolean _obfuscate)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_stripAnnotations));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_stripComments));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_obfuscate));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT95, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_saveTotalModel(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _className, modelica_metatype _stripAnnotations, modelica_metatype _stripComments, modelica_metatype _obfuscate)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_stripAnnotations);
  tmp2 = mmc_unbox_integer(_stripComments);
  tmp3 = mmc_unbox_integer(_obfuscate);
  _res = omc_OpenModelicaScriptingAPI_saveTotalModel(threadData, _fileName, _className, tmp1, tmp2, tmp3);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_saveTotalModelDebug(threadData_t *threadData, modelica_string _filename, modelica_string _className, modelica_boolean _stripAnnotations, modelica_boolean _stripComments, modelica_boolean _obfuscate)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_stripAnnotations));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_stripComments));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_obfuscate));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT96, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_saveTotalModelDebug(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _className, modelica_metatype _stripAnnotations, modelica_metatype _stripComments, modelica_metatype _obfuscate)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_stripAnnotations);
  tmp2 = mmc_unbox_integer(_stripComments);
  tmp3 = mmc_unbox_integer(_obfuscate);
  _res = omc_OpenModelicaScriptingAPI_saveTotalModelDebug(threadData, _filename, _className, tmp1, tmp2, tmp3);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_save(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT97, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_save(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_save(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_translateGraphics(threadData_t *threadData, modelica_string _className)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT98, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_dumpXMLDAE(threadData_t *threadData, modelica_string _className, modelica_string _translationLevel, modelica_boolean _addOriginalAdjacencyMatrix, modelica_boolean _addSolvingInfo, modelica_boolean _addMathMLCode, modelica_boolean _dumpResiduals, modelica_string _fileNamePrefix, modelica_string _rewriteRulesFile, modelica_string *out_res2)
{
  modelica_boolean _res1;
  modelica_string _res2 = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta17;
  modelica_metatype tmpMeta18;
  modelica_metatype tmpMeta19;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta12 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta11);
  tmpMeta13 = mmc_mk_box2(5, &Values_Value_STRING__desc, _translationLevel);
  tmpMeta14 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_addOriginalAdjacencyMatrix));
  tmpMeta15 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_addSolvingInfo));
  tmpMeta16 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_addMathMLCode));
  tmpMeta17 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_dumpResiduals));
  tmpMeta18 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileNamePrefix);
  tmpMeta19 = mmc_mk_box2(5, &Values_Value_STRING__desc, _rewriteRulesFile);
  tmpMeta10 = mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, mmc_mk_cons(tmpMeta15, mmc_mk_cons(tmpMeta16, mmc_mk_cons(tmpMeta17, mmc_mk_cons(tmpMeta18, mmc_mk_cons(tmpMeta19, MMC_REFSTRUCTLIT(mmc_nil)))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT99, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Boolean */;
  _res2 = tmpMeta9;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_dumpXMLDAE(threadData_t *threadData, modelica_metatype _className, modelica_metatype _translationLevel, modelica_metatype _addOriginalAdjacencyMatrix, modelica_metatype _addSolvingInfo, modelica_metatype _addMathMLCode, modelica_metatype _dumpResiduals, modelica_metatype _fileNamePrefix, modelica_metatype _rewriteRulesFile, modelica_metatype *out_res2)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_boolean _res1;
  modelica_metatype out_res1;
  tmp1 = mmc_unbox_integer(_addOriginalAdjacencyMatrix);
  tmp2 = mmc_unbox_integer(_addSolvingInfo);
  tmp3 = mmc_unbox_integer(_addMathMLCode);
  tmp4 = mmc_unbox_integer(_dumpResiduals);
  _res1 = omc_OpenModelicaScriptingAPI_dumpXMLDAE(threadData, _className, _translationLevel, tmp1, tmp2, tmp3, tmp4, _fileNamePrefix, _rewriteRulesFile, out_res2);
  out_res1 = mmc_mk_icon(_res1);
  /* skip box _res2; String */
  return out_res1;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_convertUnits(threadData_t *threadData, modelica_string _s1, modelica_string _s2, modelica_real *out_res2, modelica_real *out_res3)
{
  modelica_boolean _res1;
  modelica_real _res2;
  modelica_real _res3;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_real tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_real tmp14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta17;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta16 = mmc_mk_box2(5, &Values_Value_STRING__desc, _s1);
  tmpMeta17 = mmc_mk_box2(5, &Values_Value_STRING__desc, _s2);
  tmpMeta15 = mmc_mk_cons(tmpMeta16, mmc_mk_cons(tmpMeta17, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT100, tmpMeta15, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_real(tmpMeta9);
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_CAR(tmpMeta8);
  tmpMeta12 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
  tmp14 = mmc_unbox_real(tmpMeta13);
  if (!listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Boolean */;
  _res2 = tmp10  /* pattern as ty=Real */;
  _res3 = tmp14  /* pattern as ty=Real */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_convertUnits(threadData_t *threadData, modelica_metatype _s1, modelica_metatype _s2, modelica_metatype *out_res2, modelica_metatype *out_res3)
{
  modelica_real _res2;
  modelica_real _res3;
  modelica_boolean _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_convertUnits(threadData, _s1, _s2, &_res2, &_res3);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_rcon(_res2); }
  if (out_res3) { *out_res3 = mmc_mk_rcon(_res3); }
  return out_res1;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getDerivedUnits(threadData_t *threadData, modelica_string _baseUnit)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _baseUnit);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT101, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar47;
    modelica_metatype* tmp4;
    modelica_metatype tmpMeta5;
    modelica_string tmp6 = 0;
    modelica_string __omcQ_24tmpVar46;
    modelica_integer tmp11;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta5 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar47 = tmpMeta5; /* defaultValue */
    tmp4 = &__omcQ_24tmpVar47;
    while(1) {
      tmp11 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp11--;
      }
      if (tmp11 == 0) {
        { /* match expression */
          modelica_metatype tmp9_1;
          tmp9_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp9;
            int tmp10;
            tmp9 = 0;
            for (; tmp9 < 1; tmp9++) {
              switch (MMC_SWITCH_CAST(tmp9)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp9_1,2,1) == 0) goto tmp8_end;
                
                /* Pattern matching succeeded */
                tmp6 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp8_done;
              }
              }
              goto tmp8_end;
              tmp8_end: ;
            }
            goto goto_7;
            goto_7:;
            MMC_THROW_INTERNAL();
            goto tmp8_done;
            tmp8_done:;
          }
        }__omcQ_24tmpVar46 = tmp6;
        *tmp4 = mmc_mk_cons(__omcQ_24tmpVar46,0);
        tmp4 = &MMC_CDR(*tmp4);
      } else if (tmp11 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp4 = mmc_mk_nil();
    tmpMeta3 = __omcQ_24tmpVar47;
  }
  _res = tmpMeta3;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_listVariables(threadData_t *threadData)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT102, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar49;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_string __omcQ_24tmpVar48;
    modelica_integer tmp5;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar49 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar49;
    while(1) {
      tmp5 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp5--;
      }
      if (tmp5 == 0) {
        __omcQ_24tmpVar48 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar48,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp5 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar49;
  }
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_strtok(threadData_t *threadData, modelica_string _string, modelica_string _token)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _string);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _token);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT103, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar51;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar50;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar51 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar51;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar50 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar50,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar51;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_stringSplit(threadData_t *threadData, modelica_string _string, modelica_string _token)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _string);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _token);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT104, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar53;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar52;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar53 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar53;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar52 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar52,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar53;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_stringReplace(threadData_t *threadData, modelica_string _str, modelica_string _source, modelica_string _target)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _str);
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _source);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _target);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT105, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_listFile(threadData_t *threadData, modelica_string _class_, modelica_boolean _nestedClasses)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_nestedClasses));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT106, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_listFile(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _nestedClasses)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_nestedClasses);
  _res = omc_OpenModelicaScriptingAPI_listFile(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_exportToFigaro(threadData_t *threadData, modelica_string _path, modelica_string _directory, modelica_string _database, modelica_string _mode, modelica_string _options, modelica_string _processor)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _path));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _directory);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _database);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _mode);
  tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _options);
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _processor);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT107, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_exportToFigaro(threadData_t *threadData, modelica_metatype _path, modelica_metatype _directory, modelica_metatype _database, modelica_metatype _mode, modelica_metatype _options, modelica_metatype _processor)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_exportToFigaro(threadData, _path, _directory, _database, _mode, _options, _processor);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_inferBindings(threadData_t *threadData, modelica_string _path)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _path));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT108, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_inferBindings(threadData_t *threadData, modelica_metatype _path)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_inferBindings(threadData, _path);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateVerificationScenarios(threadData_t *threadData, modelica_string _path)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _path));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT109, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateVerificationScenarios(threadData_t *threadData, modelica_metatype _path)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_generateVerificationScenarios(threadData, _path);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_rewriteBlockCall(threadData_t *threadData, modelica_string _className, modelica_string _inDefs)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _inDefs));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT110, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_rewriteBlockCall(threadData_t *threadData, modelica_metatype _className, modelica_metatype _inDefs)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_rewriteBlockCall(threadData, _className, _inDefs);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_realpath(threadData_t *threadData, modelica_string _name)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _name);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT111, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_uriToFilename(threadData_t *threadData, modelica_string _uri)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _uri);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT112, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getLoadedLibraries(threadData_t *threadData)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT113, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar57;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_metatype tmpMeta5;
    modelica_metatype __omcQ_24tmpVar56;
    modelica_integer tmp14;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar57 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar57;
    while(1) {
      tmp14 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp14--;
      }
      if (tmp14 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar55;
          modelica_metatype* tmp6;
          modelica_metatype tmpMeta7;
          modelica_string tmp8 = 0;
          modelica_string __omcQ_24tmpVar54;
          modelica_integer tmp13;
          modelica_metatype _res_arr_iter_iter_loopVar = 0;
          modelica_metatype _res_arr_iter_iter;
          _res_arr_iter_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr_iter);
          tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar55 = tmpMeta7; /* defaultValue */
          tmp6 = &__omcQ_24tmpVar55;
          while(1) {
            tmp13 = 1;
            if (!listEmpty(_res_arr_iter_iter_loopVar)) {
              _res_arr_iter_iter = MMC_CAR(_res_arr_iter_iter_loopVar);
              _res_arr_iter_iter_loopVar = MMC_CDR(_res_arr_iter_iter_loopVar);
              tmp13--;
            }
            if (tmp13 == 0) {
              { /* match expression */
                modelica_metatype tmp11_1;
                tmp11_1 = _res_arr_iter_iter;
                {
                  volatile mmc_switch_type tmp11;
                  int tmp12;
                  tmp11 = 0;
                  for (; tmp11 < 1; tmp11++) {
                    switch (MMC_SWITCH_CAST(tmp11)) {
                    case 0: {
                      if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                      
                      /* Pattern matching succeeded */
                      tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter_iter), 2)));
                      goto tmp10_done;
                    }
                    }
                    goto tmp10_end;
                    tmp10_end: ;
                  }
                  goto goto_9;
                  goto_9:;
                  MMC_THROW_INTERNAL();
                  goto tmp10_done;
                  tmp10_done:;
                }
              }__omcQ_24tmpVar54 = tmp8;
              *tmp6 = mmc_mk_cons(__omcQ_24tmpVar54,0);
              tmp6 = &MMC_CDR(*tmp6);
            } else if (tmp13 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp6 = mmc_mk_nil();
          tmpMeta5 = __omcQ_24tmpVar55;
        }
        __omcQ_24tmpVar56 = tmpMeta5;
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar56,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp14 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar57;
  }
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_solveLinearSystem(threadData_t *threadData, modelica_metatype _A, modelica_metatype _B, modelica_integer *out_res2)
{
  modelica_metatype _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_integer tmp8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta19;
  modelica_metatype tmpMeta24;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res1_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  {
    modelica_metatype __omcQ_24tmpVar67;
    modelica_metatype* tmp11;
    modelica_metatype tmpMeta12;
    modelica_metatype tmpMeta13;
    modelica_metatype __omcQ_24tmpVar66;
    modelica_integer tmp18;
    modelica_metatype _A_iter_loopVar = 0;
    modelica_metatype _A_iter;
    _A_iter_loopVar = _A;
    tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar67 = tmpMeta12; /* defaultValue */
    tmp11 = &__omcQ_24tmpVar67;
    while(1) {
      tmp18 = 1;
      if (!listEmpty(_A_iter_loopVar)) {
        _A_iter = MMC_CAR(_A_iter_loopVar);
        _A_iter_loopVar = MMC_CDR(_A_iter_loopVar);
        tmp18--;
      }
      if (tmp18 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar65;
          modelica_metatype* tmp14;
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          modelica_metatype __omcQ_24tmpVar64;
          modelica_integer tmp17;
          modelica_metatype _A_iter_iter_loopVar = 0;
          modelica_metatype _A_iter_iter;
          _A_iter_iter_loopVar = _A_iter;
          tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar65 = tmpMeta15; /* defaultValue */
          tmp14 = &__omcQ_24tmpVar65;
          while(1) {
            tmp17 = 1;
            if (!listEmpty(_A_iter_iter_loopVar)) {
              _A_iter_iter = MMC_CAR(_A_iter_iter_loopVar);
              _A_iter_iter_loopVar = MMC_CDR(_A_iter_iter_loopVar);
              tmp17--;
            }
            if (tmp17 == 0) {
              tmpMeta16 = mmc_mk_box2(4, &Values_Value_REAL__desc, _A_iter_iter);
              __omcQ_24tmpVar64 = tmpMeta16;
              *tmp14 = mmc_mk_cons(__omcQ_24tmpVar64,0);
              tmp14 = &MMC_CDR(*tmp14);
            } else if (tmp17 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp14 = mmc_mk_nil();
          tmpMeta13 = __omcQ_24tmpVar65;
        }
        __omcQ_24tmpVar66 = omc_ValuesUtil_makeArray(threadData, tmpMeta13);
        *tmp11 = mmc_mk_cons(__omcQ_24tmpVar66,0);
        tmp11 = &MMC_CDR(*tmp11);
      } else if (tmp18 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp11 = mmc_mk_nil();
    tmpMeta10 = __omcQ_24tmpVar67;
  }
  {
    modelica_metatype __omcQ_24tmpVar69;
    modelica_metatype* tmp20;
    modelica_metatype tmpMeta21;
    modelica_metatype tmpMeta22;
    modelica_metatype __omcQ_24tmpVar68;
    modelica_integer tmp23;
    modelica_metatype _B_iter_loopVar = 0;
    modelica_metatype _B_iter;
    _B_iter_loopVar = _B;
    tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar69 = tmpMeta21; /* defaultValue */
    tmp20 = &__omcQ_24tmpVar69;
    while(1) {
      tmp23 = 1;
      if (!listEmpty(_B_iter_loopVar)) {
        _B_iter = MMC_CAR(_B_iter_loopVar);
        _B_iter_loopVar = MMC_CDR(_B_iter_loopVar);
        tmp23--;
      }
      if (tmp23 == 0) {
        tmpMeta22 = mmc_mk_box2(4, &Values_Value_REAL__desc, _B_iter);
        __omcQ_24tmpVar68 = tmpMeta22;
        *tmp20 = mmc_mk_cons(__omcQ_24tmpVar68,0);
        tmp20 = &MMC_CDR(*tmp20);
      } else if (tmp23 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp20 = mmc_mk_nil();
    tmpMeta19 = __omcQ_24tmpVar69;
  }
  tmpMeta9 = mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta10), mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta19), MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT114, tmpMeta9, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta5,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta5), 2));
  tmp8 = mmc_unbox_integer(tmpMeta7);
  if (!listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2 = tmp8  /* pattern as ty=Integer */;

  {
    modelica_metatype __omcQ_24tmpVar71;
    modelica_metatype* tmp25;
    modelica_metatype tmpMeta26;
    modelica_metatype tmpMeta27;
    modelica_metatype __omcQ_24tmpVar70;
    modelica_integer tmp32;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta26 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar71 = tmpMeta26; /* defaultValue */
    tmp25 = &__omcQ_24tmpVar71;
    while(1) {
      tmp32 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp32--;
      }
      if (tmp32 == 0) {
        { /* match expression */
          modelica_metatype tmp30_1;
          tmp30_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp30;
            int tmp31;
            tmp30 = 0;
            for (; tmp30 < 1; tmp30++) {
              switch (MMC_SWITCH_CAST(tmp30)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp30_1,1,1) == 0) goto tmp29_end;
                
                /* Pattern matching succeeded */
                tmpMeta27 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp29_done;
              }
              }
              goto tmp29_end;
              tmp29_end: ;
            }
            goto goto_28;
            goto_28:;
            MMC_THROW_INTERNAL();
            goto tmp29_done;
            tmp29_done:;
          }
        }__omcQ_24tmpVar70 = tmpMeta27;
        *tmp25 = mmc_mk_cons(__omcQ_24tmpVar70,0);
        tmp25 = &MMC_CDR(*tmp25);
      } else if (tmp32 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp25 = mmc_mk_nil();
    tmpMeta24 = __omcQ_24tmpVar71;
  }
  _res1 = tmpMeta24;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_solveLinearSystem(threadData_t *threadData, modelica_metatype _A, modelica_metatype _B, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_metatype _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_solveLinearSystem(threadData, _A, _B, &_res2);
  /* skip box _res1; list<#Real> */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_importFMU(threadData_t *threadData, modelica_string _filename, modelica_string _workdir, modelica_integer _loglevel, modelica_boolean _fullPath, modelica_boolean _debugLogging, modelica_boolean _generateInputConnectors, modelica_boolean _generateOutputConnectors, modelica_string _modelName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _workdir);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_loglevel));
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_fullPath));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_debugLogging));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_generateInputConnectors));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_generateOutputConnectors));
  tmpMeta11 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modelName));
  tmpMeta12 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta11);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil)))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT115, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_importFMU(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _workdir, modelica_metatype _loglevel, modelica_metatype _fullPath, modelica_metatype _debugLogging, modelica_metatype _generateInputConnectors, modelica_metatype _generateOutputConnectors, modelica_metatype _modelName)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_integer tmp5;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_loglevel);
  tmp2 = mmc_unbox_integer(_fullPath);
  tmp3 = mmc_unbox_integer(_debugLogging);
  tmp4 = mmc_unbox_integer(_generateInputConnectors);
  tmp5 = mmc_unbox_integer(_generateOutputConnectors);
  _res = omc_OpenModelicaScriptingAPI_importFMU(threadData, _filename, _workdir, tmp1, tmp2, tmp3, tmp4, tmp5, _modelName);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_importFMUModelDescription(threadData_t *threadData, modelica_string _filename, modelica_string _workdir, modelica_integer _loglevel, modelica_boolean _fullPath, modelica_boolean _debugLogging, modelica_boolean _generateInputConnectors, modelica_boolean _generateOutputConnectors)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _workdir);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_loglevel));
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_fullPath));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_debugLogging));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_generateInputConnectors));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_generateOutputConnectors));
  tmpMeta3 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT116, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_importFMUModelDescription(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _workdir, modelica_metatype _loglevel, modelica_metatype _fullPath, modelica_metatype _debugLogging, modelica_metatype _generateInputConnectors, modelica_metatype _generateOutputConnectors)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_integer tmp5;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_loglevel);
  tmp2 = mmc_unbox_integer(_fullPath);
  tmp3 = mmc_unbox_integer(_debugLogging);
  tmp4 = mmc_unbox_integer(_generateInputConnectors);
  tmp5 = mmc_unbox_integer(_generateOutputConnectors);
  _res = omc_OpenModelicaScriptingAPI_importFMUModelDescription(threadData, _filename, _workdir, tmp1, tmp2, tmp3, tmp4, tmp5);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_translateModelFMU(threadData_t *threadData, modelica_string _className, modelica_string _version, modelica_string _fmuType, modelica_string _fileNamePrefix, modelica_metatype _platforms, modelica_boolean _includeResources)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta15;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _version);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fmuType);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileNamePrefix);
  {
    modelica_metatype __omcQ_24tmpVar75;
    modelica_metatype* tmp11;
    modelica_metatype tmpMeta12;
    modelica_metatype tmpMeta13;
    modelica_metatype __omcQ_24tmpVar74;
    modelica_integer tmp14;
    modelica_metatype _platforms_iter_loopVar = 0;
    modelica_metatype _platforms_iter;
    _platforms_iter_loopVar = _platforms;
    tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar75 = tmpMeta12; /* defaultValue */
    tmp11 = &__omcQ_24tmpVar75;
    while(1) {
      tmp14 = 1;
      if (!listEmpty(_platforms_iter_loopVar)) {
        _platforms_iter = MMC_CAR(_platforms_iter_loopVar);
        _platforms_iter_loopVar = MMC_CDR(_platforms_iter_loopVar);
        tmp14--;
      }
      if (tmp14 == 0) {
        tmpMeta13 = mmc_mk_box2(5, &Values_Value_STRING__desc, _platforms_iter);
        __omcQ_24tmpVar74 = tmpMeta13;
        *tmp11 = mmc_mk_cons(__omcQ_24tmpVar74,0);
        tmp11 = &MMC_CDR(*tmp11);
      } else if (tmp14 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp11 = mmc_mk_nil();
    tmpMeta10 = __omcQ_24tmpVar75;
  }
  tmpMeta15 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_includeResources));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta10), mmc_mk_cons(tmpMeta15, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT117, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_translateModelFMU(threadData_t *threadData, modelica_metatype _className, modelica_metatype _version, modelica_metatype _fmuType, modelica_metatype _fileNamePrefix, modelica_metatype _platforms, modelica_metatype _includeResources)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_includeResources);
  _res = omc_OpenModelicaScriptingAPI_translateModelFMU(threadData, _className, _version, _fmuType, _fileNamePrefix, _platforms, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_buildModelFMU(threadData_t *threadData, modelica_string _className, modelica_string _version, modelica_string _fmuType, modelica_string _fileNamePrefix, modelica_metatype _platforms, modelica_boolean _includeResources)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta14;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _version);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fmuType);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileNamePrefix);
  {
    modelica_metatype __omcQ_24tmpVar79;
    modelica_metatype* tmp10;
    modelica_metatype tmpMeta11;
    modelica_metatype tmpMeta12;
    modelica_metatype __omcQ_24tmpVar78;
    modelica_integer tmp13;
    modelica_metatype _platforms_iter_loopVar = 0;
    modelica_metatype _platforms_iter;
    _platforms_iter_loopVar = _platforms;
    tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar79 = tmpMeta11; /* defaultValue */
    tmp10 = &__omcQ_24tmpVar79;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_platforms_iter_loopVar)) {
        _platforms_iter = MMC_CAR(_platforms_iter_loopVar);
        _platforms_iter_loopVar = MMC_CDR(_platforms_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _platforms_iter);
        __omcQ_24tmpVar78 = tmpMeta12;
        *tmp10 = mmc_mk_cons(__omcQ_24tmpVar78,0);
        tmp10 = &MMC_CDR(*tmp10);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp10 = mmc_mk_nil();
    tmpMeta9 = __omcQ_24tmpVar79;
  }
  tmpMeta14 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_includeResources));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta9), mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT118, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_buildModelFMU(threadData_t *threadData, modelica_metatype _className, modelica_metatype _version, modelica_metatype _fmuType, modelica_metatype _fileNamePrefix, modelica_metatype _platforms, modelica_metatype _includeResources)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_includeResources);
  _res = omc_OpenModelicaScriptingAPI_buildModelFMU(threadData, _className, _version, _fmuType, _fileNamePrefix, _platforms, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_buildEncryptedPackage(threadData_t *threadData, modelica_string _className, modelica_boolean _encrypt)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_encrypt));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT119, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_buildEncryptedPackage(threadData_t *threadData, modelica_metatype _className, modelica_metatype _encrypt)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_encrypt);
  _res = omc_OpenModelicaScriptingAPI_buildEncryptedPackage(threadData, _className, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_buildLabel(threadData_t *threadData, modelica_string _className, modelica_real _startTime, modelica_real _stopTime, modelica_integer _numberOfIntervals, modelica_real _tolerance, modelica_string _method, modelica_string _fileNamePrefix, modelica_string _options, modelica_string _outputFormat, modelica_string _variableFilter, modelica_string _cflags, modelica_string _simflags)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_startTime));
  tmpMeta5 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stopTime));
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_numberOfIntervals));
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_tolerance));
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _method);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileNamePrefix);
  tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _options);
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _outputFormat);
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _variableFilter);
  tmpMeta13 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cflags);
  tmpMeta14 = mmc_mk_box2(5, &Values_Value_STRING__desc, _simflags);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil)))))))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT120, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar81;
    modelica_metatype* tmp16;
    modelica_metatype tmpMeta17;
    modelica_string tmp18 = 0;
    modelica_string __omcQ_24tmpVar80;
    modelica_integer tmp23;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta17 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar81 = tmpMeta17; /* defaultValue */
    tmp16 = &__omcQ_24tmpVar81;
    while(1) {
      tmp23 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp23--;
      }
      if (tmp23 == 0) {
        { /* match expression */
          modelica_metatype tmp21_1;
          tmp21_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp21;
            int tmp22;
            tmp21 = 0;
            for (; tmp21 < 1; tmp21++) {
              switch (MMC_SWITCH_CAST(tmp21)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp21_1,2,1) == 0) goto tmp20_end;
                
                /* Pattern matching succeeded */
                tmp18 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp20_done;
              }
              }
              goto tmp20_end;
              tmp20_end: ;
            }
            goto goto_19;
            goto_19:;
            MMC_THROW_INTERNAL();
            goto tmp20_done;
            tmp20_done:;
          }
        }__omcQ_24tmpVar80 = tmp18;
        *tmp16 = mmc_mk_cons(__omcQ_24tmpVar80,0);
        tmp16 = &MMC_CDR(*tmp16);
      } else if (tmp23 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp16 = mmc_mk_nil();
    tmpMeta15 = __omcQ_24tmpVar81;
  }
  _res = tmpMeta15;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_buildLabel(threadData_t *threadData, modelica_metatype _className, modelica_metatype _startTime, modelica_metatype _stopTime, modelica_metatype _numberOfIntervals, modelica_metatype _tolerance, modelica_metatype _method, modelica_metatype _fileNamePrefix, modelica_metatype _options, modelica_metatype _outputFormat, modelica_metatype _variableFilter, modelica_metatype _cflags, modelica_metatype _simflags)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_integer tmp3;
  modelica_real tmp4;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_real(_startTime);
  tmp2 = mmc_unbox_real(_stopTime);
  tmp3 = mmc_unbox_integer(_numberOfIntervals);
  tmp4 = mmc_unbox_real(_tolerance);
  _res = omc_OpenModelicaScriptingAPI_buildLabel(threadData, _className, tmp1, tmp2, tmp3, tmp4, _method, _fileNamePrefix, _options, _outputFormat, _variableFilter, _cflags, _simflags);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_reduceTerms(threadData_t *threadData, modelica_string _className, modelica_real _startTime, modelica_real _stopTime, modelica_integer _numberOfIntervals, modelica_real _tolerance, modelica_string _method, modelica_string _fileNamePrefix, modelica_string _options, modelica_string _outputFormat, modelica_string _variableFilter, modelica_string _cflags, modelica_string _simflags, modelica_string _labelstoCancel)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_startTime));
  tmpMeta5 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stopTime));
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_numberOfIntervals));
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_tolerance));
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _method);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileNamePrefix);
  tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _options);
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _outputFormat);
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _variableFilter);
  tmpMeta13 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cflags);
  tmpMeta14 = mmc_mk_box2(5, &Values_Value_STRING__desc, _simflags);
  tmpMeta15 = mmc_mk_box2(5, &Values_Value_STRING__desc, _labelstoCancel);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, mmc_mk_cons(tmpMeta15, MMC_REFSTRUCTLIT(mmc_nil))))))))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT121, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar83;
    modelica_metatype* tmp17;
    modelica_metatype tmpMeta18;
    modelica_string tmp19 = 0;
    modelica_string __omcQ_24tmpVar82;
    modelica_integer tmp24;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta18 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar83 = tmpMeta18; /* defaultValue */
    tmp17 = &__omcQ_24tmpVar83;
    while(1) {
      tmp24 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp24--;
      }
      if (tmp24 == 0) {
        { /* match expression */
          modelica_metatype tmp22_1;
          tmp22_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp22;
            int tmp23;
            tmp22 = 0;
            for (; tmp22 < 1; tmp22++) {
              switch (MMC_SWITCH_CAST(tmp22)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp22_1,2,1) == 0) goto tmp21_end;
                
                /* Pattern matching succeeded */
                tmp19 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp21_done;
              }
              }
              goto tmp21_end;
              tmp21_end: ;
            }
            goto goto_20;
            goto_20:;
            MMC_THROW_INTERNAL();
            goto tmp21_done;
            tmp21_done:;
          }
        }__omcQ_24tmpVar82 = tmp19;
        *tmp17 = mmc_mk_cons(__omcQ_24tmpVar82,0);
        tmp17 = &MMC_CDR(*tmp17);
      } else if (tmp24 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp17 = mmc_mk_nil();
    tmpMeta16 = __omcQ_24tmpVar83;
  }
  _res = tmpMeta16;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_reduceTerms(threadData_t *threadData, modelica_metatype _className, modelica_metatype _startTime, modelica_metatype _stopTime, modelica_metatype _numberOfIntervals, modelica_metatype _tolerance, modelica_metatype _method, modelica_metatype _fileNamePrefix, modelica_metatype _options, modelica_metatype _outputFormat, modelica_metatype _variableFilter, modelica_metatype _cflags, modelica_metatype _simflags, modelica_metatype _labelstoCancel)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_integer tmp3;
  modelica_real tmp4;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_real(_startTime);
  tmp2 = mmc_unbox_real(_stopTime);
  tmp3 = mmc_unbox_integer(_numberOfIntervals);
  tmp4 = mmc_unbox_real(_tolerance);
  _res = omc_OpenModelicaScriptingAPI_reduceTerms(threadData, _className, tmp1, tmp2, tmp3, tmp4, _method, _fileNamePrefix, _options, _outputFormat, _variableFilter, _cflags, _simflags, _labelstoCancel);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_createModel(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT122, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_createModel(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_createModel(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_newModel(threadData_t *threadData, modelica_string _className, modelica_string _withinPath)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _withinPath));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT123, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_newModel(threadData_t *threadData, modelica_metatype _className, modelica_metatype _withinPath)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_newModel(threadData, _className, _withinPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_moveClass(threadData_t *threadData, modelica_string _className, modelica_integer _offset)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_offset));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT124, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_moveClass(threadData_t *threadData, modelica_metatype _className, modelica_metatype _offset)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_offset);
  _res = omc_OpenModelicaScriptingAPI_moveClass(threadData, _className, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_moveClassToTop(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT125, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_moveClassToTop(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_moveClassToTop(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_moveClassToBottom(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT126, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_moveClassToBottom(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_moveClassToBottom(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_copyClass(threadData_t *threadData, modelica_string _className, modelica_string _newClassName, modelica_string _withIn)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newClassName);
  tmpMeta8 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _withIn));
  tmpMeta9 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta8);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT127, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_copyClass(threadData_t *threadData, modelica_metatype _className, modelica_metatype _newClassName, modelica_metatype _withIn)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_copyClass(threadData, _className, _newClassName, _withIn);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_renameClass(threadData_t *threadData, modelica_string _oldName, modelica_string _newName)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _oldName));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _newName));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT128, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar85;
    modelica_metatype* tmp7;
    modelica_metatype tmpMeta8;
    modelica_string __omcQ_24tmpVar84;
    modelica_integer tmp9;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar85 = tmpMeta8; /* defaultValue */
    tmp7 = &__omcQ_24tmpVar85;
    while(1) {
      tmp9 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp9--;
      }
      if (tmp9 == 0) {
        __omcQ_24tmpVar84 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp7 = mmc_mk_cons(__omcQ_24tmpVar84,0);
        tmp7 = &MMC_CDR(*tmp7);
      } else if (tmp9 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp7 = mmc_mk_nil();
    tmpMeta6 = __omcQ_24tmpVar85;
  }
  _res = tmpMeta6;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_deleteClass(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT129, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_deleteClass(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_deleteClass(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_refactorClass(threadData_t *threadData, modelica_string _className)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT130, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getSourceFile(threadData_t *threadData, modelica_string _class_)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT131, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setSourceFile(threadData_t *threadData, modelica_string _class_, modelica_string _filename)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT132, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setSourceFile(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _filename)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setSourceFile(threadData, _class_, _filename);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isShortDefinition(threadData_t *threadData, modelica_string _class_)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT133, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isShortDefinition(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isShortDefinition(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setClassComment(threadData_t *threadData, modelica_string _class_, modelica_string _filename)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT134, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setClassComment(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _filename)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setClassComment(threadData, _class_, _filename);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getClassNames(threadData_t *threadData, modelica_string _class_, modelica_boolean _recursive, modelica_boolean _qualified, modelica_boolean _sort, modelica_boolean _builtin, modelica_boolean _showProtected, modelica_boolean _includeConstants)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_recursive));
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_qualified));
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_sort));
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_builtin));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_showProtected));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_includeConstants));
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT135, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar87;
    modelica_metatype* tmp11;
    modelica_metatype tmpMeta12;
    modelica_string __omcQ_24tmpVar86;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar87 = tmpMeta12; /* defaultValue */
    tmp11 = &__omcQ_24tmpVar87;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        __omcQ_24tmpVar86 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp11 = mmc_mk_cons(__omcQ_24tmpVar86,0);
        tmp11 = &MMC_CDR(*tmp11);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp11 = mmc_mk_nil();
    tmpMeta10 = __omcQ_24tmpVar87;
  }
  _res = tmpMeta10;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getClassNames(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _recursive, modelica_metatype _qualified, modelica_metatype _sort, modelica_metatype _builtin, modelica_metatype _showProtected, modelica_metatype _includeConstants)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_integer tmp5;
  modelica_integer tmp6;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_recursive);
  tmp2 = mmc_unbox_integer(_qualified);
  tmp3 = mmc_unbox_integer(_sort);
  tmp4 = mmc_unbox_integer(_builtin);
  tmp5 = mmc_unbox_integer(_showProtected);
  tmp6 = mmc_unbox_integer(_includeConstants);
  _res = omc_OpenModelicaScriptingAPI_getClassNames(threadData, _class_, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getUsedClassNames(threadData_t *threadData, modelica_string _className)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT136, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar89;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar88;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar89 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar89;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar88 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar88,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar89;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getPackages(threadData_t *threadData, modelica_string _class_)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT137, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar91;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar90;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar91 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar91;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar90 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar90,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar91;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAllSubtypeOf(threadData_t *threadData, modelica_string _className, modelica_string _parentClass, modelica_boolean _qualified, modelica_boolean _includePartial, modelica_boolean _sort)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _parentClass));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_qualified));
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_includePartial));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_sort));
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT138, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar93;
    modelica_metatype* tmp10;
    modelica_metatype tmpMeta11;
    modelica_string __omcQ_24tmpVar92;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar93 = tmpMeta11; /* defaultValue */
    tmp10 = &__omcQ_24tmpVar93;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        __omcQ_24tmpVar92 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp10 = mmc_mk_cons(__omcQ_24tmpVar92,0);
        tmp10 = &MMC_CDR(*tmp10);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp10 = mmc_mk_nil();
    tmpMeta9 = __omcQ_24tmpVar93;
  }
  _res = tmpMeta9;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getAllSubtypeOf(threadData_t *threadData, modelica_metatype _className, modelica_metatype _parentClass, modelica_metatype _qualified, modelica_metatype _includePartial, modelica_metatype _sort)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_qualified);
  tmp2 = mmc_unbox_integer(_includePartial);
  tmp3 = mmc_unbox_integer(_sort);
  _res = omc_OpenModelicaScriptingAPI_getAllSubtypeOf(threadData, _className, _parentClass, tmp1, tmp2, tmp3);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getReplaceableChoices(threadData_t *threadData, modelica_string _baseClass, modelica_string _parentClass, modelica_boolean _includePartial, modelica_boolean _sort)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _baseClass));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _parentClass));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_includePartial));
  tmpMeta7 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_sort));
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT139, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar97;
    modelica_metatype* tmp9;
    modelica_metatype tmpMeta10;
    modelica_metatype tmpMeta11;
    modelica_metatype __omcQ_24tmpVar96;
    modelica_integer tmp20;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar97 = tmpMeta10; /* defaultValue */
    tmp9 = &__omcQ_24tmpVar97;
    while(1) {
      tmp20 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp20--;
      }
      if (tmp20 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar95;
          modelica_metatype* tmp12;
          modelica_metatype tmpMeta13;
          modelica_string tmp14 = 0;
          modelica_string __omcQ_24tmpVar94;
          modelica_integer tmp19;
          modelica_metatype _res_arr_iter_iter_loopVar = 0;
          modelica_metatype _res_arr_iter_iter;
          _res_arr_iter_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr_iter);
          tmpMeta13 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar95 = tmpMeta13; /* defaultValue */
          tmp12 = &__omcQ_24tmpVar95;
          while(1) {
            tmp19 = 1;
            if (!listEmpty(_res_arr_iter_iter_loopVar)) {
              _res_arr_iter_iter = MMC_CAR(_res_arr_iter_iter_loopVar);
              _res_arr_iter_iter_loopVar = MMC_CDR(_res_arr_iter_iter_loopVar);
              tmp19--;
            }
            if (tmp19 == 0) {
              { /* match expression */
                modelica_metatype tmp17_1;
                tmp17_1 = _res_arr_iter_iter;
                {
                  volatile mmc_switch_type tmp17;
                  int tmp18;
                  tmp17 = 0;
                  for (; tmp17 < 1; tmp17++) {
                    switch (MMC_SWITCH_CAST(tmp17)) {
                    case 0: {
                      if (mmc__uniontype__metarecord__typedef__equal(tmp17_1,2,1) == 0) goto tmp16_end;
                      
                      /* Pattern matching succeeded */
                      tmp14 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter_iter), 2)));
                      goto tmp16_done;
                    }
                    }
                    goto tmp16_end;
                    tmp16_end: ;
                  }
                  goto goto_15;
                  goto_15:;
                  MMC_THROW_INTERNAL();
                  goto tmp16_done;
                  tmp16_done:;
                }
              }__omcQ_24tmpVar94 = tmp14;
              *tmp12 = mmc_mk_cons(__omcQ_24tmpVar94,0);
              tmp12 = &MMC_CDR(*tmp12);
            } else if (tmp19 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp12 = mmc_mk_nil();
          tmpMeta11 = __omcQ_24tmpVar95;
        }
        __omcQ_24tmpVar96 = tmpMeta11;
        *tmp9 = mmc_mk_cons(__omcQ_24tmpVar96,0);
        tmp9 = &MMC_CDR(*tmp9);
      } else if (tmp20 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp9 = mmc_mk_nil();
    tmpMeta8 = __omcQ_24tmpVar97;
  }
  _res = tmpMeta8;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getReplaceableChoices(threadData_t *threadData, modelica_metatype _baseClass, modelica_metatype _parentClass, modelica_metatype _includePartial, modelica_metatype _sort)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_includePartial);
  tmp2 = mmc_unbox_integer(_sort);
  _res = omc_OpenModelicaScriptingAPI_getReplaceableChoices(threadData, _baseClass, _parentClass, tmp1, tmp2);
  /* skip box _res; list<list<String>> */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_plotAll(threadData_t *threadData, modelica_boolean _externalWindow, modelica_string _fileName, modelica_string _title, modelica_string _grid, modelica_boolean _logX, modelica_boolean _logY, modelica_string _xLabel, modelica_string _yLabel, modelica_metatype _xRange, modelica_metatype _yRange, modelica_real _curveWidth, modelica_integer _curveStyle, modelica_string _legendPosition, modelica_string _footer, modelica_boolean _autoScale, modelica_boolean _forceOMPlot, modelica_string _yAxis, modelica_string _yLabelRight, modelica_metatype _yRangeRight)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta18;
  modelica_metatype tmpMeta23;
  modelica_metatype tmpMeta24;
  modelica_metatype tmpMeta25;
  modelica_metatype tmpMeta26;
  modelica_metatype tmpMeta27;
  modelica_metatype tmpMeta28;
  modelica_metatype tmpMeta29;
  modelica_metatype tmpMeta30;
  modelica_metatype tmpMeta31;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_externalWindow));
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _title);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _grid);
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_logX));
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_logY));
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _xLabel);
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _yLabel);
  {
    modelica_metatype __omcQ_24tmpVar105;
    modelica_metatype* tmp14;
    modelica_metatype tmpMeta15;
    modelica_metatype tmpMeta16;
    modelica_metatype __omcQ_24tmpVar104;
    modelica_integer tmp17;
    modelica_metatype _xRange_iter_loopVar = 0;
    modelica_metatype _xRange_iter;
    _xRange_iter_loopVar = _xRange;
    tmpMeta15 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar105 = tmpMeta15; /* defaultValue */
    tmp14 = &__omcQ_24tmpVar105;
    while(1) {
      tmp17 = 1;
      if (!listEmpty(_xRange_iter_loopVar)) {
        _xRange_iter = MMC_CAR(_xRange_iter_loopVar);
        _xRange_iter_loopVar = MMC_CDR(_xRange_iter_loopVar);
        tmp17--;
      }
      if (tmp17 == 0) {
        tmpMeta16 = mmc_mk_box2(4, &Values_Value_REAL__desc, _xRange_iter);
        __omcQ_24tmpVar104 = tmpMeta16;
        *tmp14 = mmc_mk_cons(__omcQ_24tmpVar104,0);
        tmp14 = &MMC_CDR(*tmp14);
      } else if (tmp17 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp14 = mmc_mk_nil();
    tmpMeta13 = __omcQ_24tmpVar105;
  }
  {
    modelica_metatype __omcQ_24tmpVar107;
    modelica_metatype* tmp19;
    modelica_metatype tmpMeta20;
    modelica_metatype tmpMeta21;
    modelica_metatype __omcQ_24tmpVar106;
    modelica_integer tmp22;
    modelica_metatype _yRange_iter_loopVar = 0;
    modelica_metatype _yRange_iter;
    _yRange_iter_loopVar = _yRange;
    tmpMeta20 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar107 = tmpMeta20; /* defaultValue */
    tmp19 = &__omcQ_24tmpVar107;
    while(1) {
      tmp22 = 1;
      if (!listEmpty(_yRange_iter_loopVar)) {
        _yRange_iter = MMC_CAR(_yRange_iter_loopVar);
        _yRange_iter_loopVar = MMC_CDR(_yRange_iter_loopVar);
        tmp22--;
      }
      if (tmp22 == 0) {
        tmpMeta21 = mmc_mk_box2(4, &Values_Value_REAL__desc, _yRange_iter);
        __omcQ_24tmpVar106 = tmpMeta21;
        *tmp19 = mmc_mk_cons(__omcQ_24tmpVar106,0);
        tmp19 = &MMC_CDR(*tmp19);
      } else if (tmp22 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp19 = mmc_mk_nil();
    tmpMeta18 = __omcQ_24tmpVar107;
  }
  tmpMeta23 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_curveWidth));
  tmpMeta24 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_curveStyle));
  tmpMeta25 = mmc_mk_box2(5, &Values_Value_STRING__desc, _legendPosition);
  tmpMeta26 = mmc_mk_box2(5, &Values_Value_STRING__desc, _footer);
  tmpMeta27 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_autoScale));
  tmpMeta28 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_forceOMPlot));
  tmpMeta29 = mmc_mk_box2(5, &Values_Value_STRING__desc, _yAxis);
  tmpMeta30 = mmc_mk_box2(5, &Values_Value_STRING__desc, _yLabelRight);
  {
    modelica_metatype __omcQ_24tmpVar109;
    modelica_metatype* tmp32;
    modelica_metatype tmpMeta33;
    modelica_metatype tmpMeta34;
    modelica_metatype __omcQ_24tmpVar108;
    modelica_integer tmp35;
    modelica_metatype _yRangeRight_iter_loopVar = 0;
    modelica_metatype _yRangeRight_iter;
    _yRangeRight_iter_loopVar = _yRangeRight;
    tmpMeta33 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar109 = tmpMeta33; /* defaultValue */
    tmp32 = &__omcQ_24tmpVar109;
    while(1) {
      tmp35 = 1;
      if (!listEmpty(_yRangeRight_iter_loopVar)) {
        _yRangeRight_iter = MMC_CAR(_yRangeRight_iter_loopVar);
        _yRangeRight_iter_loopVar = MMC_CDR(_yRangeRight_iter_loopVar);
        tmp35--;
      }
      if (tmp35 == 0) {
        tmpMeta34 = mmc_mk_box2(4, &Values_Value_REAL__desc, _yRangeRight_iter);
        __omcQ_24tmpVar108 = tmpMeta34;
        *tmp32 = mmc_mk_cons(__omcQ_24tmpVar108,0);
        tmp32 = &MMC_CDR(*tmp32);
      } else if (tmp35 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp32 = mmc_mk_nil();
    tmpMeta31 = __omcQ_24tmpVar109;
  }
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta13), mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta18), mmc_mk_cons(tmpMeta23, mmc_mk_cons(tmpMeta24, mmc_mk_cons(tmpMeta25, mmc_mk_cons(tmpMeta26, mmc_mk_cons(tmpMeta27, mmc_mk_cons(tmpMeta28, mmc_mk_cons(tmpMeta29, mmc_mk_cons(tmpMeta30, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta31), MMC_REFSTRUCTLIT(mmc_nil))))))))))))))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT140, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_plotAll(threadData_t *threadData, modelica_metatype _externalWindow, modelica_metatype _fileName, modelica_metatype _title, modelica_metatype _grid, modelica_metatype _logX, modelica_metatype _logY, modelica_metatype _xLabel, modelica_metatype _yLabel, modelica_metatype _xRange, modelica_metatype _yRange, modelica_metatype _curveWidth, modelica_metatype _curveStyle, modelica_metatype _legendPosition, modelica_metatype _footer, modelica_metatype _autoScale, modelica_metatype _forceOMPlot, modelica_metatype _yAxis, modelica_metatype _yLabelRight, modelica_metatype _yRangeRight)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_real tmp4;
  modelica_integer tmp5;
  modelica_integer tmp6;
  modelica_integer tmp7;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_externalWindow);
  tmp2 = mmc_unbox_integer(_logX);
  tmp3 = mmc_unbox_integer(_logY);
  tmp4 = mmc_unbox_real(_curveWidth);
  tmp5 = mmc_unbox_integer(_curveStyle);
  tmp6 = mmc_unbox_integer(_autoScale);
  tmp7 = mmc_unbox_integer(_forceOMPlot);
  _res = omc_OpenModelicaScriptingAPI_plotAll(threadData, tmp1, _fileName, _title, _grid, tmp2, tmp3, _xLabel, _yLabel, _xRange, _yRange, tmp4, tmp5, _legendPosition, _footer, tmp6, tmp7, _yAxis, _yLabelRight, _yRangeRight);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_readSimulationResultSize(threadData_t *threadData, modelica_string _fileName)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT141, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_readSimulationResultSize(threadData_t *threadData, modelica_metatype _fileName)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_readSimulationResultSize(threadData, _fileName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_readSimulationResultVars(threadData_t *threadData, modelica_string _fileName, modelica_boolean _readParameters, modelica_boolean _openmodelicaStyle)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta3 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_readParameters));
  tmpMeta4 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_openmodelicaStyle));
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT142, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar111;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar110;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar111 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar111;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar110 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar110,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar111;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_readSimulationResultVars(threadData_t *threadData, modelica_metatype _fileName, modelica_metatype _readParameters, modelica_metatype _openmodelicaStyle)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_readParameters);
  tmp2 = mmc_unbox_integer(_openmodelicaStyle);
  _res = omc_OpenModelicaScriptingAPI_readSimulationResultVars(threadData, _fileName, tmp1, tmp2);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_filterSimulationResults(threadData_t *threadData, modelica_string _inFile, modelica_string _outFile, modelica_metatype _vars, modelica_integer _numberOfIntervals, modelica_boolean _removeDescription, modelica_boolean _hintReadAllVars)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _inFile);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _outFile);
  {
    modelica_metatype __omcQ_24tmpVar115;
    modelica_metatype* tmp8;
    modelica_metatype tmpMeta9;
    modelica_metatype tmpMeta10;
    modelica_metatype __omcQ_24tmpVar114;
    modelica_integer tmp11;
    modelica_metatype _vars_iter_loopVar = 0;
    modelica_metatype _vars_iter;
    _vars_iter_loopVar = _vars;
    tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar115 = tmpMeta9; /* defaultValue */
    tmp8 = &__omcQ_24tmpVar115;
    while(1) {
      tmp11 = 1;
      if (!listEmpty(_vars_iter_loopVar)) {
        _vars_iter = MMC_CAR(_vars_iter_loopVar);
        _vars_iter_loopVar = MMC_CDR(_vars_iter_loopVar);
        tmp11--;
      }
      if (tmp11 == 0) {
        tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _vars_iter);
        __omcQ_24tmpVar114 = tmpMeta10;
        *tmp8 = mmc_mk_cons(__omcQ_24tmpVar114,0);
        tmp8 = &MMC_CDR(*tmp8);
      } else if (tmp11 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp8 = mmc_mk_nil();
    tmpMeta7 = __omcQ_24tmpVar115;
  }
  tmpMeta12 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_numberOfIntervals));
  tmpMeta13 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_removeDescription));
  tmpMeta14 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_hintReadAllVars));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta7), mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT143, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_filterSimulationResults(threadData_t *threadData, modelica_metatype _inFile, modelica_metatype _outFile, modelica_metatype _vars, modelica_metatype _numberOfIntervals, modelica_metatype _removeDescription, modelica_metatype _hintReadAllVars)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_numberOfIntervals);
  tmp2 = mmc_unbox_integer(_removeDescription);
  tmp3 = mmc_unbox_integer(_hintReadAllVars);
  _res = omc_OpenModelicaScriptingAPI_filterSimulationResults(threadData, _inFile, _outFile, _vars, tmp1, tmp2, tmp3);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_compareSimulationResults(threadData_t *threadData, modelica_string _filename, modelica_string _reffilename, modelica_string _logfilename, modelica_real _relTol, modelica_real _absTol, modelica_metatype _vars)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _reffilename);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _logfilename);
  tmpMeta5 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relTol));
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_absTol));
  {
    modelica_metatype __omcQ_24tmpVar119;
    modelica_metatype* tmp8;
    modelica_metatype tmpMeta9;
    modelica_metatype tmpMeta10;
    modelica_metatype __omcQ_24tmpVar118;
    modelica_integer tmp11;
    modelica_metatype _vars_iter_loopVar = 0;
    modelica_metatype _vars_iter;
    _vars_iter_loopVar = _vars;
    tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar119 = tmpMeta9; /* defaultValue */
    tmp8 = &__omcQ_24tmpVar119;
    while(1) {
      tmp11 = 1;
      if (!listEmpty(_vars_iter_loopVar)) {
        _vars_iter = MMC_CAR(_vars_iter_loopVar);
        _vars_iter_loopVar = MMC_CDR(_vars_iter_loopVar);
        tmp11--;
      }
      if (tmp11 == 0) {
        tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _vars_iter);
        __omcQ_24tmpVar118 = tmpMeta10;
        *tmp8 = mmc_mk_cons(__omcQ_24tmpVar118,0);
        tmp8 = &MMC_CDR(*tmp8);
      } else if (tmp11 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp8 = mmc_mk_nil();
    tmpMeta7 = __omcQ_24tmpVar119;
  }
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta7), MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT144, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar121;
    modelica_metatype* tmp13;
    modelica_metatype tmpMeta14;
    modelica_string tmp15 = 0;
    modelica_string __omcQ_24tmpVar120;
    modelica_integer tmp20;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta14 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar121 = tmpMeta14; /* defaultValue */
    tmp13 = &__omcQ_24tmpVar121;
    while(1) {
      tmp20 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp20--;
      }
      if (tmp20 == 0) {
        { /* match expression */
          modelica_metatype tmp18_1;
          tmp18_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp18;
            int tmp19;
            tmp18 = 0;
            for (; tmp18 < 1; tmp18++) {
              switch (MMC_SWITCH_CAST(tmp18)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp18_1,2,1) == 0) goto tmp17_end;
                
                /* Pattern matching succeeded */
                tmp15 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp17_done;
              }
              }
              goto tmp17_end;
              tmp17_end: ;
            }
            goto goto_16;
            goto_16:;
            MMC_THROW_INTERNAL();
            goto tmp17_done;
            tmp17_done:;
          }
        }__omcQ_24tmpVar120 = tmp15;
        *tmp13 = mmc_mk_cons(__omcQ_24tmpVar120,0);
        tmp13 = &MMC_CDR(*tmp13);
      } else if (tmp20 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp13 = mmc_mk_nil();
    tmpMeta12 = __omcQ_24tmpVar121;
  }
  _res = tmpMeta12;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_compareSimulationResults(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _reffilename, modelica_metatype _logfilename, modelica_metatype _relTol, modelica_metatype _absTol, modelica_metatype _vars)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_real(_relTol);
  tmp2 = mmc_unbox_real(_absTol);
  _res = omc_OpenModelicaScriptingAPI_compareSimulationResults(threadData, _filename, _reffilename, _logfilename, tmp1, tmp2, _vars);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_deltaSimulationResults(threadData_t *threadData, modelica_string _filename, modelica_string _reffilename, modelica_string _method, modelica_metatype _vars)
{
  modelica_real _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_real tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _reffilename);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _method);
  {
    modelica_metatype __omcQ_24tmpVar125;
    modelica_metatype* tmp9;
    modelica_metatype tmpMeta10;
    modelica_metatype tmpMeta11;
    modelica_metatype __omcQ_24tmpVar124;
    modelica_integer tmp12;
    modelica_metatype _vars_iter_loopVar = 0;
    modelica_metatype _vars_iter;
    _vars_iter_loopVar = _vars;
    tmpMeta10 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar125 = tmpMeta10; /* defaultValue */
    tmp9 = &__omcQ_24tmpVar125;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_vars_iter_loopVar)) {
        _vars_iter = MMC_CAR(_vars_iter_loopVar);
        _vars_iter_loopVar = MMC_CDR(_vars_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _vars_iter);
        __omcQ_24tmpVar124 = tmpMeta11;
        *tmp9 = mmc_mk_cons(__omcQ_24tmpVar124,0);
        tmp9 = &MMC_CDR(*tmp9);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp9 = mmc_mk_nil();
    tmpMeta8 = __omcQ_24tmpVar125;
  }
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta8), MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT145, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_real(tmpMeta2);
  _res = tmp3  /* pattern as ty=Real */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_deltaSimulationResults(threadData_t *threadData, modelica_metatype _filename, modelica_metatype _reffilename, modelica_metatype _method, modelica_metatype _vars)
{
  modelica_real _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_deltaSimulationResults(threadData, _filename, _reffilename, _method, _vars);
  out_res = mmc_mk_rcon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_diffSimulationResults(threadData_t *threadData, modelica_string _actualFile, modelica_string _expectedFile, modelica_string _diffPrefix, modelica_real _relTol, modelica_real _relTolDiffMinMax, modelica_real _rangeDelta, modelica_metatype _vars, modelica_boolean _keepEqualResults, modelica_metatype *out_res2)
{
  modelica_boolean _res1;
  modelica_metatype _res2 = NULL;
  modelica_metatype _res2_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta21;
  modelica_metatype tmpMeta22;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res2_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _actualFile);
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _expectedFile);
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _diffPrefix);
  tmpMeta13 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relTol));
  tmpMeta14 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relTolDiffMinMax));
  tmpMeta15 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_rangeDelta));
  {
    modelica_metatype __omcQ_24tmpVar129;
    modelica_metatype* tmp17;
    modelica_metatype tmpMeta18;
    modelica_metatype tmpMeta19;
    modelica_metatype __omcQ_24tmpVar128;
    modelica_integer tmp20;
    modelica_metatype _vars_iter_loopVar = 0;
    modelica_metatype _vars_iter;
    _vars_iter_loopVar = _vars;
    tmpMeta18 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar129 = tmpMeta18; /* defaultValue */
    tmp17 = &__omcQ_24tmpVar129;
    while(1) {
      tmp20 = 1;
      if (!listEmpty(_vars_iter_loopVar)) {
        _vars_iter = MMC_CAR(_vars_iter_loopVar);
        _vars_iter_loopVar = MMC_CDR(_vars_iter_loopVar);
        tmp20--;
      }
      if (tmp20 == 0) {
        tmpMeta19 = mmc_mk_box2(5, &Values_Value_STRING__desc, _vars_iter);
        __omcQ_24tmpVar128 = tmpMeta19;
        *tmp17 = mmc_mk_cons(__omcQ_24tmpVar128,0);
        tmp17 = &MMC_CDR(*tmp17);
      } else if (tmp20 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp17 = mmc_mk_nil();
    tmpMeta16 = __omcQ_24tmpVar129;
  }
  tmpMeta21 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_keepEqualResults));
  tmpMeta9 = mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, mmc_mk_cons(tmpMeta15, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta16), mmc_mk_cons(tmpMeta21, MMC_REFSTRUCTLIT(mmc_nil)))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT146, tmpMeta9, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Boolean */;
  _res2_arr = tmpMeta7;

  {
    modelica_metatype __omcQ_24tmpVar131;
    modelica_metatype* tmp23;
    modelica_metatype tmpMeta24;
    modelica_string tmp25 = 0;
    modelica_string __omcQ_24tmpVar130;
    modelica_integer tmp30;
    modelica_metatype _res2_arr_iter_loopVar = 0;
    modelica_metatype _res2_arr_iter;
    _res2_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res2_arr);
    tmpMeta24 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar131 = tmpMeta24; /* defaultValue */
    tmp23 = &__omcQ_24tmpVar131;
    while(1) {
      tmp30 = 1;
      if (!listEmpty(_res2_arr_iter_loopVar)) {
        _res2_arr_iter = MMC_CAR(_res2_arr_iter_loopVar);
        _res2_arr_iter_loopVar = MMC_CDR(_res2_arr_iter_loopVar);
        tmp30--;
      }
      if (tmp30 == 0) {
        { /* match expression */
          modelica_metatype tmp28_1;
          tmp28_1 = _res2_arr_iter;
          {
            volatile mmc_switch_type tmp28;
            int tmp29;
            tmp28 = 0;
            for (; tmp28 < 1; tmp28++) {
              switch (MMC_SWITCH_CAST(tmp28)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp28_1,2,1) == 0) goto tmp27_end;
                
                /* Pattern matching succeeded */
                tmp25 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res2_arr_iter), 2)));
                goto tmp27_done;
              }
              }
              goto tmp27_end;
              tmp27_end: ;
            }
            goto goto_26;
            goto_26:;
            MMC_THROW_INTERNAL();
            goto tmp27_done;
            tmp27_done:;
          }
        }__omcQ_24tmpVar130 = tmp25;
        *tmp23 = mmc_mk_cons(__omcQ_24tmpVar130,0);
        tmp23 = &MMC_CDR(*tmp23);
      } else if (tmp30 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp23 = mmc_mk_nil();
    tmpMeta22 = __omcQ_24tmpVar131;
  }
  _res2 = tmpMeta22;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_diffSimulationResults(threadData_t *threadData, modelica_metatype _actualFile, modelica_metatype _expectedFile, modelica_metatype _diffPrefix, modelica_metatype _relTol, modelica_metatype _relTolDiffMinMax, modelica_metatype _rangeDelta, modelica_metatype _vars, modelica_metatype _keepEqualResults, modelica_metatype *out_res2)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_integer tmp4;
  modelica_boolean _res1;
  modelica_metatype out_res1;
  tmp1 = mmc_unbox_real(_relTol);
  tmp2 = mmc_unbox_real(_relTolDiffMinMax);
  tmp3 = mmc_unbox_real(_rangeDelta);
  tmp4 = mmc_unbox_integer(_keepEqualResults);
  _res1 = omc_OpenModelicaScriptingAPI_diffSimulationResults(threadData, _actualFile, _expectedFile, _diffPrefix, tmp1, tmp2, tmp3, _vars, tmp4, out_res2);
  out_res1 = mmc_mk_icon(_res1);
  /* skip box _res2; list<String> */
  return out_res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_diffSimulationResultsHtml(threadData_t *threadData, modelica_string _var, modelica_string _actualFile, modelica_string _expectedFile, modelica_real _relTol, modelica_real _relTolDiffMinMax, modelica_real _rangeDelta)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _var);
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _actualFile);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _expectedFile);
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relTol));
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relTolDiffMinMax));
  tmpMeta9 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_rangeDelta));
  tmpMeta3 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT147, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_diffSimulationResultsHtml(threadData_t *threadData, modelica_metatype _var, modelica_metatype _actualFile, modelica_metatype _expectedFile, modelica_metatype _relTol, modelica_metatype _relTolDiffMinMax, modelica_metatype _rangeDelta)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_real(_relTol);
  tmp2 = mmc_unbox_real(_relTolDiffMinMax);
  tmp3 = mmc_unbox_real(_rangeDelta);
  _res = omc_OpenModelicaScriptingAPI_diffSimulationResultsHtml(threadData, _var, _actualFile, _expectedFile, tmp1, tmp2, tmp3);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_checkTaskGraph(threadData_t *threadData, modelica_string _filename, modelica_string _reffilename)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _reffilename);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT148, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar133;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar132;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar133 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar133;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar132 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar132,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar133;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_checkCodeGraph(threadData_t *threadData, modelica_string _graphfile, modelica_string _codefile)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _graphfile);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _codefile);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT149, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar135;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar134;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar135 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar135;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar134 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar134,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar135;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_closeSimulationResultFile(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT150, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_closeSimulationResultFile(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_closeSimulationResultFile(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_deleteComponent(threadData_t *threadData, modelica_string _componentName, modelica_string _classPath)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _classPath));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT151, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_deleteComponent(threadData_t *threadData, modelica_metatype _componentName, modelica_metatype _classPath)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_deleteComponent(threadData, _componentName, _classPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getParameterNames(threadData_t *threadData, modelica_string _class_)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT152, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar137;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar136;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar137 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar137;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar136 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar136,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar137;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getParameterValue(threadData_t *threadData, modelica_string _class_, modelica_string _parameterName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _parameterName);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT153, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
void omc_OpenModelicaScriptingAPI_getComponents(threadData_t *threadData, modelica_string _className, modelica_boolean _useQuotes)
{
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta4 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta3);
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_useQuotes));
  tmpMeta2 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT154, tmpMeta2, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,13,0) == 0) MMC_THROW_INTERNAL();
  _return: OMC_LABEL_UNUSED
  return;
}
void boxptr_OpenModelicaScriptingAPI_getComponents(threadData_t *threadData, modelica_metatype _className, modelica_metatype _useQuotes)
{
  modelica_integer tmp1;
  tmp1 = mmc_unbox_integer(_useQuotes);
  omc_OpenModelicaScriptingAPI_getComponents(threadData, _className, tmp1);
  return;
}

DLLDirection
void omc_OpenModelicaScriptingAPI_getElements(threadData_t *threadData, modelica_string _className, modelica_boolean _useQuotes)
{
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta4 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta3);
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_useQuotes));
  tmpMeta2 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT155, tmpMeta2, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,13,0) == 0) MMC_THROW_INTERNAL();
  _return: OMC_LABEL_UNUSED
  return;
}
void boxptr_OpenModelicaScriptingAPI_getElements(threadData_t *threadData, modelica_metatype _className, modelica_metatype _useQuotes)
{
  modelica_integer tmp1;
  tmp1 = mmc_unbox_integer(_useQuotes);
  omc_OpenModelicaScriptingAPI_getElements(threadData, _className, tmp1);
  return;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getComponentModifierNames(threadData_t *threadData, modelica_string _class_, modelica_string _componentName)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _componentName);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT156, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar139;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar138;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar139 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar139;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar138 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar138,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar139;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getComponentModifierValue(threadData_t *threadData, modelica_string _class_, modelica_string _modifier)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modifier));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT157, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getComponentModifierValues(threadData_t *threadData, modelica_string _class_, modelica_string _modifier)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modifier));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT158, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_removeComponentModifiers(threadData_t *threadData, modelica_string _class_, modelica_string _componentName, modelica_boolean _keepRedeclares)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _componentName);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_keepRedeclares));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT159, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_removeComponentModifiers(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _componentName, modelica_metatype _keepRedeclares)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_keepRedeclares);
  _res = omc_OpenModelicaScriptingAPI_removeComponentModifiers(threadData, _class_, _componentName, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getElementModifierNames(threadData_t *threadData, modelica_string _className, modelica_string _elementName)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _elementName);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT160, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar141;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar140;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar141 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar141;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar140 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar140,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar141;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getExtendsModifierNames(threadData_t *threadData, modelica_string _className, modelica_string _extendsName, modelica_boolean _useQuotes)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _extendsName));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_useQuotes));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT161, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getExtendsModifierNames(threadData_t *threadData, modelica_metatype _className, modelica_metatype _extendsName, modelica_metatype _useQuotes)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_useQuotes);
  _res = omc_OpenModelicaScriptingAPI_getExtendsModifierNames(threadData, _className, _extendsName, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getElementModifierValue(threadData_t *threadData, modelica_string _className, modelica_string _modifier)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modifier));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT162, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getElementModifierValues(threadData_t *threadData, modelica_string _className, modelica_string _modifier)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modifier));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT163, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_removeElementModifiers(threadData_t *threadData, modelica_string _className, modelica_string _componentName, modelica_boolean _keepRedeclares)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _componentName);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_keepRedeclares));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT164, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_removeElementModifiers(threadData_t *threadData, modelica_metatype _className, modelica_metatype _componentName, modelica_metatype _keepRedeclares)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_keepRedeclares);
  _res = omc_OpenModelicaScriptingAPI_removeElementModifiers(threadData, _className, _componentName, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isExtendsModifierFinal(threadData_t *threadData, modelica_string _className, modelica_string _extendsName, modelica_string _modifierName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _extendsName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta9 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modifierName));
  tmpMeta10 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta9);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT165, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isExtendsModifierFinal(threadData_t *threadData, modelica_metatype _className, modelica_metatype _extendsName, modelica_metatype _modifierName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isExtendsModifierFinal(threadData, _className, _extendsName, _modifierName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getComponentCount(threadData_t *threadData, modelica_string _classPath)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _classPath));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT166, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getComponentCount(threadData_t *threadData, modelica_metatype _classPath)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getComponentCount(threadData, _classPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthComponentCondition(threadData_t *threadData, modelica_string _className, modelica_integer _n)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_n));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT167, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthComponentCondition(threadData_t *threadData, modelica_metatype _className, modelica_metatype _n)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_n);
  _res = omc_OpenModelicaScriptingAPI_getNthComponentCondition(threadData, _className, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getElementAnnotation(threadData_t *threadData, modelica_string _elementName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _elementName));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT168, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getInstantiatedParametersAndValues(threadData_t *threadData, modelica_string _cls)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cls));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT169, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar143;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar142;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar143 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar143;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar142 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar142,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar143;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_removeExtendsModifiers(threadData_t *threadData, modelica_string _className, modelica_string _baseClassName, modelica_boolean _keepRedeclares)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _baseClassName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_keepRedeclares));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT170, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_removeExtendsModifiers(threadData_t *threadData, modelica_metatype _className, modelica_metatype _baseClassName, modelica_metatype _keepRedeclares)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_keepRedeclares);
  _res = omc_OpenModelicaScriptingAPI_removeExtendsModifiers(threadData, _className, _baseClassName, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getComponentComment(threadData_t *threadData, modelica_string _className, modelica_string _componentName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT171, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setComponentComment(threadData_t *threadData, modelica_string _className, modelica_string _componentName, modelica_string _comment)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _comment);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT172, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setComponentComment(threadData_t *threadData, modelica_metatype _className, modelica_metatype _componentName, modelica_metatype _comment)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setComponentComment(threadData, _className, _componentName, _comment);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setComponentProperties(threadData_t *threadData, modelica_string _className, modelica_string _componentName, modelica_metatype _prefixArray, modelica_metatype _variability, modelica_metatype _innerOuter, modelica_metatype _direction)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta19;
  modelica_metatype tmpMeta24;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  {
    modelica_metatype __omcQ_24tmpVar153;
    modelica_metatype* tmp10;
    modelica_metatype tmpMeta11;
    modelica_metatype tmpMeta12;
    modelica_metatype __omcQ_24tmpVar152;
    modelica_integer tmp13;
    modelica_metatype _prefixArray_iter_loopVar = 0;
    modelica_metatype _prefixArray_iter;
    _prefixArray_iter_loopVar = _prefixArray;
    tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar153 = tmpMeta11; /* defaultValue */
    tmp10 = &__omcQ_24tmpVar153;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_prefixArray_iter_loopVar)) {
        _prefixArray_iter = MMC_CAR(_prefixArray_iter_loopVar);
        _prefixArray_iter_loopVar = MMC_CDR(_prefixArray_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        tmpMeta12 = mmc_mk_box2(6, &Values_Value_BOOL__desc, _prefixArray_iter);
        __omcQ_24tmpVar152 = tmpMeta12;
        *tmp10 = mmc_mk_cons(__omcQ_24tmpVar152,0);
        tmp10 = &MMC_CDR(*tmp10);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp10 = mmc_mk_nil();
    tmpMeta9 = __omcQ_24tmpVar153;
  }
  {
    modelica_metatype __omcQ_24tmpVar155;
    modelica_metatype* tmp15;
    modelica_metatype tmpMeta16;
    modelica_metatype tmpMeta17;
    modelica_metatype __omcQ_24tmpVar154;
    modelica_integer tmp18;
    modelica_metatype _variability_iter_loopVar = 0;
    modelica_metatype _variability_iter;
    _variability_iter_loopVar = _variability;
    tmpMeta16 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar155 = tmpMeta16; /* defaultValue */
    tmp15 = &__omcQ_24tmpVar155;
    while(1) {
      tmp18 = 1;
      if (!listEmpty(_variability_iter_loopVar)) {
        _variability_iter = MMC_CAR(_variability_iter_loopVar);
        _variability_iter_loopVar = MMC_CDR(_variability_iter_loopVar);
        tmp18--;
      }
      if (tmp18 == 0) {
        tmpMeta17 = mmc_mk_box2(5, &Values_Value_STRING__desc, _variability_iter);
        __omcQ_24tmpVar154 = tmpMeta17;
        *tmp15 = mmc_mk_cons(__omcQ_24tmpVar154,0);
        tmp15 = &MMC_CDR(*tmp15);
      } else if (tmp18 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp15 = mmc_mk_nil();
    tmpMeta14 = __omcQ_24tmpVar155;
  }
  {
    modelica_metatype __omcQ_24tmpVar157;
    modelica_metatype* tmp20;
    modelica_metatype tmpMeta21;
    modelica_metatype tmpMeta22;
    modelica_metatype __omcQ_24tmpVar156;
    modelica_integer tmp23;
    modelica_metatype _innerOuter_iter_loopVar = 0;
    modelica_metatype _innerOuter_iter;
    _innerOuter_iter_loopVar = _innerOuter;
    tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar157 = tmpMeta21; /* defaultValue */
    tmp20 = &__omcQ_24tmpVar157;
    while(1) {
      tmp23 = 1;
      if (!listEmpty(_innerOuter_iter_loopVar)) {
        _innerOuter_iter = MMC_CAR(_innerOuter_iter_loopVar);
        _innerOuter_iter_loopVar = MMC_CDR(_innerOuter_iter_loopVar);
        tmp23--;
      }
      if (tmp23 == 0) {
        tmpMeta22 = mmc_mk_box2(6, &Values_Value_BOOL__desc, _innerOuter_iter);
        __omcQ_24tmpVar156 = tmpMeta22;
        *tmp20 = mmc_mk_cons(__omcQ_24tmpVar156,0);
        tmp20 = &MMC_CDR(*tmp20);
      } else if (tmp23 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp20 = mmc_mk_nil();
    tmpMeta19 = __omcQ_24tmpVar157;
  }
  {
    modelica_metatype __omcQ_24tmpVar159;
    modelica_metatype* tmp25;
    modelica_metatype tmpMeta26;
    modelica_metatype tmpMeta27;
    modelica_metatype __omcQ_24tmpVar158;
    modelica_integer tmp28;
    modelica_metatype _direction_iter_loopVar = 0;
    modelica_metatype _direction_iter;
    _direction_iter_loopVar = _direction;
    tmpMeta26 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar159 = tmpMeta26; /* defaultValue */
    tmp25 = &__omcQ_24tmpVar159;
    while(1) {
      tmp28 = 1;
      if (!listEmpty(_direction_iter_loopVar)) {
        _direction_iter = MMC_CAR(_direction_iter_loopVar);
        _direction_iter_loopVar = MMC_CDR(_direction_iter_loopVar);
        tmp28--;
      }
      if (tmp28 == 0) {
        tmpMeta27 = mmc_mk_box2(5, &Values_Value_STRING__desc, _direction_iter);
        __omcQ_24tmpVar158 = tmpMeta27;
        *tmp25 = mmc_mk_cons(__omcQ_24tmpVar158,0);
        tmp25 = &MMC_CDR(*tmp25);
      } else if (tmp28 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp25 = mmc_mk_nil();
    tmpMeta24 = __omcQ_24tmpVar159;
  }
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta9), mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta14), mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta19), mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta24), MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT173, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setComponentProperties(threadData_t *threadData, modelica_metatype _className, modelica_metatype _componentName, modelica_metatype _prefixArray, modelica_metatype _variability, modelica_metatype _innerOuter, modelica_metatype _direction)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setComponentProperties(threadData, _className, _componentName, _prefixArray, _variability, _innerOuter, _direction);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getConnectorCount(threadData_t *threadData, modelica_string _className)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT174, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getConnectorCount(threadData_t *threadData, modelica_metatype _className)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getConnectorCount(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_updateConnectionAnnotation(threadData_t *threadData, modelica_string _className, modelica_string _from, modelica_string _to, modelica_string _annotate)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _from);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _to);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _annotate);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT175, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_updateConnectionAnnotation(threadData_t *threadData, modelica_metatype _className, modelica_metatype _from, modelica_metatype _to, modelica_metatype _annotate)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_updateConnectionAnnotation(threadData, _className, _from, _to, _annotate);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_updateConnectionNames(threadData_t *threadData, modelica_string _className, modelica_string _from, modelica_string _to, modelica_string _fromNew, modelica_string _toNew)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _from);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _to);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fromNew);
  tmpMeta10 = mmc_mk_box2(5, &Values_Value_STRING__desc, _toNew);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT176, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_updateConnectionNames(threadData_t *threadData, modelica_metatype _className, modelica_metatype _from, modelica_metatype _to, modelica_metatype _fromNew, modelica_metatype _toNew)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_updateConnectionNames(threadData, _className, _from, _to, _fromNew, _toNew);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getConnectionCount(threadData_t *threadData, modelica_string _className)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT177, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getConnectionCount(threadData_t *threadData, modelica_metatype _className)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getConnectionCount(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getNthConnection(threadData_t *threadData, modelica_string _className, modelica_integer _index)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT178, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar161;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar160;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar161 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar161;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar160 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar160,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar161;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthConnection(threadData_t *threadData, modelica_metatype _className, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthConnection(threadData, _className, tmp1);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getConnectionList(threadData_t *threadData, modelica_string _className)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT179, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar165;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_metatype tmpMeta7;
    modelica_metatype __omcQ_24tmpVar164;
    modelica_integer tmp16;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar165 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar165;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar163;
          modelica_metatype* tmp8;
          modelica_metatype tmpMeta9;
          modelica_string tmp10 = 0;
          modelica_string __omcQ_24tmpVar162;
          modelica_integer tmp15;
          modelica_metatype _res_arr_iter_iter_loopVar = 0;
          modelica_metatype _res_arr_iter_iter;
          _res_arr_iter_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr_iter);
          tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar163 = tmpMeta9; /* defaultValue */
          tmp8 = &__omcQ_24tmpVar163;
          while(1) {
            tmp15 = 1;
            if (!listEmpty(_res_arr_iter_iter_loopVar)) {
              _res_arr_iter_iter = MMC_CAR(_res_arr_iter_iter_loopVar);
              _res_arr_iter_iter_loopVar = MMC_CDR(_res_arr_iter_iter_loopVar);
              tmp15--;
            }
            if (tmp15 == 0) {
              { /* match expression */
                modelica_metatype tmp13_1;
                tmp13_1 = _res_arr_iter_iter;
                {
                  volatile mmc_switch_type tmp13;
                  int tmp14;
                  tmp13 = 0;
                  for (; tmp13 < 1; tmp13++) {
                    switch (MMC_SWITCH_CAST(tmp13)) {
                    case 0: {
                      if (mmc__uniontype__metarecord__typedef__equal(tmp13_1,2,1) == 0) goto tmp12_end;
                      
                      /* Pattern matching succeeded */
                      tmp10 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter_iter), 2)));
                      goto tmp12_done;
                    }
                    }
                    goto tmp12_end;
                    tmp12_end: ;
                  }
                  goto goto_11;
                  goto_11:;
                  MMC_THROW_INTERNAL();
                  goto tmp12_done;
                  tmp12_done:;
                }
              }__omcQ_24tmpVar162 = tmp10;
              *tmp8 = mmc_mk_cons(__omcQ_24tmpVar162,0);
              tmp8 = &MMC_CDR(*tmp8);
            } else if (tmp15 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp8 = mmc_mk_nil();
          tmpMeta7 = __omcQ_24tmpVar163;
        }
        __omcQ_24tmpVar164 = tmpMeta7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar164,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar165;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getAlgorithmCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT180, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getAlgorithmCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getAlgorithmCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthAlgorithm(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT181, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthAlgorithm(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthAlgorithm(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getInitialAlgorithmCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT182, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getInitialAlgorithmCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getInitialAlgorithmCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthInitialAlgorithm(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT183, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthInitialAlgorithm(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthInitialAlgorithm(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getAlgorithmItemsCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT184, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getAlgorithmItemsCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getAlgorithmItemsCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthAlgorithmItem(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT185, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthAlgorithmItem(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthAlgorithmItem(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getInitialAlgorithmItemsCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT186, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getInitialAlgorithmItemsCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getInitialAlgorithmItemsCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthInitialAlgorithmItem(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT187, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthInitialAlgorithmItem(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthInitialAlgorithmItem(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getEquationCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT188, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getEquationCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getEquationCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthEquation(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT189, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthEquation(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthEquation(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getInitialEquationCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT190, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getInitialEquationCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getInitialEquationCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthInitialEquation(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT191, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthInitialEquation(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthInitialEquation(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getEquationItemsCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT192, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getEquationItemsCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getEquationItemsCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthEquationItem(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT193, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthEquationItem(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthEquationItem(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getInitialEquationItemsCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT194, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getInitialEquationItemsCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getInitialEquationItemsCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthInitialEquationItem(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT195, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthInitialEquationItem(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthInitialEquationItem(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getAnnotationCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT196, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getAnnotationCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getAnnotationCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthAnnotationString(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT197, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthAnnotationString(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthAnnotationString(threadData, _class_, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getImportCount(threadData_t *threadData, modelica_string _class_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT198, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getImportCount(threadData_t *threadData, modelica_metatype _class_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getImportCount(threadData, _class_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getMMfileTotalDependencies(threadData_t *threadData, modelica_string _in_package_name, modelica_string _public_imports_dir)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _in_package_name);
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _public_imports_dir);
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT199, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar167;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar166;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar167 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar167;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar166 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar166,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar167;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getImportedNames(threadData_t *threadData, modelica_string _class_, modelica_metatype *out_res2)
{
  modelica_metatype _res1 = NULL;
  modelica_metatype _res2 = NULL;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype _res2_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta19;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res1_arr has no default value.
  // _res2_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta8 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta9 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta8);
  tmpMeta7 = mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT200, tmpMeta7, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (!listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2_arr = tmpMeta5;

  {
    modelica_metatype __omcQ_24tmpVar169;
    modelica_metatype* tmp11;
    modelica_metatype tmpMeta12;
    modelica_string tmp13 = 0;
    modelica_string __omcQ_24tmpVar168;
    modelica_integer tmp18;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar169 = tmpMeta12; /* defaultValue */
    tmp11 = &__omcQ_24tmpVar169;
    while(1) {
      tmp18 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp18--;
      }
      if (tmp18 == 0) {
        { /* match expression */
          modelica_metatype tmp16_1;
          tmp16_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp16;
            int tmp17;
            tmp16 = 0;
            for (; tmp16 < 1; tmp16++) {
              switch (MMC_SWITCH_CAST(tmp16)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp16_1,2,1) == 0) goto tmp15_end;
                
                /* Pattern matching succeeded */
                tmp13 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp15_done;
              }
              }
              goto tmp15_end;
              tmp15_end: ;
            }
            goto goto_14;
            goto_14:;
            MMC_THROW_INTERNAL();
            goto tmp15_done;
            tmp15_done:;
          }
        }__omcQ_24tmpVar168 = tmp13;
        *tmp11 = mmc_mk_cons(__omcQ_24tmpVar168,0);
        tmp11 = &MMC_CDR(*tmp11);
      } else if (tmp18 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp11 = mmc_mk_nil();
    tmpMeta10 = __omcQ_24tmpVar169;
  }
  _res1 = tmpMeta10;

  {
    modelica_metatype __omcQ_24tmpVar171;
    modelica_metatype* tmp20;
    modelica_metatype tmpMeta21;
    modelica_string tmp22 = 0;
    modelica_string __omcQ_24tmpVar170;
    modelica_integer tmp27;
    modelica_metatype _res2_arr_iter_loopVar = 0;
    modelica_metatype _res2_arr_iter;
    _res2_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res2_arr);
    tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar171 = tmpMeta21; /* defaultValue */
    tmp20 = &__omcQ_24tmpVar171;
    while(1) {
      tmp27 = 1;
      if (!listEmpty(_res2_arr_iter_loopVar)) {
        _res2_arr_iter = MMC_CAR(_res2_arr_iter_loopVar);
        _res2_arr_iter_loopVar = MMC_CDR(_res2_arr_iter_loopVar);
        tmp27--;
      }
      if (tmp27 == 0) {
        { /* match expression */
          modelica_metatype tmp25_1;
          tmp25_1 = _res2_arr_iter;
          {
            volatile mmc_switch_type tmp25;
            int tmp26;
            tmp25 = 0;
            for (; tmp25 < 1; tmp25++) {
              switch (MMC_SWITCH_CAST(tmp25)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp25_1,2,1) == 0) goto tmp24_end;
                
                /* Pattern matching succeeded */
                tmp22 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res2_arr_iter), 2)));
                goto tmp24_done;
              }
              }
              goto tmp24_end;
              tmp24_end: ;
            }
            goto goto_23;
            goto_23:;
            MMC_THROW_INTERNAL();
            goto tmp24_done;
            tmp24_done:;
          }
        }__omcQ_24tmpVar170 = tmp22;
        *tmp20 = mmc_mk_cons(__omcQ_24tmpVar170,0);
        tmp20 = &MMC_CDR(*tmp20);
      } else if (tmp27 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp20 = mmc_mk_nil();
    tmpMeta19 = __omcQ_24tmpVar171;
  }
  _res2 = tmpMeta19;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getNthImport(threadData_t *threadData, modelica_string _class_, modelica_integer _index)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_index));
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT201, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar173;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar172;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar173 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar173;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar172 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar172,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar173;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthImport(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _index)
{
  modelica_integer tmp1;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_index);
  _res = omc_OpenModelicaScriptingAPI_getNthImport(threadData, _class_, tmp1);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_iconv(threadData_t *threadData, modelica_string _string, modelica_string _from, modelica_string _to)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _string);
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _from);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _to);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT202, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getDocumentationAnnotation(threadData_t *threadData, modelica_string _cl)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT203, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar175;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar174;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar175 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar175;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar174 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar174,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar175;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_setDocumentationAnnotation(threadData_t *threadData, modelica_string _class_, modelica_string _info, modelica_string _revisions)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _class_));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _info);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _revisions);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT204, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_setDocumentationAnnotation(threadData_t *threadData, modelica_metatype _class_, modelica_metatype _info, modelica_metatype _revisions)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_setDocumentationAnnotation(threadData, _class_, _info, _revisions);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_getTimeStamp(threadData_t *threadData, modelica_string _cl, modelica_string *out_res2)
{
  modelica_real _res1;
  modelica_string _res2 = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta12 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta11);
  tmpMeta10 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT205, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmpMeta9;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getTimeStamp(threadData_t *threadData, modelica_metatype _cl, modelica_metatype *out_res2)
{
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_getTimeStamp(threadData, _cl, out_res2);
  out_res1 = mmc_mk_rcon(_res1);
  /* skip box _res2; String */
  return out_res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_stringTypeName(threadData_t *threadData, modelica_string _str)
{
  modelica_string _res = NULL;
  modelica_metatype _res_path = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_path has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _str);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT206, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,12,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
  _res_path = tmpMeta3;

  _res = omc_AbsynUtil_pathString(threadData, _res_path, _OMC_LIT207, 1 /* true */, 0 /* false */);
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_typeNameString(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT208, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_typeNameStrings(threadData_t *threadData, modelica_string _cl)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT209, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar177;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar176;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar177 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar177;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar176 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar176,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar177;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getClassComment(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT210, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_dirname(threadData_t *threadData, modelica_string _path)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _path);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT211, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_basename(threadData_t *threadData, modelica_string _path)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _path);
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT212, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_existClass(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT213, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_existClass(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_existClass(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getClassRestriction(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT214, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isType(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT215, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isType(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isType(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isPackage(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT216, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isPackage(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isPackage(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isClass(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT217, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isClass(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isClass(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isRecord(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT218, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isRecord(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isRecord(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isBlock(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT219, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isBlock(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isBlock(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isFunction(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT220, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isFunction(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isFunction(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isPartial(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT221, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isPartial(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isPartial(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isReplaceable(threadData_t *threadData, modelica_string _element)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _element));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT222, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isReplaceable(threadData_t *threadData, modelica_metatype _element)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isReplaceable(threadData, _element);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isRedeclare(threadData_t *threadData, modelica_string _element)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _element));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT223, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isRedeclare(threadData_t *threadData, modelica_metatype _element)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isRedeclare(threadData, _element);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isModel(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT224, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isModel(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isModel(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isConnector(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT225, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isConnector(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isConnector(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isOptimization(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT226, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isOptimization(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isOptimization(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isEnumeration(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT227, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isEnumeration(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isEnumeration(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isOperator(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT228, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isOperator(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isOperator(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isOperatorRecord(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT229, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isOperatorRecord(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isOperatorRecord(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isOperatorFunction(threadData_t *threadData, modelica_string _cl)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT230, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isOperatorFunction(threadData_t *threadData, modelica_metatype _cl)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isOperatorFunction(threadData, _cl);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isProtectedClass(threadData_t *threadData, modelica_string _cl, modelica_string _c2)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _c2);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT231, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isProtectedClass(threadData_t *threadData, modelica_metatype _cl, modelica_metatype _c2)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isProtectedClass(threadData, _cl, _c2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getBuiltinType(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT232, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isPrimitive(threadData_t *threadData, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT233, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isPrimitive(threadData_t *threadData, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isPrimitive(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isParameter(threadData_t *threadData, modelica_string _componentName, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT234, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isParameter(threadData_t *threadData, modelica_metatype _componentName, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isParameter(threadData, _componentName, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isConstant(threadData_t *threadData, modelica_string _componentName, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT235, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isConstant(threadData_t *threadData, modelica_metatype _componentName, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isConstant(threadData, _componentName, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isProtected(threadData_t *threadData, modelica_string _componentName, modelica_string _className)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _componentName));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT236, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isProtected(threadData_t *threadData, modelica_metatype _componentName, modelica_metatype _className)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isProtected(threadData, _componentName, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_getInheritanceCount(threadData_t *threadData, modelica_string _className)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT237, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getInheritanceCount(threadData_t *threadData, modelica_metatype _className)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getInheritanceCount(threadData, _className);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getInheritedClasses(threadData_t *threadData, modelica_string _name)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _name));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT238, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar179;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar178;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar179 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar179;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar178 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar178,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar179;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getNthInheritedClass(threadData_t *threadData, modelica_string _className, modelica_integer _n)
{
  modelica_string _res = NULL;
  modelica_metatype _res_path = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_path has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_n));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT239, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,12,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
  _res_path = tmpMeta3;

  _res = omc_AbsynUtil_pathString(threadData, _res_path, _OMC_LIT207, 1 /* true */, 0 /* false */);
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getNthInheritedClass(threadData_t *threadData, modelica_metatype _className, modelica_metatype _n)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_n);
  _res = omc_OpenModelicaScriptingAPI_getNthInheritedClass(threadData, _className, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_isExperiment(threadData_t *threadData, modelica_string _name)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _name));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT240, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_isExperiment(threadData_t *threadData, modelica_metatype _name)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_isExperiment(threadData, _name);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_getSimulationOptions(threadData_t *threadData, modelica_string _name, modelica_real _defaultStartTime, modelica_real _defaultStopTime, modelica_real _defaultTolerance, modelica_integer _defaultNumberOfIntervals, modelica_real _defaultInterval, modelica_real *out_res2, modelica_real *out_res3, modelica_integer *out_res4, modelica_real *out_res5)
{
  modelica_real _res1;
  modelica_real _res2;
  modelica_real _res3;
  modelica_integer _res4;
  modelica_real _res5;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_real tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_real tmp14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta17;
  modelica_integer tmp18;
  modelica_metatype tmpMeta19;
  modelica_metatype tmpMeta20;
  modelica_metatype tmpMeta21;
  modelica_real tmp22;
  modelica_metatype tmpMeta23;
  modelica_metatype tmpMeta24;
  modelica_metatype tmpMeta25;
  modelica_metatype tmpMeta26;
  modelica_metatype tmpMeta27;
  modelica_metatype tmpMeta28;
  modelica_metatype tmpMeta29;
  modelica_metatype tmpMeta30;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  // _res4 has no default value.
  // _res5 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta24 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _name));
  tmpMeta25 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta24);
  tmpMeta26 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_defaultStartTime));
  tmpMeta27 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_defaultStopTime));
  tmpMeta28 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_defaultTolerance));
  tmpMeta29 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_defaultNumberOfIntervals));
  tmpMeta30 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_defaultInterval));
  tmpMeta23 = mmc_mk_cons(tmpMeta25, mmc_mk_cons(tmpMeta26, mmc_mk_cons(tmpMeta27, mmc_mk_cons(tmpMeta28, mmc_mk_cons(tmpMeta29, mmc_mk_cons(tmpMeta30, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT241, tmpMeta23, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_real(tmpMeta9);
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_CAR(tmpMeta8);
  tmpMeta12 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
  tmp14 = mmc_unbox_real(tmpMeta13);
  if (listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
  tmpMeta15 = MMC_CAR(tmpMeta12);
  tmpMeta16 = MMC_CDR(tmpMeta12);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
  tmp18 = mmc_unbox_integer(tmpMeta17);
  if (listEmpty(tmpMeta16)) MMC_THROW_INTERNAL();
  tmpMeta19 = MMC_CAR(tmpMeta16);
  tmpMeta20 = MMC_CDR(tmpMeta16);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
  tmp22 = mmc_unbox_real(tmpMeta21);
  if (!listEmpty(tmpMeta20)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Real */;
  _res3 = tmp14  /* pattern as ty=Real */;
  _res4 = tmp18  /* pattern as ty=Integer */;
  _res5 = tmp22  /* pattern as ty=Real */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  if (out_res4) { *out_res4 = _res4; }
  if (out_res5) { *out_res5 = _res5; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getSimulationOptions(threadData_t *threadData, modelica_metatype _name, modelica_metatype _defaultStartTime, modelica_metatype _defaultStopTime, modelica_metatype _defaultTolerance, modelica_metatype _defaultNumberOfIntervals, modelica_metatype _defaultInterval, modelica_metatype *out_res2, modelica_metatype *out_res3, modelica_metatype *out_res4, modelica_metatype *out_res5)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_integer tmp4;
  modelica_real tmp5;
  modelica_real _res2;
  modelica_real _res3;
  modelica_integer _res4;
  modelica_real _res5;
  modelica_real _res1;
  modelica_metatype out_res1;
  tmp1 = mmc_unbox_real(_defaultStartTime);
  tmp2 = mmc_unbox_real(_defaultStopTime);
  tmp3 = mmc_unbox_real(_defaultTolerance);
  tmp4 = mmc_unbox_integer(_defaultNumberOfIntervals);
  tmp5 = mmc_unbox_real(_defaultInterval);
  _res1 = omc_OpenModelicaScriptingAPI_getSimulationOptions(threadData, _name, tmp1, tmp2, tmp3, tmp4, tmp5, &_res2, &_res3, &_res4, &_res5);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_rcon(_res2); }
  if (out_res3) { *out_res3 = mmc_mk_rcon(_res3); }
  if (out_res4) { *out_res4 = mmc_mk_icon(_res4); }
  if (out_res5) { *out_res5 = mmc_mk_rcon(_res5); }
  return out_res1;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAnnotationNamedModifiers(threadData_t *threadData, modelica_string _className, modelica_string _annotationName)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _annotationName);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT242, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar181;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar180;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar181 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar181;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar180 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar180,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar181;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getAnnotationModifierValue(threadData_t *threadData, modelica_string _className, modelica_string _annotationName, modelica_string _modifierName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _annotationName);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _modifierName);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT243, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_classAnnotationExists(threadData_t *threadData, modelica_string _className, modelica_string _annotationName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _annotationName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT244, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_classAnnotationExists(threadData_t *threadData, modelica_metatype _className, modelica_metatype _annotationName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_classAnnotationExists(threadData, _className, _annotationName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_getBooleanClassAnnotation(threadData_t *threadData, modelica_string _className, modelica_string _annotationName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _annotationName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT245, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getBooleanClassAnnotation(threadData_t *threadData, modelica_metatype _className, modelica_metatype _annotationName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getBooleanClassAnnotation(threadData, _className, _annotationName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_extendsFrom(threadData_t *threadData, modelica_string _className, modelica_string _baseClassName)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _baseClassName));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT246, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_extendsFrom(threadData_t *threadData, modelica_metatype _className, modelica_metatype _baseClassName)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_extendsFrom(threadData, _className, _baseClassName);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_searchClassNames(threadData_t *threadData, modelica_string _searchText, modelica_boolean _findInText)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(5, &Values_Value_STRING__desc, _searchText);
  tmpMeta3 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_findInText));
  tmpMeta1 = mmc_mk_cons(tmpMeta2, mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT247, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar183;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string __omcQ_24tmpVar182;
    modelica_integer tmp7;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar183 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar183;
    while(1) {
      tmp7 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp7--;
      }
      if (tmp7 == 0) {
        __omcQ_24tmpVar182 = omc_ValuesUtil_valString(threadData, _res_arr_iter);
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar182,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp7 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar183;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_searchClassNames(threadData_t *threadData, modelica_metatype _searchText, modelica_metatype _findInText)
{
  modelica_integer tmp1;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_findInText);
  _res = omc_OpenModelicaScriptingAPI_searchClassNames(threadData, _searchText, tmp1);
  /* skip box _res; list<String> */
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailableLibraries(threadData_t *threadData)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta1 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT248, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar185;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_string tmp5 = 0;
    modelica_string __omcQ_24tmpVar184;
    modelica_integer tmp10;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar185 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar185;
    while(1) {
      tmp10 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp10--;
      }
      if (tmp10 == 0) {
        { /* match expression */
          modelica_metatype tmp8_1;
          tmp8_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp8;
            int tmp9;
            tmp8 = 0;
            for (; tmp8 < 1; tmp8++) {
              switch (MMC_SWITCH_CAST(tmp8)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp8_1,2,1) == 0) goto tmp7_end;
                
                /* Pattern matching succeeded */
                tmp5 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp7_done;
              }
              }
              goto tmp7_end;
              tmp7_end: ;
            }
            goto goto_6;
            goto_6:;
            MMC_THROW_INTERNAL();
            goto tmp7_done;
            tmp7_done:;
          }
        }__omcQ_24tmpVar184 = tmp5;
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar184,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp10 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar185;
  }
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailableLibraryVersions(threadData_t *threadData, modelica_string _libraryName)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _libraryName));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT249, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar187;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar186;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar187 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar187;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar186 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar186,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar187;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_installPackage(threadData_t *threadData, modelica_string _pkg, modelica_string _version, modelica_boolean _exactMatch)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _pkg));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _version);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_exactMatch));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT250, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_installPackage(threadData_t *threadData, modelica_metatype _pkg, modelica_metatype _version, modelica_metatype _exactMatch)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_exactMatch);
  _res = omc_OpenModelicaScriptingAPI_installPackage(threadData, _pkg, _version, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_updatePackageIndex(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT251, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_updatePackageIndex(threadData_t *threadData)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_updatePackageIndex(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailablePackageVersions(threadData_t *threadData, modelica_string _pkg, modelica_string _version)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _pkg));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _version);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT252, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar189;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar188;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar189 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar189;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar188 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar188,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar189;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailablePackageConversionsTo(threadData_t *threadData, modelica_string _pkg, modelica_string _version)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _pkg));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _version);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT253, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar191;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar190;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar191 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar191;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar190 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar190,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar191;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getAvailablePackageConversionsFrom(threadData_t *threadData, modelica_string _pkg, modelica_string _version)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _pkg));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _version);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT254, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar193;
    modelica_metatype* tmp6;
    modelica_metatype tmpMeta7;
    modelica_string tmp8 = 0;
    modelica_string __omcQ_24tmpVar192;
    modelica_integer tmp13;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta7 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar193 = tmpMeta7; /* defaultValue */
    tmp6 = &__omcQ_24tmpVar193;
    while(1) {
      tmp13 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp13--;
      }
      if (tmp13 == 0) {
        { /* match expression */
          modelica_metatype tmp11_1;
          tmp11_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp11;
            int tmp12;
            tmp11 = 0;
            for (; tmp11 < 1; tmp11++) {
              switch (MMC_SWITCH_CAST(tmp11)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp11_1,2,1) == 0) goto tmp10_end;
                
                /* Pattern matching succeeded */
                tmp8 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp10_done;
              }
              }
              goto tmp10_end;
              tmp10_end: ;
            }
            goto goto_9;
            goto_9:;
            MMC_THROW_INTERNAL();
            goto tmp10_done;
            tmp10_done:;
          }
        }__omcQ_24tmpVar192 = tmp8;
        *tmp6 = mmc_mk_cons(__omcQ_24tmpVar192,0);
        tmp6 = &MMC_CDR(*tmp6);
      } else if (tmp13 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp6 = mmc_mk_nil();
    tmpMeta5 = __omcQ_24tmpVar193;
  }
  _res = tmpMeta5;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_upgradeInstalledPackages(threadData_t *threadData, modelica_boolean _installNewestVersions)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_installNewestVersions));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT255, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_upgradeInstalledPackages(threadData_t *threadData, modelica_metatype _installNewestVersions)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_installNewestVersions);
  _res = omc_OpenModelicaScriptingAPI_upgradeInstalledPackages(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getUses(threadData_t *threadData, modelica_string _pack)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _pack));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT256, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar197;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_metatype tmpMeta7;
    modelica_metatype __omcQ_24tmpVar196;
    modelica_integer tmp16;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar197 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar197;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar195;
          modelica_metatype* tmp8;
          modelica_metatype tmpMeta9;
          modelica_string tmp10 = 0;
          modelica_string __omcQ_24tmpVar194;
          modelica_integer tmp15;
          modelica_metatype _res_arr_iter_iter_loopVar = 0;
          modelica_metatype _res_arr_iter_iter;
          _res_arr_iter_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr_iter);
          tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar195 = tmpMeta9; /* defaultValue */
          tmp8 = &__omcQ_24tmpVar195;
          while(1) {
            tmp15 = 1;
            if (!listEmpty(_res_arr_iter_iter_loopVar)) {
              _res_arr_iter_iter = MMC_CAR(_res_arr_iter_iter_loopVar);
              _res_arr_iter_iter_loopVar = MMC_CDR(_res_arr_iter_iter_loopVar);
              tmp15--;
            }
            if (tmp15 == 0) {
              { /* match expression */
                modelica_metatype tmp13_1;
                tmp13_1 = _res_arr_iter_iter;
                {
                  volatile mmc_switch_type tmp13;
                  int tmp14;
                  tmp13 = 0;
                  for (; tmp13 < 1; tmp13++) {
                    switch (MMC_SWITCH_CAST(tmp13)) {
                    case 0: {
                      if (mmc__uniontype__metarecord__typedef__equal(tmp13_1,2,1) == 0) goto tmp12_end;
                      
                      /* Pattern matching succeeded */
                      tmp10 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter_iter), 2)));
                      goto tmp12_done;
                    }
                    }
                    goto tmp12_end;
                    tmp12_end: ;
                  }
                  goto goto_11;
                  goto_11:;
                  MMC_THROW_INTERNAL();
                  goto tmp12_done;
                  tmp12_done:;
                }
              }__omcQ_24tmpVar194 = tmp10;
              *tmp8 = mmc_mk_cons(__omcQ_24tmpVar194,0);
              tmp8 = &MMC_CDR(*tmp8);
            } else if (tmp15 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp8 = mmc_mk_nil();
          tmpMeta7 = __omcQ_24tmpVar195;
        }
        __omcQ_24tmpVar196 = tmpMeta7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar196,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar197;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getConversionsFromVersions(threadData_t *threadData, modelica_string _pack, modelica_metatype *out_res2)
{
  modelica_metatype _res1 = NULL;
  modelica_metatype _res2 = NULL;
  modelica_metatype _res1_arr = NULL;
  modelica_metatype _res2_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta19;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res1_arr has no default value.
  // _res2_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta8 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _pack));
  tmpMeta9 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta8);
  tmpMeta7 = mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT257, tmpMeta7, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_CAR(tmpMeta4);
  tmpMeta6 = MMC_CDR(tmpMeta4);
  if (!listEmpty(tmpMeta6)) MMC_THROW_INTERNAL();
  _res1_arr = tmpMeta3;
  _res2_arr = tmpMeta5;

  {
    modelica_metatype __omcQ_24tmpVar199;
    modelica_metatype* tmp11;
    modelica_metatype tmpMeta12;
    modelica_string tmp13 = 0;
    modelica_string __omcQ_24tmpVar198;
    modelica_integer tmp18;
    modelica_metatype _res1_arr_iter_loopVar = 0;
    modelica_metatype _res1_arr_iter;
    _res1_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res1_arr);
    tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar199 = tmpMeta12; /* defaultValue */
    tmp11 = &__omcQ_24tmpVar199;
    while(1) {
      tmp18 = 1;
      if (!listEmpty(_res1_arr_iter_loopVar)) {
        _res1_arr_iter = MMC_CAR(_res1_arr_iter_loopVar);
        _res1_arr_iter_loopVar = MMC_CDR(_res1_arr_iter_loopVar);
        tmp18--;
      }
      if (tmp18 == 0) {
        { /* match expression */
          modelica_metatype tmp16_1;
          tmp16_1 = _res1_arr_iter;
          {
            volatile mmc_switch_type tmp16;
            int tmp17;
            tmp16 = 0;
            for (; tmp16 < 1; tmp16++) {
              switch (MMC_SWITCH_CAST(tmp16)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp16_1,2,1) == 0) goto tmp15_end;
                
                /* Pattern matching succeeded */
                tmp13 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res1_arr_iter), 2)));
                goto tmp15_done;
              }
              }
              goto tmp15_end;
              tmp15_end: ;
            }
            goto goto_14;
            goto_14:;
            MMC_THROW_INTERNAL();
            goto tmp15_done;
            tmp15_done:;
          }
        }__omcQ_24tmpVar198 = tmp13;
        *tmp11 = mmc_mk_cons(__omcQ_24tmpVar198,0);
        tmp11 = &MMC_CDR(*tmp11);
      } else if (tmp18 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp11 = mmc_mk_nil();
    tmpMeta10 = __omcQ_24tmpVar199;
  }
  _res1 = tmpMeta10;

  {
    modelica_metatype __omcQ_24tmpVar201;
    modelica_metatype* tmp20;
    modelica_metatype tmpMeta21;
    modelica_string tmp22 = 0;
    modelica_string __omcQ_24tmpVar200;
    modelica_integer tmp27;
    modelica_metatype _res2_arr_iter_loopVar = 0;
    modelica_metatype _res2_arr_iter;
    _res2_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res2_arr);
    tmpMeta21 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar201 = tmpMeta21; /* defaultValue */
    tmp20 = &__omcQ_24tmpVar201;
    while(1) {
      tmp27 = 1;
      if (!listEmpty(_res2_arr_iter_loopVar)) {
        _res2_arr_iter = MMC_CAR(_res2_arr_iter_loopVar);
        _res2_arr_iter_loopVar = MMC_CDR(_res2_arr_iter_loopVar);
        tmp27--;
      }
      if (tmp27 == 0) {
        { /* match expression */
          modelica_metatype tmp25_1;
          tmp25_1 = _res2_arr_iter;
          {
            volatile mmc_switch_type tmp25;
            int tmp26;
            tmp25 = 0;
            for (; tmp25 < 1; tmp25++) {
              switch (MMC_SWITCH_CAST(tmp25)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp25_1,2,1) == 0) goto tmp24_end;
                
                /* Pattern matching succeeded */
                tmp22 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res2_arr_iter), 2)));
                goto tmp24_done;
              }
              }
              goto tmp24_end;
              tmp24_end: ;
            }
            goto goto_23;
            goto_23:;
            MMC_THROW_INTERNAL();
            goto tmp24_done;
            tmp24_done:;
          }
        }__omcQ_24tmpVar200 = tmp22;
        *tmp20 = mmc_mk_cons(__omcQ_24tmpVar200,0);
        tmp20 = &MMC_CDR(*tmp20);
      } else if (tmp27 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp20 = mmc_mk_nil();
    tmpMeta19 = __omcQ_24tmpVar201;
  }
  _res2 = tmpMeta19;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getDerivedClassModifierNames(threadData_t *threadData, modelica_string _className)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT258, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar203;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar202;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar203 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar203;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar202 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar202,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar203;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getDerivedClassModifierValue(threadData_t *threadData, modelica_string _className, modelica_string _modifierName)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _modifierName));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT259, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
void omc_OpenModelicaScriptingAPI_generateEntryPoint(threadData_t *threadData, modelica_string _fileName, modelica_string _entryPoint, modelica_string _url)
{
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fileName);
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _entryPoint));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _url);
  tmpMeta2 = mmc_mk_cons(tmpMeta3, mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT260, tmpMeta2, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,13,0) == 0) MMC_THROW_INTERNAL();
  _return: OMC_LABEL_UNUSED
  return;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_numProcessors(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT261, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_numProcessors(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_numProcessors(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_runScriptParallel(threadData_t *threadData, modelica_metatype _scripts, modelica_integer _numThreads, modelica_boolean _useThreads)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  {
    modelica_metatype __omcQ_24tmpVar207;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_metatype tmpMeta5;
    modelica_metatype __omcQ_24tmpVar206;
    modelica_integer tmp6;
    modelica_metatype _scripts_iter_loopVar = 0;
    modelica_metatype _scripts_iter;
    _scripts_iter_loopVar = _scripts;
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar207 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar207;
    while(1) {
      tmp6 = 1;
      if (!listEmpty(_scripts_iter_loopVar)) {
        _scripts_iter = MMC_CAR(_scripts_iter_loopVar);
        _scripts_iter_loopVar = MMC_CDR(_scripts_iter_loopVar);
        tmp6--;
      }
      if (tmp6 == 0) {
        tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _scripts_iter);
        __omcQ_24tmpVar206 = tmpMeta5;
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar206,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp6 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar207;
  }
  tmpMeta7 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_numThreads));
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_useThreads));
  tmpMeta1 = mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta2), mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT262, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar209;
    modelica_metatype* tmp10;
    modelica_metatype tmpMeta11;
    modelica_metatype tmpMeta12;
    modelica_metatype __omcQ_24tmpVar208;
    modelica_integer tmp17;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta11 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar209 = tmpMeta11; /* defaultValue */
    tmp10 = &__omcQ_24tmpVar209;
    while(1) {
      tmp17 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp17--;
      }
      if (tmp17 == 0) {
        { /* match expression */
          modelica_metatype tmp15_1;
          tmp15_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp15;
            int tmp16;
            tmp15 = 0;
            for (; tmp15 < 1; tmp15++) {
              switch (MMC_SWITCH_CAST(tmp15)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp15_1,3,1) == 0) goto tmp14_end;
                
                /* Pattern matching succeeded */
                tmpMeta12 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp14_done;
              }
              }
              goto tmp14_end;
              tmp14_end: ;
            }
            goto goto_13;
            goto_13:;
            MMC_THROW_INTERNAL();
            goto tmp14_done;
            tmp14_done:;
          }
        }__omcQ_24tmpVar208 = tmpMeta12;
        *tmp10 = mmc_mk_cons(__omcQ_24tmpVar208,0);
        tmp10 = &MMC_CDR(*tmp10);
      } else if (tmp17 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp10 = mmc_mk_nil();
    tmpMeta9 = __omcQ_24tmpVar209;
  }
  _res = tmpMeta9;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_runScriptParallel(threadData_t *threadData, modelica_metatype _scripts, modelica_metatype _numThreads, modelica_metatype _useThreads)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _res = NULL;
  tmp1 = mmc_unbox_integer(_numThreads);
  tmp2 = mmc_unbox_integer(_useThreads);
  _res = omc_OpenModelicaScriptingAPI_runScriptParallel(threadData, _scripts, tmp1, tmp2);
  /* skip box _res; list<#Boolean> */
  return _res;
}

DLLDirection
void omc_OpenModelicaScriptingAPI_exit(threadData_t *threadData, modelica_integer _status)
{
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_status));
  tmpMeta2 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT263, tmpMeta2, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,13,0) == 0) MMC_THROW_INTERNAL();
  _return: OMC_LABEL_UNUSED
  return;
}
void boxptr_OpenModelicaScriptingAPI_exit(threadData_t *threadData, modelica_metatype _status)
{
  modelica_integer tmp1;
  tmp1 = mmc_unbox_integer(_status);
  omc_OpenModelicaScriptingAPI_exit(threadData, tmp1);
  return;
}

DLLDirection
void omc_OpenModelicaScriptingAPI_threadWorkFailed(threadData_t *threadData)
{
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT264, tmpMeta2, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,13,0) == 0) MMC_THROW_INTERNAL();
  _return: OMC_LABEL_UNUSED
  return;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_getMemorySize(threadData_t *threadData)
{
  modelica_real _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_real tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT265, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_real(tmpMeta2);
  _res = tmp3  /* pattern as ty=Real */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getMemorySize(threadData_t *threadData)
{
  modelica_real _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_getMemorySize(threadData);
  out_res = mmc_mk_rcon(_res);
  return out_res;
}

DLLDirection
void omc_OpenModelicaScriptingAPI_GC__gcollect__and__unmap(threadData_t *threadData)
{
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta2 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT266, tmpMeta2, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,13,0) == 0) MMC_THROW_INTERNAL();
  _return: OMC_LABEL_UNUSED
  return;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_GC__expand__hp(threadData_t *threadData, modelica_integer _size)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_size));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT267, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_GC__expand__hp(threadData_t *threadData, modelica_metatype _size)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_size);
  _res = omc_OpenModelicaScriptingAPI_GC__expand__hp(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_GC__set__max__heap__size(threadData_t *threadData, modelica_integer _size)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_size));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT268, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_GC__set__max__heap__size(threadData_t *threadData, modelica_metatype _size)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_size);
  _res = omc_OpenModelicaScriptingAPI_GC__set__max__heap__size(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_checkInterfaceOfPackages(threadData_t *threadData, modelica_string _cl, modelica_metatype _dependencyMatrix)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  {
    modelica_metatype __omcQ_24tmpVar217;
    modelica_metatype* tmp8;
    modelica_metatype tmpMeta9;
    modelica_metatype tmpMeta10;
    modelica_metatype __omcQ_24tmpVar216;
    modelica_integer tmp15;
    modelica_metatype _dependencyMatrix_iter_loopVar = 0;
    modelica_metatype _dependencyMatrix_iter;
    _dependencyMatrix_iter_loopVar = _dependencyMatrix;
    tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar217 = tmpMeta9; /* defaultValue */
    tmp8 = &__omcQ_24tmpVar217;
    while(1) {
      tmp15 = 1;
      if (!listEmpty(_dependencyMatrix_iter_loopVar)) {
        _dependencyMatrix_iter = MMC_CAR(_dependencyMatrix_iter_loopVar);
        _dependencyMatrix_iter_loopVar = MMC_CDR(_dependencyMatrix_iter_loopVar);
        tmp15--;
      }
      if (tmp15 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar215;
          modelica_metatype* tmp11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype __omcQ_24tmpVar214;
          modelica_integer tmp14;
          modelica_metatype _dependencyMatrix_iter_iter_loopVar = 0;
          modelica_metatype _dependencyMatrix_iter_iter;
          _dependencyMatrix_iter_iter_loopVar = _dependencyMatrix_iter;
          tmpMeta12 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar215 = tmpMeta12; /* defaultValue */
          tmp11 = &__omcQ_24tmpVar215;
          while(1) {
            tmp14 = 1;
            if (!listEmpty(_dependencyMatrix_iter_iter_loopVar)) {
              _dependencyMatrix_iter_iter = MMC_CAR(_dependencyMatrix_iter_iter_loopVar);
              _dependencyMatrix_iter_iter_loopVar = MMC_CDR(_dependencyMatrix_iter_iter_loopVar);
              tmp14--;
            }
            if (tmp14 == 0) {
              tmpMeta13 = mmc_mk_box2(5, &Values_Value_STRING__desc, _dependencyMatrix_iter_iter);
              __omcQ_24tmpVar214 = tmpMeta13;
              *tmp11 = mmc_mk_cons(__omcQ_24tmpVar214,0);
              tmp11 = &MMC_CDR(*tmp11);
            } else if (tmp14 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp11 = mmc_mk_nil();
          tmpMeta10 = __omcQ_24tmpVar215;
        }
        __omcQ_24tmpVar216 = omc_ValuesUtil_makeArray(threadData, tmpMeta10);
        *tmp8 = mmc_mk_cons(__omcQ_24tmpVar216,0);
        tmp8 = &MMC_CDR(*tmp8);
      } else if (tmp15 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp8 = mmc_mk_nil();
    tmpMeta7 = __omcQ_24tmpVar217;
  }
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta7), MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT269, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_checkInterfaceOfPackages(threadData_t *threadData, modelica_metatype _cl, modelica_metatype _dependencyMatrix)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_checkInterfaceOfPackages(threadData, _cl, _dependencyMatrix);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_sortStrings(threadData_t *threadData, modelica_metatype _arr)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  {
    modelica_metatype __omcQ_24tmpVar221;
    modelica_metatype* tmp3;
    modelica_metatype tmpMeta4;
    modelica_metatype tmpMeta5;
    modelica_metatype __omcQ_24tmpVar220;
    modelica_integer tmp6;
    modelica_metatype _arr_iter_loopVar = 0;
    modelica_metatype _arr_iter;
    _arr_iter_loopVar = _arr;
    tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar221 = tmpMeta4; /* defaultValue */
    tmp3 = &__omcQ_24tmpVar221;
    while(1) {
      tmp6 = 1;
      if (!listEmpty(_arr_iter_loopVar)) {
        _arr_iter = MMC_CAR(_arr_iter_loopVar);
        _arr_iter_loopVar = MMC_CDR(_arr_iter_loopVar);
        tmp6--;
      }
      if (tmp6 == 0) {
        tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _arr_iter);
        __omcQ_24tmpVar220 = tmpMeta5;
        *tmp3 = mmc_mk_cons(__omcQ_24tmpVar220,0);
        tmp3 = &MMC_CDR(*tmp3);
      } else if (tmp6 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp3 = mmc_mk_nil();
    tmpMeta2 = __omcQ_24tmpVar221;
  }
  tmpMeta1 = mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta2), MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT270, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar223;
    modelica_metatype* tmp8;
    modelica_metatype tmpMeta9;
    modelica_string tmp10 = 0;
    modelica_string __omcQ_24tmpVar222;
    modelica_integer tmp15;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar223 = tmpMeta9; /* defaultValue */
    tmp8 = &__omcQ_24tmpVar223;
    while(1) {
      tmp15 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp15--;
      }
      if (tmp15 == 0) {
        { /* match expression */
          modelica_metatype tmp13_1;
          tmp13_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp13;
            int tmp14;
            tmp13 = 0;
            for (; tmp13 < 1; tmp13++) {
              switch (MMC_SWITCH_CAST(tmp13)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp13_1,2,1) == 0) goto tmp12_end;
                
                /* Pattern matching succeeded */
                tmp10 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp12_done;
              }
              }
              goto tmp12_end;
              tmp12_end: ;
            }
            goto goto_11;
            goto_11:;
            MMC_THROW_INTERNAL();
            goto tmp12_done;
            tmp12_done:;
          }
        }__omcQ_24tmpVar222 = tmp10;
        *tmp8 = mmc_mk_cons(__omcQ_24tmpVar222,0);
        tmp8 = &MMC_CDR(*tmp8);
      } else if (tmp15 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp8 = mmc_mk_nil();
    tmpMeta7 = __omcQ_24tmpVar223;
  }
  _res = tmpMeta7;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getClassInformation(threadData_t *threadData, modelica_string _cl, modelica_string *out_res2, modelica_boolean *out_res3, modelica_boolean *out_res4, modelica_boolean *out_res5, modelica_string *out_res6, modelica_boolean *out_res7, modelica_integer *out_res8, modelica_integer *out_res9, modelica_integer *out_res10, modelica_integer *out_res11, modelica_metatype *out_res12, modelica_boolean *out_res13, modelica_boolean *out_res14, modelica_string *out_res15, modelica_string *out_res16, modelica_boolean *out_res17, modelica_string *out_res18, modelica_string *out_res19, modelica_string *out_res20, modelica_string *out_res21, modelica_string *out_res22)
{
  modelica_string _res1 = NULL;
  modelica_string _res2 = NULL;
  modelica_boolean _res3;
  modelica_boolean _res4;
  modelica_boolean _res5;
  modelica_string _res6 = NULL;
  modelica_boolean _res7;
  modelica_integer _res8;
  modelica_integer _res9;
  modelica_integer _res10;
  modelica_integer _res11;
  modelica_metatype _res12 = NULL;
  modelica_boolean _res13;
  modelica_boolean _res14;
  modelica_string _res15 = NULL;
  modelica_string _res16 = NULL;
  modelica_boolean _res17;
  modelica_string _res18 = NULL;
  modelica_string _res19 = NULL;
  modelica_string _res20 = NULL;
  modelica_string _res21 = NULL;
  modelica_string _res22 = NULL;
  modelica_metatype _res12_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_integer tmp12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  modelica_integer tmp16;
  modelica_metatype tmpMeta17;
  modelica_metatype tmpMeta18;
  modelica_metatype tmpMeta19;
  modelica_integer tmp20;
  modelica_metatype tmpMeta21;
  modelica_metatype tmpMeta22;
  modelica_metatype tmpMeta23;
  modelica_metatype tmpMeta24;
  modelica_metatype tmpMeta25;
  modelica_metatype tmpMeta26;
  modelica_integer tmp27;
  modelica_metatype tmpMeta28;
  modelica_metatype tmpMeta29;
  modelica_metatype tmpMeta30;
  modelica_integer tmp31;
  modelica_metatype tmpMeta32;
  modelica_metatype tmpMeta33;
  modelica_metatype tmpMeta34;
  modelica_integer tmp35;
  modelica_metatype tmpMeta36;
  modelica_metatype tmpMeta37;
  modelica_metatype tmpMeta38;
  modelica_integer tmp39;
  modelica_metatype tmpMeta40;
  modelica_metatype tmpMeta41;
  modelica_metatype tmpMeta42;
  modelica_integer tmp43;
  modelica_metatype tmpMeta44;
  modelica_metatype tmpMeta45;
  modelica_metatype tmpMeta46;
  modelica_metatype tmpMeta47;
  modelica_metatype tmpMeta48;
  modelica_integer tmp49;
  modelica_metatype tmpMeta50;
  modelica_metatype tmpMeta51;
  modelica_metatype tmpMeta52;
  modelica_integer tmp53;
  modelica_metatype tmpMeta54;
  modelica_metatype tmpMeta55;
  modelica_metatype tmpMeta56;
  modelica_metatype tmpMeta57;
  modelica_metatype tmpMeta58;
  modelica_metatype tmpMeta59;
  modelica_metatype tmpMeta60;
  modelica_metatype tmpMeta61;
  modelica_metatype tmpMeta62;
  modelica_integer tmp63;
  modelica_metatype tmpMeta64;
  modelica_metatype tmpMeta65;
  modelica_metatype tmpMeta66;
  modelica_metatype tmpMeta67;
  modelica_metatype tmpMeta68;
  modelica_metatype tmpMeta69;
  modelica_metatype tmpMeta70;
  modelica_metatype tmpMeta71;
  modelica_metatype tmpMeta72;
  modelica_metatype tmpMeta73;
  modelica_metatype tmpMeta74;
  modelica_metatype tmpMeta75;
  modelica_metatype tmpMeta76;
  modelica_metatype tmpMeta77;
  modelica_metatype tmpMeta78;
  modelica_metatype tmpMeta79;
  modelica_metatype tmpMeta80;
  modelica_metatype tmpMeta81;
  modelica_metatype tmpMeta82;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  // _res4 has no default value.
  // _res5 has no default value.
  // _res6 has no default value.
  // _res7 has no default value.
  // _res8 has no default value.
  // _res9 has no default value.
  // _res10 has no default value.
  // _res11 has no default value.
  // _res12 has no default value.
  // _res13 has no default value.
  // _res14 has no default value.
  // _res15 has no default value.
  // _res16 has no default value.
  // _res17 has no default value.
  // _res18 has no default value.
  // _res19 has no default value.
  // _res20 has no default value.
  // _res21 has no default value.
  // _res22 has no default value.
  // _res12_arr has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta80 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta81 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta80);
  tmpMeta79 = mmc_mk_cons(tmpMeta81, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT271, tmpMeta79, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  if (listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_CAR(tmpMeta7);
  tmpMeta10 = MMC_CDR(tmpMeta7);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
  tmp12 = mmc_unbox_integer(tmpMeta11);
  if (listEmpty(tmpMeta10)) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_CAR(tmpMeta10);
  tmpMeta14 = MMC_CDR(tmpMeta10);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
  tmp16 = mmc_unbox_integer(tmpMeta15);
  if (listEmpty(tmpMeta14)) MMC_THROW_INTERNAL();
  tmpMeta17 = MMC_CAR(tmpMeta14);
  tmpMeta18 = MMC_CDR(tmpMeta14);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta17,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta17), 2));
  tmp20 = mmc_unbox_integer(tmpMeta19);
  if (listEmpty(tmpMeta18)) MMC_THROW_INTERNAL();
  tmpMeta21 = MMC_CAR(tmpMeta18);
  tmpMeta22 = MMC_CDR(tmpMeta18);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta21,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta23 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta21), 2));
  if (listEmpty(tmpMeta22)) MMC_THROW_INTERNAL();
  tmpMeta24 = MMC_CAR(tmpMeta22);
  tmpMeta25 = MMC_CDR(tmpMeta22);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta24,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta26 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta24), 2));
  tmp27 = mmc_unbox_integer(tmpMeta26);
  if (listEmpty(tmpMeta25)) MMC_THROW_INTERNAL();
  tmpMeta28 = MMC_CAR(tmpMeta25);
  tmpMeta29 = MMC_CDR(tmpMeta25);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta28,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta30 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta28), 2));
  tmp31 = mmc_unbox_integer(tmpMeta30);
  if (listEmpty(tmpMeta29)) MMC_THROW_INTERNAL();
  tmpMeta32 = MMC_CAR(tmpMeta29);
  tmpMeta33 = MMC_CDR(tmpMeta29);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta32,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta34 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta32), 2));
  tmp35 = mmc_unbox_integer(tmpMeta34);
  if (listEmpty(tmpMeta33)) MMC_THROW_INTERNAL();
  tmpMeta36 = MMC_CAR(tmpMeta33);
  tmpMeta37 = MMC_CDR(tmpMeta33);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta36,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta38 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta36), 2));
  tmp39 = mmc_unbox_integer(tmpMeta38);
  if (listEmpty(tmpMeta37)) MMC_THROW_INTERNAL();
  tmpMeta40 = MMC_CAR(tmpMeta37);
  tmpMeta41 = MMC_CDR(tmpMeta37);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta40,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta42 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta40), 2));
  tmp43 = mmc_unbox_integer(tmpMeta42);
  if (listEmpty(tmpMeta41)) MMC_THROW_INTERNAL();
  tmpMeta44 = MMC_CAR(tmpMeta41);
  tmpMeta45 = MMC_CDR(tmpMeta41);
  if (listEmpty(tmpMeta45)) MMC_THROW_INTERNAL();
  tmpMeta46 = MMC_CAR(tmpMeta45);
  tmpMeta47 = MMC_CDR(tmpMeta45);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta48 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta46), 2));
  tmp49 = mmc_unbox_integer(tmpMeta48);
  if (listEmpty(tmpMeta47)) MMC_THROW_INTERNAL();
  tmpMeta50 = MMC_CAR(tmpMeta47);
  tmpMeta51 = MMC_CDR(tmpMeta47);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta50,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta52 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta50), 2));
  tmp53 = mmc_unbox_integer(tmpMeta52);
  if (listEmpty(tmpMeta51)) MMC_THROW_INTERNAL();
  tmpMeta54 = MMC_CAR(tmpMeta51);
  tmpMeta55 = MMC_CDR(tmpMeta51);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta54,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta56 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta54), 2));
  if (listEmpty(tmpMeta55)) MMC_THROW_INTERNAL();
  tmpMeta57 = MMC_CAR(tmpMeta55);
  tmpMeta58 = MMC_CDR(tmpMeta55);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta59 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta57), 2));
  if (listEmpty(tmpMeta58)) MMC_THROW_INTERNAL();
  tmpMeta60 = MMC_CAR(tmpMeta58);
  tmpMeta61 = MMC_CDR(tmpMeta58);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta60,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta62 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta60), 2));
  tmp63 = mmc_unbox_integer(tmpMeta62);
  if (listEmpty(tmpMeta61)) MMC_THROW_INTERNAL();
  tmpMeta64 = MMC_CAR(tmpMeta61);
  tmpMeta65 = MMC_CDR(tmpMeta61);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta64,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta66 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta64), 2));
  if (listEmpty(tmpMeta65)) MMC_THROW_INTERNAL();
  tmpMeta67 = MMC_CAR(tmpMeta65);
  tmpMeta68 = MMC_CDR(tmpMeta65);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta67,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta69 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta67), 2));
  if (listEmpty(tmpMeta68)) MMC_THROW_INTERNAL();
  tmpMeta70 = MMC_CAR(tmpMeta68);
  tmpMeta71 = MMC_CDR(tmpMeta68);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta70,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta72 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta70), 2));
  if (listEmpty(tmpMeta71)) MMC_THROW_INTERNAL();
  tmpMeta73 = MMC_CAR(tmpMeta71);
  tmpMeta74 = MMC_CDR(tmpMeta71);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta73,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta75 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta73), 2));
  if (listEmpty(tmpMeta74)) MMC_THROW_INTERNAL();
  tmpMeta76 = MMC_CAR(tmpMeta74);
  tmpMeta77 = MMC_CDR(tmpMeta74);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta76,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta78 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta76), 2));
  if (!listEmpty(tmpMeta77)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmpMeta8;
  _res3 = tmp12  /* pattern as ty=Boolean */;
  _res4 = tmp16  /* pattern as ty=Boolean */;
  _res5 = tmp20  /* pattern as ty=Boolean */;
  _res6 = tmpMeta23;
  _res7 = tmp27  /* pattern as ty=Boolean */;
  _res8 = tmp31  /* pattern as ty=Integer */;
  _res9 = tmp35  /* pattern as ty=Integer */;
  _res10 = tmp39  /* pattern as ty=Integer */;
  _res11 = tmp43  /* pattern as ty=Integer */;
  _res12_arr = tmpMeta44;
  _res13 = tmp49  /* pattern as ty=Boolean */;
  _res14 = tmp53  /* pattern as ty=Boolean */;
  _res15 = tmpMeta56;
  _res16 = tmpMeta59;
  _res17 = tmp63  /* pattern as ty=Boolean */;
  _res18 = tmpMeta66;
  _res19 = tmpMeta69;
  _res20 = tmpMeta72;
  _res21 = tmpMeta75;
  _res22 = tmpMeta78;

  {
    modelica_metatype __omcQ_24tmpVar225;
    modelica_metatype* tmp83;
    modelica_metatype tmpMeta84;
    modelica_string tmp85 = 0;
    modelica_string __omcQ_24tmpVar224;
    modelica_integer tmp90;
    modelica_metatype _res12_arr_iter_loopVar = 0;
    modelica_metatype _res12_arr_iter;
    _res12_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res12_arr);
    tmpMeta84 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar225 = tmpMeta84; /* defaultValue */
    tmp83 = &__omcQ_24tmpVar225;
    while(1) {
      tmp90 = 1;
      if (!listEmpty(_res12_arr_iter_loopVar)) {
        _res12_arr_iter = MMC_CAR(_res12_arr_iter_loopVar);
        _res12_arr_iter_loopVar = MMC_CDR(_res12_arr_iter_loopVar);
        tmp90--;
      }
      if (tmp90 == 0) {
        { /* match expression */
          modelica_metatype tmp88_1;
          tmp88_1 = _res12_arr_iter;
          {
            volatile mmc_switch_type tmp88;
            int tmp89;
            tmp88 = 0;
            for (; tmp88 < 1; tmp88++) {
              switch (MMC_SWITCH_CAST(tmp88)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp88_1,2,1) == 0) goto tmp87_end;
                
                /* Pattern matching succeeded */
                tmp85 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res12_arr_iter), 2)));
                goto tmp87_done;
              }
              }
              goto tmp87_end;
              tmp87_end: ;
            }
            goto goto_86;
            goto_86:;
            MMC_THROW_INTERNAL();
            goto tmp87_done;
            tmp87_done:;
          }
        }__omcQ_24tmpVar224 = tmp85;
        *tmp83 = mmc_mk_cons(__omcQ_24tmpVar224,0);
        tmp83 = &MMC_CDR(*tmp83);
      } else if (tmp90 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp83 = mmc_mk_nil();
    tmpMeta82 = __omcQ_24tmpVar225;
  }
  _res12 = tmpMeta82;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  if (out_res4) { *out_res4 = _res4; }
  if (out_res5) { *out_res5 = _res5; }
  if (out_res6) { *out_res6 = _res6; }
  if (out_res7) { *out_res7 = _res7; }
  if (out_res8) { *out_res8 = _res8; }
  if (out_res9) { *out_res9 = _res9; }
  if (out_res10) { *out_res10 = _res10; }
  if (out_res11) { *out_res11 = _res11; }
  if (out_res12) { *out_res12 = _res12; }
  if (out_res13) { *out_res13 = _res13; }
  if (out_res14) { *out_res14 = _res14; }
  if (out_res15) { *out_res15 = _res15; }
  if (out_res16) { *out_res16 = _res16; }
  if (out_res17) { *out_res17 = _res17; }
  if (out_res18) { *out_res18 = _res18; }
  if (out_res19) { *out_res19 = _res19; }
  if (out_res20) { *out_res20 = _res20; }
  if (out_res21) { *out_res21 = _res21; }
  if (out_res22) { *out_res22 = _res22; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getClassInformation(threadData_t *threadData, modelica_metatype _cl, modelica_metatype *out_res2, modelica_metatype *out_res3, modelica_metatype *out_res4, modelica_metatype *out_res5, modelica_metatype *out_res6, modelica_metatype *out_res7, modelica_metatype *out_res8, modelica_metatype *out_res9, modelica_metatype *out_res10, modelica_metatype *out_res11, modelica_metatype *out_res12, modelica_metatype *out_res13, modelica_metatype *out_res14, modelica_metatype *out_res15, modelica_metatype *out_res16, modelica_metatype *out_res17, modelica_metatype *out_res18, modelica_metatype *out_res19, modelica_metatype *out_res20, modelica_metatype *out_res21, modelica_metatype *out_res22)
{
  modelica_boolean _res3;
  modelica_boolean _res4;
  modelica_boolean _res5;
  modelica_boolean _res7;
  modelica_integer _res8;
  modelica_integer _res9;
  modelica_integer _res10;
  modelica_integer _res11;
  modelica_boolean _res13;
  modelica_boolean _res14;
  modelica_boolean _res17;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_getClassInformation(threadData, _cl, out_res2, &_res3, &_res4, &_res5, out_res6, &_res7, &_res8, &_res9, &_res10, &_res11, out_res12, &_res13, &_res14, out_res15, out_res16, &_res17, out_res18, out_res19, out_res20, out_res21, out_res22);
  /* skip box _res1; String */
  /* skip box _res2; String */
  if (out_res3) { *out_res3 = mmc_mk_icon(_res3); }
  if (out_res4) { *out_res4 = mmc_mk_icon(_res4); }
  if (out_res5) { *out_res5 = mmc_mk_icon(_res5); }
  /* skip box _res6; String */
  if (out_res7) { *out_res7 = mmc_mk_icon(_res7); }
  if (out_res8) { *out_res8 = mmc_mk_icon(_res8); }
  if (out_res9) { *out_res9 = mmc_mk_icon(_res9); }
  if (out_res10) { *out_res10 = mmc_mk_icon(_res10); }
  if (out_res11) { *out_res11 = mmc_mk_icon(_res11); }
  /* skip box _res12; list<String> */
  if (out_res13) { *out_res13 = mmc_mk_icon(_res13); }
  if (out_res14) { *out_res14 = mmc_mk_icon(_res14); }
  /* skip box _res15; String */
  /* skip box _res16; String */
  if (out_res17) { *out_res17 = mmc_mk_icon(_res17); }
  /* skip box _res18; String */
  /* skip box _res19; String */
  /* skip box _res20; String */
  /* skip box _res21; String */
  /* skip box _res22; String */
  return _res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getDefaultComponentName(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT272, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getDefaultComponentPrefixes(threadData_t *threadData, modelica_string _cl)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta3 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT273, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getEnumerationLiterals(threadData_t *threadData, modelica_string _className)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT274, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar227;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_string tmp7 = 0;
    modelica_string __omcQ_24tmpVar226;
    modelica_integer tmp12;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar227 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar227;
    while(1) {
      tmp12 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp12--;
      }
      if (tmp12 == 0) {
        { /* match expression */
          modelica_metatype tmp10_1;
          tmp10_1 = _res_arr_iter;
          {
            volatile mmc_switch_type tmp10;
            int tmp11;
            tmp10 = 0;
            for (; tmp10 < 1; tmp10++) {
              switch (MMC_SWITCH_CAST(tmp10)) {
              case 0: {
                if (mmc__uniontype__metarecord__typedef__equal(tmp10_1,2,1) == 0) goto tmp9_end;
                
                /* Pattern matching succeeded */
                tmp7 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter), 2)));
                goto tmp9_done;
              }
              }
              goto tmp9_end;
              tmp9_end: ;
            }
            goto goto_8;
            goto_8:;
            MMC_THROW_INTERNAL();
            goto tmp9_done;
            tmp9_done:;
          }
        }__omcQ_24tmpVar226 = tmp7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar226,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp12 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar227;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getTransitions(threadData_t *threadData, modelica_string _cl)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT275, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar231;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_metatype tmpMeta7;
    modelica_metatype __omcQ_24tmpVar230;
    modelica_integer tmp16;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar231 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar231;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar229;
          modelica_metatype* tmp8;
          modelica_metatype tmpMeta9;
          modelica_string tmp10 = 0;
          modelica_string __omcQ_24tmpVar228;
          modelica_integer tmp15;
          modelica_metatype _res_arr_iter_iter_loopVar = 0;
          modelica_metatype _res_arr_iter_iter;
          _res_arr_iter_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr_iter);
          tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar229 = tmpMeta9; /* defaultValue */
          tmp8 = &__omcQ_24tmpVar229;
          while(1) {
            tmp15 = 1;
            if (!listEmpty(_res_arr_iter_iter_loopVar)) {
              _res_arr_iter_iter = MMC_CAR(_res_arr_iter_iter_loopVar);
              _res_arr_iter_iter_loopVar = MMC_CDR(_res_arr_iter_iter_loopVar);
              tmp15--;
            }
            if (tmp15 == 0) {
              { /* match expression */
                modelica_metatype tmp13_1;
                tmp13_1 = _res_arr_iter_iter;
                {
                  volatile mmc_switch_type tmp13;
                  int tmp14;
                  tmp13 = 0;
                  for (; tmp13 < 1; tmp13++) {
                    switch (MMC_SWITCH_CAST(tmp13)) {
                    case 0: {
                      if (mmc__uniontype__metarecord__typedef__equal(tmp13_1,2,1) == 0) goto tmp12_end;
                      
                      /* Pattern matching succeeded */
                      tmp10 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter_iter), 2)));
                      goto tmp12_done;
                    }
                    }
                    goto tmp12_end;
                    tmp12_end: ;
                  }
                  goto goto_11;
                  goto_11:;
                  MMC_THROW_INTERNAL();
                  goto tmp12_done;
                  tmp12_done:;
                }
              }__omcQ_24tmpVar228 = tmp10;
              *tmp8 = mmc_mk_cons(__omcQ_24tmpVar228,0);
              tmp8 = &MMC_CDR(*tmp8);
            } else if (tmp15 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp8 = mmc_mk_nil();
          tmpMeta7 = __omcQ_24tmpVar229;
        }
        __omcQ_24tmpVar230 = tmpMeta7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar230,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar231;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_deleteTransition(threadData_t *threadData, modelica_string _cl, modelica_string _from, modelica_string _to, modelica_string _condition, modelica_boolean _immediate, modelica_boolean _reset, modelica_boolean _synchronize, modelica_integer _priority)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _from);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _to);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _condition);
  tmpMeta10 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_immediate));
  tmpMeta11 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_reset));
  tmpMeta12 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_synchronize));
  tmpMeta13 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_priority));
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, MMC_REFSTRUCTLIT(mmc_nil)))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT276, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_deleteTransition(threadData_t *threadData, modelica_metatype _cl, modelica_metatype _from, modelica_metatype _to, modelica_metatype _condition, modelica_metatype _immediate, modelica_metatype _reset, modelica_metatype _synchronize, modelica_metatype _priority)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_immediate);
  tmp2 = mmc_unbox_integer(_reset);
  tmp3 = mmc_unbox_integer(_synchronize);
  tmp4 = mmc_unbox_integer(_priority);
  _res = omc_OpenModelicaScriptingAPI_deleteTransition(threadData, _cl, _from, _to, _condition, tmp1, tmp2, tmp3, tmp4);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_metatype omc_OpenModelicaScriptingAPI_getInitialStates(threadData_t *threadData, modelica_string _cl)
{
  modelica_metatype _res = NULL;
  modelica_metatype _res_arr = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_arr has no default value.
  tmpMeta2 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta3 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta2);
  tmpMeta1 = mmc_mk_cons(tmpMeta3, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT277, tmpMeta1, _OMC_LIT4 ,&_res_arr);

  {
    modelica_metatype __omcQ_24tmpVar235;
    modelica_metatype* tmp5;
    modelica_metatype tmpMeta6;
    modelica_metatype tmpMeta7;
    modelica_metatype __omcQ_24tmpVar234;
    modelica_integer tmp16;
    modelica_metatype _res_arr_iter_loopVar = 0;
    modelica_metatype _res_arr_iter;
    _res_arr_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr);
    tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar235 = tmpMeta6; /* defaultValue */
    tmp5 = &__omcQ_24tmpVar235;
    while(1) {
      tmp16 = 1;
      if (!listEmpty(_res_arr_iter_loopVar)) {
        _res_arr_iter = MMC_CAR(_res_arr_iter_loopVar);
        _res_arr_iter_loopVar = MMC_CDR(_res_arr_iter_loopVar);
        tmp16--;
      }
      if (tmp16 == 0) {
        {
          modelica_metatype __omcQ_24tmpVar233;
          modelica_metatype* tmp8;
          modelica_metatype tmpMeta9;
          modelica_string tmp10 = 0;
          modelica_string __omcQ_24tmpVar232;
          modelica_integer tmp15;
          modelica_metatype _res_arr_iter_iter_loopVar = 0;
          modelica_metatype _res_arr_iter_iter;
          _res_arr_iter_iter_loopVar = omc_ValuesUtil_arrayValues(threadData, _res_arr_iter);
          tmpMeta9 = MMC_REFSTRUCTLIT(mmc_nil);
          __omcQ_24tmpVar233 = tmpMeta9; /* defaultValue */
          tmp8 = &__omcQ_24tmpVar233;
          while(1) {
            tmp15 = 1;
            if (!listEmpty(_res_arr_iter_iter_loopVar)) {
              _res_arr_iter_iter = MMC_CAR(_res_arr_iter_iter_loopVar);
              _res_arr_iter_iter_loopVar = MMC_CDR(_res_arr_iter_iter_loopVar);
              tmp15--;
            }
            if (tmp15 == 0) {
              { /* match expression */
                modelica_metatype tmp13_1;
                tmp13_1 = _res_arr_iter_iter;
                {
                  volatile mmc_switch_type tmp13;
                  int tmp14;
                  tmp13 = 0;
                  for (; tmp13 < 1; tmp13++) {
                    switch (MMC_SWITCH_CAST(tmp13)) {
                    case 0: {
                      if (mmc__uniontype__metarecord__typedef__equal(tmp13_1,2,1) == 0) goto tmp12_end;
                      
                      /* Pattern matching succeeded */
                      tmp10 = (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_res_arr_iter_iter), 2)));
                      goto tmp12_done;
                    }
                    }
                    goto tmp12_end;
                    tmp12_end: ;
                  }
                  goto goto_11;
                  goto_11:;
                  MMC_THROW_INTERNAL();
                  goto tmp12_done;
                  tmp12_done:;
                }
              }__omcQ_24tmpVar232 = tmp10;
              *tmp8 = mmc_mk_cons(__omcQ_24tmpVar232,0);
              tmp8 = &MMC_CDR(*tmp8);
            } else if (tmp15 == 1) {
              break;
            } else {
              MMC_THROW_INTERNAL();
            }
          }
          *tmp8 = mmc_mk_nil();
          tmpMeta7 = __omcQ_24tmpVar233;
        }
        __omcQ_24tmpVar234 = tmpMeta7;
        *tmp5 = mmc_mk_cons(__omcQ_24tmpVar234,0);
        tmp5 = &MMC_CDR(*tmp5);
      } else if (tmp16 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp5 = mmc_mk_nil();
    tmpMeta4 = __omcQ_24tmpVar235;
  }
  _res = tmpMeta4;
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_deleteInitialState(threadData_t *threadData, modelica_string _cl, modelica_string _state)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _state);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT278, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_deleteInitialState(threadData_t *threadData, modelica_metatype _cl, modelica_metatype _state)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_deleteInitialState(threadData, _cl, _state);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_generateScriptingAPI(threadData_t *threadData, modelica_string _cl, modelica_string _name, modelica_string *out_res2, modelica_string *out_res3, modelica_string *out_res4)
{
  modelica_boolean _res1;
  modelica_string _res2 = NULL;
  modelica_string _res3 = NULL;
  modelica_string _res4 = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta17;
  modelica_metatype tmpMeta18;
  modelica_metatype tmpMeta19;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  // _res4 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta17 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _cl));
  tmpMeta18 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta17);
  tmpMeta19 = mmc_mk_box2(5, &Values_Value_STRING__desc, _name);
  tmpMeta16 = mmc_mk_cons(tmpMeta18, mmc_mk_cons(tmpMeta19, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT279, tmpMeta16, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta10 = MMC_CAR(tmpMeta8);
  tmpMeta11 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta10), 2));
  if (listEmpty(tmpMeta11)) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_CAR(tmpMeta11);
  tmpMeta14 = MMC_CDR(tmpMeta11);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta13,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta13), 2));
  if (!listEmpty(tmpMeta14)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Boolean */;
  _res2 = tmpMeta9;
  _res3 = tmpMeta12;
  _res4 = tmpMeta15;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  if (out_res4) { *out_res4 = _res4; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_generateScriptingAPI(threadData_t *threadData, modelica_metatype _cl, modelica_metatype _name, modelica_metatype *out_res2, modelica_metatype *out_res3, modelica_metatype *out_res4)
{
  modelica_boolean _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_generateScriptingAPI(threadData, _cl, _name, out_res2, out_res3, out_res4);
  out_res1 = mmc_mk_icon(_res1);
  /* skip box _res2; String */
  /* skip box _res3; String */
  /* skip box _res4; String */
  return out_res1;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_runConversionScript(threadData_t *threadData, modelica_string _packageToConvert, modelica_string _scriptFile)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _packageToConvert));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _scriptFile);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT280, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_runConversionScript(threadData_t *threadData, modelica_metatype _packageToConvert, modelica_metatype _scriptFile)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_runConversionScript(threadData, _packageToConvert, _scriptFile);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_convertPackageToLibrary(threadData_t *threadData, modelica_string _packageToConvert, modelica_string _library, modelica_string _libraryVersion)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _packageToConvert));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _library));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _libraryVersion);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT281, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_convertPackageToLibrary(threadData_t *threadData, modelica_metatype _packageToConvert, modelica_metatype _library, modelica_metatype _libraryVersion)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_convertPackageToLibrary(threadData, _packageToConvert, _library, _libraryVersion);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getModelInstance(threadData_t *threadData, modelica_string _className, modelica_string _context, modelica_string _modifier, modelica_boolean _prettyPrint)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _context));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _modifier);
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_prettyPrint));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT282, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getModelInstance(threadData_t *threadData, modelica_metatype _className, modelica_metatype _context, modelica_metatype _modifier, modelica_metatype _prettyPrint)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_prettyPrint);
  _res = omc_OpenModelicaScriptingAPI_getModelInstance(threadData, _className, _context, _modifier, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getModelInstanceAnnotation(threadData_t *threadData, modelica_string _className, modelica_metatype _filter, modelica_boolean _prettyPrint)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _className));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  {
    modelica_metatype __omcQ_24tmpVar239;
    modelica_metatype* tmp7;
    modelica_metatype tmpMeta8;
    modelica_metatype tmpMeta9;
    modelica_metatype __omcQ_24tmpVar238;
    modelica_integer tmp10;
    modelica_metatype _filter_iter_loopVar = 0;
    modelica_metatype _filter_iter;
    _filter_iter_loopVar = _filter;
    tmpMeta8 = MMC_REFSTRUCTLIT(mmc_nil);
    __omcQ_24tmpVar239 = tmpMeta8; /* defaultValue */
    tmp7 = &__omcQ_24tmpVar239;
    while(1) {
      tmp10 = 1;
      if (!listEmpty(_filter_iter_loopVar)) {
        _filter_iter = MMC_CAR(_filter_iter_loopVar);
        _filter_iter_loopVar = MMC_CDR(_filter_iter_loopVar);
        tmp10--;
      }
      if (tmp10 == 0) {
        tmpMeta9 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filter_iter);
        __omcQ_24tmpVar238 = tmpMeta9;
        *tmp7 = mmc_mk_cons(__omcQ_24tmpVar238,0);
        tmp7 = &MMC_CDR(*tmp7);
      } else if (tmp10 == 1) {
        break;
      } else {
        MMC_THROW_INTERNAL();
      }
    }
    *tmp7 = mmc_mk_nil();
    tmpMeta6 = __omcQ_24tmpVar239;
  }
  tmpMeta11 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_prettyPrint));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(omc_ValuesUtil_makeArray(threadData, tmpMeta6), mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT283, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getModelInstanceAnnotation(threadData_t *threadData, modelica_metatype _className, modelica_metatype _filter, modelica_metatype _prettyPrint)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_prettyPrint);
  _res = omc_OpenModelicaScriptingAPI_getModelInstanceAnnotation(threadData, _className, _filter, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_modifierToJSON(threadData_t *threadData, modelica_string _modifier, modelica_boolean _prettyPrint)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(5, &Values_Value_STRING__desc, _modifier);
  tmpMeta5 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_prettyPrint));
  tmpMeta3 = mmc_mk_cons(tmpMeta4, mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT284, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_modifierToJSON(threadData_t *threadData, modelica_metatype _modifier, modelica_metatype _prettyPrint)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_prettyPrint);
  _res = omc_OpenModelicaScriptingAPI_modifierToJSON(threadData, _modifier, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_storeAST(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT285, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_storeAST(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_storeAST(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_restoreAST(threadData_t *threadData, modelica_integer _id)
{
  modelica_boolean _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_id));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT286, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Boolean */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_restoreAST(threadData_t *threadData, modelica_metatype _id)
{
  modelica_integer tmp1;
  modelica_boolean _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_id);
  _res = omc_OpenModelicaScriptingAPI_restoreAST(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_qualifyPath(threadData_t *threadData, modelica_string _classPath, modelica_string _path)
{
  modelica_string _res = NULL;
  modelica_metatype _res_path = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  // _res_path has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _classPath));
  tmpMeta6 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta5);
  tmpMeta7 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _path));
  tmpMeta8 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta7);
  tmpMeta4 = mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT287, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,12,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta2,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
  _res_path = tmpMeta3;

  _res = omc_AbsynUtil_pathString(threadData, _res_path, _OMC_LIT207, 1 /* true */, 0 /* false */);
  _return: OMC_LABEL_UNUSED
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_getDefinitions(threadData_t *threadData, modelica_boolean _addFunctions)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_addFunctions));
  tmpMeta3 = mmc_mk_cons(tmpMeta4, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT288, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_getDefinitions(threadData_t *threadData, modelica_metatype _addFunctions)
{
  modelica_integer tmp1;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_addFunctions);
  _res = omc_OpenModelicaScriptingAPI_getDefinitions(threadData, tmp1);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_reverseLookup(threadData_t *threadData, modelica_string _name, modelica_string _scope, modelica_boolean _exactMatch, modelica_boolean _prettyPrint)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _name));
  tmpMeta5 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta4);
  tmpMeta6 = mmc_mk_box2(3, &Absyn_CodeNode_C__TYPENAME__desc, omc_Parser_stringPath(threadData, _scope));
  tmpMeta7 = mmc_mk_box2(15, &Values_Value_CODE__desc, tmpMeta6);
  tmpMeta8 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_exactMatch));
  tmpMeta9 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_prettyPrint));
  tmpMeta3 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT289, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_reverseLookup(threadData_t *threadData, modelica_metatype _name, modelica_metatype _scope, modelica_metatype _exactMatch, modelica_metatype _prettyPrint)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_string _res = NULL;
  tmp1 = mmc_unbox_integer(_exactMatch);
  tmp2 = mmc_unbox_integer(_prettyPrint);
  _res = omc_OpenModelicaScriptingAPI_reverseLookup(threadData, _name, _scope, tmp1, tmp2);
  /* skip box _res; String */
  return _res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_loadOMSimulator(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT290, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_loadOMSimulator(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_loadOMSimulator(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_unloadOMSimulator(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta4 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT291, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_unloadOMSimulator(threadData_t *threadData)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_unloadOMSimulator(threadData);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addBus(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT292, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addBus(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addBus(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addConnection(threadData_t *threadData, modelica_string _crefA, modelica_string _crefB)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _crefA);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _crefB);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT293, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addConnection(threadData_t *threadData, modelica_metatype _crefA, modelica_metatype _crefB)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addConnection(threadData, _crefA, _crefB);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addConnectorToBus(threadData_t *threadData, modelica_string _busCref, modelica_string _connectorCref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _busCref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _connectorCref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT294, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addConnectorToBus(threadData_t *threadData, modelica_metatype _busCref, modelica_metatype _connectorCref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addConnectorToBus(threadData, _busCref, _connectorCref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addConnectorToTLMBus(threadData_t *threadData, modelica_string _busCref, modelica_string _connectorCref, modelica_string _type_)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _busCref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _connectorCref);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _type_);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT295, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addConnectorToTLMBus(threadData_t *threadData, modelica_metatype _busCref, modelica_metatype _connectorCref, modelica_metatype _type_)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addConnectorToTLMBus(threadData, _busCref, _connectorCref, _type_);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addDynamicValueIndicator(threadData_t *threadData, modelica_string _signal, modelica_string _lower, modelica_string _upper, modelica_real _stepSize)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _signal);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _lower);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _upper);
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stepSize));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT296, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addDynamicValueIndicator(threadData_t *threadData, modelica_metatype _signal, modelica_metatype _lower, modelica_metatype _upper, modelica_metatype _stepSize)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_stepSize);
  _res = omc_OpenModelicaScriptingAPI_oms__addDynamicValueIndicator(threadData, _signal, _lower, _upper, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addEventIndicator(threadData_t *threadData, modelica_string _signal)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _signal);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT297, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addEventIndicator(threadData_t *threadData, modelica_metatype _signal)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addEventIndicator(threadData, _signal);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addExternalModel(threadData_t *threadData, modelica_string _cref, modelica_string _path, modelica_string _startscript)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _path);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _startscript);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT298, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addExternalModel(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _path, modelica_metatype _startscript)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addExternalModel(threadData, _cref, _path, _startscript);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addSignalsToResults(threadData_t *threadData, modelica_string _cref, modelica_string _regex)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _regex);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT299, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addSignalsToResults(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _regex)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addSignalsToResults(threadData, _cref, _regex);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addStaticValueIndicator(threadData_t *threadData, modelica_string _signal, modelica_real _lower, modelica_real _upper, modelica_real _stepSize)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _signal);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_lower));
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_upper));
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stepSize));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT300, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addStaticValueIndicator(threadData_t *threadData, modelica_metatype _signal, modelica_metatype _lower, modelica_metatype _upper, modelica_metatype _stepSize)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_lower);
  tmp2 = mmc_unbox_real(_upper);
  tmp3 = mmc_unbox_real(_stepSize);
  _res = omc_OpenModelicaScriptingAPI_oms__addStaticValueIndicator(threadData, _signal, tmp1, tmp2, tmp3);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addSubModel(threadData_t *threadData, modelica_string _cref, modelica_string _fmuPath)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _fmuPath);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT301, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addSubModel(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _fmuPath)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addSubModel(threadData, _cref, _fmuPath);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addTimeIndicator(threadData_t *threadData, modelica_string _signal)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _signal);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT302, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addTimeIndicator(threadData_t *threadData, modelica_metatype _signal)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__addTimeIndicator(threadData, _signal);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__addTLMConnection(threadData_t *threadData, modelica_string _crefA, modelica_string _crefB, modelica_real _delay, modelica_real _alpha, modelica_real _linearimpedance, modelica_real _angularimpedance)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _crefA);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _crefB);
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_delay));
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_alpha));
  tmpMeta9 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_linearimpedance));
  tmpMeta10 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_angularimpedance));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, MMC_REFSTRUCTLIT(mmc_nil)))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT303, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__addTLMConnection(threadData_t *threadData, modelica_metatype _crefA, modelica_metatype _crefB, modelica_metatype _delay, modelica_metatype _alpha, modelica_metatype _linearimpedance, modelica_metatype _angularimpedance)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_real tmp4;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_delay);
  tmp2 = mmc_unbox_real(_alpha);
  tmp3 = mmc_unbox_real(_linearimpedance);
  tmp4 = mmc_unbox_real(_angularimpedance);
  _res = omc_OpenModelicaScriptingAPI_oms__addTLMConnection(threadData, _crefA, _crefB, tmp1, tmp2, tmp3, tmp4);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__compareSimulationResults(threadData_t *threadData, modelica_string _filenameA, modelica_string _filenameB, modelica_string _var, modelica_real _relTol, modelica_real _absTol)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filenameA);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filenameB);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _var);
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relTol));
  tmpMeta9 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_absTol));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, MMC_REFSTRUCTLIT(mmc_nil))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT304, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__compareSimulationResults(threadData_t *threadData, modelica_metatype _filenameA, modelica_metatype _filenameB, modelica_metatype _var, modelica_metatype _relTol, modelica_metatype _absTol)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_relTol);
  tmp2 = mmc_unbox_real(_absTol);
  _res = omc_OpenModelicaScriptingAPI_oms__compareSimulationResults(threadData, _filenameA, _filenameB, _var, tmp1, tmp2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__copySystem(threadData_t *threadData, modelica_string _source, modelica_string _target)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _source);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _target);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT305, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__copySystem(threadData_t *threadData, modelica_metatype _source, modelica_metatype _target)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__copySystem(threadData, _source, _target);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__delete(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT306, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__delete(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__delete(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__deleteConnection(threadData_t *threadData, modelica_string _crefA, modelica_string _crefB)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _crefA);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _crefB);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT307, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__deleteConnection(threadData_t *threadData, modelica_metatype _crefA, modelica_metatype _crefB)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__deleteConnection(threadData, _crefA, _crefB);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__deleteConnectorFromBus(threadData_t *threadData, modelica_string _busCref, modelica_string _connectorCref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _busCref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _connectorCref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT308, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__deleteConnectorFromBus(threadData_t *threadData, modelica_metatype _busCref, modelica_metatype _connectorCref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__deleteConnectorFromBus(threadData, _busCref, _connectorCref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__deleteConnectorFromTLMBus(threadData_t *threadData, modelica_string _busCref, modelica_string _connectorCref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _busCref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _connectorCref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT309, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__deleteConnectorFromTLMBus(threadData_t *threadData, modelica_metatype _busCref, modelica_metatype _connectorCref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__deleteConnectorFromTLMBus(threadData, _busCref, _connectorCref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__export(threadData_t *threadData, modelica_string _cref, modelica_string _filename)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT310, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__export(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _filename)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__export(threadData, _cref, _filename);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__exportDependencyGraphs(threadData_t *threadData, modelica_string _cref, modelica_string _initialization, modelica_string _event, modelica_string _simulation)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _initialization);
  tmpMeta7 = mmc_mk_box2(5, &Values_Value_STRING__desc, _event);
  tmpMeta8 = mmc_mk_box2(5, &Values_Value_STRING__desc, _simulation);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT311, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__exportDependencyGraphs(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _initialization, modelica_metatype _event, modelica_metatype _simulation)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__exportDependencyGraphs(threadData, _cref, _initialization, _event, _simulation);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__exportSnapshot(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_string _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_integer tmp9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT312, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  tmp9 = mmc_unbox_integer(tmpMeta8);
  if (!listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmp9  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__exportSnapshot(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_oms__exportSnapshot(threadData, _cref, &_res2);
  /* skip box _res1; String */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__extractFMIKind(threadData_t *threadData, modelica_string _filename, modelica_integer *out_res2)
{
  modelica_integer _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT313, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Integer */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__extractFMIKind(threadData_t *threadData, modelica_metatype _filename, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_integer _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__extractFMIKind(threadData, _filename, &_res2);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_boolean omc_OpenModelicaScriptingAPI_oms__getBoolean(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_boolean _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT314, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,3,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Boolean */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getBoolean(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_boolean _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getBoolean(threadData, _cref, &_res2);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_oms__getFixedStepSize(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_real _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT315, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getFixedStepSize(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getFixedStepSize(threadData, _cref, &_res2);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__getInteger(threadData_t *threadData, modelica_string _cref, modelica_integer _value)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_value));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT316, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getInteger(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _value)
{
  modelica_integer tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_value);
  _res = omc_OpenModelicaScriptingAPI_oms__getInteger(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__getModelState(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_integer _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT317, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Integer */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getModelState(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_integer _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getModelState(threadData, _cref, &_res2);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_oms__getReal(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_real _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT318, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getReal(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getReal(threadData, _cref, &_res2);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__getSolver(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_integer _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT319, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Integer */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getSolver(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_integer _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getSolver(threadData, _cref, &_res2);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_oms__getStartTime(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_real _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT320, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getStartTime(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getStartTime(threadData, _cref, &_res2);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_oms__getStopTime(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_real _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT321, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getStopTime(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getStopTime(threadData, _cref, &_res2);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__getSubModelPath(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_string _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_integer tmp9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT322, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  tmp9 = mmc_unbox_integer(tmpMeta8);
  if (!listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmp9  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getSubModelPath(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getSubModelPath(threadData, _cref, &_res2);
  /* skip box _res1; String */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__getSystemType(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_integer _res1;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_integer tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_integer tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta11 = mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT323, tmpMeta11, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_integer(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_integer(tmpMeta9);
  if (!listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Integer */;
  _res2 = tmp10  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getSystemType(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_integer _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getSystemType(threadData, _cref, &_res2);
  out_res1 = mmc_mk_icon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return out_res1;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_oms__getTolerance(threadData_t *threadData, modelica_string _cref, modelica_real *out_res2, modelica_integer *out_res3)
{
  modelica_real _res1;
  modelica_real _res2;
  modelica_integer _res3;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_real tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_integer tmp14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta16 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta15 = mmc_mk_cons(tmpMeta16, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT324, tmpMeta15, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_real(tmpMeta9);
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_CAR(tmpMeta8);
  tmpMeta12 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
  tmp14 = mmc_unbox_integer(tmpMeta13);
  if (!listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Real */;
  _res3 = tmp14  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getTolerance(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2, modelica_metatype *out_res3)
{
  modelica_real _res2;
  modelica_integer _res3;
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getTolerance(threadData, _cref, &_res2, &_res3);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_rcon(_res2); }
  if (out_res3) { *out_res3 = mmc_mk_icon(_res3); }
  return out_res1;
}

DLLDirection
modelica_real omc_OpenModelicaScriptingAPI_oms__getVariableStepSize(threadData_t *threadData, modelica_string _cref, modelica_real *out_res2, modelica_real *out_res3, modelica_integer *out_res4)
{
  modelica_real _res1;
  modelica_real _res2;
  modelica_real _res3;
  modelica_integer _res4;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_real tmp6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_real tmp10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_real tmp14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta17;
  modelica_integer tmp18;
  modelica_metatype tmpMeta19;
  modelica_metatype tmpMeta20;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  // _res3 has no default value.
  // _res4 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta20 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta19 = mmc_mk_cons(tmpMeta20, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT325, tmpMeta19, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  tmp6 = mmc_unbox_real(tmpMeta5);
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta7 = MMC_CAR(tmpMeta4);
  tmpMeta8 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
  tmp10 = mmc_unbox_real(tmpMeta9);
  if (listEmpty(tmpMeta8)) MMC_THROW_INTERNAL();
  tmpMeta11 = MMC_CAR(tmpMeta8);
  tmpMeta12 = MMC_CDR(tmpMeta8);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,1,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 2));
  tmp14 = mmc_unbox_real(tmpMeta13);
  if (listEmpty(tmpMeta12)) MMC_THROW_INTERNAL();
  tmpMeta15 = MMC_CAR(tmpMeta12);
  tmpMeta16 = MMC_CDR(tmpMeta12);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
  tmp18 = mmc_unbox_integer(tmpMeta17);
  if (!listEmpty(tmpMeta16)) MMC_THROW_INTERNAL();
  _res1 = tmp6  /* pattern as ty=Real */;
  _res2 = tmp10  /* pattern as ty=Real */;
  _res3 = tmp14  /* pattern as ty=Real */;
  _res4 = tmp18  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  if (out_res3) { *out_res3 = _res3; }
  if (out_res4) { *out_res4 = _res4; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__getVariableStepSize(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2, modelica_metatype *out_res3, modelica_metatype *out_res4)
{
  modelica_real _res2;
  modelica_real _res3;
  modelica_integer _res4;
  modelica_real _res1;
  modelica_metatype out_res1;
  _res1 = omc_OpenModelicaScriptingAPI_oms__getVariableStepSize(threadData, _cref, &_res2, &_res3, &_res4);
  out_res1 = mmc_mk_rcon(_res1);
  if (out_res2) { *out_res2 = mmc_mk_rcon(_res2); }
  if (out_res3) { *out_res3 = mmc_mk_rcon(_res3); }
  if (out_res4) { *out_res4 = mmc_mk_icon(_res4); }
  return out_res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__importFile(threadData_t *threadData, modelica_string _filename, modelica_integer *out_res2)
{
  modelica_string _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_integer tmp9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT326, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  tmp9 = mmc_unbox_integer(tmpMeta8);
  if (!listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmp9  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__importFile(threadData_t *threadData, modelica_metatype _filename, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_oms__importFile(threadData, _filename, &_res2);
  /* skip box _res1; String */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__importSnapshot(threadData_t *threadData, modelica_string _cref, modelica_string _snapshot)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _snapshot);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT327, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__importSnapshot(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _snapshot)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__importSnapshot(threadData, _cref, _snapshot);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__initialize(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT328, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__initialize(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__initialize(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__instantiate(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT329, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__instantiate(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__instantiate(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__list(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_string _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_integer tmp9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT330, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  tmp9 = mmc_unbox_integer(tmpMeta8);
  if (!listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmp9  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__list(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_oms__list(threadData, _cref, &_res2);
  /* skip box _res1; String */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__listUnconnectedConnectors(threadData_t *threadData, modelica_string _cref, modelica_integer *out_res2)
{
  modelica_string _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_integer tmp9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT331, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  tmp9 = mmc_unbox_integer(tmpMeta8);
  if (!listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmp9  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__listUnconnectedConnectors(threadData_t *threadData, modelica_metatype _cref, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_oms__listUnconnectedConnectors(threadData, _cref, &_res2);
  /* skip box _res1; String */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__loadSnapshot(threadData_t *threadData, modelica_string _cref, modelica_string _snapshot, modelica_integer *out_res2)
{
  modelica_string _res1 = NULL;
  modelica_integer _res2;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_integer tmp9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res1 has no default value.
  // _res2 has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta11 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta12 = mmc_mk_box2(5, &Values_Value_STRING__desc, _snapshot);
  tmpMeta10 = mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT332, tmpMeta10, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,8,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  if (listEmpty(tmpMeta2)) MMC_THROW_INTERNAL();
  tmpMeta3 = MMC_CAR(tmpMeta2);
  tmpMeta4 = MMC_CDR(tmpMeta2);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta3,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta3), 2));
  if (listEmpty(tmpMeta4)) MMC_THROW_INTERNAL();
  tmpMeta6 = MMC_CAR(tmpMeta4);
  tmpMeta7 = MMC_CDR(tmpMeta4);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
  tmp9 = mmc_unbox_integer(tmpMeta8);
  if (!listEmpty(tmpMeta7)) MMC_THROW_INTERNAL();
  _res1 = tmpMeta5;
  _res2 = tmp9  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  if (out_res2) { *out_res2 = _res2; }
  return _res1;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__loadSnapshot(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _snapshot, modelica_metatype *out_res2)
{
  modelica_integer _res2;
  modelica_string _res1 = NULL;
  _res1 = omc_OpenModelicaScriptingAPI_oms__loadSnapshot(threadData, _cref, _snapshot, &_res2);
  /* skip box _res1; String */
  if (out_res2) { *out_res2 = mmc_mk_icon(_res2); }
  return _res1;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__newModel(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT333, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__newModel(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__newModel(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__removeSignalsFromResults(threadData_t *threadData, modelica_string _cref, modelica_string _regex)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _regex);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT334, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__removeSignalsFromResults(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _regex)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__removeSignalsFromResults(threadData, _cref, _regex);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__rename(threadData_t *threadData, modelica_string _cref, modelica_string _newCref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newCref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT335, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__rename(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _newCref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__rename(threadData, _cref, _newCref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__reset(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT336, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__reset(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__reset(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__RunFile(threadData_t *threadData, modelica_string _filename)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT337, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__RunFile(threadData_t *threadData, modelica_metatype _filename)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__RunFile(threadData, _filename);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setBoolean(threadData_t *threadData, modelica_string _cref, modelica_boolean _value)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(6, &Values_Value_BOOL__desc, mmc_mk_boolean(_value));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT338, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setBoolean(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _value)
{
  modelica_integer tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_value);
  _res = omc_OpenModelicaScriptingAPI_oms__setBoolean(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setCommandLineOption(threadData_t *threadData, modelica_string _cmd)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cmd);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT339, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setCommandLineOption(threadData_t *threadData, modelica_metatype _cmd)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__setCommandLineOption(threadData, _cmd);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setFixedStepSize(threadData_t *threadData, modelica_string _cref, modelica_real _stepSize)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stepSize));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT340, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setFixedStepSize(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _stepSize)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_stepSize);
  _res = omc_OpenModelicaScriptingAPI_oms__setFixedStepSize(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setInteger(threadData_t *threadData, modelica_string _cref, modelica_integer _value)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_value));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT341, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setInteger(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _value)
{
  modelica_integer tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_value);
  _res = omc_OpenModelicaScriptingAPI_oms__setInteger(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setLogFile(threadData_t *threadData, modelica_string _filename)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT342, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setLogFile(threadData_t *threadData, modelica_metatype _filename)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__setLogFile(threadData, _filename);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setLoggingInterval(threadData_t *threadData, modelica_string _cref, modelica_real _loggingInterval)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_loggingInterval));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT343, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setLoggingInterval(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _loggingInterval)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_loggingInterval);
  _res = omc_OpenModelicaScriptingAPI_oms__setLoggingInterval(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setLoggingLevel(threadData_t *threadData, modelica_integer _logLevel)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_logLevel));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT344, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setLoggingLevel(threadData_t *threadData, modelica_metatype _logLevel)
{
  modelica_integer tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_logLevel);
  _res = omc_OpenModelicaScriptingAPI_oms__setLoggingLevel(threadData, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setReal(threadData_t *threadData, modelica_string _cref, modelica_real _value)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_value));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT345, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setReal(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _value)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_value);
  _res = omc_OpenModelicaScriptingAPI_oms__setReal(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setRealInputDerivative(threadData_t *threadData, modelica_string _cref, modelica_real _value)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_value));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT346, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setRealInputDerivative(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _value)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_value);
  _res = omc_OpenModelicaScriptingAPI_oms__setRealInputDerivative(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setResultFile(threadData_t *threadData, modelica_string _cref, modelica_string _filename, modelica_integer _bufferSize)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _filename);
  tmpMeta7 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_bufferSize));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT347, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setResultFile(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _filename, modelica_metatype _bufferSize)
{
  modelica_integer tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_bufferSize);
  _res = omc_OpenModelicaScriptingAPI_oms__setResultFile(threadData, _cref, _filename, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setSignalFilter(threadData_t *threadData, modelica_string _cref, modelica_string _regex)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _regex);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT348, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setSignalFilter(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _regex)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__setSignalFilter(threadData, _cref, _regex);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setStartTime(threadData_t *threadData, modelica_string _cref, modelica_real _startTime)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_startTime));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT349, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setStartTime(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _startTime)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_startTime);
  _res = omc_OpenModelicaScriptingAPI_oms__setStartTime(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setStopTime(threadData_t *threadData, modelica_string _cref, modelica_real _stopTime)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stopTime));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT350, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setStopTime(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _stopTime)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_stopTime);
  _res = omc_OpenModelicaScriptingAPI_oms__setStopTime(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setTempDirectory(threadData_t *threadData, modelica_string _newTempDir)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newTempDir);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT351, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setTempDirectory(threadData_t *threadData, modelica_metatype _newTempDir)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__setTempDirectory(threadData, _newTempDir);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setTLMPositionAndOrientation(threadData_t *threadData, modelica_string _cref, modelica_real _x1, modelica_real _x2, modelica_real _x3, modelica_real _A11, modelica_real _A12, modelica_real _A13, modelica_real _A21, modelica_real _A22, modelica_real _A23, modelica_real _A31, modelica_real _A32, modelica_real _A33)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  modelica_metatype tmpMeta9;
  modelica_metatype tmpMeta10;
  modelica_metatype tmpMeta11;
  modelica_metatype tmpMeta12;
  modelica_metatype tmpMeta13;
  modelica_metatype tmpMeta14;
  modelica_metatype tmpMeta15;
  modelica_metatype tmpMeta16;
  modelica_metatype tmpMeta17;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_x1));
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_x2));
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_x3));
  tmpMeta9 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A11));
  tmpMeta10 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A12));
  tmpMeta11 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A13));
  tmpMeta12 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A21));
  tmpMeta13 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A22));
  tmpMeta14 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A23));
  tmpMeta15 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A31));
  tmpMeta16 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A32));
  tmpMeta17 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_A33));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, mmc_mk_cons(tmpMeta9, mmc_mk_cons(tmpMeta10, mmc_mk_cons(tmpMeta11, mmc_mk_cons(tmpMeta12, mmc_mk_cons(tmpMeta13, mmc_mk_cons(tmpMeta14, mmc_mk_cons(tmpMeta15, mmc_mk_cons(tmpMeta16, mmc_mk_cons(tmpMeta17, MMC_REFSTRUCTLIT(mmc_nil))))))))))))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT352, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setTLMPositionAndOrientation(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _x1, modelica_metatype _x2, modelica_metatype _x3, modelica_metatype _A11, modelica_metatype _A12, modelica_metatype _A13, modelica_metatype _A21, modelica_metatype _A22, modelica_metatype _A23, modelica_metatype _A31, modelica_metatype _A32, modelica_metatype _A33)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_real tmp4;
  modelica_real tmp5;
  modelica_real tmp6;
  modelica_real tmp7;
  modelica_real tmp8;
  modelica_real tmp9;
  modelica_real tmp10;
  modelica_real tmp11;
  modelica_real tmp12;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_x1);
  tmp2 = mmc_unbox_real(_x2);
  tmp3 = mmc_unbox_real(_x3);
  tmp4 = mmc_unbox_real(_A11);
  tmp5 = mmc_unbox_real(_A12);
  tmp6 = mmc_unbox_real(_A13);
  tmp7 = mmc_unbox_real(_A21);
  tmp8 = mmc_unbox_real(_A22);
  tmp9 = mmc_unbox_real(_A23);
  tmp10 = mmc_unbox_real(_A31);
  tmp11 = mmc_unbox_real(_A32);
  tmp12 = mmc_unbox_real(_A33);
  _res = omc_OpenModelicaScriptingAPI_oms__setTLMPositionAndOrientation(threadData, _cref, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, tmp7, tmp8, tmp9, tmp10, tmp11, tmp12);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setTLMSocketData(threadData_t *threadData, modelica_string _cref, modelica_string _address, modelica_integer _managerPort, modelica_integer _monitorPort)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(5, &Values_Value_STRING__desc, _address);
  tmpMeta7 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_managerPort));
  tmpMeta8 = mmc_mk_box2(3, &Values_Value_INTEGER__desc, mmc_mk_integer(_monitorPort));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT353, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setTLMSocketData(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _address, modelica_metatype _managerPort, modelica_metatype _monitorPort)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_integer(_managerPort);
  tmp2 = mmc_unbox_integer(_monitorPort);
  _res = omc_OpenModelicaScriptingAPI_oms__setTLMSocketData(threadData, _cref, _address, tmp1, tmp2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setTolerance(threadData_t *threadData, modelica_string _cref, modelica_real _absoluteTolerance, modelica_real _relativeTolerance)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_absoluteTolerance));
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_relativeTolerance));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, MMC_REFSTRUCTLIT(mmc_nil))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT354, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setTolerance(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _absoluteTolerance, modelica_metatype _relativeTolerance)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_absoluteTolerance);
  tmp2 = mmc_unbox_real(_relativeTolerance);
  _res = omc_OpenModelicaScriptingAPI_oms__setTolerance(threadData, _cref, tmp1, tmp2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setVariableStepSize(threadData_t *threadData, modelica_string _cref, modelica_real _initialStepSize, modelica_real _minimumStepSize, modelica_real _maximumStepSize)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  modelica_metatype tmpMeta7;
  modelica_metatype tmpMeta8;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_initialStepSize));
  tmpMeta7 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_minimumStepSize));
  tmpMeta8 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_maximumStepSize));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, mmc_mk_cons(tmpMeta7, mmc_mk_cons(tmpMeta8, MMC_REFSTRUCTLIT(mmc_nil)))));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT355, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setVariableStepSize(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _initialStepSize, modelica_metatype _minimumStepSize, modelica_metatype _maximumStepSize)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_initialStepSize);
  tmp2 = mmc_unbox_real(_minimumStepSize);
  tmp3 = mmc_unbox_real(_maximumStepSize);
  _res = omc_OpenModelicaScriptingAPI_oms__setVariableStepSize(threadData, _cref, tmp1, tmp2, tmp3);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__setWorkingDirectory(threadData_t *threadData, modelica_string _newWorkingDir)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _newWorkingDir);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT356, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__setWorkingDirectory(threadData_t *threadData, modelica_metatype _newWorkingDir)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__setWorkingDirectory(threadData, _newWorkingDir);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__simulate(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT357, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__simulate(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__simulate(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__stepUntil(threadData_t *threadData, modelica_string _cref, modelica_real _stopTime)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta6 = mmc_mk_box2(4, &Values_Value_REAL__desc, mmc_mk_real(_stopTime));
  tmpMeta4 = mmc_mk_cons(tmpMeta5, mmc_mk_cons(tmpMeta6, MMC_REFSTRUCTLIT(mmc_nil)));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT358, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__stepUntil(threadData_t *threadData, modelica_metatype _cref, modelica_metatype _stopTime)
{
  modelica_real tmp1;
  modelica_integer _res;
  modelica_metatype out_res;
  tmp1 = mmc_unbox_real(_stopTime);
  _res = omc_OpenModelicaScriptingAPI_oms__stepUntil(threadData, _cref, tmp1);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_integer omc_OpenModelicaScriptingAPI_oms__terminate(threadData_t *threadData, modelica_string _cref)
{
  modelica_integer _res;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_integer tmp3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta5 = mmc_mk_box2(5, &Values_Value_STRING__desc, _cref);
  tmpMeta4 = mmc_mk_cons(tmpMeta5, MMC_REFSTRUCTLIT(mmc_nil));
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT359, tmpMeta4, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,0,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  tmp3 = mmc_unbox_integer(tmpMeta2);
  _res = tmp3  /* pattern as ty=Integer */;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_OpenModelicaScriptingAPI_oms__terminate(threadData_t *threadData, modelica_metatype _cref)
{
  modelica_integer _res;
  modelica_metatype out_res;
  _res = omc_OpenModelicaScriptingAPI_oms__terminate(threadData, _cref);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_string omc_OpenModelicaScriptingAPI_oms__getVersion(threadData_t *threadData)
{
  modelica_string _res = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  /* Pattern-matching tuple assignment, wild first pattern */
  tmpMeta3 = MMC_REFSTRUCTLIT(mmc_nil);
  omc_CevalScript_cevalInteractiveFunctions2(threadData, omc_FCore_emptyCache(threadData), omc_FGraph_empty(threadData), _OMC_LIT360, tmpMeta3, _OMC_LIT4, &tmpMeta1);
  if (mmc__uniontype__metarecord__typedef__equal(tmpMeta1,2,1) == 0) MMC_THROW_INTERNAL();
  tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 2));
  _res = tmpMeta2;
  _return: OMC_LABEL_UNUSED
  return _res;
}

