#include "omc_simulation_settings.h"
#include "CodegenUtil.h"
#define _OMC_LIT0_data "_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,1,_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)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT2,3,3) {&Tpl_Text_MEM__TEXT__desc,MMC_REFSTRUCTLIT(mmc_nil),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT2 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT2)
#define _OMC_LIT3_data "Unsupported external language: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT3,31,_OMC_LIT3_data);
#define _OMC_LIT3 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT3)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT4,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT3}};
#define _OMC_LIT4 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT4)
#define _OMC_LIT5_data "CodegenUtil.tpl"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT5,15,_OMC_LIT5_data);
#define _OMC_LIT5 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT5)
#define _OMC_LIT6_data "BUILTIN"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT6,7,_OMC_LIT6_data);
#define _OMC_LIT6 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT6)
#define _OMC_LIT7_data "C"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT7,1,_OMC_LIT7_data);
#define _OMC_LIT7 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT7)
#define _OMC_LIT8_data "FORTRAN 77"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT8,10,_OMC_LIT8_data);
#define _OMC_LIT8 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT8)
#define _OMC_LIT9_data "\n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT9,1,_OMC_LIT9_data);
#define _OMC_LIT9 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "#error \""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,8,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT11,2,1) {_OMC_LIT10,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT11 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT11)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT12,2,1) {_OMC_LIT9,_OMC_LIT11}};
#define _OMC_LIT12 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT12)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT13,3,6) {&Tpl_StringToken_ST__STRING__LIST__desc,_OMC_LIT12,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */))}};
#define _OMC_LIT13 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT13)
#define _OMC_LIT14_data "\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT14,1,_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)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT16,1,3) {&Tpl_StringToken_ST__NEW__LINE__desc,}};
#define _OMC_LIT16 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data " "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,1,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT18,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT17}};
#define _OMC_LIT18 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT18)
#define _OMC_LIT19_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT19,1,_OMC_LIT19_data);
#define _OMC_LIT19 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT19)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT20,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT19}};
#define _OMC_LIT20 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT20)
#define _OMC_LIT21_data "\"noAlias\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT21,9,_OMC_LIT21_data);
#define _OMC_LIT21 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT21)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT22,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT21}};
#define _OMC_LIT22 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT22)
#define _OMC_LIT23_data "\"alias\" aliasVariable=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT23,23,_OMC_LIT23_data);
#define _OMC_LIT23 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT23)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT24,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT23}};
#define _OMC_LIT24 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT24)
#define _OMC_LIT25_data "\"negatedAlias\" aliasVariable=\""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT25,30,_OMC_LIT25_data);
#define _OMC_LIT25 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT25)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT26,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT25}};
#define _OMC_LIT26 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT26)
#define _OMC_LIT27_data "variable"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT27,8,_OMC_LIT27_data);
#define _OMC_LIT27 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT27)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT28,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT27}};
#define _OMC_LIT28 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT28)
#define _OMC_LIT29_data "STATE("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT29,6,_OMC_LIT29_data);
#define _OMC_LIT29 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT29)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT30,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT29}};
#define _OMC_LIT30 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT30)
#define _OMC_LIT31_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT31,1,_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 ","
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT33,1,_OMC_LIT33_data);
#define _OMC_LIT33 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT33)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT34,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT33}};
#define _OMC_LIT34 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT34)
#define _OMC_LIT35_data "STATE_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT35,9,_OMC_LIT35_data);
#define _OMC_LIT35 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT35)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT36,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT35}};
#define _OMC_LIT36 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT36)
#define _OMC_LIT37_data "DUMMY_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT37,9,_OMC_LIT37_data);
#define _OMC_LIT37 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT37)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT38,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT37}};
#define _OMC_LIT38 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT38)
#define _OMC_LIT39_data "DUMMY_STATE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT39,11,_OMC_LIT39_data);
#define _OMC_LIT39 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT39)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT40,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT39}};
#define _OMC_LIT40 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "CLOCKED_STATE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,13,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT42,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT41}};
#define _OMC_LIT42 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT42)
#define _OMC_LIT43_data "DISCRETE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT43,8,_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 "PARAM"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT45,5,_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 "CONST"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,5,_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)
#define _OMC_LIT49_data "EXTOBJ: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT49,8,_OMC_LIT49_data);
#define _OMC_LIT49 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT49)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT50,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT49}};
#define _OMC_LIT50 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT50)
#define _OMC_LIT51_data "JACOBIAN_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT51,12,_OMC_LIT51_data);
#define _OMC_LIT51 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT51)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT52,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT51}};
#define _OMC_LIT52 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT52)
#define _OMC_LIT53_data "JACOBIAN_TMP_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT53,16,_OMC_LIT53_data);
#define _OMC_LIT53 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT53)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT54,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT53}};
#define _OMC_LIT54 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT54)
#define _OMC_LIT55_data "SEED_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT55,8,_OMC_LIT55_data);
#define _OMC_LIT55 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT55)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT56,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT55}};
#define _OMC_LIT56 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT56)
#define _OMC_LIT57_data "OPT_CONSTR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT57,10,_OMC_LIT57_data);
#define _OMC_LIT57 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT57)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT58,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT57}};
#define _OMC_LIT58 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT58)
#define _OMC_LIT59_data "OPT_FCONSTR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT59,11,_OMC_LIT59_data);
#define _OMC_LIT59 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT59)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT60,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT59}};
#define _OMC_LIT60 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT60)
#define _OMC_LIT61_data "OPT_INPUT_WITH_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT61,18,_OMC_LIT61_data);
#define _OMC_LIT61 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT61)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT62,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT61}};
#define _OMC_LIT62 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT62)
#define _OMC_LIT63_data "OPT_INPUT_DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT63,13,_OMC_LIT63_data);
#define _OMC_LIT63 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT63)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT64,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT63}};
#define _OMC_LIT64 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT64)
#define _OMC_LIT65_data "OPT_TGRID"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT65,9,_OMC_LIT65_data);
#define _OMC_LIT65 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT65)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT66,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT65}};
#define _OMC_LIT66 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT66)
#define _OMC_LIT67_data "OPT_LOOP_INPUT"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT67,14,_OMC_LIT67_data);
#define _OMC_LIT67 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT67)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT68,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT67}};
#define _OMC_LIT68 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT68)
#define _OMC_LIT69_data "ALG_STATE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT69,9,_OMC_LIT69_data);
#define _OMC_LIT69 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT69)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT70,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT69}};
#define _OMC_LIT70 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT70)
#define _OMC_LIT71_data "DAE_RESIDUAL_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT71,16,_OMC_LIT71_data);
#define _OMC_LIT71 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT71)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT72,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT71}};
#define _OMC_LIT72 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT72)
#define _OMC_LIT73_data "DAE_AUX_VAR"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT73,11,_OMC_LIT73_data);
#define _OMC_LIT73 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT73)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT74,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT73}};
#define _OMC_LIT74 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT74)
#define _OMC_LIT75_data "LOOP_ITERATION"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT75,14,_OMC_LIT75_data);
#define _OMC_LIT75 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT75)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT76,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT75}};
#define _OMC_LIT76 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT76)
#define _OMC_LIT77_data "LOOP_SOLVED"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT77,11,_OMC_LIT77_data);
#define _OMC_LIT77 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT77)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT78,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT77}};
#define _OMC_LIT78 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT78)
#define _OMC_LIT79_data "#UNKNOWN_VARKIND"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT79,16,_OMC_LIT79_data);
#define _OMC_LIT79 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT79)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT80,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT79}};
#define _OMC_LIT80 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT80)
#define _OMC_LIT81_data "discrete"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT81,8,_OMC_LIT81_data);
#define _OMC_LIT81 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT81)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT82,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT81}};
#define _OMC_LIT82 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT82)
#define _OMC_LIT83_data "parameter"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT83,9,_OMC_LIT83_data);
#define _OMC_LIT83 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT83)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT84,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT83}};
#define _OMC_LIT84 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data "constant"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,8,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT86,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT85}};
#define _OMC_LIT86 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data "continuous"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,10,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT88,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT87}};
#define _OMC_LIT88 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,1,1) {_OMC_LIT18}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT90,9,3) {&Tpl_IterOptions_ITER__OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT89,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT16,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT16}};
#define _OMC_LIT90 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT90)
#define _OMC_LIT91_data "initial value of unknown type: "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT91,31,_OMC_LIT91_data);
#define _OMC_LIT91 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT91)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT92,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT91}};
#define _OMC_LIT92 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT92)
#define _OMC_LIT93_data "0"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT93,1,_OMC_LIT93_data);
#define _OMC_LIT93 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT93)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT94,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT93}};
#define _OMC_LIT94 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT94)
#define _OMC_LIT95_data "0.0"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT95,3,_OMC_LIT95_data);
#define _OMC_LIT95 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT95)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT96,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT95}};
#define _OMC_LIT96 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT96)
#define _OMC_LIT97_data "false"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT97,5,_OMC_LIT97_data);
#define _OMC_LIT97 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT97)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT98,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT97}};
#define _OMC_LIT98 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT98)
#define _OMC_LIT99_data "\\'"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT99,2,_OMC_LIT99_data);
#define _OMC_LIT99 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT99)
#define _OMC_LIT100_data "\\\\'"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT100,3,_OMC_LIT100_data);
#define _OMC_LIT100 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT100)
#define _OMC_LIT101_data "'"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT101,1,_OMC_LIT101_data);
#define _OMC_LIT101 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT101)
#define _OMC_LIT102_data "obfuscate"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT102,9,_OMC_LIT102_data);
#define _OMC_LIT102 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT102)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT103,1,4) {&Flags_FlagVisibility_EXTERNAL__desc,}};
#define _OMC_LIT103 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT103)
#define _OMC_LIT104_data "none"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT104,4,_OMC_LIT104_data);
#define _OMC_LIT104 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT104)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT105,2,8) {&Flags_FlagData_STRING__FLAG__desc,_OMC_LIT104}};
#define _OMC_LIT105 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT105)
#define _OMC_LIT106_data "No obfuscation."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT106,15,_OMC_LIT106_data);
#define _OMC_LIT106 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT106)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT107,2,0) {_OMC_LIT104,_OMC_LIT106}};
#define _OMC_LIT107 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT107)
#define _OMC_LIT108_data "encrypted"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT108,9,_OMC_LIT108_data);
#define _OMC_LIT108 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT108)
#define _OMC_LIT109_data "Obfuscates protected variables in encrypted models"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT109,50,_OMC_LIT109_data);
#define _OMC_LIT109 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT109)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT110,2,0) {_OMC_LIT108,_OMC_LIT109}};
#define _OMC_LIT110 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT110)
#define _OMC_LIT111_data "protected"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT111,9,_OMC_LIT111_data);
#define _OMC_LIT111 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT111)
#define _OMC_LIT112_data "Obfuscates protected variables in all models."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT112,45,_OMC_LIT112_data);
#define _OMC_LIT112 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT112)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT113,2,0) {_OMC_LIT111,_OMC_LIT112}};
#define _OMC_LIT113 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT113)
#define _OMC_LIT114_data "full"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT114,4,_OMC_LIT114_data);
#define _OMC_LIT114 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT114)
#define _OMC_LIT115_data "Obfuscates everything."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT115,22,_OMC_LIT115_data);
#define _OMC_LIT115 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT115)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT116,2,0) {_OMC_LIT114,_OMC_LIT115}};
#define _OMC_LIT116 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,2,1) {_OMC_LIT116,MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT118,2,1) {_OMC_LIT113,_OMC_LIT117}};
#define _OMC_LIT118 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT118)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT119,2,1) {_OMC_LIT110,_OMC_LIT118}};
#define _OMC_LIT119 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT119)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT120,2,1) {_OMC_LIT107,_OMC_LIT119}};
#define _OMC_LIT120 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT120)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT121,2,4) {&Flags_ValidOptions_STRING__DESC__OPTION__desc,_OMC_LIT120}};
#define _OMC_LIT121 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT121)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT122,1,1) {_OMC_LIT121}};
#define _OMC_LIT122 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT122)
#define _OMC_LIT123_data "Obfuscates identifiers in the simulation model"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT123,46,_OMC_LIT123_data);
#define _OMC_LIT123 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT123)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT124,8,3) {&Flags_ConfigFlag_CONFIG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(149)),_OMC_LIT102,MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT103,_OMC_LIT105,_OMC_LIT122,_OMC_LIT123}};
#define _OMC_LIT124 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT124)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT125,2,4) {&Tpl_BlockType_BT__INDENT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1))}};
#define _OMC_LIT125 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT125)
#define _OMC_LIT126_data "/* "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT126,3,_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 " */"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT128,3,_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 "OBFUSCATED"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT130,10,_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 "/*"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT132,2,_OMC_LIT132_data);
#define _OMC_LIT132 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT132)
#define _OMC_LIT133_data "(*"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT133,2,_OMC_LIT133_data);
#define _OMC_LIT133 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT133)
#define _OMC_LIT134_data "*/"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT134,2,_OMC_LIT134_data);
#define _OMC_LIT134 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT134)
#define _OMC_LIT135_data "*)"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT135,2,_OMC_LIT135_data);
#define _OMC_LIT135 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT135)
#define _OMC_LIT136_data "UNKNOWN_SUBSCRIPT /* "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT136,21,_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 "WHOLEDIM"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT138,8,_OMC_LIT138_data);
#define _OMC_LIT138 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT138)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT139,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT138}};
#define _OMC_LIT139 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT139)
#define _OMC_LIT140_data "WHOLE_NONEXP"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT140,12,_OMC_LIT140_data);
#define _OMC_LIT140 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT140)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT141,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT140}};
#define _OMC_LIT141 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT141)
#define _OMC_LIT142_data "UNKNOWN_SUBSCRIPT"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT142,17,_OMC_LIT142_data);
#define _OMC_LIT142 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT142)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT143,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT142}};
#define _OMC_LIT143 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT143)
#define _OMC_LIT144_data "("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT144,1,_OMC_LIT144_data);
#define _OMC_LIT144 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT144)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT145,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT144}};
#define _OMC_LIT145 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT145)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT146,1,1) {_OMC_LIT34}};
#define _OMC_LIT146 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT146)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT147,9,3) {&Tpl_IterOptions_ITER__OPTIONS__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_REFSTRUCTLIT(mmc_none),_OMC_LIT146,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT16,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT16}};
#define _OMC_LIT147 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT147)
#define _OMC_LIT148_data "der_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT148,4,_OMC_LIT148_data);
#define _OMC_LIT148 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT148)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT149,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT148}};
#define _OMC_LIT149 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT149)
#define _OMC_LIT150_data "pre_"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT150,4,_OMC_LIT150_data);
#define _OMC_LIT150 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT150)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT151,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT150}};
#define _OMC_LIT151 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT151)
#define _OMC_LIT152_data "CREF_NOT_IDENT_OR_QUAL"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT152,22,_OMC_LIT152_data);
#define _OMC_LIT152 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT152)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT152}};
#define _OMC_LIT153 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153)
#define _OMC_LIT154_data "$DER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT154,4,_OMC_LIT154_data);
#define _OMC_LIT154 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT154)
#define _OMC_LIT155_data "$CLKPRE"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT155,7,_OMC_LIT155_data);
#define _OMC_LIT155 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT155)
#define _OMC_LIT156_data "["
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT156,1,_OMC_LIT156_data);
#define _OMC_LIT156 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT156)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT157,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT156}};
#define _OMC_LIT157 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT157)
#define _OMC_LIT158_data "]"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT158,1,_OMC_LIT158_data);
#define _OMC_LIT158 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT158)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT159,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT158}};
#define _OMC_LIT159 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT159)
#define _OMC_LIT160_data "der("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT160,4,_OMC_LIT160_data);
#define _OMC_LIT160 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT160)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT161,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT160}};
#define _OMC_LIT161 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT161)
#define _OMC_LIT162_data "previous("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT162,9,_OMC_LIT162_data);
#define _OMC_LIT162 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT162)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT163,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT162}};
#define _OMC_LIT163 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT163)
#define _OMC_LIT164_data "._"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT164,2,_OMC_LIT164_data);
#define _OMC_LIT164 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT164)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT165,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT164}};
#define _OMC_LIT165 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT165)
#define _OMC_LIT166_data "msvc"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT166,4,_OMC_LIT166_data);
#define _OMC_LIT166 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT166)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT167,2,4) {&Tpl_StringToken_ST__STRING__desc,_OMC_LIT166}};
#define _OMC_LIT167 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT167)
#define _OMC_LIT168_data "msvc10"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT168,6,_OMC_LIT168_data);
#define _OMC_LIT168 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT168)
#define _OMC_LIT169_data "msvc12"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT169,6,_OMC_LIT169_data);
#define _OMC_LIT169 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT169)
#define _OMC_LIT170_data "msvc13"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT170,6,_OMC_LIT170_data);
#define _OMC_LIT170 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT170)
#define _OMC_LIT171_data "msvc15"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT171,6,_OMC_LIT171_data);
#define _OMC_LIT171 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT171)
#define _OMC_LIT172_data "msvc19"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT172,6,_OMC_LIT172_data);
#define _OMC_LIT172 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT172)
#define _OMC_LIT173_data "__"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT173,2,_OMC_LIT173_data);
#define _OMC_LIT173 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT173)
#include "util/modelica.h"

