#include "omc_simulation_settings.h"
#include "CodegenFMUCommon.h"
#define _OMC_LIT0_data "startTime=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,11,_OMC_LIT0_data);
#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT1,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT0}};
#define _OMC_LIT1 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT1)
#define _OMC_LIT2_data "\" stopTime=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,12,_OMC_LIT2_data);
#define _OMC_LIT2 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT3,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT2}};
#define _OMC_LIT3 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT3)
#define _OMC_LIT4_data "\" tolerance=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT4,13,_OMC_LIT4_data);
#define _OMC_LIT4 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT4)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT5,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT4}};
#define _OMC_LIT5 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT5)
#define _OMC_LIT6_data "\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT6,1,_OMC_LIT6_data);
#define _OMC_LIT6 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT6)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT7,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT6}};
#define _OMC_LIT7 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT7)
#define _OMC_LIT8_data "\" stepSize=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT8,12,_OMC_LIT8_data);
#define _OMC_LIT8 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT8)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT9,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT8}};
#define _OMC_LIT9 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "<DefaultExperiment "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,19,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT11,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT10}};
#define _OMC_LIT11 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT11)
#define _OMC_LIT12_data "/>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT12,2,_OMC_LIT12_data);
#define _OMC_LIT12 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT12)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT13,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT12}};
#define _OMC_LIT13 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT13)
#define _OMC_LIT14_data "<Type name=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT14,12,_OMC_LIT14_data);
#define _OMC_LIT14 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT14)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT15,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT14}};
#define _OMC_LIT15 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT15)
#define _OMC_LIT16_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT16,1,_OMC_LIT16_data);
#define _OMC_LIT16 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "\">\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,3,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
#define _OMC_LIT18_data "  <EnumerationType>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT18,20,_OMC_LIT18_data);
#define _OMC_LIT18 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT18)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT19,2,1) {_OMC_LIT18,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT19 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT19)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT20,2,1) {_OMC_LIT17,_OMC_LIT19}};
#define _OMC_LIT20 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT20)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT21,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT20,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT21 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT21)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,2,4) {&Tpl_BlockType_BT__INDENT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(4))}};
#define _OMC_LIT22 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT23,1,3) {&Tpl_StringToken_ST__NEW__LINE__desc,}};
#define _OMC_LIT23 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT23)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT24,1,1) {_OMC_LIT23}};
#define _OMC_LIT24 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT24)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT25,9,3) {&Tpl_IterOptions_ITER__OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT24,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT23,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT23}};
#define _OMC_LIT25 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT25)
#define _OMC_LIT26_data "  </EnumerationType>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT26,21,_OMC_LIT26_data);
#define _OMC_LIT26 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT26)
#define _OMC_LIT27_data "</Type>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT27,7,_OMC_LIT27_data);
#define _OMC_LIT27 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT27)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT28,2,1) {_OMC_LIT27,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT28 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT28)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT29,2,1) {_OMC_LIT26,_OMC_LIT28}};
#define _OMC_LIT29 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT29)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT30,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT29,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT30 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT30)
#define _OMC_LIT31_data "<SimpleType name=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT31,18,_OMC_LIT31_data);
#define _OMC_LIT31 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT31)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT32,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT31}};
#define _OMC_LIT32 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT32)
#define _OMC_LIT33_data "  <Enumeration>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT33,16,_OMC_LIT33_data);
#define _OMC_LIT33 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT33)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT34,2,1) {_OMC_LIT33,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT34 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT34)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT35,2,1) {_OMC_LIT17,_OMC_LIT34}};
#define _OMC_LIT35 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT35)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT36,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT35,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT36 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT36)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT37,9,3) {&Tpl_IterOptions_ITER__OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT24,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT23,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT23}};
#define _OMC_LIT37 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT37)
#define _OMC_LIT38_data "  </Enumeration>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT38,17,_OMC_LIT38_data);
#define _OMC_LIT38 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT38)
#define _OMC_LIT39_data "</SimpleType>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT39,13,_OMC_LIT39_data);
#define _OMC_LIT39 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT39)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT40,2,1) {_OMC_LIT39,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT40 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT40)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT41,2,1) {_OMC_LIT38,_OMC_LIT40}};
#define _OMC_LIT41 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT41)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT42,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT41,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT42 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT42)
#define _OMC_LIT43_data "<Item name=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT43,12,_OMC_LIT43_data);
#define _OMC_LIT43 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT43)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT44,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT43}};
#define _OMC_LIT44 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT44)
#define _OMC_LIT45_data "\" value=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT45,9,_OMC_LIT45_data);
#define _OMC_LIT45 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT45)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT46,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT45}};
#define _OMC_LIT46 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "\"/>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,3,_OMC_LIT47_data);
#define _OMC_LIT47 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT47)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT48,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT47}};
#define _OMC_LIT48 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT48)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT49,3,3) {&Tpl_Text_MEM__TEXT__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT49 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,0,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
#define _OMC_LIT51_data "<TypeDefinitions>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT51,18,_OMC_LIT51_data);
#define _OMC_LIT51 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT51}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT53,2,4) {&Tpl_BlockType_BT__INDENT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(2))}};
#define _OMC_LIT53 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "</TypeDefinitions>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,18,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT55,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT54}};
#define _OMC_LIT55 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT55)
#define _OMC_LIT56_data "exportClocksInModelDescription"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT56,30,_OMC_LIT56_data);
#define _OMC_LIT56 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT56)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT57,1,4) {&Flags_FlagVisibility_EXTERNAL__desc,}};
#define _OMC_LIT57 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT57)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT58,2,4) {&Flags_FlagData_BOOL__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT58 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT58)
#define _OMC_LIT59_data "exports clocks in modeldescription.xml for fmus, The default is false."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT59,70,_OMC_LIT59_data);
#define _OMC_LIT59 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT59)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT60,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT59}};
#define _OMC_LIT60 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT60)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT61,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(144)),_OMC_LIT56,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT57,_OMC_LIT58,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT60}};
#define _OMC_LIT61 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT61)
#define _OMC_LIT62_data "<BaseUnit "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT62,10,_OMC_LIT62_data);
#define _OMC_LIT62 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT62)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT63,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT62}};
#define _OMC_LIT63 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT63)
#define _OMC_LIT64_data "offset=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT64,8,_OMC_LIT64_data);
#define _OMC_LIT64 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT64)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT65,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT64}};
#define _OMC_LIT65 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT65)
#define _OMC_LIT66_data "\" "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT66,2,_OMC_LIT66_data);
#define _OMC_LIT66 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT66)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT67,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT66}};
#define _OMC_LIT67 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT67)
#define _OMC_LIT68_data "factor=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT68,8,_OMC_LIT68_data);
#define _OMC_LIT68 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT68)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT69,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT68}};
#define _OMC_LIT69 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT69)
#define _OMC_LIT70_data "cd=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT70,4,_OMC_LIT70_data);
#define _OMC_LIT70 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT70)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT71,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT70}};
#define _OMC_LIT71 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT71)
#define _OMC_LIT72_data "mol=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT72,5,_OMC_LIT72_data);
#define _OMC_LIT72 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT72)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT73,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT72}};
#define _OMC_LIT73 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT73)
#define _OMC_LIT74_data "K=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT74,3,_OMC_LIT74_data);
#define _OMC_LIT74 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT74)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT75,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT74}};
#define _OMC_LIT75 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT75)
#define _OMC_LIT76_data "A=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT76,3,_OMC_LIT76_data);
#define _OMC_LIT76 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT76)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT77,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT76}};
#define _OMC_LIT77 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT77)
#define _OMC_LIT78_data "kg=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT78,4,_OMC_LIT78_data);
#define _OMC_LIT78 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT78)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT79,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT78}};
#define _OMC_LIT79 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT79)
#define _OMC_LIT80_data "m=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT80,3,_OMC_LIT80_data);
#define _OMC_LIT80 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT80)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT81,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT80}};
#define _OMC_LIT81 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT81)
#define _OMC_LIT82_data "s=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT82,3,_OMC_LIT82_data);
#define _OMC_LIT82 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT82)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT83,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT82}};
#define _OMC_LIT83 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT83)
#define _OMC_LIT84_data "name=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT84,6,_OMC_LIT84_data);
#define _OMC_LIT84 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT84)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT85,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT84}};
#define _OMC_LIT85 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT85)
#define _OMC_LIT86_data "<Unit "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT86,6,_OMC_LIT86_data);
#define _OMC_LIT86 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT86)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT87,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT86}};
#define _OMC_LIT87 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT87)
#define _OMC_LIT88_data ">\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT88,2,_OMC_LIT88_data);
#define _OMC_LIT88 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT88}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
#define _OMC_LIT90_data "</Unit>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT90,7,_OMC_LIT90_data);
#define _OMC_LIT90 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT90)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT91,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT90}};
#define _OMC_LIT91 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT91)
#define _OMC_LIT92_data "<UnitDefinitions>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT92,18,_OMC_LIT92_data);
#define _OMC_LIT92 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT92)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT93,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT92}};
#define _OMC_LIT93 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT93)
#define _OMC_LIT94_data "</UnitDefinitions>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT94,18,_OMC_LIT94_data);
#define _OMC_LIT94 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT94)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT95,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT94}};
#define _OMC_LIT95 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT95)
#define _OMC_LIT96_data "-"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT96,1,_OMC_LIT96_data);
#define _OMC_LIT96 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT96)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT97,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT96}};
#define _OMC_LIT97 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT97)
#define _OMC_LIT98_data "T"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT98,1,_OMC_LIT98_data);
#define _OMC_LIT98 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT98)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT99,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT98}};
#define _OMC_LIT99 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT99)
#define _OMC_LIT100_data ":"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT100,1,_OMC_LIT100_data);
#define _OMC_LIT100 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT100)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT101,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT100}};
#define _OMC_LIT101 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "Z"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,1,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT103,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT102}};
#define _OMC_LIT103 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "$dummy"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,6,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
#define _OMC_LIT105_data "1"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT105,1,_OMC_LIT105_data);
#define _OMC_LIT105 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT105)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT106,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT105}};
#define _OMC_LIT106 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT106)
#define _OMC_LIT107_data "0"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT107,1,_OMC_LIT107_data);
#define _OMC_LIT107 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT107)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT108,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT107}};
#define _OMC_LIT108 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT108)
#define _OMC_LIT109_data " relativeQuantity=\"true\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT109,24,_OMC_LIT109_data);
#define _OMC_LIT109 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT109)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT110,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT109}};
#define _OMC_LIT110 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT110)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT111,2,4) {&Tpl_BlockType_BT__INDENT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT111 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT111)
#define _OMC_LIT112_data "displayUnit=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT112,13,_OMC_LIT112_data);
#define _OMC_LIT112 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT112}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
#define _OMC_LIT114_data "unit=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT114,6,_OMC_LIT114_data);
#define _OMC_LIT114 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT114)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT115,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT114}};
#define _OMC_LIT115 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT115)
#define _OMC_LIT116_data "nominal=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT116,9,_OMC_LIT116_data);
#define _OMC_LIT116 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT116}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
#define _OMC_LIT118_data "max=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT118,5,_OMC_LIT118_data);
#define _OMC_LIT118 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT119,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT118}};
#define _OMC_LIT119 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT119)
#define _OMC_LIT120_data "min=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT120,5,_OMC_LIT120_data);
#define _OMC_LIT120 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT120)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT121,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT120}};
#define _OMC_LIT121 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT121)
#define _OMC_LIT122_data "start=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT122,7,_OMC_LIT122_data);
#define _OMC_LIT122 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT122)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT123,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT122}};
#define _OMC_LIT123 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT123)
#define _OMC_LIT124_data "derivative=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT124,12,_OMC_LIT124_data);
#define _OMC_LIT124 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT124)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT125,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT124}};
#define _OMC_LIT125 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT125)
#define _OMC_LIT126_data "<Real"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT126,5,_OMC_LIT126_data);
#define _OMC_LIT126 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT126)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT127,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT126}};
#define _OMC_LIT127 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT127)
#define _OMC_LIT128_data "<Integer"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT128,8,_OMC_LIT128_data);
#define _OMC_LIT128 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT128)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT129,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT128}};
#define _OMC_LIT129 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT129)
#define _OMC_LIT130_data "<Boolean"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT130,8,_OMC_LIT130_data);
#define _OMC_LIT130 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT130)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT131,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT130}};
#define _OMC_LIT131 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT131)
#define _OMC_LIT132_data "<String"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT132,7,_OMC_LIT132_data);
#define _OMC_LIT132 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT132)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT133,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT132}};
#define _OMC_LIT133 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT133)
#define _OMC_LIT134_data "<Enumeration declaredType=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT134,27,_OMC_LIT134_data);
#define _OMC_LIT134 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT134)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT135,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT134}};
#define _OMC_LIT135 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT135)
#define _OMC_LIT136_data "UNKOWN_TYPE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT136,11,_OMC_LIT136_data);
#define _OMC_LIT136 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT136)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT137,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT136}};
#define _OMC_LIT137 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT137)
#define _OMC_LIT138_data "Cpp"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT138,3,_OMC_LIT138_data);
#define _OMC_LIT138 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT138)
#define _OMC_LIT139_data "none"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT139,4,_OMC_LIT139_data);
#define _OMC_LIT139 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT139)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT140,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT139}};
#define _OMC_LIT140 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT140)
#define _OMC_LIT141_data "output"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT141,6,_OMC_LIT141_data);
#define _OMC_LIT141 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT141)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT142,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT141}};
#define _OMC_LIT142 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT142)
#define _OMC_LIT143_data "input"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT143,5,_OMC_LIT143_data);
#define _OMC_LIT143 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT143)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT144,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT143}};
#define _OMC_LIT144 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT144)
#define _OMC_LIT145_data "force-fmi-attributes"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT145,20,_OMC_LIT145_data);
#define _OMC_LIT145 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT145)
#define _OMC_LIT146_data "Force to export all fmi attributes to the modelDescription.xml, including those which have default values"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT146,105,_OMC_LIT146_data);
#define _OMC_LIT146 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT146)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT147,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT146}};
#define _OMC_LIT147 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT147)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT148,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(180)),_OMC_LIT145,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),_OMC_LIT147}};
#define _OMC_LIT148 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT148)
#define _OMC_LIT149_data "parameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT149,9,_OMC_LIT149_data);
#define _OMC_LIT149 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT149)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT150,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT149}};
#define _OMC_LIT150 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT150)
#define _OMC_LIT151_data "calculatedParameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT151,19,_OMC_LIT151_data);
#define _OMC_LIT151 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT151)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT152,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT151}};
#define _OMC_LIT152 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT152)
#define _OMC_LIT153_data "local"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT153,5,_OMC_LIT153_data);
#define _OMC_LIT153 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT153)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT154,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT153}};
#define _OMC_LIT154 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT154)
#define _OMC_LIT155_data "discrete"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT155,8,_OMC_LIT155_data);
#define _OMC_LIT155 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT155)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT156,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT155}};
#define _OMC_LIT156 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT156)
#define _OMC_LIT157_data "fixed"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT157,5,_OMC_LIT157_data);
#define _OMC_LIT157 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT157)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT158,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT157}};
#define _OMC_LIT158 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT158)
#define _OMC_LIT159_data "constant"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT159,8,_OMC_LIT159_data);
#define _OMC_LIT159 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT159)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT160,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT159}};
#define _OMC_LIT160 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT160)
#define _OMC_LIT161_data "tunable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT161,7,_OMC_LIT161_data);
#define _OMC_LIT161 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT161)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT162,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT161}};
#define _OMC_LIT162 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT162)
#define _OMC_LIT163_data "continuous"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT163,10,_OMC_LIT163_data);
#define _OMC_LIT163 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT163)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT164,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT163}};
#define _OMC_LIT164 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT164)
#define _OMC_LIT165_data "$"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT165,1,_OMC_LIT165_data);
#define _OMC_LIT165 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT165)
#define _OMC_LIT166_data "_D_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT166,3,_OMC_LIT166_data);
#define _OMC_LIT166 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT166)
#define _OMC_LIT167_data "\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT167,2,_OMC_LIT167_data);
#define _OMC_LIT167 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT167)
#define _OMC_LIT168_data "valueReference=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT168,16,_OMC_LIT168_data);
#define _OMC_LIT168 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT168)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT169,2,1) {_OMC_LIT168,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT169 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT169)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT170,2,1) {_OMC_LIT167,_OMC_LIT169}};
#define _OMC_LIT170 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT170)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT171,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT170,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT171 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT171)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT172,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT167}};
#define _OMC_LIT172 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT172)
#define _OMC_LIT173_data "initial=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT173,9,_OMC_LIT173_data);
#define _OMC_LIT173 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT173)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT174,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT173}};
#define _OMC_LIT174 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT174)
#define _OMC_LIT175_data "previous=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT175,10,_OMC_LIT175_data);
#define _OMC_LIT175 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT175)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT176,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT175}};
#define _OMC_LIT176 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT176)
#define _OMC_LIT177_data "clockIndex=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT177,12,_OMC_LIT177_data);
#define _OMC_LIT177 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT177)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT178,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT177}};
#define _OMC_LIT178 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT178)
#define _OMC_LIT179_data "causality=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT179,11,_OMC_LIT179_data);
#define _OMC_LIT179 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT179)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT180,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT179}};
#define _OMC_LIT180 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT180)
#define _OMC_LIT181_data "variability=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT181,13,_OMC_LIT181_data);
#define _OMC_LIT181 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT181)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT182,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT181}};
#define _OMC_LIT182 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT182)
#define _OMC_LIT183_data "description=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT183,13,_OMC_LIT183_data);
#define _OMC_LIT183 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT183)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT184,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT183}};
#define _OMC_LIT184 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT184)
#define _OMC_LIT185_data "dependenciesKind=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT185,18,_OMC_LIT185_data);
#define _OMC_LIT185 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT185)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT186,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT185}};
#define _OMC_LIT186 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT186)
#define _OMC_LIT187_data " "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT187,1,_OMC_LIT187_data);
#define _OMC_LIT187 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT187)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT188,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT187}};
#define _OMC_LIT188 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT188)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT189,1,1) {_OMC_LIT188}};
#define _OMC_LIT189 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT189)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT190,9,3) {&Tpl_IterOptions_ITER__OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT189,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT23,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT23}};
#define _OMC_LIT190 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT190)
#define _OMC_LIT191_data "dependencies=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT191,14,_OMC_LIT191_data);
#define _OMC_LIT191 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT191)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT192,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT191}};
#define _OMC_LIT192 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT192)
#define _OMC_LIT193_data "<Unknown index=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT193,16,_OMC_LIT193_data);
#define _OMC_LIT193 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT193)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT194,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT193}};
#define _OMC_LIT194 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT194)
#define _OMC_LIT195_data " />"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT195,3,_OMC_LIT195_data);
#define _OMC_LIT195 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT195)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT196,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT195}};
#define _OMC_LIT196 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT196)
#define _OMC_LIT197_data "<InitialUnknowns>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT197,18,_OMC_LIT197_data);
#define _OMC_LIT197 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT197)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT198,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT197}};
#define _OMC_LIT198 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT198)
#define _OMC_LIT199_data "</InitialUnknowns>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT199,18,_OMC_LIT199_data);
#define _OMC_LIT199 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT199)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT200,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT199}};
#define _OMC_LIT200 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT200)
#define _OMC_LIT201_data "<DiscreteStates>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT201,17,_OMC_LIT201_data);
#define _OMC_LIT201 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT201)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT202,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT201}};
#define _OMC_LIT202 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT202)
#define _OMC_LIT203_data "</DiscreteStates>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT203,17,_OMC_LIT203_data);
#define _OMC_LIT203 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT203)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT204,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT203}};
#define _OMC_LIT204 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT204)
#define _OMC_LIT205_data "<Derivatives>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT205,14,_OMC_LIT205_data);
#define _OMC_LIT205 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT205)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT206,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT205}};
#define _OMC_LIT206 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT206)
#define _OMC_LIT207_data "</Derivatives>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT207,14,_OMC_LIT207_data);
#define _OMC_LIT207 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT207)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT208,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT207}};
#define _OMC_LIT208 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT208)
#define _OMC_LIT209_data "<Outputs>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT209,10,_OMC_LIT209_data);
#define _OMC_LIT209 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT209)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT210,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT209}};
#define _OMC_LIT210 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT210)
#define _OMC_LIT211_data "</Outputs>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT211,10,_OMC_LIT211_data);
#define _OMC_LIT211 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT211)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT212,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT211}};
#define _OMC_LIT212 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT212)
#define _OMC_LIT213_data "<Clocks>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT213,9,_OMC_LIT213_data);
#define _OMC_LIT213 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT213)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT214,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT213}};
#define _OMC_LIT214 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT214)
#define _OMC_LIT215_data "</Clocks>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT215,9,_OMC_LIT215_data);
#define _OMC_LIT215 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT215)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT216,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT215}};
#define _OMC_LIT216 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT216)
#define _OMC_LIT217_data "<Clock><Inferred/></Clock>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT217,26,_OMC_LIT217_data);
#define _OMC_LIT217 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT217)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT218,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT217}};
#define _OMC_LIT218 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT218)
#define _OMC_LIT219_data "<Clock><Triggered/></Clock>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT219,27,_OMC_LIT219_data);
#define _OMC_LIT219 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT219)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT220,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT219}};
#define _OMC_LIT220 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT220)
#define _OMC_LIT221_data "<Clock><Inferred\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT221,17,_OMC_LIT221_data);
#define _OMC_LIT221 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT221)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT222,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT221}};
#define _OMC_LIT222 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT222)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT223,2,4) {&Tpl_BlockType_BT__INDENT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(8))}};
#define _OMC_LIT223 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT223)
#define _OMC_LIT224_data "intervalCounter=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT224,17,_OMC_LIT224_data);
#define _OMC_LIT224 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT224)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT225,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT224}};
#define _OMC_LIT225 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT225)
#define _OMC_LIT226_data "resolution=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT226,12,_OMC_LIT226_data);
#define _OMC_LIT226 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT226)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT227,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT226}};
#define _OMC_LIT227 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT227)
#define _OMC_LIT228_data "/></Clock>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT228,10,_OMC_LIT228_data);
#define _OMC_LIT228 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT228)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT229,2,1) {_OMC_LIT228,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT229 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT229)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT230,2,1) {_OMC_LIT167,_OMC_LIT229}};
#define _OMC_LIT230 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT230)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT231,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT230,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT231 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT231)
#define _OMC_LIT232_data "shiftCounter=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT232,14,_OMC_LIT232_data);
#define _OMC_LIT232 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT232)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT233,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT232}};
#define _OMC_LIT233 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT233)
#define _OMC_LIT234_data "interval=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT234,10,_OMC_LIT234_data);
#define _OMC_LIT234 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT234)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT235,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT234}};
#define _OMC_LIT235 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT235)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT236,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT228}};
#define _OMC_LIT236 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT236)
#define _OMC_LIT237_data "<ModelStructure>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT237,17,_OMC_LIT237_data);
#define _OMC_LIT237 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT237)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT238,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT237}};
#define _OMC_LIT238 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT238)
#define _OMC_LIT239_data "</ModelStructure>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT239,17,_OMC_LIT239_data);
#define _OMC_LIT239 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT239)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT240,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT239}};
#define _OMC_LIT240 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT240)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT241,2,1) {_OMC_LIT239,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT241 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT241)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT242,2,1) {_OMC_LIT237,_OMC_LIT241}};
#define _OMC_LIT242 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT242)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT243,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT242,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT243 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT243)
#define _OMC_LIT244_data "<Implementation>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT244,17,_OMC_LIT244_data);
#define _OMC_LIT244 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT244)
#define _OMC_LIT245_data "  <CoSimulation_StandAlone>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT245,28,_OMC_LIT245_data);
#define _OMC_LIT245 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT245)
#define _OMC_LIT246_data "    <Capabilities\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT246,18,_OMC_LIT246_data);
#define _OMC_LIT246 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT246)
#define _OMC_LIT247_data "      canHandleVariableCommunicationStepSize=\"true\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT247,52,_OMC_LIT247_data);
#define _OMC_LIT247 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT247)
#define _OMC_LIT248_data "      canHandleEvents=\"true\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT248,29,_OMC_LIT248_data);
#define _OMC_LIT248 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT248)
#define _OMC_LIT249_data "      canBeInstantiatedOnlyOncePerProcess=\"false\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT249,50,_OMC_LIT249_data);
#define _OMC_LIT249 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT249)
#define _OMC_LIT250_data "      canInterpolateInputs=\"true\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT250,34,_OMC_LIT250_data);
#define _OMC_LIT250 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT250)
#define _OMC_LIT251_data "      maxOutputDerivativeOrder=\"0\"/>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT251,37,_OMC_LIT251_data);
#define _OMC_LIT251 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT251)
#define _OMC_LIT252_data "  </CoSimulation_StandAlone>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT252,29,_OMC_LIT252_data);
#define _OMC_LIT252 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT252)
#define _OMC_LIT253_data "</Implementation>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT253,17,_OMC_LIT253_data);
#define _OMC_LIT253 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT253)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT254,2,1) {_OMC_LIT253,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT254 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT254)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT255,2,1) {_OMC_LIT252,_OMC_LIT254}};
#define _OMC_LIT255 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT255)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT256,2,1) {_OMC_LIT251,_OMC_LIT255}};
#define _OMC_LIT256 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT256)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT257,2,1) {_OMC_LIT250,_OMC_LIT256}};
#define _OMC_LIT257 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT257)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT258,2,1) {_OMC_LIT249,_OMC_LIT257}};
#define _OMC_LIT258 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT258)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT259,2,1) {_OMC_LIT248,_OMC_LIT258}};
#define _OMC_LIT259 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT259)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT260,2,1) {_OMC_LIT247,_OMC_LIT259}};
#define _OMC_LIT260 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT260)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT261,2,1) {_OMC_LIT246,_OMC_LIT260}};
#define _OMC_LIT261 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT261)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT262,2,1) {_OMC_LIT245,_OMC_LIT261}};
#define _OMC_LIT262 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT262)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT263,2,1) {_OMC_LIT244,_OMC_LIT262}};
#define _OMC_LIT263 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT263)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT264,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT263,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT264 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT264)
#define _OMC_LIT265_data "<ExternalFunction\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT265,18,_OMC_LIT265_data);
#define _OMC_LIT265 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT265)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT266,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT265}};
#define _OMC_LIT266 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT266)
#define _OMC_LIT267_data "noAlias"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT267,7,_OMC_LIT267_data);
#define _OMC_LIT267 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT267)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT268,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT267}};
#define _OMC_LIT268 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT268)
#define _OMC_LIT269_data "internal"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT269,8,_OMC_LIT269_data);
#define _OMC_LIT269 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT269)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT270,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT269}};
#define _OMC_LIT270 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT270)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT271,2,1) {_OMC_LIT179,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT271 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT271)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT272,2,1) {_OMC_LIT167,_OMC_LIT271}};
#define _OMC_LIT272 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT272)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT273,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT272,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT273 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT273)
#define _OMC_LIT274_data "alias=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT274,7,_OMC_LIT274_data);
#define _OMC_LIT274 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT274)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT275,2,1) {_OMC_LIT274,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT275 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT275)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT276,2,1) {_OMC_LIT167,_OMC_LIT275}};
#define _OMC_LIT276 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT276)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT277,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT276,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT277 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT277)
#define _OMC_LIT278_data "der($dummy)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT278,11,_OMC_LIT278_data);
#define _OMC_LIT278 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT278)
#define _OMC_LIT279_data "<ScalarVariable\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT279,16,_OMC_LIT279_data);
#define _OMC_LIT279 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT279)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT280,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT279}};
#define _OMC_LIT280 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT280)
#define _OMC_LIT281_data "</ScalarVariable>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT281,17,_OMC_LIT281_data);
#define _OMC_LIT281 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT281)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT282,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT281}};
#define _OMC_LIT282 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT282)
#define _OMC_LIT283_data "<!-- Index of variable = \""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT283,26,_OMC_LIT283_data);
#define _OMC_LIT283 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT283)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT284,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT283}};
#define _OMC_LIT284 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT284)
#define _OMC_LIT285_data "\" -->\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT285,6,_OMC_LIT285_data);
#define _OMC_LIT285 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT285)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT286,2,1) {_OMC_LIT279,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT286 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT286)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT287,2,1) {_OMC_LIT285,_OMC_LIT286}};
#define _OMC_LIT287 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT287)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT288,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT287,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT288 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT288)
#define _OMC_LIT289_data "<ModelVariables>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT289,17,_OMC_LIT289_data);
#define _OMC_LIT289 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT289)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT290,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT289}};
#define _OMC_LIT290 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT290)
#define _OMC_LIT291_data "</ModelVariables>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT291,17,_OMC_LIT291_data);
#define _OMC_LIT291 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT291)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT292,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT291}};
#define _OMC_LIT292 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT292)
#define _OMC_LIT293_data "<SourceFiles>\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT293,14,_OMC_LIT293_data);
#define _OMC_LIT293 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT293)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT294,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT293}};
#define _OMC_LIT294 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT294)
#define _OMC_LIT295_data "</SourceFiles>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT295,14,_OMC_LIT295_data);
#define _OMC_LIT295 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT295)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT296,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT295}};
#define _OMC_LIT296 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT296)
#define _OMC_LIT297_data "<File name=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT297,12,_OMC_LIT297_data);
#define _OMC_LIT297 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT297)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT298,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT297}};
#define _OMC_LIT298 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT298)
#define _OMC_LIT299_data "\" />"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT299,4,_OMC_LIT299_data);
#define _OMC_LIT299 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT299)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT300,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT299}};
#define _OMC_LIT300 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT300)
#define _OMC_LIT301_data "<ModelExchange\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT301,15,_OMC_LIT301_data);
#define _OMC_LIT301 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT301)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT302,2,5) {&Tpl_StringToken_ST__LINE__desc,_OMC_LIT301}};
#define _OMC_LIT302 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT302)
#define _OMC_LIT303_data "modelIdentifier=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT303,17,_OMC_LIT303_data);
#define _OMC_LIT303 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT303)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT304,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT303}};
#define _OMC_LIT304 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT304)
#define _OMC_LIT305_data "needsExecutionTool=\"false\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT305,27,_OMC_LIT305_data);
#define _OMC_LIT305 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT305)
#define _OMC_LIT306_data "completedIntegratorStepNotNeeded=\"false\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT306,41,_OMC_LIT306_data);
#define _OMC_LIT306 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT306)
#define _OMC_LIT307_data "canBeInstantiatedOnlyOncePerProcess=\"false\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT307,44,_OMC_LIT307_data);
#define _OMC_LIT307 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT307)
#define _OMC_LIT308_data "canNotUseMemoryManagementFunctions=\"false\"\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT308,43,_OMC_LIT308_data);
#define _OMC_LIT308 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT308)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT309,2,1) {_OMC_LIT308,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT309 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT309)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT310,2,1) {_OMC_LIT307,_OMC_LIT309}};
#define _OMC_LIT310 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT310)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT311,2,1) {_OMC_LIT306,_OMC_LIT310}};
#define _OMC_LIT311 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT311)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT312,2,1) {_OMC_LIT305,_OMC_LIT311}};
#define _OMC_LIT312 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT312)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT313,2,1) {_OMC_LIT167,_OMC_LIT312}};
#define _OMC_LIT313 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT313)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT314,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT313,MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */))}};
#define _OMC_LIT314 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT314)
#define _OMC_LIT315_data "fmuExperimental"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT315,15,_OMC_LIT315_data);
#define _OMC_LIT315 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT315)
#define _OMC_LIT316_data "Adds features to the FMI export that are considered experimental as of now: fmi2GetSpecificDerivatives, canGetSetFMUState, canSerializeFMUstate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT316,143,_OMC_LIT316_data);
#define _OMC_LIT316 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT316)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT317,2,3) {&Gettext_TranslatableContent_gettext__desc,_OMC_LIT316}};
#define _OMC_LIT317 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT317)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT318,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(135)),_OMC_LIT315,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),_OMC_LIT317}};
#define _OMC_LIT318 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT318)
#define _OMC_LIT319_data "</ModelExchange>"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT319,16,_OMC_LIT319_data);
#define _OMC_LIT319 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT319)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT320,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT319}};
#define _OMC_LIT320 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT320)
#define _OMC_LIT321_data "providesDirectionalDerivative=\"false\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT321,37,_OMC_LIT321_data);
#define _OMC_LIT321 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT321)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT322,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT321}};
#define _OMC_LIT322 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT322)
#define _OMC_LIT323_data "providesDirectionalDerivative=\"true\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT323,36,_OMC_LIT323_data);
#define _OMC_LIT323 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT323)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT324,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT323}};
#define _OMC_LIT324 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT324)
#define _OMC_LIT325_data "canSerializeFMUstate=\"false\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT325,28,_OMC_LIT325_data);
#define _OMC_LIT325 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT325)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT326,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT325}};
#define _OMC_LIT326 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT326)
#define _OMC_LIT327_data "canSerializeFMUstate=\"true\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT327,27,_OMC_LIT327_data);
#define _OMC_LIT327 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT327)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT328,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT327}};
#define _OMC_LIT328 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT328)
#define _OMC_LIT329_data "canGetAndSetFMUstate=\"false\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT329,28,_OMC_LIT329_data);
#define _OMC_LIT329 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT329)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT330,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT329}};
#define _OMC_LIT330 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT330)
#define _OMC_LIT331_data "canGetAndSetFMUstate=\"true\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT331,27,_OMC_LIT331_data);
#define _OMC_LIT331 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT331)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT332,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT331}};
#define _OMC_LIT332 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT332)
#include "util/modelica.h"