#include "CodegenUtil_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_CodegenUtil_fun__74(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_language, modelica_string _in_a_name);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__74,2,0) {(void*) boxptr_CodegenUtil_fun__74,0}};
#define boxvar_CodegenUtil_fun__74 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__74)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__66(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_stringQuotes, modelica_metatype _in_a_expr);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__66(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stringQuotes, modelica_metatype _in_a_expr);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__66,2,0) {(void*) boxptr_CodegenUtil_fun__66,0}};
#define boxvar_CodegenUtil_fun__66 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__66)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__65(threadData_t *threadData, modelica_metatype __omcQ_24in_5Ftxt, modelica_metatype _items, modelica_string _a_stringQuotes);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__65,2,0) {(void*) boxptr_CodegenUtil_lm__65,0}};
#define boxvar_CodegenUtil_lm__65 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__65)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_varKind, modelica_metatype _in_a_name);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_varKind, modelica_metatype _in_a_name);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__61,2,0) {(void*) boxptr_CodegenUtil_fun__61,0}};
#define boxvar_CodegenUtil_fun__61 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__61)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__60(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_varKind, modelica_metatype _in_a_name);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__60(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_varKind, modelica_metatype _in_a_name);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__60,2,0) {(void*) boxptr_CodegenUtil_fun__60,0}};
#define boxvar_CodegenUtil_fun__60 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__60)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_vName);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_vName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__58,2,0) {(void*) boxptr_CodegenUtil_fun__58,0}};
#define boxvar_CodegenUtil_fun__58 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__58)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__57(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_vName);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__57(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_vName);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__57,2,0) {(void*) boxptr_CodegenUtil_fun__57,0}};
#define boxvar_CodegenUtil_fun__57 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__57)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__53(threadData_t *threadData, modelica_metatype __omcQ_24in_5Ftxt, modelica_metatype _items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__53,2,0) {(void*) boxptr_CodegenUtil_lm__53,0}};
#define boxvar_CodegenUtil_lm__53 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__53)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__50(threadData_t *threadData, modelica_metatype __omcQ_24in_5Ftxt, modelica_metatype _items);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__50,2,0) {(void*) boxptr_CodegenUtil_lm__50,0}};
#define boxvar_CodegenUtil_lm__50 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_lm__50)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__44(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_str);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_CodegenUtil_fun__44(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_str);
static const MMC_DEFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__44,2,0) {(void*) boxptr_CodegenUtil_fun__44,0}};
#define boxvar_CodegenUtil_fun__44 MMC_REFSTRUCTLIT(boxvar_lit_CodegenUtil_fun__44)

DLLDirection
modelica_metatype omc_CodegenUtil_extFunctionName(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_name, modelica_string _a_language)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_CodegenUtil_fun__74(threadData, _txt, _a_language, _a_name);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__74(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_language, modelica_string _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_string tmp4_2;modelica_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_language;
    tmp4_3 = _in_a_name;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_name = NULL;
      modelica_string _i_language = NULL;
      modelica_metatype _txt_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_name has no default value.
      // _i_language has no default value.
      // _txt_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 4; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (7 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT6), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_name = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _a_name);
          goto tmp3_done;
        }
        case 1: {
          if (1 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT7), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_name = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _a_name);
          goto tmp3_done;
        }
        case 2: {
          if (10 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT8), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_name = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _a_name);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT1);
          goto tmp3_done;
        }
        case 3: {
          
          _txt = tmp4_1;
          _i_language = tmp4_2;
          /* Pattern matching succeeded */
          _txt_0 = omc_Tpl_writeTok(threadData, _OMC_LIT2, _OMC_LIT4);

          _txt_0 = omc_Tpl_writeStr(threadData, _txt_0, _i_language);
          tmpMeta1 = omc_CodegenUtil_error(threadData, _txt, omc_Tpl_sourceInfo(threadData, _OMC_LIT5, ((modelica_integer) 380), ((modelica_integer) 14)), omc_Tpl_textString(threadData, _txt_0));
          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_CodegenUtil_errorMsg(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_errMessage)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  omc_Tpl_addTemplateError(threadData, _a_errMessage);

  _out_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);

  _out_txt = omc_Tpl_writeStr(threadData, _out_txt, _a_errMessage);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT15);

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