#include "CodegenFMUCommon_includes.h"


/* default, do not make protected functions static */
#if !defined(PROTECTED_FUNCTION_STATIC)
#define PROTECTED_FUNCTION_STATIC
#endif
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__191(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_real _in_a_stepSize, modelica_real _in_a_tolerance, modelica_real _in_a_stopTime, modelica_real _in_a_startTime);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__191(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stepSize, modelica_metatype _in_a_tolerance, modelica_metatype _in_a_stopTime, modelica_metatype _in_a_startTime);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__191,2,0) {(void*) boxptr_CodegenFMUCommon_fun__191,0}};
#define boxvar_CodegenFMUCommon_fun__191 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__191)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__188(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_names, modelica_metatype _in_a_path);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__188(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_names, modelica_metatype _in_a_path);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__188,2,0) {(void*) boxptr_CodegenFMUCommon_fun__188,0}};
#define boxvar_CodegenFMUCommon_fun__188 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__188)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__187(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__187,2,0) {(void*) boxptr_CodegenFMUCommon_lm__187,0}};
#define boxvar_CodegenFMUCommon_lm__187 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__187)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__186(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__186,2,0) {(void*) boxptr_CodegenFMUCommon_lm__186,0}};
#define boxvar_CodegenFMUCommon_lm__186 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__186)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__183(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_clocks, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_vars);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__183(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_clocks, modelica_metatype _in_a_FMUVersion, modelica_metatype _in_a_vars);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__183,2,0) {(void*) boxptr_CodegenFMUCommon_fun__183,0}};
#define boxvar_CodegenFMUCommon_fun__183 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__183)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__182(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__182,2,0) {(void*) boxptr_CodegenFMUCommon_lm__182,0}};
#define boxvar_CodegenFMUCommon_lm__182 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__182)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__181(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_simCode);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__181(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__181,2,0) {(void*) boxptr_CodegenFMUCommon_fun__181,0}};
#define boxvar_CodegenFMUCommon_fun__181 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__181)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__180(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_simCode);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__180(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__180,2,0) {(void*) boxptr_CodegenFMUCommon_fun__180,0}};
#define boxvar_CodegenFMUCommon_fun__180 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__180)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__178(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__178,2,0) {(void*) boxptr_CodegenFMUCommon_fun__178,0}};
#define boxvar_CodegenFMUCommon_fun__178 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__178)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__176(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_real _in_a_offset);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__176(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_offset);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__176,2,0) {(void*) boxptr_CodegenFMUCommon_fun__176,0}};
#define boxvar_CodegenFMUCommon_fun__176 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__176)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__175(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_real _in_a_factor);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__175(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_factor);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__175,2,0) {(void*) boxptr_CodegenFMUCommon_fun__175,0}};
#define boxvar_CodegenFMUCommon_fun__175 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__175)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__174(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_cd);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__174(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_cd);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__174,2,0) {(void*) boxptr_CodegenFMUCommon_fun__174,0}};
#define boxvar_CodegenFMUCommon_fun__174 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__174)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__173(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_mol);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__173(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_mol);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__173,2,0) {(void*) boxptr_CodegenFMUCommon_fun__173,0}};
#define boxvar_CodegenFMUCommon_fun__173 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__173)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__172(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_K);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__172(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_K);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__172,2,0) {(void*) boxptr_CodegenFMUCommon_fun__172,0}};
#define boxvar_CodegenFMUCommon_fun__172 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__172)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__171(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_A);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__171(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_A);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__171,2,0) {(void*) boxptr_CodegenFMUCommon_fun__171,0}};
#define boxvar_CodegenFMUCommon_fun__171 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__171)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__170(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_kg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__170(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_kg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__170,2,0) {(void*) boxptr_CodegenFMUCommon_fun__170,0}};
#define boxvar_CodegenFMUCommon_fun__170 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__170)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__169(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_m);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__169(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_m);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__169,2,0) {(void*) boxptr_CodegenFMUCommon_fun__169,0}};
#define boxvar_CodegenFMUCommon_fun__169 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__169)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__168(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_s);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__168(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_s);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__168,2,0) {(void*) boxptr_CodegenFMUCommon_fun__168,0}};
#define boxvar_CodegenFMUCommon_fun__168 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__168)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__166(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unitName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__166,2,0) {(void*) boxptr_CodegenFMUCommon_fun__166,0}};
#define boxvar_CodegenFMUCommon_fun__166 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__166)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__163(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__163,2,0) {(void*) boxptr_CodegenFMUCommon_lm__163,0}};
#define boxvar_CodegenFMUCommon_lm__163 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__163)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__161(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__161,2,0) {(void*) boxptr_CodegenFMUCommon_fun__161,0}};
#define boxvar_CodegenFMUCommon_fun__161 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__161)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__158(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__158,2,0) {(void*) boxptr_CodegenFMUCommon_lm__158,0}};
#define boxvar_CodegenFMUCommon_lm__158 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__158)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__157(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_var);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__157,2,0) {(void*) boxptr_CodegenFMUCommon_fun__157,0}};
#define boxvar_CodegenFMUCommon_fun__157 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__157)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__156(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__156(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__156,2,0) {(void*) boxptr_CodegenFMUCommon_fun__156,0}};
#define boxvar_CodegenFMUCommon_fun__156 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__156)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__154(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_a_relativeQuantity);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__154(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_relativeQuantity);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__154,2,0) {(void*) boxptr_CodegenFMUCommon_fun__154,0}};
#define boxvar_CodegenFMUCommon_fun__154 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__154)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__152(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_displayUnit);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__152,2,0) {(void*) boxptr_CodegenFMUCommon_fun__152,0}};
#define boxvar_CodegenFMUCommon_fun__152 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__152)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__151(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unit);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__151,2,0) {(void*) boxptr_CodegenFMUCommon_fun__151,0}};
#define boxvar_CodegenFMUCommon_fun__151 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__151)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__149(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_nominalValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__149,2,0) {(void*) boxptr_CodegenFMUCommon_fun__149,0}};
#define boxvar_CodegenFMUCommon_fun__149 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__149)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__147(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_maxValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__147,2,0) {(void*) boxptr_CodegenFMUCommon_fun__147,0}};
#define boxvar_CodegenFMUCommon_fun__147 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__147)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__145(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_minValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__145,2,0) {(void*) boxptr_CodegenFMUCommon_fun__145,0}};
#define boxvar_CodegenFMUCommon_fun__145 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__145)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__142(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_initialValue);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__142,2,0) {(void*) boxptr_CodegenFMUCommon_fun__142,0}};
#define boxvar_CodegenFMUCommon_fun__142 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__142)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__140(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_initial__, modelica_metatype _in_a_simvar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__140,2,0) {(void*) boxptr_CodegenFMUCommon_fun__140,0}};
#define boxvar_CodegenFMUCommon_fun__140 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__140)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__138(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind, modelica_integer _in_a_index, modelica_metatype _in_a_stateVars);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__138(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind, modelica_metatype _in_a_index, modelica_metatype _in_a_stateVars);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__138,2,0) {(void*) boxptr_CodegenFMUCommon_fun__138,0}};
#define boxvar_CodegenFMUCommon_fun__138 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__138)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__135(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simvar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__135,2,0) {(void*) boxptr_CodegenFMUCommon_fun__135,0}};
#define boxvar_CodegenFMUCommon_fun__135 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__135)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__133(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_mArg, modelica_integer _in_a_vi_numZeroCrossings, modelica_metatype _in_a_zeroCrossings);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__133(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_vi_numZeroCrossings, modelica_metatype _in_a_zeroCrossings);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__133,2,0) {(void*) boxptr_CodegenFMUCommon_fun__133,0}};
#define boxvar_CodegenFMUCommon_fun__133 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__133)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__131(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__131(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__131,2,0) {(void*) boxptr_CodegenFMUCommon_fun__131,0}};
#define boxvar_CodegenFMUCommon_fun__131 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__131)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__129(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__129(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__129,2,0) {(void*) boxptr_CodegenFMUCommon_fun__129,0}};
#define boxvar_CodegenFMUCommon_fun__129 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__129)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__127(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_initial);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__127(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_initial);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__127,2,0) {(void*) boxptr_CodegenFMUCommon_fun__127,0}};
#define boxvar_CodegenFMUCommon_fun__127 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__127)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__126(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_previous);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__126(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_previous);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__126,2,0) {(void*) boxptr_CodegenFMUCommon_fun__126,0}};
#define boxvar_CodegenFMUCommon_fun__126 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__126)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__125(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_clockIndex);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__125(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_clockIndex);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__125,2,0) {(void*) boxptr_CodegenFMUCommon_fun__125,0}};
#define boxvar_CodegenFMUCommon_fun__125 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__125)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__124(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_caus);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__124(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_caus);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__124,2,0) {(void*) boxptr_CodegenFMUCommon_fun__124,0}};
#define boxvar_CodegenFMUCommon_fun__124 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__124)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__123(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_variability__);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__123(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_variability__);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__123,2,0) {(void*) boxptr_CodegenFMUCommon_fun__123,0}};
#define boxvar_CodegenFMUCommon_fun__123 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__123)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__122(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__122,2,0) {(void*) boxptr_CodegenFMUCommon_fun__122,0}};
#define boxvar_CodegenFMUCommon_fun__122 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__122)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__121(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__121,2,0) {(void*) boxptr_CodegenFMUCommon_fun__121,0}};
#define boxvar_CodegenFMUCommon_fun__121 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__121)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__120(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_variability);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__120,2,0) {(void*) boxptr_CodegenFMUCommon_fun__120,0}};
#define boxvar_CodegenFMUCommon_fun__120 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__120)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__119(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_comment);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__119,2,0) {(void*) boxptr_CodegenFMUCommon_fun__119,0}};
#define boxvar_CodegenFMUCommon_fun__119 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__119)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__117(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__117,2,0) {(void*) boxptr_CodegenFMUCommon_lm__117,0}};
#define boxvar_CodegenFMUCommon_lm__117 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__117)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__115(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__115,2,0) {(void*) boxptr_CodegenFMUCommon_lm__115,0}};
#define boxvar_CodegenFMUCommon_lm__115 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__115)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__112(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__112,2,0) {(void*) boxptr_CodegenFMUCommon_lm__112,0}};
#define boxvar_CodegenFMUCommon_lm__112 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__112)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__106(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_mArg, modelica_metatype _in_a_clocks);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__106,2,0) {(void*) boxptr_CodegenFMUCommon_fun__106,0}};
#define boxvar_CodegenFMUCommon_fun__106 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__106)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__105(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__105,2,0) {(void*) boxptr_CodegenFMUCommon_lm__105,0}};
#define boxvar_CodegenFMUCommon_lm__105 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__105)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__104(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_partition);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__104,2,0) {(void*) boxptr_CodegenFMUCommon_fun__104,0}};
#define boxvar_CodegenFMUCommon_fun__104 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__104)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__103(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_baseClock, modelica_metatype _in_a_subPartitions);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__103,2,0) {(void*) boxptr_CodegenFMUCommon_fun__103,0}};
#define boxvar_CodegenFMUCommon_fun__103 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__103)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__102(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_integer _in_a_resi, modelica_integer _in_a_bic);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_lm__102(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_metatype _in_a_resi, modelica_metatype _in_a_bic);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__102,2,0) {(void*) boxptr_CodegenFMUCommon_lm__102,0}};
#define boxvar_CodegenFMUCommon_lm__102 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__102)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__101(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_integer _in_a_resi, modelica_integer _in_a_bic);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__101(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_metatype _in_a_resi, modelica_metatype _in_a_bic);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__101,2,0) {(void*) boxptr_CodegenFMUCommon_fun__101,0}};
#define boxvar_CodegenFMUCommon_fun__101 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__101)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__100(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_fsuper, modelica_integer _in_a_resi, modelica_integer _in_a_snom);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__100(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_fsuper, modelica_metatype _in_a_resi, modelica_metatype _in_a_snom);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__100,2,0) {(void*) boxptr_CodegenFMUCommon_fun__100,0}};
#define boxvar_CodegenFMUCommon_fun__100 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__100)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__99(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_real _in_a_bi);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_lm__99(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_metatype _in_a_bi);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__99,2,0) {(void*) boxptr_CodegenFMUCommon_lm__99,0}};
#define boxvar_CodegenFMUCommon_lm__99 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__99)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__98(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_real _in_a_bi);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__98(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_metatype _in_a_bi);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__98,2,0) {(void*) boxptr_CodegenFMUCommon_fun__98,0}};
#define boxvar_CodegenFMUCommon_fun__98 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__98)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__97(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_sres);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__97(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_sres);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__97,2,0) {(void*) boxptr_CodegenFMUCommon_fun__97,0}};
#define boxvar_CodegenFMUCommon_fun__97 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__97)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__96(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_snom);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__96(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_snom);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__96,2,0) {(void*) boxptr_CodegenFMUCommon_fun__96,0}};
#define boxvar_CodegenFMUCommon_fun__96 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__96)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__94(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_fmistruct_fmiDiscreteStates);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__94(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_fmistruct_fmiDiscreteStates);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__94,2,0) {(void*) boxptr_CodegenFMUCommon_fun__94,0}};
#define boxvar_CodegenFMUCommon_fun__94 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__94)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__90(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__90,2,0) {(void*) boxptr_CodegenFMUCommon_lm__90,0}};
#define boxvar_CodegenFMUCommon_lm__90 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__90)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__88(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_displayUnit);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__88,2,0) {(void*) boxptr_CodegenFMUCommon_fun__88,0}};
#define boxvar_CodegenFMUCommon_fun__88 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__88)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__87(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unit);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__87,2,0) {(void*) boxptr_CodegenFMUCommon_fun__87,0}};
#define boxvar_CodegenFMUCommon_fun__87 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__87)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__85(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_initialValue, modelica_metatype _in_a_type__, modelica_metatype _in_a_causality);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__85,2,0) {(void*) boxptr_CodegenFMUCommon_fun__85,0}};
#define boxvar_CodegenFMUCommon_fun__85 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__85)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__84(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_causality, modelica_metatype _in_a_type__);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__84,2,0) {(void*) boxptr_CodegenFMUCommon_fun__84,0}};
#define boxvar_CodegenFMUCommon_fun__84 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__84)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__82(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_metatype _in_a_simvar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__82,2,0) {(void*) boxptr_CodegenFMUCommon_fun__82,0}};
#define boxvar_CodegenFMUCommon_fun__82 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__82)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__77(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_comment);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__77,2,0) {(void*) boxptr_CodegenFMUCommon_fun__77,0}};
#define boxvar_CodegenFMUCommon_fun__77 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__77)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__75(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_name);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__75(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_metatype _in_a_FMUVersion, modelica_metatype _in_a_name);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__75,2,0) {(void*) boxptr_CodegenFMUCommon_fun__75,0}};
#define boxvar_CodegenFMUCommon_fun__75 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__75)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__74(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_string _in_a_FMUVersion);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__74(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_metatype _in_a_FMUVersion);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__74,2,0) {(void*) boxptr_CodegenFMUCommon_fun__74,0}};
#define boxvar_CodegenFMUCommon_fun__74 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__74)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__73(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__73(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__73,2,0) {(void*) boxptr_CodegenFMUCommon_fun__73,0}};
#define boxvar_CodegenFMUCommon_fun__73 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__73)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__72(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_simVar);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__72(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_simVar);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__72,2,0) {(void*) boxptr_CodegenFMUCommon_fun__72,0}};
#define boxvar_CodegenFMUCommon_fun__72 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__72)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__71(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__71,2,0) {(void*) boxptr_CodegenFMUCommon_lm__71,0}};
#define boxvar_CodegenFMUCommon_lm__71 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__71)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__69(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__69,2,0) {(void*) boxptr_CodegenFMUCommon_fun__69,0}};
#define boxvar_CodegenFMUCommon_fun__69 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__69)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__68(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__68,2,0) {(void*) boxptr_CodegenFMUCommon_lm__68,0}};
#define boxvar_CodegenFMUCommon_lm__68 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__68)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__67(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__67,2,0) {(void*) boxptr_CodegenFMUCommon_lm__67,0}};
#define boxvar_CodegenFMUCommon_lm__67 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__67)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__66(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__66,2,0) {(void*) boxptr_CodegenFMUCommon_lm__66,0}};
#define boxvar_CodegenFMUCommon_lm__66 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__66)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__65(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__65,2,0) {(void*) boxptr_CodegenFMUCommon_lm__65,0}};
#define boxvar_CodegenFMUCommon_lm__65 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__65)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__64(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__64,2,0) {(void*) boxptr_CodegenFMUCommon_lm__64,0}};
#define boxvar_CodegenFMUCommon_lm__64 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__64)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__63(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__63,2,0) {(void*) boxptr_CodegenFMUCommon_lm__63,0}};
#define boxvar_CodegenFMUCommon_lm__63 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__63)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__62(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__62,2,0) {(void*) boxptr_CodegenFMUCommon_lm__62,0}};
#define boxvar_CodegenFMUCommon_lm__62 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__62)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__61,2,0) {(void*) boxptr_CodegenFMUCommon_lm__61,0}};
#define boxvar_CodegenFMUCommon_lm__61 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__61)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__60(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__60,2,0) {(void*) boxptr_CodegenFMUCommon_lm__60,0}};
#define boxvar_CodegenFMUCommon_lm__60 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__60)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__59(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__59,2,0) {(void*) boxptr_CodegenFMUCommon_lm__59,0}};
#define boxvar_CodegenFMUCommon_lm__59 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__59)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__58,2,0) {(void*) boxptr_CodegenFMUCommon_lm__58,0}};
#define boxvar_CodegenFMUCommon_lm__58 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__58)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__57(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__57,2,0) {(void*) boxptr_CodegenFMUCommon_lm__57,0}};
#define boxvar_CodegenFMUCommon_lm__57 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__57)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__56(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__56,2,0) {(void*) boxptr_CodegenFMUCommon_lm__56,0}};
#define boxvar_CodegenFMUCommon_lm__56 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__56)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__55(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__55,2,0) {(void*) boxptr_CodegenFMUCommon_lm__55,0}};
#define boxvar_CodegenFMUCommon_lm__55 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__55)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__54(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__54,2,0) {(void*) boxptr_CodegenFMUCommon_lm__54,0}};
#define boxvar_CodegenFMUCommon_lm__54 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__54)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__52(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__52,2,0) {(void*) boxptr_CodegenFMUCommon_lm__52,0}};
#define boxvar_CodegenFMUCommon_lm__52 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_lm__52)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__50(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__50(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__50,2,0) {(void*) boxptr_CodegenFMUCommon_fun__50,0}};
#define boxvar_CodegenFMUCommon_fun__50 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__50)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__49(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__49(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__49,2,0) {(void*) boxptr_CodegenFMUCommon_fun__49,0}};
#define boxvar_CodegenFMUCommon_fun__49 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__49)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__48(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__48(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__48,2,0) {(void*) boxptr_CodegenFMUCommon_fun__48,0}};
#define boxvar_CodegenFMUCommon_fun__48 MMC_REFSTRUCTLIT(boxvar_lit_CodegenFMUCommon_fun__48)