DLLDirection
modelica_metatype omc_CodegenUtil_error(threadData_t *threadData, modelica_metatype _txt, modelica_metatype _a_srcInfo, modelica_string _a_errMessage)
{
  modelica_metatype _out_txt = NULL;
  modelica_string _ret_0 = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _ret_0 has no default value.
  omc_Tpl_addSourceTemplateError(threadData, _a_errMessage, _a_srcInfo);

  _out_txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT13);

  _ret_0 = omc_Error_infoStr(threadData, _a_srcInfo);

  _out_txt = omc_Tpl_writeStr(threadData, _out_txt, _ret_0);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT18);

  _out_txt = omc_Tpl_writeStr(threadData, _out_txt, _a_errMessage);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT15);

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

DLLDirection
modelica_metatype omc_CodegenUtil_dotPath(threadData_t *threadData, modelica_metatype _in_txt, 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_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_path;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_name_1 = NULL;
      modelica_metatype _i_path = NULL;
      modelica_string _i_name = NULL;
      int tmp4;
      // _txt has no default value.
      // _i_name_1 has no default value.
      // _i_path has no default value.
      // _i_name has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 3: {
          modelica_metatype tmpMeta5;
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          
          _i_name = tmpMeta5;
          _i_path = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _i_name);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT20);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_path = _i_path;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_name_1 = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _i_name_1);
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta8;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_path = tmpMeta8;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_path = _i_path;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          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;
}

DLLDirection
modelica_metatype omc_CodegenUtil_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;
      modelica_metatype _i_varName = NULL;
      int tmp4;
      // _txt has no default value.
      // _i_varName has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 3: {
          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_LIT22);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta5;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_varName = tmpMeta5;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT24);

          _txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_varName);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT15);
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_varName = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT26);

          _txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_varName);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT15);
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT22);
          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_CodegenUtil_variabilityString(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind)
{
  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_varKind;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_fullClassName = NULL;
      modelica_metatype _i_dcr = NULL;
      modelica_integer _i_index;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_fullClassName has no default value.
      // _i_dcr has no default value.
      // _i_index has no default value.
      tmp4 = 0;
      for (; tmp4 < 26; 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_LIT28);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta6;
          modelica_integer tmp7;
          modelica_metatype tmpMeta8;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
          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));
          if (!optionNone(tmpMeta8)) goto tmp3_end;
          
          _i_index = tmp7  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT30);

          _txt = omc_Tpl_writeStr(threadData, _txt, intString(_i_index));
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta9;
          modelica_integer tmp10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp10 = mmc_unbox_integer(tmpMeta9);
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          if (optionNone(tmpMeta11)) goto tmp3_end;
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta11), 1));
          
          _i_index = tmp10  /* pattern as ty=Integer */;
          _i_dcr = tmpMeta12;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT30);

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

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT34);

          _txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_dcr);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          goto tmp3_done;
        }
        case 3: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT36);
          goto tmp3_done;
        }
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT38);
          goto tmp3_done;
        }
        case 5: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,4,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT40);
          goto tmp3_done;
        }
        case 6: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT42);
          goto tmp3_done;
        }
        case 7: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT44);
          goto tmp3_done;
        }
        case 8: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,7,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT46);
          goto tmp3_done;
        }
        case 9: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,8,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT48);
          goto tmp3_done;
        }
        case 10: {
          modelica_metatype tmpMeta13;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,9,1) == 0) goto tmp3_end;
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_fullClassName = tmpMeta13;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT50);
          tmpMeta1 = omc_CodegenUtil_dotPath(threadData, _txt, _i_fullClassName);
          goto tmp3_done;
        }
        case 11: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,10,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT52);
          goto tmp3_done;
        }
        case 12: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,11,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT54);
          goto tmp3_done;
        }
        case 13: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,12,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT56);
          goto tmp3_done;
        }
        case 14: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,13,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT58);
          goto tmp3_done;
        }
        case 15: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,14,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT60);
          goto tmp3_done;
        }
        case 16: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,15,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT62);
          goto tmp3_done;
        }
        case 17: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT64);
          goto tmp3_done;
        }
        case 18: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,17,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT66);
          goto tmp3_done;
        }
        case 19: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,18,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT68);
          goto tmp3_done;
        }
        case 20: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,19,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT70);
          goto tmp3_done;
        }
        case 21: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,21,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT72);
          goto tmp3_done;
        }
        case 22: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,22,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT74);
          goto tmp3_done;
        }
        case 23: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,23,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT76);
          goto tmp3_done;
        }
        case 24: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,24,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT78);
          goto tmp3_done;
        }
        case 25: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT80);
          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_CodegenUtil_getVariablity(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_varKind)
{
  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_varKind;
    {
      modelica_metatype _txt = NULL;
      int tmp4;
      // _txt has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 9: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,6,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT82);
          goto tmp3_done;
        }
        case 10: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,7,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT84);
          goto tmp3_done;
        }
        case 11: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,8,0) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT86);
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT88);
          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_CodegenUtil_initValXml(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_exp, modelica_string _in_a_stringQuotes)
{
  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_exp;
    tmp4_3 = _in_a_stringQuotes;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_stringQuotes = NULL;
      modelica_metatype _i_exp = NULL;
      modelica_integer _i_index;
      modelica_metatype _i_expr = NULL;
      modelica_metatype _i_array = NULL;
      modelica_boolean _i_bool;
      modelica_string _i_string = NULL;
      modelica_real _i_real;
      modelica_integer _i_integer;
      modelica_metatype _txt_2 = NULL;
      modelica_boolean _ret_1;
      modelica_string _ret_0 = NULL;
      int tmp4;
      // _txt has no default value.
      // _a_stringQuotes has no default value.
      // _i_exp has no default value.
      // _i_index has no default value.
      // _i_expr has no default value.
      // _i_array has no default value.
      // _i_bool has no default value.
      // _i_string has no default value.
      // _i_real has no default value.
      // _i_integer has no default value.
      // _txt_2 has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 3: {
          modelica_metatype tmpMeta5;
          modelica_integer tmp6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,1) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp6 = mmc_unbox_integer(tmpMeta5);
          
          _i_integer = tmp6  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_integer));
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta7;
          modelica_real tmp8;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp8 = mmc_unbox_real(tmpMeta7);
          
          _i_real = tmp8  /* pattern as ty=Real */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, realString(_i_real));
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta9;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_string = tmpMeta9;
          _txt = tmp4_1;
          _a_stringQuotes = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _a_stringQuotes);

          _ret_0 = omc_Util_escapeModelicaStringToXmlString(threadData, _i_string);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _a_stringQuotes);
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmp11 = mmc_unbox_integer(tmpMeta10);
          
          _i_bool = tmp11  /* pattern as ty=Boolean */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, omc_Tpl_booleanString(threadData, _i_bool));
          goto tmp3_done;
        }
        case 19: {
          modelica_metatype tmpMeta12;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,16,3) == 0) goto tmp3_end;
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          
          _i_array = tmpMeta12;
          _txt = tmp4_1;
          _a_stringQuotes = tmp4_3;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT90);

          _txt = omc_CodegenUtil_lm__65(threadData, _txt, _i_array, _a_stringQuotes);
          tmpMeta1 = omc_Tpl_popIter(threadData, _txt);
          goto tmp3_done;
        }
        case 30: {
          modelica_metatype tmpMeta13;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,27,3) == 0) goto tmp3_end;
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          
          _i_expr = tmpMeta13;
          _txt = tmp4_1;
          _a_stringQuotes = tmp4_3;
          /* Pattern matching succeeded */
          _ret_1 = omc_Expression_isSimpleLiteralValue(threadData, _i_expr, 1 /* true */);
          tmpMeta1 = omc_CodegenUtil_fun__66(threadData, _txt, _ret_1, _a_stringQuotes, _i_expr);
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta14;
          modelica_integer tmp15;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,2) == 0) goto tmp3_end;
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmp15 = mmc_unbox_integer(tmpMeta14);
          
          _i_index = tmp15  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_index));
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          _i_exp = tmp4_2;
          /* Pattern matching succeeded */
          _txt_2 = omc_Tpl_writeTok(threadData, _OMC_LIT2, _OMC_LIT92);

          _txt_2 = omc_ExpressionDumpTpl_dumpExp(threadData, _txt_2, _i_exp, _OMC_LIT14);
          tmpMeta1 = omc_CodegenUtil_error(threadData, _txt, omc_Tpl_sourceInfo(threadData, _OMC_LIT5, ((modelica_integer) 267), ((modelica_integer) 14)), omc_Tpl_textString(threadData, _txt_2));
          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_CodegenUtil_fun__66(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_stringQuotes, modelica_metatype _in_a_expr)
{
  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_string tmp4_3;modelica_metatype tmp4_4;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_stringQuotes;
    tmp4_4 = _in_a_expr;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_stringQuotes = NULL;
      modelica_metatype _a_expr = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_stringQuotes has no default value.
      // _a_expr 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_stringQuotes = tmp4_3;
          _a_expr = tmp4_4;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_initValXml(threadData, _txt, _a_expr, _a_stringQuotes);
          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_CodegenUtil_fun__66(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_stringQuotes, modelica_metatype _in_a_expr)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenUtil_fun__66(threadData, _in_txt, tmp1, _in_a_stringQuotes, _in_a_expr);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_lm__65(threadData_t *threadData, modelica_metatype __omcQ_24in_5Ftxt, modelica_metatype _items, modelica_string _a_stringQuotes)
{
  modelica_metatype _txt = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  _txt = __omcQ_24in_5Ftxt;
  {
    modelica_metatype _lstElt_65;
    for (tmpMeta1 = _items; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
    {
      _lstElt_65 = MMC_CAR(tmpMeta1);
      { /* match expression */
        modelica_metatype tmp5_1;
        tmp5_1 = _lstElt_65;
        {
          modelica_metatype _i_elem = NULL;
          volatile mmc_switch_type tmp5;
          int tmp6;
          // _i_elem has no default value.
          tmp5 = 0;
          for (; tmp5 < 1; tmp5++) {
            switch (MMC_SWITCH_CAST(tmp5)) {
            case 0: {
              
              _i_elem = tmp5_1;
              /* Pattern matching succeeded */
              _txt = omc_CodegenUtil_initValXml(threadData, _txt, _i_elem, _a_stringQuotes);
              tmpMeta2 = omc_Tpl_nextIter(threadData, _txt);
              goto tmp4_done;
            }
            }
            goto tmp4_end;
            tmp4_end: ;
          }
          goto goto_3;
          goto_3:;
          MMC_THROW_INTERNAL();
          goto tmp4_done;
          tmp4_done:;
        }
      }
      _txt = tmpMeta2;
    }
  }
  _return: OMC_LABEL_UNUSED
  return _txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_initDefaultValXml(threadData_t *threadData, modelica_metatype _in_txt, 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;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_type__;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_type__ = NULL;
      modelica_metatype _txt_0 = NULL;
      modelica_string _ret_0 = NULL;
      int tmp4;
      // _txt has no default value.
      // _i_type__ has no default value.
      // _txt_0 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;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT94);
          goto tmp3_done;
        }
        case 4: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT96);
          goto tmp3_done;
        }
        case 6: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT98);
          goto tmp3_done;
        }
        case 5: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 8: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,5,5) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT94);
          goto tmp3_done;
        }
        default:
        tmp3_default: OMC_LABEL_UNUSED; {
          
          _txt = tmp4_1;
          _i_type__ = tmp4_2;
          /* Pattern matching succeeded */
          _txt_0 = omc_Tpl_writeTok(threadData, _OMC_LIT2, _OMC_LIT92);

          _ret_0 = omc_TypesDump_unparseType(threadData, _i_type__);

          _txt_0 = omc_Tpl_writeStr(threadData, _txt_0, _ret_0);
          tmpMeta1 = omc_CodegenUtil_error(threadData, _txt, omc_Tpl_sourceInfo(threadData, _OMC_LIT5, ((modelica_integer) 254), ((modelica_integer) 14)), omc_Tpl_textString(threadData, _txt_0));
          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_CodegenUtil_escapeSingleQuoteIdent(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_ident)
{
  modelica_metatype _out_txt = NULL;
  modelica_string _ret_1 = NULL;
  modelica_string _ret_0 = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _ret_1 has no default value.
  // _ret_0 has no default value.
  _ret_0 = omc_System_stringReplace(threadData, _a_ident, _OMC_LIT99, _OMC_LIT100);

  _ret_1 = omc_System_stringReplace(threadData, _ret_0, _OMC_LIT101, _OMC_LIT99);

  _out_txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_crefCCommentWithVariability(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_v)
{
  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_v;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_varKind = NULL;
      modelica_metatype _i_name = NULL;
      modelica_boolean _ret_3;
      modelica_string _ret_2 = NULL;
      modelica_boolean _ret_1;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_varKind has no default value.
      // _i_name 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 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_integer tmp9;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 23));
          tmp9 = mmc_unbox_integer(tmpMeta8);
          if (1 /* true */ != tmp9) goto tmp3_end;
          
          _i_name = tmpMeta6;
          _i_varKind = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_0 = omc_Flags_getConfigString(threadData, _OMC_LIT124);

          _ret_1 = (stringEqual(_ret_0, _OMC_LIT104));
          tmpMeta1 = omc_CodegenUtil_fun__60(threadData, _txt, _ret_1, _i_varKind, _i_name);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          
          _txt = tmp4_1;
          _i_name = tmpMeta10;
          _i_varKind = tmpMeta11;
          /* Pattern matching succeeded */
          _ret_2 = omc_Flags_getConfigString(threadData, _OMC_LIT124);

          _ret_3 = (stringEqual(_ret_2, _OMC_LIT114));
          tmpMeta1 = omc_CodegenUtil_fun__61(threadData, _txt, _ret_3, _i_varKind, _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_CodegenUtil_fun__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_varKind, 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;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_varKind;
    tmp4_4 = _in_a_name;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_varKind = NULL;
      modelica_metatype _a_name = NULL;
      modelica_metatype _txt_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_varKind has no default value.
      // _a_name 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_varKind = tmp4_3;
          _a_name = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT125);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT127);

          _txt_0 = omc_CodegenUtil_crefStrNoUnderscore(threadData, _OMC_LIT2, _a_name);

          _txt = omc_CodegenUtil_escapeCComments(threadData, _txt, omc_Tpl_textString(threadData, _txt_0));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT18);

          _txt = omc_CodegenUtil_variabilityString(threadData, _txt, _a_varKind);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT129);
          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_CodegenUtil_fun__61(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_varKind, modelica_metatype _in_a_name)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenUtil_fun__61(threadData, _in_txt, tmp1, _in_a_varKind, _in_a_name);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__60(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_metatype _in_a_varKind, 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;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_varKind;
    tmp4_4 = _in_a_name;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _a_varKind = NULL;
      modelica_metatype _a_name = NULL;
      modelica_metatype _txt_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_varKind has no default value.
      // _a_name 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;
          /* Pattern matching succeeded */
          tmpMeta1 = _txt;
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_varKind = tmp4_3;
          _a_name = tmp4_4;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_pushBlock(threadData, _txt, _OMC_LIT125);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT127);

          _txt_0 = omc_CodegenUtil_crefStrNoUnderscore(threadData, _OMC_LIT2, _a_name);

          _txt = omc_CodegenUtil_escapeCComments(threadData, _txt, omc_Tpl_textString(threadData, _txt_0));

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT18);

          _txt = omc_CodegenUtil_variabilityString(threadData, _txt, _a_varKind);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT129);
          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 boxptr_CodegenUtil_fun__60(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_varKind, modelica_metatype _in_a_name)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenUtil_fun__60(threadData, _in_txt, tmp1, _in_a_varKind, _in_a_name);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_crefCComment(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_v, modelica_string _in_a_vName)
{
  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_v;
    tmp4_3 = _in_a_vName;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_vName = NULL;
      modelica_boolean _ret_3;
      modelica_string _ret_2 = NULL;
      modelica_boolean _ret_1;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_vName 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 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_integer tmp7;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 23));
          tmp7 = mmc_unbox_integer(tmpMeta6);
          if (1 /* true */ != tmp7) goto tmp3_end;
          
          _txt = tmp4_1;
          _a_vName = tmp4_3;
          /* Pattern matching succeeded */
          _ret_0 = omc_Flags_getConfigString(threadData, _OMC_LIT124);

          _ret_1 = (stringEqual(_ret_0, _OMC_LIT104));
          tmpMeta1 = omc_CodegenUtil_fun__57(threadData, _txt, _ret_1, _a_vName);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_vName = tmp4_3;
          /* Pattern matching succeeded */
          _ret_2 = omc_Flags_getConfigString(threadData, _OMC_LIT124);

          _ret_3 = (stringEqual(_ret_2, _OMC_LIT114));
          tmpMeta1 = omc_CodegenUtil_fun__58(threadData, _txt, _ret_3, _a_vName);
          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_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_vName)
{
  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_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_vName;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_vName = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_vName 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_vName = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_escapeCComments(threadData, _txt, _a_vName);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT131);
          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_CodegenUtil_fun__58(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_vName)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenUtil_fun__58(threadData, _in_txt, tmp1, _in_a_vName);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__57(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_vName)
{
  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_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_vName;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_vName = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_vName 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_LIT131);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_vName = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_escapeCComments(threadData, _txt, _a_vName);
          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_CodegenUtil_fun__57(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_vName)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenUtil_fun__57(threadData, _in_txt, tmp1, _in_a_vName);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_escapeCComments(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_stringWithCComments)
{
  modelica_metatype _out_txt = NULL;
  modelica_string _ret_1 = NULL;
  modelica_string _ret_0 = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _ret_1 has no default value.
  // _ret_0 has no default value.
  _ret_0 = omc_System_stringReplace(threadData, _a_stringWithCComments, _OMC_LIT132, _OMC_LIT133);

  _ret_1 = omc_System_stringReplace(threadData, _ret_0, _OMC_LIT134, _OMC_LIT135);

  _out_txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_subscriptStr(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subscript)
{
  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_subscript;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_exp = NULL;
      modelica_metatype _i_n = NULL;
      modelica_boolean _i_i_1;
      modelica_integer _i_i;
      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_exp has no default value.
      // _i_n has no default value.
      // _i_i_1 has no default value.
      // _i_i 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 < 10; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_integer 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,0,1) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta6), 2));
          tmp8 = mmc_unbox_integer(tmpMeta7);
          
          _i_i = tmp8  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_i));
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta9,3,1) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta9), 2));
          tmp11 = mmc_unbox_integer(tmpMeta10);
          
          _i_i_1 = tmp11  /* pattern as ty=Boolean */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, omc_Tpl_booleanString(threadData, _i_i_1));
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,5,2) == 0) goto tmp3_end;
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
          
          _i_n = tmpMeta13;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_dotPath(threadData, _txt, _i_n);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta14;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta14,6,2) == 0) goto tmp3_end;
          
          _i_exp = tmpMeta14;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_0 = omc_ExpressionBasics_printExpStr(threadData, _i_exp);
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          modelica_integer tmp17;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          tmpMeta15 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta15,0,1) == 0) goto tmp3_end;
          tmpMeta16 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta15), 2));
          tmp17 = mmc_unbox_integer(tmpMeta16);
          
          _i_i = tmp17  /* pattern as ty=Integer */;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, intString(_i_i));
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta18;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta18 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_exp = tmpMeta18;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT137);

          _ret_1 = omc_ExpressionBasics_printExpStr(threadData, _i_exp);

          _txt = omc_CodegenUtil_escapeCComments(threadData, _txt, _ret_1);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT129);
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta19;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          tmpMeta19 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_exp = tmpMeta19;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT137);

          _ret_2 = omc_ExpressionBasics_printExpStr(threadData, _i_exp);

          _txt = omc_CodegenUtil_escapeCComments(threadData, _txt, _ret_2);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT129);
          goto tmp3_done;
        }
        case 7: {
          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_LIT139);
          goto tmp3_done;
        }
        case 8: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,3,1) == 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT141);
          goto tmp3_done;
        }
        case 9: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT143);
          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_CodegenUtil_subscriptsStrMatlabSafe(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subscripts)
{
  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_subscripts;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_subscripts = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_subscripts 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_subscripts = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT145);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT147);

          _txt = omc_CodegenUtil_lm__53(threadData, _txt, _i_subscripts);

          _txt = omc_Tpl_popIter(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          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_CodegenUtil_lm__53(threadData_t *threadData, modelica_metatype __omcQ_24in_5Ftxt, modelica_metatype _items)
{
  modelica_metatype _txt = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  _txt = __omcQ_24in_5Ftxt;
  {
    modelica_metatype _lstElt_53;
    for (tmpMeta1 = _items; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
    {
      _lstElt_53 = MMC_CAR(tmpMeta1);
      { /* match expression */
        modelica_metatype tmp5_1;
        tmp5_1 = _lstElt_53;
        {
          modelica_metatype _i_s = NULL;
          volatile mmc_switch_type tmp5;
          int tmp6;
          // _i_s has no default value.
          tmp5 = 0;
          for (; tmp5 < 1; tmp5++) {
            switch (MMC_SWITCH_CAST(tmp5)) {
            case 0: {
              
              _i_s = tmp5_1;
              /* Pattern matching succeeded */
              _txt = omc_CodegenUtil_subscriptStr(threadData, _txt, _i_s);
              tmpMeta2 = omc_Tpl_nextIter(threadData, _txt);
              goto tmp4_done;
            }
            }
            goto tmp4_end;
            tmp4_end: ;
          }
          goto goto_3;
          goto_3:;
          MMC_THROW_INTERNAL();
          goto tmp4_done;
          tmp4_done:;
        }
      }
      _txt = tmpMeta2;
    }
  }
  _return: OMC_LABEL_UNUSED
  return _txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_crefStrMatlabSafe(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_cr)
{
  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_cr;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_componentRef = NULL;
      modelica_metatype _i_subscriptLst = NULL;
      modelica_string _i_ident = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_componentRef has no default value.
      // _i_subscriptLst has no default value.
      // _i_ident has no default value.
      tmp4 = 0;
      for (; tmp4 < 5; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          
          _i_ident = tmpMeta6;
          _i_subscriptLst = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);
          tmpMeta1 = omc_CodegenUtil_subscriptsStrMatlabSafe(threadData, _txt, _i_subscriptLst);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT154), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_componentRef = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT149);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_cr = _i_componentRef;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (7 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT155), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_componentRef = tmpMeta11;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT151);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_cr = _i_componentRef;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_ident = tmpMeta12;
          _i_subscriptLst = tmpMeta13;
          _i_componentRef = tmpMeta14;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);

          _txt = omc_CodegenUtil_subscriptsStrMatlabSafe(threadData, _txt, _i_subscriptLst);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT1);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_cr = _i_componentRef;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 4: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT153);
          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_CodegenUtil_subscriptsStr(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_subscripts)
{
  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_subscripts;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_subscripts = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_subscripts 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_subscripts = tmp4_2;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT157);

          _txt = omc_Tpl_pushIter(threadData, _txt, _OMC_LIT147);

          _txt = omc_CodegenUtil_lm__50(threadData, _txt, _i_subscripts);

          _txt = omc_Tpl_popIter(threadData, _txt);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT159);
          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_CodegenUtil_lm__50(threadData_t *threadData, modelica_metatype __omcQ_24in_5Ftxt, modelica_metatype _items)
{
  modelica_metatype _txt = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta7;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  _txt = __omcQ_24in_5Ftxt;
  {
    modelica_metatype _lstElt_50;
    for (tmpMeta1 = _items; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
    {
      _lstElt_50 = MMC_CAR(tmpMeta1);
      { /* match expression */
        modelica_metatype tmp5_1;
        tmp5_1 = _lstElt_50;
        {
          modelica_metatype _i_s = NULL;
          volatile mmc_switch_type tmp5;
          int tmp6;
          // _i_s has no default value.
          tmp5 = 0;
          for (; tmp5 < 1; tmp5++) {
            switch (MMC_SWITCH_CAST(tmp5)) {
            case 0: {
              
              _i_s = tmp5_1;
              /* Pattern matching succeeded */
              _txt = omc_CodegenUtil_subscriptStr(threadData, _txt, _i_s);
              tmpMeta2 = omc_Tpl_nextIter(threadData, _txt);
              goto tmp4_done;
            }
            }
            goto tmp4_end;
            tmp4_end: ;
          }
          goto goto_3;
          goto_3:;
          MMC_THROW_INTERNAL();
          goto tmp4_done;
          tmp4_done:;
        }
      }
      _txt = tmpMeta2;
    }
  }
  _return: OMC_LABEL_UNUSED
  return _txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_crefStrNoUnderscore(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_cr)
{
  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_cr;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_componentRef = NULL;
      modelica_metatype _i_subscriptLst = NULL;
      modelica_string _i_ident = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_componentRef has no default value.
      // _i_subscriptLst has no default value.
      // _i_ident has no default value.
      tmp4 = 0;
      for (; tmp4 < 5; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          
          _i_ident = tmpMeta6;
          _i_subscriptLst = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);
          tmpMeta1 = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT154), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_componentRef = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT161);

          _txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_componentRef);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (7 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT155), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_componentRef = tmpMeta11;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT163);

          _txt = omc_CodegenUtil_crefStrNoUnderscore(threadData, _txt, _i_componentRef);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_ident = tmpMeta12;
          _i_subscriptLst = tmpMeta13;
          _i_componentRef = tmpMeta14;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeStr(threadData, _txt, _i_ident);

          _txt = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT20);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_cr = _i_componentRef;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 4: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT153);
          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_CodegenUtil_crefStr(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_a_cr)
{
  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_cr;
    {
      modelica_metatype _txt = NULL;
      modelica_metatype _i_componentRef = NULL;
      modelica_metatype _i_subscriptLst = NULL;
      modelica_string _i_ident = NULL;
      modelica_string _ret_1 = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_componentRef has no default value.
      // _i_subscriptLst has no default value.
      // _i_ident has no default value.
      // _ret_1 has no default value.
      // _ret_0 has no default value.
      tmp4 = 0;
      for (; tmp4 < 5; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,3) == 0) goto tmp3_end;
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          
          _i_ident = tmpMeta6;
          _i_subscriptLst = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_0 = omc_System_unquoteIdentifier(threadData, _i_ident);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          tmpMeta1 = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (4 != MMC_STRLEN(tmpMeta8) || strcmp(MMC_STRINGDATA(_OMC_LIT154), MMC_STRINGDATA(tmpMeta8)) != 0) goto tmp3_end;
          tmpMeta9 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_componentRef = tmpMeta9;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT161);

          _txt = omc_CodegenUtil_crefStr(threadData, _txt, _i_componentRef);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta10 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          if (7 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT155), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
          tmpMeta11 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_componentRef = tmpMeta11;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT163);

          _txt = omc_CodegenUtil_crefStr(threadData, _txt, _i_componentRef);
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT32);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,4) == 0) goto tmp3_end;
          tmpMeta12 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta13 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 4));
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 5));
          
          _i_ident = tmpMeta12;
          _i_subscriptLst = tmpMeta13;
          _i_componentRef = tmpMeta14;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _ret_1 = omc_System_unquoteIdentifier(threadData, _i_ident);

          _txt = omc_Tpl_writeStr(threadData, _txt, _ret_1);

          _txt = omc_CodegenUtil_subscriptsStr(threadData, _txt, _i_subscriptLst);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT165);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_cr = _i_componentRef;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 4: {
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT153);
          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_CodegenUtil_underscorePath(threadData_t *threadData, modelica_metatype _in_txt, 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_metatype tmp4_2;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_a_path;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_name_1 = NULL;
      modelica_metatype _i_path = NULL;
      modelica_string _i_name = NULL;
      int tmp4;
      // _txt has no default value.
      // _i_name_1 has no default value.
      // _i_path has no default value.
      // _i_name has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_2))) {
        case 3: {
          modelica_metatype tmpMeta5;
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,2) == 0) goto tmp3_end;
          tmpMeta5 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          tmpMeta6 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 3));
          
          _i_name = tmpMeta5;
          _i_path = tmpMeta6;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          _txt = omc_CodegenUtil_replaceDotAndUnderscore(threadData, _txt, _i_name);

          _txt = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT1);
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_path = _i_path;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          tmpMeta7 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_name_1 = tmpMeta7;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_CodegenUtil_replaceDotAndUnderscore(threadData, _txt, _i_name_1);
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta8;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          tmpMeta8 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmp4_2), 2));
          
          _i_path = tmpMeta8;
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          /* Tail recursive call */
          _in_txt = _txt;
          _in_a_path = _i_path;
          goto _tailrecursive;
          /* TODO: Make sure any eventual dead code below is never generated */
          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;
}