DLLDirection
modelica_metatype omc_CodegenFMUCommon_DefaultExperimentAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simulationSettings, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simulationSettings;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_real _i_stepSize;
      modelica_real _i_tolerance;
      modelica_real _i_stopTime;
      modelica_real _i_startTime;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _i_stepSize has no default value.
      // _i_tolerance has no default value.
      // _i_stopTime has no default value.
      // _i_startTime has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_real tmp7;
          modelica_metatype tmpMeta8;
          modelica_real tmp9;
          modelica_metatype tmpMeta10;
          modelica_real tmp11;
          modelica_metatype tmpMeta12;
          modelica_real tmp13;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp7 = mmc_unbox_real(tmpMeta6);
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmp9 = mmc_unbox_real(tmpMeta8);
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          tmp11 = mmc_unbox_real(tmpMeta10);
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 6));
          tmp13 = mmc_unbox_real(tmpMeta12);
          
          _txt = tmp4_1;
          _i_startTime = tmp7  /* pattern as ty=Real */;
          _i_stopTime = tmp9  /* pattern as ty=Real */;
          _i_stepSize = tmp11  /* pattern as ty=Real */;
          _i_tolerance = tmp13  /* pattern as ty=Real */;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          _ret_0 = omc_FMI_isFMIVersion20(threadData, _a_FMUVersion);
          tmpMeta1 = omc_CodegenFMUCommon_fun__191(threadData, _txt, _ret_0, _i_stepSize, _i_tolerance, _i_stopTime, _i_startTime);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__191(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_real _in_a_stepSize, modelica_real _in_a_tolerance, modelica_real _in_a_stopTime, modelica_real _in_a_startTime)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_real tmp4_3;modelica_real tmp4_4;modelica_real tmp4_5;modelica_real tmp4_6;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_stepSize;
    tmp4_4 = _in_a_tolerance;
    tmp4_5 = _in_a_stopTime;
    tmp4_6 = _in_a_startTime;
    {
      modelica_metatype _txt = NULL;
      modelica_real _a_stepSize;
      modelica_real _a_tolerance;
      modelica_real _a_stopTime;
      modelica_real _a_startTime;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stepSize has no default value.
      // _a_tolerance has no default value.
      // _a_stopTime has no default value.
      // _a_startTime has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_tolerance = tmp4_4;
          _a_stopTime = tmp4_5;
          _a_startTime = tmp4_6;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT1);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_startTime));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT3);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_stopTime));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT5);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_tolerance));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_stepSize = tmp4_3;
          _a_tolerance = tmp4_4;
          _a_stopTime = tmp4_5;
          _a_startTime = tmp4_6;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT1);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_startTime));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT3);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_stopTime));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT5);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_tolerance));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT9);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_stepSize));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__191(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stepSize, modelica_metatype _in_a_tolerance, modelica_metatype _in_a_stopTime, modelica_metatype _in_a_startTime)
{
  modelica_integer tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_real tmp4;
  modelica_real tmp5;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_real(_in_a_stepSize);
  tmp3 = mmc_unbox_real(_in_a_tolerance);
  tmp4 = mmc_unbox_real(_in_a_stopTime);
  tmp5 = mmc_unbox_real(_in_a_startTime);
  _out_txt = omc_CodegenFMUCommon_fun__191(threadData, _in_txt, tmp1, tmp2, tmp3, tmp4, tmp5);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_DefaultExperiment(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simulationSettingsOpt, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simulationSettingsOpt;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_v = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _i_v has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          
          _i_v = tmpMeta6;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT11);

          _txt = omc_CodegenFMUCommon_DefaultExperimentAttribute(threadData, _txt, _i_v, _a_FMUVersion);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_TypeDefinitionType(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_type__;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_names = NULL;
      modelica_metatype _i_path = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _i_names has no default value.
      // _i_path has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          
          _i_path = tmpMeta6;
          _i_names = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          _ret_0 = omc_FMI_isFMIVersion20(threadData, _a_FMUVersion);
          tmpMeta1 = omc_CodegenFMUCommon_fun__188(threadData, _txt, _ret_0, _i_names, _i_path);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__188(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_names, modelica_metatype _in_a_path)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_names;
    tmp4_4 = _in_a_path;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_names = NULL;
      modelica_metatype _a_path = NULL;
      modelica_string _ret_1 = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_names has no default value.
      // _a_path has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_names = tmp4_3;
          _a_path = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT15);

          _ret_0 = omc_AbsynUtil_pathString(threadData, _a_path, _OMC_LIT16, 0 /* false */, 0 /* false */);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT21);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT22);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__186(threadData, _txt, _a_names);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT30);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_names = tmp4_3;
          _a_path = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);

          _ret_1 = omc_AbsynUtil_pathString(threadData, _a_path, _OMC_LIT16, 0 /* false */, 0 /* false */);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT36);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT22);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT37);

          _txt = omc_CodegenFMUCommon_lm__187(threadData, _txt, _a_names);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT42);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__188(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_names, modelica_metatype _in_a_path)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__188(threadData, _in_txt, tmp1, _in_a_names, _in_a_path);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__187(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_integer _x_i0;
      modelica_string _i_name = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _x_i0 has no default value.
      // _i_name has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_name = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _x_i0 = omc_Tpl_getIteri__i0(threadData, _txt);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT44);

          _txt = omc_Tpl_writeStr(threadData, _txt, _i_name);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT46);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_x_i0));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT48);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__186(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _i_name = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_name has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_name = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT44);

          _txt = omc_Tpl_writeStr(threadData, _txt, _i_name);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT48);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_TypeDefinition(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simVar, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simVar;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_type__ = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _i_type__ has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 13));
          
          _txt = tmp4_1;
          _i_type__ = tmpMeta6;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_TypeDefinitionType(threadData, _txt, _i_type__, _a_FMUVersion);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_TypeDefinitionsHelper(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_simCode, modelica_metatype _a_vars, modelica_string _a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_boolean _ret_6;
  modelica_boolean _ret_5;
  modelica_boolean _ret_4;
  modelica_boolean _ret_3;
  modelica_integer _ret_2;
  modelica_boolean _ret_1;
  modelica_metatype _l_clocks = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _ret_6 has no default value.
  // _ret_5 has no default value.
  // _ret_4 has no default value.
  // _ret_3 has no default value.
  // _ret_2 has no default value.
  // _ret_1 has no default value.
  // _l_clocks has no default value.
  _ret_1 = omc_FMI_isFMIVersion10(threadData, _a_FMUVersion);

  _l_clocks = omc_CodegenFMUCommon_fun__181(threadData, _OMC_LIT49, _ret_1, _a_simCode);

  _ret_2 = listLength(_a_vars);

  _ret_3 = (_ret_2 > ((modelica_integer) 0));

  _ret_4 = (stringEqual(omc_Tpl_textString(threadData, _l_clocks), _OMC_LIT50));

  _ret_5 = (!_ret_4);

  _ret_6 = (_ret_3 || _ret_5);

  _out_txt = omc_CodegenFMUCommon_fun__183(threadData, _txt, _ret_6, _l_clocks, _a_FMUVersion, _a_vars);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__183(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_clocks, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_vars)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;modelica_string tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_clocks;
    tmp4_4 = _in_a_FMUVersion;
    tmp4_5 = _in_a_vars;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_clocks = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_vars = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_clocks has no default value.
      // _a_FMUVersion has no default value.
      // _a_vars has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_clocks = tmp4_3;
          _a_FMUVersion = tmp4_4;
          _a_vars = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT52);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__182(threadData, _txt, _a_vars, _a_FMUVersion);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_clocks);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT55);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__183(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_clocks, modelica_metatype _in_a_FMUVersion, modelica_metatype _in_a_vars)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__183(threadData, _in_txt, tmp1, _in_a_clocks, _in_a_FMUVersion, _in_a_vars);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__182(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_TypeDefinition(threadData, _txt, _i_var, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__181(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_simCode has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simCode = tmp4_3;
          /* Pattern matching succeeded */
          _ret_0 = omc_Flags_getConfigBool(threadData, _OMC_LIT61);
          tmpMeta1 = omc_CodegenFMUCommon_fun__180(threadData, _txt, _ret_0, _a_simCode);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__181(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_simCode)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__181(threadData, _in_txt, tmp1, _in_a_simCode);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__180(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simCode = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_simCode has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_simCode = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_TypeDefinitionsClocks(threadData, _txt, _a_simCode);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__180(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_simCode)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__180(threadData, _in_txt, tmp1, _in_a_simCode);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_fmiTypeDefinitions(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simCode, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simCode;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_simCode = NULL;
      modelica_metatype _i_modelInfo = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _i_simCode has no default value.
      // _i_modelInfo has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _txt = tmp4_1;
          _i_simCode = tmp4_2;
          _i_modelInfo = tmpMeta6;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__178(threadData, _txt, _i_modelInfo, _a_FMUVersion, _i_simCode);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__178(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_modelInfo;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_vars = NULL;
      modelica_metatype _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _a_simCode has no default value.
      // _i_vars has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 11));
          
          _txt = tmp4_1;
          _i_vars = tmpMeta6;
          _a_FMUVersion = tmp4_3;
          _a_simCode = tmp4_4;
          /* Pattern matching succeeded */
          _ret_0 = omc_SimCodeUtil_getEnumerationTypes(threadData, _i_vars);
          tmpMeta1 = omc_CodegenFMUCommon_TypeDefinitionsHelper(threadData, _txt, _a_simCode, _ret_0, _a_FMUVersion);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_baseUnitAttributes(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_baseUnit)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_baseUnit;
    {
      modelica_metatype _txt = NULL;
      modelica_real _i_offset;
      modelica_real _i_factor;
      modelica_integer _i_cd;
      modelica_integer _i_mol;
      modelica_integer _i_K;
      modelica_integer _i_A;
      modelica_integer _i_kg;
      modelica_integer _i_m;
      modelica_integer _i_s;
      modelica_boolean _ret_17;
      modelica_metatype _l_offset__Value = NULL;
      modelica_boolean _ret_15;
      modelica_metatype _l_factor__Value = NULL;
      modelica_boolean _ret_13;
      modelica_metatype _l_cd__Value = NULL;
      modelica_boolean _ret_11;
      modelica_metatype _l_mol__Value = NULL;
      modelica_boolean _ret_9;
      modelica_metatype _l_K__Value = NULL;
      modelica_boolean _ret_7;
      modelica_metatype _l_A__Value = NULL;
      modelica_boolean _ret_5;
      modelica_metatype _l_kg__Value = NULL;
      modelica_boolean _ret_3;
      modelica_metatype _l_m__Value = NULL;
      modelica_boolean _ret_1;
      modelica_metatype _l_s__Value = NULL;
      int tmp4;
      // _txt has no default value.
      // _i_offset has no default value.
      // _i_factor has no default value.
      // _i_cd has no default value.
      // _i_mol has no default value.
      // _i_K has no default value.
      // _i_A has no default value.
      // _i_kg has no default value.
      // _i_m has no default value.
      // _i_s has no default value.
      // _ret_17 has no default value.
      // _l_offset__Value has no default value.
      // _ret_15 has no default value.
      // _l_factor__Value has no default value.
      // _ret_13 has no default value.
      // _l_cd__Value has no default value.
      // _ret_11 has no default value.
      // _l_mol__Value has no default value.
      // _ret_9 has no default value.
      // _l_K__Value has no default value.
      // _ret_7 has no default value.
      // _l_A__Value has no default value.
      // _ret_5 has no default value.
      // _l_kg__Value has no default value.
      // _ret_3 has no default value.
      // _l_m__Value has no default value.
      // _ret_1 has no default value.
      // _l_s__Value has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 3: {
          modelica_metatype tmpMeta5;
          modelica_integer tmp6;
          modelica_metatype tmpMeta7;
          modelica_integer tmp8;
          modelica_metatype tmpMeta9;
          modelica_integer tmp10;
          modelica_metatype tmpMeta11;
          modelica_integer tmp12;
          modelica_metatype tmpMeta13;
          modelica_integer tmp14;
          modelica_metatype tmpMeta15;
          modelica_integer tmp16;
          modelica_metatype tmpMeta17;
          modelica_integer tmp18;
          modelica_metatype tmpMeta19;
          modelica_real tmp20;
          modelica_metatype tmpMeta21;
          modelica_real tmp22;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,9) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp6 = mmc_unbox_integer(tmpMeta5);
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmp8 = mmc_unbox_integer(tmpMeta7);
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmp10 = mmc_unbox_integer(tmpMeta9);
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          tmp12 = mmc_unbox_integer(tmpMeta11);
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 6));
          tmp14 = mmc_unbox_integer(tmpMeta13);
          tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
          tmp16 = mmc_unbox_integer(tmpMeta15);
          tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 8));
          tmp18 = mmc_unbox_integer(tmpMeta17);
          tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 9));
          tmp20 = mmc_unbox_real(tmpMeta19);
          tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 10));
          tmp22 = mmc_unbox_real(tmpMeta21);
          
          _i_s = tmp6  /* pattern as ty=Integer */;
          _i_m = tmp8  /* pattern as ty=Integer */;
          _i_kg = tmp10  /* pattern as ty=Integer */;
          _i_A = tmp12  /* pattern as ty=Integer */;
          _i_K = tmp14  /* pattern as ty=Integer */;
          _i_mol = tmp16  /* pattern as ty=Integer */;
          _i_cd = tmp18  /* pattern as ty=Integer */;
          _i_factor = tmp20  /* pattern as ty=Real */;
          _i_offset = tmp22  /* pattern as ty=Real */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_1 = (_i_s == ((modelica_integer) 0));

          _l_s__Value = omc_CodegenFMUCommon_fun__168(threadData, _OMC_LIT49, _ret_1, _i_s);

          _ret_3 = (_i_m == ((modelica_integer) 0));

          _l_m__Value = omc_CodegenFMUCommon_fun__169(threadData, _OMC_LIT49, _ret_3, _i_m);

          _ret_5 = (_i_kg == ((modelica_integer) 0));

          _l_kg__Value = omc_CodegenFMUCommon_fun__170(threadData, _OMC_LIT49, _ret_5, _i_kg);

          _ret_7 = (_i_A == ((modelica_integer) 0));

          _l_A__Value = omc_CodegenFMUCommon_fun__171(threadData, _OMC_LIT49, _ret_7, _i_A);

          _ret_9 = (_i_K == ((modelica_integer) 0));

          _l_K__Value = omc_CodegenFMUCommon_fun__172(threadData, _OMC_LIT49, _ret_9, _i_K);

          _ret_11 = (_i_mol == ((modelica_integer) 0));

          _l_mol__Value = omc_CodegenFMUCommon_fun__173(threadData, _OMC_LIT49, _ret_11, _i_mol);

          _ret_13 = (_i_cd == ((modelica_integer) 0));

          _l_cd__Value = omc_CodegenFMUCommon_fun__174(threadData, _OMC_LIT49, _ret_13, _i_cd);

          _ret_15 = (1e-6 > fabs(_i_factor - 1.0));

          _l_factor__Value = omc_CodegenFMUCommon_fun__175(threadData, _OMC_LIT49, _ret_15, _i_factor);

          _ret_17 = (1e-6 > fabs(_i_offset));

          _l_offset__Value = omc_CodegenFMUCommon_fun__176(threadData, _OMC_LIT49, _ret_17, _i_offset);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT63);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_mol__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_cd__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_m__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_s__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_A__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_K__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_kg__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_factor__Value);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_offset__Value);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__176(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_real _in_a_offset)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_real tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_offset;
    {
      modelica_metatype _txt = NULL;
      modelica_real _a_offset;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_offset has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_offset = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT65);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_offset));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__176(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_offset)
{
  modelica_integer tmp1;
  modelica_real tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_real(_in_a_offset);
  _out_txt = omc_CodegenFMUCommon_fun__176(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__175(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_real _in_a_factor)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_real tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_factor;
    {
      modelica_metatype _txt = NULL;
      modelica_real _a_factor;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_factor has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_factor = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT69);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_a_factor));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__175(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_factor)
{
  modelica_integer tmp1;
  modelica_real tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_real(_in_a_factor);
  _out_txt = omc_CodegenFMUCommon_fun__175(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__174(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_cd)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_cd;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_cd;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_cd has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_cd = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT71);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_cd));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__174(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_cd)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_cd);
  _out_txt = omc_CodegenFMUCommon_fun__174(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__173(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_mol)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_mol;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_mol;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_mol has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_mol = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT73);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_mol));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__173(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_mol)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_mol);
  _out_txt = omc_CodegenFMUCommon_fun__173(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__172(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_K)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_K;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_K;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_K has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_K = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT75);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_K));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__172(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_K)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_K);
  _out_txt = omc_CodegenFMUCommon_fun__172(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__171(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_A)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_A;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_A;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_A has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_A = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT77);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_A));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__171(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_A)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_A);
  _out_txt = omc_CodegenFMUCommon_fun__171(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__170(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_kg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_kg;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_kg;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_kg has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_kg = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT79);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_kg));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__170(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_kg)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_kg);
  _out_txt = omc_CodegenFMUCommon_fun__170(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__169(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_m)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_m;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_m;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_m has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_m = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT81);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_m));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__169(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_m)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_m);
  _out_txt = omc_CodegenFMUCommon_fun__169(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__168(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_s)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_s;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_s;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_s has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_s = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT83);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_s));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT67);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__168(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_s)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_s);
  _out_txt = omc_CodegenFMUCommon_fun__168(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_unitDefinitionAttribute(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_unitName)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype _l_unitString = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _l_unitString has no default value.
  _l_unitString = omc_CodegenFMUCommon_fun__166(threadData, _OMC_LIT49, _a_unitName);

  _out_txt = omc_Tpl_writeText(threadData, _txt, _l_unitString);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__166(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unitName)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_unitName;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_unitName = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_unitName has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_unitName = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT85);

          _txt = omc_Tpl_writeStr(threadData, _txt, _i_unitName);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_UnitDefinitionsHelper1(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_unitDefinition)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_unitDefinition;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_baseUnit = NULL;
      modelica_string _i_name = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_baseUnit has no default value.
      // _i_name has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          _txt = tmp4_1;
          _i_name = tmpMeta6;
          _i_baseUnit = tmpMeta7;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT87);

          _txt = omc_CodegenFMUCommon_unitDefinitionAttribute(threadData, _txt, _i_name);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT89);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_baseUnitAttributes(threadData, _txt, _i_baseUnit);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT91);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_UnitDefinitionsHelper(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_unitDefinitions)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_unitDefinitions;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_unitDefinitions = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_unitDefinitions has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_unitDefinitions = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT93);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__163(threadData, _txt, _i_unitDefinitions);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT95);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__163(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_metatype _i_unitDefinition = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_unitDefinition has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_unitDefinition = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_UnitDefinitionsHelper1(threadData, _txt, _i_unitDefinition);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_UnitDefinitions(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_modelInfo = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_modelInfo has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _txt = tmp4_1;
          _i_modelInfo = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__161(threadData, _txt, _i_modelInfo);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__161(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_modelInfo;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_unitDefinitions = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_unitDefinitions has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 22));
          _txt = tmp4_1;
          _i_unitDefinitions = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_UnitDefinitionsHelper(threadData, _txt, _i_unitDefinitions);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_xsdateTime(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_dt)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_dt;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _i_sec;
      modelica_integer _i_min;
      modelica_integer _i_hour;
      modelica_integer _i_mday;
      modelica_integer _i_mon;
      modelica_integer _i_year;
      modelica_string _ret_4 = NULL;
      modelica_string _ret_3 = NULL;
      modelica_string _ret_2 = NULL;
      modelica_string _ret_1 = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_sec has no default value.
      // _i_min has no default value.
      // _i_hour has no default value.
      // _i_mday has no default value.
      // _i_mon has no default value.
      // _i_year has no default value.
      // _ret_4 has no default value.
      // _ret_3 has no default value.
      // _ret_2 has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_integer tmp7;
          modelica_metatype tmpMeta8;
          modelica_integer tmp9;
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          modelica_metatype tmpMeta12;
          modelica_integer tmp13;
          modelica_metatype tmpMeta14;
          modelica_integer tmp15;
          modelica_metatype tmpMeta16;
          modelica_integer tmp17;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp7 = mmc_unbox_integer(tmpMeta6);
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmp9 = mmc_unbox_integer(tmpMeta8);
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmp11 = mmc_unbox_integer(tmpMeta10);
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          tmp13 = mmc_unbox_integer(tmpMeta12);
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 6));
          tmp15 = mmc_unbox_integer(tmpMeta14);
          tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
          tmp17 = mmc_unbox_integer(tmpMeta16);
          _txt = tmp4_1;
          _i_sec = tmp7  /* pattern as ty=Integer */;
          _i_min = tmp9  /* pattern as ty=Integer */;
          _i_hour = tmp11  /* pattern as ty=Integer */;
          _i_mday = tmp13  /* pattern as ty=Integer */;
          _i_mon = tmp15  /* pattern as ty=Integer */;
          _i_year = tmp17  /* pattern as ty=Integer */;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_i_year));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT97);

          _ret_0 = omc_SimCodeFunctionUtil_twodigit(threadData, _i_mon);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT97);

          _ret_1 = omc_SimCodeFunctionUtil_twodigit(threadData, _i_mday);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT99);

          _ret_2 = omc_SimCodeFunctionUtil_twodigit(threadData, _i_hour);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_2);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT101);

          _ret_3 = omc_SimCodeFunctionUtil_twodigit(threadData, _i_min);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_3);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT101);

          _ret_4 = omc_SimCodeFunctionUtil_twodigit(threadData, _i_sec);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_4);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT103);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_statesnumwithDummy(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_vars)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

  _out_txt = omc_CodegenFMUCommon_lm__158(threadData, _out_txt, _a_vars);

  _out_txt = omc_Tpl_popIter(threadData, _out_txt);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__158(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_fun__157(threadData, _txt, _i_var);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__157(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_var)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_var;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_name = NULL;
      modelica_boolean _ret_1;
      modelica_metatype _txt_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_name has no default value.
      // _ret_1 has no default value.
      // _txt_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _txt = tmp4_1;
          _i_name = tmpMeta6;
          /* Pattern matching succeeded */
          _txt_0 = omc_CodegenUtil_crefStr(threadData, _OMC_LIT49, _i_name);

          _ret_1 = (stringEqual(omc_Tpl_textString(threadData, _txt_0), _OMC_LIT104));
          tmpMeta1 = omc_CodegenFMUCommon_fun__156(threadData, _txt, _ret_1);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__156(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT106);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT108);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__156(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__156(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_relativeQuantity(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_boolean _i_relativeQuantity;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_relativeQuantity has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_integer tmp7;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 32));
          tmp7 = mmc_unbox_integer(tmpMeta6);
          _txt = tmp4_1;
          _i_relativeQuantity = tmp7  /* pattern as ty=Boolean */;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__154(threadData, _txt, _i_relativeQuantity);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__154(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_a_relativeQuantity)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_relativeQuantity;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (1 /* true */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT110);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__154(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_relativeQuantity)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_a_relativeQuantity);
  _out_txt = omc_CodegenFMUCommon_fun__154(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_UnitString2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_displayUnit = NULL;
      modelica_string _i_unit = NULL;
      modelica_metatype _l_unitString = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_displayUnit has no default value.
      // _i_unit has no default value.
      // _l_unitString has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 6));
          
          _txt = tmp4_1;
          _i_unit = tmpMeta6;
          _i_displayUnit = tmpMeta7;
          /* Pattern matching succeeded */
          _l_unitString = omc_CodegenFMUCommon_fun__151(threadData, _OMC_LIT49, _i_unit);

          omc_CodegenFMUCommon_fun__152(threadData, _OMC_LIT49, _i_displayUnit);
          tmpMeta1 = omc_Tpl_writeText(threadData, _txt, _l_unitString);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__152(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_displayUnit)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_displayUnit;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_displayUnit = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_displayUnit has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_displayUnit = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT113);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_displayUnit);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__151(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unit)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_unit;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_unit = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_unit has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_unit = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT115);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_unit);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_NominalString2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_nominalValue = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_nominalValue has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 11));
          
          _txt = tmp4_1;
          _i_nominalValue = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__149(threadData, _txt, _i_nominalValue);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__149(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_nominalValue)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_nominalValue;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_e = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_e has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT117);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_MaxString2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_maxValue = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_maxValue has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 9));
          
          _txt = tmp4_1;
          _i_maxValue = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__147(threadData, _txt, _i_maxValue);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__147(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_maxValue)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_maxValue;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_e = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_e has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT119);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT119);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta8;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT119);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT119);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,5,2) == 0) goto tmp3_end;
          
          _i_e = tmpMeta10;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT119);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_MinString2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_minValue = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_minValue has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 8));
          
          _txt = tmp4_1;
          _i_minValue = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__145(threadData, _txt, _i_minValue);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__145(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_minValue)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_minValue;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_e = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_e has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta8;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,5,2) == 0) goto tmp3_end;
          
          _i_e = tmpMeta10;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT121);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_startString2Helper(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp, modelica_metatype _in_a_type__)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_exp;
    tmp4_3 = _in_a_type__;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_type__ = NULL;
      modelica_metatype _i_e = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_type__ has no default value.
      // _i_e has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          
          _i_e = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_type__ = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_initDefaultValXml(threadData, _txt, _a_type__);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_startString3(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_initialValue = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_initialValue has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 10));
          
          _txt = tmp4_1;
          _i_initialValue = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__142(threadData, _txt, _i_initialValue);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__142(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_initialValue)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_initialValue;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_e = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_e has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta8;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,5,2) == 0) goto tmp3_end;
          
          _i_e = tmpMeta10;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_StartString2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_initial__ = NULL;
      modelica_metatype _i_simvar = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_initial__ has no default value.
      // _i_simvar has no default value.
      tmp4 = 0;
      for (; tmp4 < 5; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 16));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 10));
          if (!optionNone(tmpMeta7)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 18));
          if (optionNone(tmpMeta8)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta8), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,2,0) == 0) goto tmp3_end;
          
          _i_simvar = tmp4_2;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_startString3(threadData, _txt, _i_simvar);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta10;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 30));
          
          _txt = tmp4_1;
          _i_simvar = tmp4_2;
          _i_initial__ = tmpMeta10;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__140(threadData, _txt, _i_initial__, _i_simvar);
          goto tmp3_done;
        }
        case 4: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__140(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_initial__, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_initial__;
    tmp4_3 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simvar = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_simvar has no default value.
      tmp4 = 0;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_startString3(threadData, _txt, _a_simvar);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_startString3(threadData, _txt, _a_simvar);
          goto tmp3_done;
        }
        case 2: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_DerivativeVarIndex(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar, modelica_metatype _in_a_stateVars)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    tmp4_3 = _in_a_stateVars;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_integer _i_index;
      modelica_metatype _i_varKind = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _i_index has no default value.
      // _i_varKind has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_integer tmp8;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 7));
          tmp8 = mmc_unbox_integer(tmpMeta7);
          
          _txt = tmp4_1;
          _i_varKind = tmpMeta6;
          _i_index = tmp8  /* pattern as ty=Integer */;
          _a_stateVars = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__138(threadData, _txt, _i_varKind, _i_index, _a_stateVars);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__138(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind, modelica_integer _in_a_index, modelica_metatype _in_a_stateVars)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_integer tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_varKind;
    tmp4_3 = _in_a_index;
    tmp4_4 = _in_a_stateVars;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_index;
      modelica_metatype _a_stateVars = NULL;
      modelica_integer _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_index has no default value.
      // _a_stateVars has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_index = tmp4_3;
          _a_stateVars = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT125);

          _ret_0 = omc_SimCodeUtil_getStateSimVarIndexFromIndex(threadData, _a_stateVars, _a_index);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_ret_0));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__138(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind, modelica_metatype _in_a_index, modelica_metatype _in_a_stateVars)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_a_index);
  _out_txt = omc_CodegenFMUCommon_fun__138(threadData, _in_txt, _in_a_varKind, tmp1, _in_a_stateVars);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariableTypeCommonAttribute2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar, modelica_metatype _in_a_stateVars)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    tmp4_3 = _in_a_stateVars;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _i_simvar = NULL;
      modelica_metatype _l_extraAttributes = NULL;
      modelica_metatype _l_startString = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _i_simvar has no default value.
      // _l_extraAttributes has no default value.
      // _l_startString has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          
          _txt = tmp4_1;
          _i_simvar = tmp4_2;
          _a_stateVars = tmp4_3;
          /* Pattern matching succeeded */
          _l_startString = omc_CodegenFMUCommon_StartString2(threadData, _OMC_LIT49, _i_simvar);

          _l_extraAttributes = omc_CodegenFMUCommon_DerivativeVarIndex(threadData, _OMC_LIT49, _i_simvar, _a_stateVars);

          _l_extraAttributes = omc_CodegenFMUCommon_MinString2(threadData, _l_extraAttributes, _i_simvar);

          _l_extraAttributes = omc_CodegenFMUCommon_MaxString2(threadData, _l_extraAttributes, _i_simvar);

          _l_extraAttributes = omc_CodegenFMUCommon_NominalString2(threadData, _l_extraAttributes, _i_simvar);

          _l_extraAttributes = omc_CodegenFMUCommon_UnitString2(threadData, _l_extraAttributes, _i_simvar);

          _l_extraAttributes = omc_CodegenFMUCommon_relativeQuantity(threadData, _l_extraAttributes, _i_simvar);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_startString);
          tmpMeta1 = omc_Tpl_writeText(threadData, _txt, _l_extraAttributes);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariableType2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar, modelica_metatype _in_a_stateVars)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    tmp4_3 = _in_a_stateVars;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _i_simvar = NULL;
      modelica_metatype _i_type__ = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _i_simvar has no default value.
      // _i_type__ has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 13));
          
          _txt = tmp4_1;
          _i_simvar = tmp4_2;
          _i_type__ = tmpMeta6;
          _a_stateVars = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__135(threadData, _txt, _i_type__, _a_stateVars, _i_simvar);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__135(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_type__;
    tmp4_3 = _in_a_stateVars;
    tmp4_4 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simvar = NULL;
      modelica_metatype _i_path = NULL;
      modelica_string _ret_0 = NULL;
      int tmp4;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _a_simvar has no default value.
      // _i_path has no default value.
      // _ret_0 has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simvar = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT127);

          _txt = omc_CodegenFMUCommon_ScalarVariableTypeCommonAttribute2(threadData, _txt, _a_simvar, _a_stateVars);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 3: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simvar = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT129);

          _txt = omc_CodegenFMUCommon_ScalarVariableTypeCommonAttribute2(threadData, _txt, _a_simvar, _a_stateVars);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 6: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simvar = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT131);

          _txt = omc_CodegenFMUCommon_ScalarVariableTypeCommonAttribute2(threadData, _txt, _a_simvar, _a_stateVars);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 5: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simvar = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT133);

          _txt = omc_CodegenFMUCommon_ScalarVariableTypeCommonAttribute2(threadData, _txt, _a_simvar, _a_stateVars);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta5;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          
          _i_path = tmpMeta5;
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simvar = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT135);

          _ret_0 = omc_AbsynUtil_pathString(threadData, _i_path, _OMC_LIT16, 0 /* false */, 0 /* false */);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);

          _txt = omc_CodegenFMUCommon_ScalarVariableTypeCommonAttribute2(threadData, _txt, _a_simvar, _a_stateVars);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT137);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_getNumberOfEventIndicators(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _i_vi_numZeroCrossings;
      modelica_metatype _i_zeroCrossings = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_vi_numZeroCrossings has no default value.
      // _i_zeroCrossings has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_integer tmp9;
          modelica_metatype tmpMeta10;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 10));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
          tmp9 = mmc_unbox_integer(tmpMeta8);
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 27));
          
          _txt = tmp4_1;
          _i_vi_numZeroCrossings = tmp9  /* pattern as ty=Integer */;
          _i_zeroCrossings = tmpMeta10;
          /* Pattern matching succeeded */
          _ret_0 = omc_Config_simCodeTarget(threadData);
          tmpMeta1 = omc_CodegenFMUCommon_fun__133(threadData, _txt, _ret_0, _i_vi_numZeroCrossings, _i_zeroCrossings);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__133(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_mArg, modelica_integer _in_a_vi_numZeroCrossings, modelica_metatype _in_a_zeroCrossings)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_integer tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_vi_numZeroCrossings;
    tmp4_4 = _in_a_zeroCrossings;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_vi_numZeroCrossings;
      modelica_metatype _a_zeroCrossings = NULL;
      modelica_integer _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_vi_numZeroCrossings has no default value.
      // _a_zeroCrossings has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (3 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT138), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_zeroCrossings = tmp4_4;
          /* Pattern matching succeeded */
          _ret_0 = listLength(_a_zeroCrossings);
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_ret_0));
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_vi_numZeroCrossings = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_a_vi_numZeroCrossings));
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__133(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_vi_numZeroCrossings, modelica_metatype _in_a_zeroCrossings)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_a_vi_numZeroCrossings);
  _out_txt = omc_CodegenFMUCommon_fun__133(threadData, _in_txt, _in_mArg, tmp1, _in_a_zeroCrossings);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_getCausality2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_c)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_c;
    {
      modelica_metatype _txt = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 7; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT140);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT142);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT144);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_0 = omc_Flags_isSet(threadData, _OMC_LIT148);
          tmpMeta1 = omc_CodegenFMUCommon_fun__131(threadData, _txt, _ret_0);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,4,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT150);
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta11;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta11,5,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT152);
          goto tmp3_done;
        }
        case 6: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__131(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT154);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__131(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__131(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_getVariability2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_variability)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_variability;
    {
      modelica_metatype _txt = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT156);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT158);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT160);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,4,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_0 = omc_Flags_isSet(threadData, _OMC_LIT148);
          tmpMeta1 = omc_CodegenFMUCommon_fun__129(threadData, _txt, _ret_0);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT162);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__129(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT164);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__129(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__129(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariableAttribute2(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simVar, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simVar;
    tmp4_3 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_causality = NULL;
      modelica_metatype _i_varKind = NULL;
      modelica_metatype _i_variability = NULL;
      modelica_string _i_comment = NULL;
      modelica_metatype _i_simVar = NULL;
      modelica_metatype _i_exportVar = NULL;
      modelica_boolean _ret_31;
      modelica_boolean _ret_30;
      modelica_boolean _ret_29;
      modelica_boolean _ret_28;
      modelica_boolean _ret_27;
      modelica_boolean _ret_26;
      modelica_boolean _ret_25;
      modelica_boolean _ret_24;
      modelica_boolean _ret_23;
      modelica_boolean _ret_22;
      modelica_boolean _ret_21;
      modelica_boolean _ret_20;
      modelica_boolean _ret_19;
      modelica_boolean _ret_18;
      modelica_string _ret_17 = NULL;
      modelica_metatype _l_initial = NULL;
      modelica_metatype _l_caus = NULL;
      modelica_metatype _l_previous = NULL;
      modelica_metatype _ret_13 = NULL;
      modelica_metatype _l_clockIndex = NULL;
      modelica_metatype _ret_11 = NULL;
      modelica_metatype _l_variability__ = NULL;
      modelica_metatype _l_description = NULL;
      modelica_string _ret_8 = NULL;
      modelica_metatype _l_valueReference = NULL;
      modelica_integer _ret_6;
      modelica_string _ret_4 = NULL;
      modelica_string _ret_3 = NULL;
      modelica_metatype _txt_2 = NULL;
      modelica_metatype _ret_1 = NULL;
      modelica_metatype _l_name = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_simCode has no default value.
      // _i_causality has no default value.
      // _i_varKind has no default value.
      // _i_variability has no default value.
      // _i_comment has no default value.
      // _i_simVar has no default value.
      // _i_exportVar has no default value.
      // _ret_31 has no default value.
      // _ret_30 has no default value.
      // _ret_29 has no default value.
      // _ret_28 has no default value.
      // _ret_27 has no default value.
      // _ret_26 has no default value.
      // _ret_25 has no default value.
      // _ret_24 has no default value.
      // _ret_23 has no default value.
      // _ret_22 has no default value.
      // _ret_21 has no default value.
      // _ret_20 has no default value.
      // _ret_19 has no default value.
      // _ret_18 has no default value.
      // _ret_17 has no default value.
      // _l_initial has no default value.
      // _l_caus has no default value.
      // _l_previous has no default value.
      // _ret_13 has no default value.
      // _l_clockIndex has no default value.
      // _ret_11 has no default value.
      // _l_variability__ has no default value.
      // _l_description has no default value.
      // _ret_8 has no default value.
      // _l_valueReference has no default value.
      // _ret_6 has no default value.
      // _ret_4 has no default value.
      // _ret_3 has no default value.
      // _txt_2 has no default value.
      // _ret_1 has no default value.
      // _l_name has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 18));
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 29));
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 31));
          
          _txt = tmp4_1;
          _i_simVar = tmp4_2;
          _i_varKind = tmpMeta6;
          _i_comment = tmpMeta7;
          _i_causality = tmpMeta8;
          _i_variability = tmpMeta9;
          _i_exportVar = tmpMeta10;
          _a_simCode = tmp4_3;
          /* Pattern matching succeeded */
          _ret_1 = omc_Util_getOption(threadData, _i_exportVar);

          _txt_2 = omc_CodegenUtil_crefStrNoUnderscore(threadData, _OMC_LIT49, _ret_1);

          _ret_3 = omc_System_stringReplace(threadData, omc_Tpl_textString(threadData, _txt_2), _OMC_LIT165, _OMC_LIT166);

          _ret_4 = omc_Util_escapeModelicaStringToXmlString(threadData, _ret_3);

          _l_name = omc_Tpl_writeStr(threadData, _OMC_LIT49, _ret_4);

          _ret_6 = omc_System_tmpTick(threadData);

          omc_Tpl_writeStr(threadData, _OMC_LIT49, intString(_ret_6));

          _ret_8 = omc_SimCodeUtil_getValueReference(threadData, _i_simVar, _a_simCode, 0 /* false */);

          _l_valueReference = omc_Tpl_writeStr(threadData, _OMC_LIT49, _ret_8);

          _l_description = omc_CodegenFMUCommon_fun__119(threadData, _OMC_LIT49, _i_comment);

          _ret_11 = omc_SimCodeUtil_getClockIndex(threadData, _i_simVar, _a_simCode);

          _l_variability__ = omc_CodegenFMUCommon_fun__120(threadData, _OMC_LIT49, _ret_11, _i_variability);

          _ret_13 = omc_SimCodeUtil_getClockIndex(threadData, _i_simVar, _a_simCode);

          _l_clockIndex = omc_CodegenFMUCommon_fun__121(threadData, _OMC_LIT49, _ret_13);

          _l_previous = omc_CodegenFMUCommon_fun__122(threadData, _OMC_LIT49, _i_varKind, _a_simCode);

          _l_caus = omc_CodegenFMUCommon_getCausality2(threadData, _OMC_LIT49, _i_causality);

          _ret_17 = omc_SimCodeUtil_getFmiInitialAttributeStr(threadData, _i_simVar);

          _l_initial = omc_Tpl_writeStr(threadData, _OMC_LIT49, _ret_17);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT85);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_name);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT171);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_valueReference);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT172);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_description);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_18 = (stringEqual(omc_Tpl_textString(threadData, _l_variability__), _OMC_LIT50));

          _ret_19 = (!_ret_18);

          _txt = omc_CodegenFMUCommon_fun__123(threadData, _txt, _ret_19, _l_variability__);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_20 = (stringEqual(omc_Tpl_textString(threadData, _l_caus), _OMC_LIT50));

          _ret_21 = (!_ret_20);

          _txt = omc_CodegenFMUCommon_fun__124(threadData, _txt, _ret_21, _l_caus);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_22 = (stringEqual(omc_Tpl_textString(threadData, _l_clockIndex), _OMC_LIT50));

          _ret_23 = (!_ret_22);

          _ret_24 = omc_Flags_getConfigBool(threadData, _OMC_LIT61);

          _ret_25 = (_ret_23 && _ret_24);

          _txt = omc_CodegenFMUCommon_fun__125(threadData, _txt, _ret_25, _l_clockIndex);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_26 = (stringEqual(omc_Tpl_textString(threadData, _l_previous), _OMC_LIT50));

          _ret_27 = (!_ret_26);

          _ret_28 = omc_Flags_getConfigBool(threadData, _OMC_LIT61);

          _ret_29 = (_ret_27 && _ret_28);

          _txt = omc_CodegenFMUCommon_fun__126(threadData, _txt, _ret_29, _l_previous);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_30 = (stringEqual(omc_Tpl_textString(threadData, _l_initial), _OMC_LIT50));

          _ret_31 = (!_ret_30);
          tmpMeta1 = omc_CodegenFMUCommon_fun__127(threadData, _txt, _ret_31, _l_initial);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__127(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_initial)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_initial;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_initial = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_initial has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_initial = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT174);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_initial);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__127(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_initial)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__127(threadData, _in_txt, tmp1, _in_a_initial);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__126(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_previous)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_previous;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_previous = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_previous has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_previous = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT176);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_previous);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__126(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_previous)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__126(threadData, _in_txt, tmp1, _in_a_previous);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__125(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_clockIndex)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_clockIndex;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_clockIndex = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_clockIndex has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_clockIndex = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT178);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_clockIndex);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__125(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_clockIndex)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__125(threadData, _in_txt, tmp1, _in_a_clockIndex);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__124(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_caus)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_caus;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_caus = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_caus has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_caus = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT180);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_caus);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__124(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_caus)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__124(threadData, _in_txt, tmp1, _in_a_caus);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__123(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_variability__)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_variability__;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_variability__ = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_variability__ has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_variability__ = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT182);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_variability__);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__123(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_variability__)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__123(threadData, _in_txt, tmp1, _in_a_variability__);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__122(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_varKind;
    tmp4_3 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_previousName = NULL;
      modelica_integer _ret_1;
      modelica_metatype _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_simCode has no default value.
      // _i_previousName has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_previousName = tmpMeta6;
          _txt = tmp4_1;
          _a_simCode = tmp4_3;
          /* Pattern matching succeeded */
          _ret_0 = omc_SimCodeUtil_cref2simvar(threadData, _i_previousName, _a_simCode);

          _ret_1 = omc_SimCodeUtil_getVariableFMIIndex(threadData, _ret_0);
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_ret_1));
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__121(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _i_val;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_val has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_integer tmp7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          tmp7 = mmc_unbox_integer(tmpMeta6);
          
          _i_val = tmp7  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_val));
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__120(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_variability)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_variability;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_variability = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_variability has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!optionNone(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_variability = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_getVariability2(threadData, _txt, _a_variability);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT156);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__119(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_comment)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_comment;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_comment = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_comment has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_comment = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT184);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_comment);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_FmiUnknownDependenciesKind(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_dependenciesKind)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT186);

  _out_txt = omc_Tpl_pushIter(threadData, _out_txt, _OMC_LIT190);

  _out_txt = omc_CodegenFMUCommon_lm__117(threadData, _out_txt, _a_dependenciesKind);

  _out_txt = omc_Tpl_popIter(threadData, _out_txt);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT7);

  _out_txt = omc_Tpl_popBlock(threadData, _out_txt);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__117(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _i_dependencyKind = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_dependencyKind has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_dependencyKind = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _i_dependencyKind);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_FmiUnknownDependencies(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_dependencies)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT192);

  _out_txt = omc_Tpl_pushIter(threadData, _out_txt, _OMC_LIT190);

  _out_txt = omc_CodegenFMUCommon_lm__115(threadData, _out_txt, _a_dependencies);

  _out_txt = omc_Tpl_popIter(threadData, _out_txt);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT7);

  _out_txt = omc_Tpl_popBlock(threadData, _out_txt);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__115(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_integer _i_dependency;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_dependency has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_integer tmp8;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          tmp8 = mmc_unbox_integer(tmpMeta6);
          
          _i_dependency = tmp8  /* pattern as ty=Integer */;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_i_dependency));

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_FmiUnknownAttributes(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fmiUnknown)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fmiUnknown;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_dependenciesKind = NULL;
      modelica_metatype _i_dependencies = NULL;
      modelica_integer _i_index;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_dependenciesKind has no default value.
      // _i_dependencies has no default value.
      // _i_index has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_integer tmp7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp7 = mmc_unbox_integer(tmpMeta6);
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          _txt = tmp4_1;
          _i_index = tmp7  /* pattern as ty=Integer */;
          _i_dependencies = tmpMeta8;
          _i_dependenciesKind = tmpMeta9;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT194);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_i_index));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);

          _txt = omc_CodegenFMUCommon_FmiUnknownDependencies(threadData, _txt, _i_dependencies);

          _txt = omc_CodegenFMUCommon_FmiUnknownDependenciesKind(threadData, _txt, _i_dependenciesKind);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT196);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelStructureUnknowns(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_fmiUnknownsList)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

  _out_txt = omc_CodegenFMUCommon_lm__112(threadData, _out_txt, _a_fmiUnknownsList);

  _out_txt = omc_Tpl_popIter(threadData, _out_txt);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__112(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_metatype _i_fmiUnknown = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_fmiUnknown has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_fmiUnknown = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_FmiUnknownAttributes(threadData, _txt, _i_fmiUnknown);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelStructureInitialUnknowns(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fmiInitialUnknowns)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fmiInitialUnknowns;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_fmiUnknownsList = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_fmiUnknownsList has no default value.
      tmp4 = 0;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (!listEmpty(tmpMeta6)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _txt = tmp4_1;
          _i_fmiUnknownsList = tmpMeta7;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT198);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ModelStructureUnknowns(threadData, _txt, _i_fmiUnknownsList);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT200);
          goto tmp3_done;
        }
        case 2: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelStructureDiscreteStates(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fmiDiscreteStates)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fmiDiscreteStates;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_fmiUnknownsList = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_fmiUnknownsList has no default value.
      tmp4 = 0;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (!listEmpty(tmpMeta6)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          _txt = tmp4_1;
          _i_fmiUnknownsList = tmpMeta7;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT202);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ModelStructureUnknowns(threadData, _txt, _i_fmiUnknownsList);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT204);
          goto tmp3_done;
        }
        case 2: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelStructureDerivatives(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fmiDerivatives)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fmiDerivatives;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_fmiUnknownsList = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_fmiUnknownsList has no default value.
      tmp4 = 0;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (!listEmpty(tmpMeta6)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          _txt = tmp4_1;
          _i_fmiUnknownsList = tmpMeta7;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT206);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ModelStructureUnknowns(threadData, _txt, _i_fmiUnknownsList);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT208);
          goto tmp3_done;
        }
        case 2: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelStructureOutputs(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fmiOutputs)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fmiOutputs;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_fmiUnknownsList = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_fmiUnknownsList has no default value.
      tmp4 = 0;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (!listEmpty(tmpMeta6)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          _txt = tmp4_1;
          _i_fmiUnknownsList = tmpMeta7;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT210);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ModelStructureUnknowns(threadData, _txt, _i_fmiUnknownsList);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT212);
          goto tmp3_done;
        }
        case 2: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_TypeDefinitionsClocks(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_clockedPartitions = NULL;
      modelica_string _str_1 = NULL;
      modelica_metatype _l_clocks = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_clockedPartitions has no default value.
      // _str_1 has no default value.
      // _l_clocks has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 11));
          
          _txt = tmp4_1;
          _i_clockedPartitions = tmpMeta7;
          /* Pattern matching succeeded */
          _l_clocks = omc_Tpl_pushIter(threadData, _OMC_LIT49, _OMC_LIT25);

          _l_clocks = omc_CodegenFMUCommon_lm__105(threadData, _l_clocks, _i_clockedPartitions);

          _l_clocks = omc_Tpl_popIter(threadData, _l_clocks);

          _str_1 = omc_Tpl_textString(threadData, _l_clocks);
          tmpMeta1 = omc_CodegenFMUCommon_fun__106(threadData, _txt, _str_1, _l_clocks);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__106(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_mArg, modelica_metatype _in_a_clocks)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_clocks;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_clocks = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_clocks has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_clocks = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT214);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_Tpl_writeText(threadData, _txt, _a_clocks);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT216);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__105(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_metatype _i_partition = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_partition has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_partition = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_fun__104(threadData, _txt, _i_partition);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__104(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_partition)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_partition;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_subPartitions = NULL;
      modelica_metatype _i_baseClock = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_subPartitions has no default value.
      // _i_baseClock has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          _txt = tmp4_1;
          _i_baseClock = tmpMeta6;
          _i_subPartitions = tmpMeta7;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__103(threadData, _txt, _i_baseClock, _i_subPartitions);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__103(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_baseClock, modelica_metatype _in_a_subPartitions)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_baseClock;
    tmp4_3 = _in_a_subPartitions;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_subPartitions = NULL;
      modelica_integer _i_resi;
      modelica_integer _i_bic;
      modelica_real _i_bi;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_subPartitions has no default value.
      // _i_resi has no default value.
      // _i_bic has no default value.
      // _i_bi has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_real tmp8;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,1,1) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
          tmp8 = mmc_unbox_real(tmpMeta7);
          
          _i_bi = tmp8  /* pattern as ty=Real */;
          _txt = tmp4_1;
          _a_subPartitions = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__99(threadData, _txt, _a_subPartitions, _i_bi);
          tmpMeta1 = omc_Tpl_popIter(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_integer tmp14;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,2) == 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,0,1) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
          tmp11 = mmc_unbox_integer(tmpMeta10);
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,1) == 0) goto tmp3_end;
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
          tmp14 = mmc_unbox_integer(tmpMeta13);
          
          _i_bic = tmp11  /* pattern as ty=Integer */;
          _i_resi = tmp14  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          _a_subPartitions = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__102(threadData, _txt, _a_subPartitions, _i_resi, _i_bic);
          tmpMeta1 = omc_Tpl_popIter(threadData, _txt);
          goto tmp3_done;
        }
        case 2: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT218);
          goto tmp3_done;
        }
        case 3: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,2) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT218);
          goto tmp3_done;
        }
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT218);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT220);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__102(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_integer _in_a_resi, modelica_integer _in_a_bic)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_integer tmp4_3;modelica_integer tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_resi;
    tmp4_4 = _in_a_bic;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_integer _a_resi;
      modelica_integer _a_bic;
      modelica_metatype _i_subPartition = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_resi has no default value.
      // _a_bic has no default value.
      // _i_subPartition has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_subPartition = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_resi = tmp4_3;
          _a_bic = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_fun__101(threadData, _txt, _i_subPartition, _a_resi, _a_bic);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_resi = _a_resi;
          _in_a_bic = _a_bic;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_lm__102(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_metatype _in_a_resi, modelica_metatype _in_a_bic)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_a_resi);
  tmp2 = mmc_unbox_integer(_in_a_bic);
  _out_txt = omc_CodegenFMUCommon_lm__102(threadData, _in_txt, _in_items, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__101(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_integer _in_a_resi, modelica_integer _in_a_bic)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_integer tmp4_3;modelica_integer tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_subPartition;
    tmp4_3 = _in_a_resi;
    tmp4_4 = _in_a_bic;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_resi;
      modelica_integer _a_bic;
      modelica_integer _i_fsuper;
      modelica_integer _i_snom;
      modelica_integer _i_sres;
      modelica_integer _i_fsub;
      modelica_integer _ret_4;
      modelica_integer _ret_3;
      modelica_boolean _ret_2;
      modelica_integer _ret_1;
      modelica_integer _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_resi has no default value.
      // _a_bic has no default value.
      // _i_fsuper has no default value.
      // _i_snom has no default value.
      // _i_sres has no default value.
      // _i_fsub has no default value.
      // _ret_4 has no default value.
      // _ret_3 has no default value.
      // _ret_2 has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_integer tmp9;
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_integer tmp14;
          modelica_metatype tmpMeta15;
          modelica_integer tmp16;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,3) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
          tmp9 = mmc_unbox_integer(tmpMeta8);
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
          tmp11 = mmc_unbox_integer(tmpMeta10);
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
          tmp14 = mmc_unbox_integer(tmpMeta13);
          tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
          tmp16 = mmc_unbox_integer(tmpMeta15);
          
          _i_fsub = tmp9  /* pattern as ty=Integer */;
          _i_fsuper = tmp11  /* pattern as ty=Integer */;
          _i_snom = tmp14  /* pattern as ty=Integer */;
          _i_sres = tmp16  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          _a_resi = tmp4_3;
          _a_bic = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT222);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT223);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT225);

          _ret_0 = (_a_bic) * (_i_fsub);

          _ret_1 = (_ret_0) * (_i_sres);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_ret_1));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT172);

          _ret_2 = (_i_snom > ((modelica_integer) 0));

          _txt = omc_CodegenFMUCommon_fun__100(threadData, _txt, _ret_2, _i_fsuper, _a_resi, _i_snom);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT227);

          _ret_3 = (_a_resi) * (_i_sres);

          _ret_4 = (_ret_3) * (_i_fsuper);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_ret_4));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT231);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__101(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_metatype _in_a_resi, modelica_metatype _in_a_bic)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_a_resi);
  tmp2 = mmc_unbox_integer(_in_a_bic);
  _out_txt = omc_CodegenFMUCommon_fun__101(threadData, _in_txt, _in_a_subPartition, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__100(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_fsuper, modelica_integer _in_a_resi, modelica_integer _in_a_snom)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;modelica_integer tmp4_4;modelica_integer tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_fsuper;
    tmp4_4 = _in_a_resi;
    tmp4_5 = _in_a_snom;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_fsuper;
      modelica_integer _a_resi;
      modelica_integer _a_snom;
      modelica_integer _ret_1;
      modelica_integer _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_fsuper has no default value.
      // _a_resi has no default value.
      // _a_snom has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_fsuper = tmp4_3;
          _a_resi = tmp4_4;
          _a_snom = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT233);

          _ret_0 = (_a_snom) * (_a_resi);

          _ret_1 = (_ret_0) * (_a_fsuper);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_ret_1));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__100(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_fsuper, modelica_metatype _in_a_resi, modelica_metatype _in_a_snom)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_integer tmp3;
  modelica_integer tmp4;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_fsuper);
  tmp3 = mmc_unbox_integer(_in_a_resi);
  tmp4 = mmc_unbox_integer(_in_a_snom);
  _out_txt = omc_CodegenFMUCommon_fun__100(threadData, _in_txt, tmp1, tmp2, tmp3, tmp4);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__99(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_real _in_a_bi)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_real tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_bi;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_real _a_bi;
      modelica_metatype _i_subPartition = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_bi has no default value.
      // _i_subPartition has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_subPartition = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_bi = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_fun__98(threadData, _txt, _i_subPartition, _a_bi);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_bi = _a_bi;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_lm__99(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_metatype _in_a_bi)
{
  modelica_real tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_real(_in_a_bi);
  _out_txt = omc_CodegenFMUCommon_lm__99(threadData, _in_txt, _in_items, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__98(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_real _in_a_bi)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_real tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_subPartition;
    tmp4_3 = _in_a_bi;
    {
      modelica_metatype _txt = NULL;
      modelica_real _a_bi;
      modelica_integer _i_sres;
      modelica_integer _i_snom;
      modelica_integer _i_fsuper;
      modelica_integer _i_fsub;
      modelica_boolean _ret_5;
      modelica_boolean _ret_4;
      modelica_real _ret_3;
      modelica_real _ret_2;
      modelica_real _ret_1;
      modelica_real _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_bi has no default value.
      // _i_sres has no default value.
      // _i_snom has no default value.
      // _i_fsuper has no default value.
      // _i_fsub has no default value.
      // _ret_5 has no default value.
      // _ret_4 has no default value.
      // _ret_3 has no default value.
      // _ret_2 has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_integer tmp9;
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_integer tmp14;
          modelica_metatype tmpMeta15;
          modelica_integer tmp16;
          modelica_real tmp17;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,3) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 2));
          tmp9 = mmc_unbox_integer(tmpMeta8);
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta7), 3));
          tmp11 = mmc_unbox_integer(tmpMeta10);
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
          tmp14 = mmc_unbox_integer(tmpMeta13);
          tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 3));
          tmp16 = mmc_unbox_integer(tmpMeta15);
          
          _i_fsub = tmp9  /* pattern as ty=Integer */;
          _i_fsuper = tmp11  /* pattern as ty=Integer */;
          _i_snom = tmp14  /* pattern as ty=Integer */;
          _i_sres = tmp16  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          _a_bi = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT222);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT223);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT235);

          _ret_0 = ((modelica_real)_i_fsub);

          _ret_1 = ((modelica_real)_i_fsuper);

          tmp17 = _ret_1;
          if (tmp17 == 0) {goto goto_2;}
          _ret_2 = (_ret_0) / tmp17;

          _ret_3 = (_a_bi) * (_ret_2);

          _txt = omc_Tpl_writeStr(threadData, _txt, realString(_ret_3));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT172);

          _ret_4 = (_i_snom > ((modelica_integer) 0));

          _txt = omc_CodegenFMUCommon_fun__96(threadData, _txt, _ret_4, _i_snom);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_5 = (_i_sres > ((modelica_integer) 1));

          _txt = omc_CodegenFMUCommon_fun__97(threadData, _txt, _ret_5, _i_sres);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT236);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__98(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subPartition, modelica_metatype _in_a_bi)
{
  modelica_real tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_real(_in_a_bi);
  _out_txt = omc_CodegenFMUCommon_fun__98(threadData, _in_txt, _in_a_subPartition, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__97(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_sres)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_sres;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_sres;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_sres has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_sres = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT227);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_sres));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__97(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_sres)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_sres);
  _out_txt = omc_CodegenFMUCommon_fun__97(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__96(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_integer _in_a_snom)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_integer tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_snom;
    {
      modelica_metatype _txt = NULL;
      modelica_integer _a_snom;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_snom has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_snom = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT233);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_a_snom));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__96(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_snom)
{
  modelica_integer tmp1;
  modelica_integer tmp2;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  tmp2 = mmc_unbox_integer(_in_a_snom);
  _out_txt = omc_CodegenFMUCommon_fun__96(threadData, _in_txt, tmp1, tmp2);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelStructure(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fmiModelStructure)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fmiModelStructure;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_fmistruct_fmiInitialUnknowns = NULL;
      modelica_metatype _i_fmistruct_fmiDiscreteStates = NULL;
      modelica_metatype _i_fmistruct_fmiDerivatives = NULL;
      modelica_metatype _i_fmistruct_fmiOutputs = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_fmistruct_fmiInitialUnknowns has no default value.
      // _i_fmistruct_fmiDiscreteStates has no default value.
      // _i_fmistruct_fmiDerivatives has no default value.
      // _i_fmistruct_fmiOutputs has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
          
          _i_fmistruct_fmiOutputs = tmpMeta7;
          _i_fmistruct_fmiDerivatives = tmpMeta8;
          _i_fmistruct_fmiDiscreteStates = tmpMeta9;
          _i_fmistruct_fmiInitialUnknowns = tmpMeta10;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT238);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ModelStructureOutputs(threadData, _txt, _i_fmistruct_fmiOutputs);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_CodegenFMUCommon_ModelStructureDerivatives(threadData, _txt, _i_fmistruct_fmiDerivatives);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_0 = omc_Flags_getConfigBool(threadData, _OMC_LIT61);

          _txt = omc_CodegenFMUCommon_fun__94(threadData, _txt, _ret_0, _i_fmistruct_fmiDiscreteStates);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_CodegenFMUCommon_ModelStructureInitialUnknowns(threadData, _txt, _i_fmistruct_fmiInitialUnknowns);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT240);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT243);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__94(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_fmistruct_fmiDiscreteStates)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_fmistruct_fmiDiscreteStates;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_fmistruct_fmiDiscreteStates = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_fmistruct_fmiDiscreteStates has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_fmistruct_fmiDiscreteStates = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_ModelStructureDiscreteStates(threadData, _txt, _a_fmistruct_fmiDiscreteStates);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__94(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_fmistruct_fmiDiscreteStates)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__94(threadData, _in_txt, tmp1, _in_a_fmistruct_fmiDiscreteStates);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_Implementation(threadData_t *threadData, modelica_metatype _txt)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT264);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_externalFunction(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_fn)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_fn;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_language = NULL;
      modelica_string _i_extName = NULL;
      modelica_integer _ret_1;
      modelica_metatype _l_fname = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_language has no default value.
      // _i_extName has no default value.
      // _ret_1 has no default value.
      // _l_fname has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_integer tmp9;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,14) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 12));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 15));
          tmp9 = mmc_unbox_integer(tmpMeta8);
          if (1 /* true */ != tmp9) goto tmp3_end;
          
          _i_extName = tmpMeta6;
          _i_language = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _l_fname = omc_CodegenCFunctions_extFunctionName(threadData, _OMC_LIT49, _i_extName, _i_language);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT266);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT85);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_fname);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT171);

          _ret_1 = omc_System_tmpTick(threadData);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_ret_1));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT48);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_externalFunctions(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_modelInfo;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_functions = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_functions has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 12));
          
          _txt = tmp4_1;
          _i_functions = tmpMeta6;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__90(threadData, _txt, _i_functions);
          tmpMeta1 = omc_Tpl_popIter(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__90(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_metatype _i_fn = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_fn has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_fn = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_externalFunction(threadData, _txt, _i_fn);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariableTypeRealAttribute(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_unit, modelica_string _a_displayUnit)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype _l_displayUnit__ = NULL;
  modelica_metatype _l_unit__ = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _l_displayUnit__ has no default value.
  // _l_unit__ has no default value.
  _l_unit__ = omc_CodegenFMUCommon_fun__87(threadData, _OMC_LIT49, _a_unit);

  _l_displayUnit__ = omc_CodegenFMUCommon_fun__88(threadData, _OMC_LIT49, _a_displayUnit);

  _out_txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

  _out_txt = omc_Tpl_writeText(threadData, _out_txt, _l_unit__);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT188);

  _out_txt = omc_Tpl_writeText(threadData, _out_txt, _l_displayUnit__);

  _out_txt = omc_Tpl_popBlock(threadData, _out_txt);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__88(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_displayUnit)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_displayUnit;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_displayUnit = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_displayUnit has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_displayUnit = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT113);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_displayUnit);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__87(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_unit)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_unit;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_unit = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_unit has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_unit = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT115);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_unit);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_StartString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_type__ = NULL;
      modelica_metatype _i_causality = NULL;
      modelica_metatype _i_initialValue = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_type__ has no default value.
      // _i_causality has no default value.
      // _i_initialValue has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 10));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 13));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 18));
          
          _txt = tmp4_1;
          _i_initialValue = tmpMeta6;
          _i_type__ = tmpMeta7;
          _i_causality = tmpMeta8;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__85(threadData, _txt, _i_initialValue, _i_type__, _i_causality);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__85(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_initialValue, modelica_metatype _in_a_type__, modelica_metatype _in_a_causality)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_initialValue;
    tmp4_3 = _in_a_type__;
    tmp4_4 = _in_a_causality;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_type__ = NULL;
      modelica_metatype _a_causality = NULL;
      modelica_metatype _i_e = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_type__ has no default value.
      // _a_causality has no default value.
      // _i_e has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta8;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
          
          _i_e = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta10;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta10,5,2) == 0) goto tmp3_end;
          
          _i_e = tmpMeta10;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_e, _OMC_LIT50);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          _a_type__ = tmp4_3;
          _a_causality = tmp4_4;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__84(threadData, _txt, _a_causality, _a_type__);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__84(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_causality, modelica_metatype _in_a_type__)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_causality;
    tmp4_3 = _in_a_type__;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_type__ = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_type__ has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_type__ = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT111);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT123);

          _txt = omc_CodegenUtil_initDefaultValXml(threadData, _txt, _a_type__);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          tmpMeta1 = omc_Tpl_popBlock(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariableType(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_simvar = NULL;
      modelica_metatype _i_type__ = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_simvar has no default value.
      // _i_type__ has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 13));
          
          _txt = tmp4_1;
          _i_simvar = tmp4_2;
          _i_type__ = tmpMeta6;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__82(threadData, _txt, _i_type__, _i_simvar);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__82(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_type__, modelica_metatype _in_a_simvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_type__;
    tmp4_3 = _in_a_simvar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simvar = NULL;
      modelica_metatype _i_path = NULL;
      modelica_string _ret_0 = NULL;
      int tmp4;
      // _txt has no default value.
      // _a_simvar has no default value.
      // _i_path has no default value.
      // _ret_0 has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 3: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT129);

          _txt = omc_CodegenFMUCommon_StartString(threadData, _txt, _a_simvar);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT127);

          _txt = omc_CodegenFMUCommon_StartString(threadData, _txt, _a_simvar);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 6: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT131);

          _txt = omc_CodegenFMUCommon_StartString(threadData, _txt, _a_simvar);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 5: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT133);

          _txt = omc_CodegenFMUCommon_StartString(threadData, _txt, _a_simvar);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta5;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          
          _i_path = tmpMeta5;
          _txt = tmp4_1;
          _a_simvar = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT135);

          _ret_0 = omc_AbsynUtil_pathString(threadData, _i_path, _OMC_LIT16, 0 /* false */, 0 /* false */);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);

          _txt = omc_CodegenFMUCommon_StartString(threadData, _txt, _a_simvar);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT137);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_getAliasVar(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_aliasvar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_aliasvar;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT268);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT268);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_getVariability(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_variability__)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_variability__;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 5; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,3,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT156);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT150);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,0,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT160);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta9;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,4,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT164);
          goto tmp3_done;
        }
        case 4: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT164);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_getCausality(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_c)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_c;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 4; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,0,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT140);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta7,1,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT142);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta8;
          if (optionNone(tmp4_2)) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 1));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta8,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT144);
          goto tmp3_done;
        }
        case 3: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT270);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariableAttribute(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simVar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simVar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_name = NULL;
      modelica_metatype _i_causality = NULL;
      modelica_metatype _i_aliasvar = NULL;
      modelica_string _i_comment = NULL;
      modelica_metatype _i_variability = NULL;
      modelica_string _ret_7 = NULL;
      modelica_metatype _txt_6 = NULL;
      modelica_metatype _l_caus = NULL;
      modelica_metatype _l_alias = NULL;
      modelica_metatype _l_description = NULL;
      modelica_metatype _l_variability__ = NULL;
      modelica_integer _ret_1;
      modelica_metatype _l_valueReference = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_name has no default value.
      // _i_causality has no default value.
      // _i_aliasvar has no default value.
      // _i_comment has no default value.
      // _i_variability has no default value.
      // _ret_7 has no default value.
      // _txt_6 has no default value.
      // _l_caus has no default value.
      // _l_alias has no default value.
      // _l_description has no default value.
      // _l_variability__ has no default value.
      // _ret_1 has no default value.
      // _l_valueReference has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 16));
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 18));
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 29));
          
          _txt = tmp4_1;
          _i_name = tmpMeta6;
          _i_comment = tmpMeta7;
          _i_aliasvar = tmpMeta8;
          _i_causality = tmpMeta9;
          _i_variability = tmpMeta10;
          /* Pattern matching succeeded */
          _ret_1 = omc_System_tmpTick(threadData);

          _l_valueReference = omc_Tpl_writeStr(threadData, _OMC_LIT49, intString(_ret_1));

          _l_variability__ = omc_CodegenFMUCommon_getVariability(threadData, _OMC_LIT49, _i_variability);

          _l_description = omc_CodegenFMUCommon_fun__77(threadData, _OMC_LIT49, _i_comment);

          _l_alias = omc_CodegenFMUCommon_getAliasVar(threadData, _OMC_LIT49, _i_aliasvar);

          _l_caus = omc_CodegenFMUCommon_getCausality(threadData, _OMC_LIT49, _i_causality);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT85);

          _txt_6 = omc_CodegenUtil_crefStrNoUnderscore(threadData, _OMC_LIT49, _i_name);

          _ret_7 = omc_System_stringReplace(threadData, omc_Tpl_textString(threadData, _txt_6), _OMC_LIT165, _OMC_LIT166);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_7);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT171);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_valueReference);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT172);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_description);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT182);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_variability__);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT273);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_caus);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT277);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_alias);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__77(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_comment)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_string tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_comment;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_comment = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_comment has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT50), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_comment = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT184);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_comment);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT7);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ScalarVariable(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simVar, modelica_metatype _in_a_simCode, modelica_metatype _in_a_stateVars, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_string tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simVar;
    tmp4_3 = _in_a_simCode;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_exportVar = NULL;
      modelica_metatype _i_name = NULL;
      modelica_metatype _i_simVar = NULL;
      modelica_boolean _ret_2;
      modelica_metatype _txt_1 = NULL;
      modelica_metatype _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_simCode has no default value.
      // _a_stateVars has no default value.
      // _a_FMUVersion has no default value.
      // _i_exportVar has no default value.
      // _i_name has no default value.
      // _i_simVar has no default value.
      // _ret_2 has no default value.
      // _txt_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 13));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta6,6,2) == 0) goto tmp3_end;
          
          _i_simVar = tmp4_2;
          _txt = tmp4_1;
          _a_simCode = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_FMUVersion = tmp4_5;
          /* Pattern matching succeeded */
          _ret_0 = omc_SimCodeUtil_getScalarElements(threadData, _i_simVar);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__71(threadData, _txt, _ret_0, _a_FMUVersion, _a_stateVars, _a_simCode);
          tmpMeta1 = omc_Tpl_popIter(threadData, _txt);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 31));
          
          _txt = tmp4_1;
          _i_simVar = tmp4_2;
          _i_name = tmpMeta7;
          _i_exportVar = tmpMeta8;
          _a_simCode = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_FMUVersion = tmp4_5;
          /* Pattern matching succeeded */
          _txt_1 = omc_CodegenUtil_crefStr(threadData, _OMC_LIT49, _i_name);

          _ret_2 = (stringEqual(omc_Tpl_textString(threadData, _txt_1), _OMC_LIT104));
          tmpMeta1 = omc_CodegenFMUCommon_fun__75(threadData, _txt, _ret_2, _a_stateVars, _a_simCode, _i_exportVar, _i_simVar, _a_FMUVersion, _i_name);
          goto tmp3_done;
        }
        case 2: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__75(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_name)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;modelica_string tmp4_7;modelica_metatype tmp4_8;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_stateVars;
    tmp4_4 = _in_a_simCode;
    tmp4_5 = _in_a_exportVar;
    tmp4_6 = _in_a_simVar;
    tmp4_7 = _in_a_FMUVersion;
    tmp4_8 = _in_a_name;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _a_exportVar = NULL;
      modelica_metatype _a_simVar = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_name = NULL;
      modelica_boolean _ret_1;
      modelica_metatype _txt_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _a_exportVar has no default value.
      // _a_simVar has no default value.
      // _a_FMUVersion has no default value.
      // _a_name has no default value.
      // _ret_1 has no default value.
      // _txt_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simCode = tmp4_4;
          _a_exportVar = tmp4_5;
          _a_simVar = tmp4_6;
          _a_FMUVersion = tmp4_7;
          _a_name = tmp4_8;
          /* Pattern matching succeeded */
          _txt_0 = omc_CodegenUtil_crefStr(threadData, _OMC_LIT49, _a_name);

          _ret_1 = (stringEqual(omc_Tpl_textString(threadData, _txt_0), _OMC_LIT278));
          tmpMeta1 = omc_CodegenFMUCommon_fun__74(threadData, _txt, _ret_1, _a_stateVars, _a_simCode, _a_exportVar, _a_simVar, _a_FMUVersion);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__75(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_metatype _in_a_FMUVersion, modelica_metatype _in_a_name)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__75(threadData, _in_txt, tmp1, _in_a_stateVars, _in_a_simCode, _in_a_exportVar, _in_a_simVar, _in_a_FMUVersion, _in_a_name);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__74(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;modelica_string tmp4_7;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_stateVars;
    tmp4_4 = _in_a_simCode;
    tmp4_5 = _in_a_exportVar;
    tmp4_6 = _in_a_simVar;
    tmp4_7 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _a_exportVar = NULL;
      modelica_metatype _a_simVar = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _a_exportVar has no default value.
      // _a_simVar has no default value.
      // _a_FMUVersion has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simCode = tmp4_4;
          _a_exportVar = tmp4_5;
          _a_simVar = tmp4_6;
          _a_FMUVersion = tmp4_7;
          /* Pattern matching succeeded */
          _ret_0 = omc_FMI_isFMIVersion20(threadData, _a_FMUVersion);
          tmpMeta1 = omc_CodegenFMUCommon_fun__73(threadData, _txt, _ret_0, _a_stateVars, _a_simCode, _a_exportVar, _a_simVar);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__74(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar, modelica_metatype _in_a_FMUVersion)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__74(threadData, _in_txt, tmp1, _in_a_stateVars, _in_a_simCode, _in_a_exportVar, _in_a_simVar, _in_a_FMUVersion);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__73(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;modelica_metatype tmp4_6;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_stateVars;
    tmp4_4 = _in_a_simCode;
    tmp4_5 = _in_a_exportVar;
    tmp4_6 = _in_a_simVar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _a_exportVar = NULL;
      modelica_metatype _a_simVar = NULL;
      modelica_boolean _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _a_exportVar has no default value.
      // _a_simVar has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_simVar = tmp4_6;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT280);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ScalarVariableAttribute(threadData, _txt, _a_simVar);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT89);

          _txt = omc_CodegenFMUCommon_ScalarVariableType(threadData, _txt, _a_simVar);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT282);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simCode = tmp4_4;
          _a_exportVar = tmp4_5;
          _a_simVar = tmp4_6;
          /* Pattern matching succeeded */
          _ret_0 = isSome(_a_exportVar);
          tmpMeta1 = omc_CodegenFMUCommon_fun__72(threadData, _txt, _ret_0, _a_stateVars, _a_simCode, _a_simVar);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__73(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_exportVar, modelica_metatype _in_a_simVar)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__73(threadData, _in_txt, tmp1, _in_a_stateVars, _in_a_simCode, _in_a_exportVar, _in_a_simVar);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__72(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_simVar)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;modelica_metatype tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_stateVars;
    tmp4_4 = _in_a_simCode;
    tmp4_5 = _in_a_simVar;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _a_simVar = NULL;
      modelica_integer _ret_0;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _a_simVar has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_stateVars = tmp4_3;
          _a_simCode = tmp4_4;
          _a_simVar = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT284);

          _ret_0 = omc_SimCodeUtil_getVariableFMIIndex(threadData, _a_simVar);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_ret_0));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT288);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_CodegenFMUCommon_ScalarVariableAttribute2(threadData, _txt, _a_simVar, _a_simCode);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT89);

          _txt = omc_CodegenFMUCommon_ScalarVariableType2(threadData, _txt, _a_simVar, _a_stateVars);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT282);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__72(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode, modelica_metatype _in_a_simVar)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__72(threadData, _in_txt, tmp1, _in_a_stateVars, _in_a_simCode, _in_a_simVar);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__71(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_fmiModelVariables(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simCode, modelica_string _in_a_FMUVersion)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simCode;
    tmp4_3 = _in_a_FMUVersion;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _i_simCode = NULL;
      modelica_metatype _i_modelInfo = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _i_simCode has no default value.
      // _i_modelInfo has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _txt = tmp4_1;
          _i_simCode = tmp4_2;
          _i_modelInfo = tmpMeta6;
          _a_FMUVersion = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenFMUCommon_fun__69(threadData, _txt, _i_modelInfo, _a_FMUVersion, _i_simCode);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__69(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_modelInfo, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_modelInfo;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_modelInfo = NULL;
      modelica_metatype _i_vars_stringAliasVars = NULL;
      modelica_metatype _i_vars_stringParamVars = NULL;
      modelica_metatype _i_vars_stringAlgVars = NULL;
      modelica_metatype _i_vars_boolAliasVars = NULL;
      modelica_metatype _i_vars_boolParamVars = NULL;
      modelica_metatype _i_vars_boolAlgVars = NULL;
      modelica_metatype _i_vars_intAliasVars = NULL;
      modelica_metatype _i_vars_intParamVars = NULL;
      modelica_metatype _i_vars_intAlgVars = NULL;
      modelica_metatype _i_vars_aliasVars = NULL;
      modelica_metatype _i_vars_paramVars = NULL;
      modelica_metatype _i_vars_discreteAlgVars = NULL;
      modelica_metatype _i_vars_algVars = NULL;
      modelica_metatype _i_vars_derivativeVars = NULL;
      modelica_metatype _i_stateVars = NULL;
      modelica_metatype _i_vars_stateVars = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_FMUVersion has no default value.
      // _a_simCode has no default value.
      // _i_modelInfo has no default value.
      // _i_vars_stringAliasVars has no default value.
      // _i_vars_stringParamVars has no default value.
      // _i_vars_stringAlgVars has no default value.
      // _i_vars_boolAliasVars has no default value.
      // _i_vars_boolParamVars has no default value.
      // _i_vars_boolAlgVars has no default value.
      // _i_vars_intAliasVars has no default value.
      // _i_vars_intParamVars has no default value.
      // _i_vars_intAlgVars has no default value.
      // _i_vars_aliasVars has no default value.
      // _i_vars_paramVars has no default value.
      // _i_vars_discreteAlgVars has no default value.
      // _i_vars_algVars has no default value.
      // _i_vars_derivativeVars has no default value.
      // _i_stateVars has no default value.
      // _i_vars_stateVars has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          modelica_metatype tmpMeta17;
          modelica_metatype tmpMeta18;
          modelica_metatype tmpMeta19;
          modelica_metatype tmpMeta20;
          modelica_metatype tmpMeta21;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 11));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 3));
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 4));
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 5));
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 6));
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 7));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 10));
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 11));
          tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 12));
          tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 13));
          tmpMeta17 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 14));
          tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 15));
          tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 16));
          tmpMeta20 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 17));
          tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 18));
          
          _txt = tmp4_1;
          _i_modelInfo = tmp4_2;
          _i_vars_stateVars = tmpMeta7;
          _i_stateVars = tmpMeta7;
          _i_vars_derivativeVars = tmpMeta8;
          _i_vars_algVars = tmpMeta9;
          _i_vars_discreteAlgVars = tmpMeta10;
          _i_vars_intAlgVars = tmpMeta11;
          _i_vars_boolAlgVars = tmpMeta12;
          _i_vars_aliasVars = tmpMeta13;
          _i_vars_intAliasVars = tmpMeta14;
          _i_vars_boolAliasVars = tmpMeta15;
          _i_vars_paramVars = tmpMeta16;
          _i_vars_intParamVars = tmpMeta17;
          _i_vars_boolParamVars = tmpMeta18;
          _i_vars_stringAlgVars = tmpMeta19;
          _i_vars_stringParamVars = tmpMeta20;
          _i_vars_stringAliasVars = tmpMeta21;
          _a_FMUVersion = tmp4_3;
          _a_simCode = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT290);

          omc_System_tmpTickReset(threadData, ((modelica_integer) 0));

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__54(threadData, _txt, _i_vars_stateVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__55(threadData, _txt, _i_vars_derivativeVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__56(threadData, _txt, _i_vars_algVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__57(threadData, _txt, _i_vars_discreteAlgVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__58(threadData, _txt, _i_vars_paramVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__59(threadData, _txt, _i_vars_aliasVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          omc_System_tmpTickReset(threadData, ((modelica_integer) 0));

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__60(threadData, _txt, _i_vars_intAlgVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__61(threadData, _txt, _i_vars_intParamVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__62(threadData, _txt, _i_vars_intAliasVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          omc_System_tmpTickReset(threadData, ((modelica_integer) 0));

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__63(threadData, _txt, _i_vars_boolAlgVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__64(threadData, _txt, _i_vars_boolParamVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__65(threadData, _txt, _i_vars_boolAliasVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          omc_System_tmpTickReset(threadData, ((modelica_integer) 0));

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__66(threadData, _txt, _i_vars_stringAlgVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__67(threadData, _txt, _i_vars_stringParamVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__68(threadData, _txt, _i_vars_stringAliasVars, _a_FMUVersion, _i_stateVars, _a_simCode);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          omc_System_tmpTickReset(threadData, ((modelica_integer) 0));

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_CodegenFMUCommon_externalFunctions(threadData, _txt, _i_modelInfo);

          _txt = omc_Tpl_softNewLine(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT292);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__68(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__67(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__66(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__65(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__64(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__63(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__62(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__60(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__59(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__57(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__56(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__55(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__54(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items, modelica_string _in_a_FMUVersion, modelica_metatype _in_a_stateVars, modelica_metatype _in_a_simCode)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_string tmp4_3;modelica_metatype tmp4_4;modelica_metatype tmp4_5;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    tmp4_3 = _in_a_FMUVersion;
    tmp4_4 = _in_a_stateVars;
    tmp4_5 = _in_a_simCode;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _a_FMUVersion = NULL;
      modelica_metatype _a_stateVars = NULL;
      modelica_metatype _a_simCode = NULL;
      modelica_metatype _i_var = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _a_FMUVersion has no default value.
      // _a_stateVars has no default value.
      // _a_simCode has no default value.
      // _i_var has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_var = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          _a_FMUVersion = tmp4_3;
          _a_stateVars = tmp4_4;
          _a_simCode = tmp4_5;
          /* Pattern matching succeeded */
          _txt = omc_CodegenFMUCommon_ScalarVariable(threadData, _txt, _i_var, _a_simCode, _a_stateVars, _a_FMUVersion);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          _in_a_FMUVersion = _a_FMUVersion;
          _in_a_stateVars = _a_stateVars;
          _in_a_simCode = _a_simCode;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_SourceFiles(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_sourceFiles)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_sourceFiles;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_sourceFiles = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_sourceFiles has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _i_sourceFiles = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT294);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT25);

          _txt = omc_CodegenFMUCommon_lm__52(threadData, _txt, _i_sourceFiles);

          _txt = omc_Tpl_popIter(threadData, _txt);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT296);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_lm__52(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_items)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_items;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _rest = NULL;
      modelica_string _i_file = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _rest has no default value.
      // _i_file has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_2);
          tmpMeta7 = MMC_CDR(tmp4_2);
          
          _i_file = tmpMeta6;
          _rest = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT298);

          _txt = omc_Tpl_writeStr(threadData, _txt, _i_file);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT300);

          _txt = omc_Tpl_nextIter(threadData, _txt);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_items = _rest;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenFMUCommon_ModelExchange(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_simCode, modelica_metatype _in_a_sourceFiles)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;modelica_metatype tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_simCode;
    tmp4_3 = _in_a_sourceFiles;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_sourceFiles = NULL;
      modelica_metatype _i_simCode = NULL;
      modelica_boolean _ret_3;
      modelica_boolean _ret_2;
      modelica_boolean _ret_1;
      modelica_metatype _l_modelIdentifier = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_sourceFiles has no default value.
      // _i_simCode has no default value.
      // _ret_3 has no default value.
      // _ret_2 has no default value.
      // _ret_1 has no default value.
      // _l_modelIdentifier has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          
          _txt = tmp4_1;
          _i_simCode = tmp4_2;
          _a_sourceFiles = tmp4_3;
          /* Pattern matching succeeded */
          _l_modelIdentifier = omc_CodegenUtilSimulation_modelNamePrefix(threadData, _OMC_LIT49, _i_simCode);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT302);

          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT53);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT304);

          _txt = omc_Tpl_writeText(threadData, _txt, _l_modelIdentifier);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT314);

          _ret_1 = omc_Flags_isSet(threadData, _OMC_LIT318);

          _txt = omc_CodegenFMUCommon_fun__48(threadData, _txt, _ret_1);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_2 = omc_Flags_isSet(threadData, _OMC_LIT318);

          _txt = omc_CodegenFMUCommon_fun__49(threadData, _txt, _ret_2);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _ret_3 = omc_SimCodeUtil_providesDirectionalDerivative(threadData, _i_simCode);

          _txt = omc_CodegenFMUCommon_fun__50(threadData, _txt, _ret_3);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT89);

          _txt = omc_CodegenFMUCommon_SourceFiles(threadData, _txt, _a_sourceFiles);

          _txt = omc_Tpl_softNewLine(threadData, _txt);

          _txt = omc_Tpl_popBlock(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT320);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__50(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT322);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT324);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__50(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__50(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__49(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT326);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT328);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__49(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__49(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenFMUCommon_fun__48(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg)
{
  modelica_metatype _out_txt = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_boolean tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    {
      modelica_metatype _txt = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (0 /* false */ != tmp4_2) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT330);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT332);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _out_txt = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenFMUCommon_fun__48(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenFMUCommon_fun__48(threadData, _in_txt, tmp1);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