DLLDirection
modelica_metatype omc_CodegenUtil_getGeneralTarget(threadData_t *threadData, modelica_metatype _in_txt, modelica_string _in_a_str)
{
  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_str;
    {
      modelica_metatype _txt = NULL;
      modelica_string _i_str = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _i_str has no default value.
      tmp4 = 0;
      for (; tmp4 < 6; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT168), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
          goto tmp3_done;
        }
        case 1: {
          if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT169), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
          goto tmp3_done;
        }
        case 2: {
          if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT170), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
          goto tmp3_done;
        }
        case 3: {
          if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT171), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
          goto tmp3_done;
        }
        case 4: {
          if (6 != MMC_STRLEN(tmp4_2) || strcmp(MMC_STRINGDATA(_OMC_LIT172), MMC_STRINGDATA(tmp4_2)) != 0) goto tmp3_end;
          
          _txt = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeTok(threadData, _txt, _OMC_LIT167);
          goto tmp3_done;
        }
        case 5: {
          
          _txt = tmp4_1;
          _i_str = tmp4_2;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _i_str);
          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_CodegenUtil_replaceDotAndUnderscore(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_str)
{
  modelica_metatype _out_txt = NULL;
  modelica_string _ret_5 = NULL;
  modelica_string _ret_4 = NULL;
  modelica_metatype _l_str__underscores = NULL;
  modelica_boolean _ret_2;
  modelica_string _ret_1 = NULL;
  modelica_metatype _l_str__dots = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  // _ret_5 has no default value.
  // _ret_4 has no default value.
  // _l_str__underscores has no default value.
  // _ret_2 has no default value.
  // _ret_1 has no default value.
  // _l_str__dots has no default value.
  _ret_1 = substring(_a_str, ((modelica_integer) 1), ((modelica_integer) 1));

  _ret_2 = (stringEqual(_ret_1, _OMC_LIT101));

  _l_str__dots = omc_CodegenUtil_fun__44(threadData, _OMC_LIT2, _ret_2, _a_str);

  _ret_4 = omc_System_stringReplace(threadData, omc_Tpl_textString(threadData, _l_str__dots), _OMC_LIT0, _OMC_LIT173);

  _l_str__underscores = omc_Tpl_writeStr(threadData, _OMC_LIT2, _ret_4);

  _ret_5 = omc_System_unquoteIdentifier(threadData, omc_Tpl_textString(threadData, _l_str__underscores));

  _out_txt = omc_Tpl_writeStr(threadData, _txt, _ret_5);
  _return: OMC_LABEL_UNUSED
  return _out_txt;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_CodegenUtil_fun__44(threadData_t *threadData, modelica_metatype _in_txt, modelica_boolean _in_mArg, modelica_string _in_a_str)
{
  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_string tmp4_3;
    tmp4_1 = _in_txt;
    tmp4_2 = _in_mArg;
    tmp4_3 = _in_a_str;
    {
      modelica_metatype _txt = NULL;
      modelica_string _a_str = NULL;
      modelica_string _ret_0 = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _txt has no default value.
      // _a_str 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_str = tmp4_3;
          /* Pattern matching succeeded */
          _ret_0 = omc_System_stringReplace(threadData, _a_str, _OMC_LIT19, _OMC_LIT0);
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _ret_0);
          goto tmp3_done;
        }
        case 1: {
          
          _txt = tmp4_1;
          _a_str = tmp4_3;
          /* Pattern matching succeeded */
          tmpMeta1 = omc_Tpl_writeStr(threadData, _txt, _a_str);
          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_CodegenUtil_fun__44(threadData_t *threadData, modelica_metatype _in_txt, modelica_metatype _in_mArg, modelica_metatype _in_a_str)
{
  modelica_integer tmp1;
  modelica_metatype _out_txt = NULL;
  tmp1 = mmc_unbox_integer(_in_mArg);
  _out_txt = omc_CodegenUtil_fun__44(threadData, _in_txt, tmp1, _in_a_str);
  /* skip box _out_txt; Tpl.Text */
  return _out_txt;
}

DLLDirection
modelica_metatype omc_CodegenUtil_symbolName(threadData_t *threadData, modelica_metatype _txt, modelica_string _a_modelNamePrefix, modelica_string _a_symbolName)
{
  modelica_metatype _out_txt = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _out_txt has no default value.
  _out_txt = omc_Tpl_writeStr(threadData, _txt, _a_modelNamePrefix);

  _out_txt = omc_Tpl_writeTok(threadData, _out_txt, _OMC_LIT1);

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

