#include "omc_simulation_settings.h"
#include "NFUnit.h"
#define _OMC_LIT0_data ""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT0,0,_OMC_LIT0_data);
#define _OMC_LIT0 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT0)
#define _OMC_LIT1_data "a"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT1,1,_OMC_LIT1_data);
#define _OMC_LIT1 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT1)
#define _OMC_LIT2_data "z"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT2,1,_OMC_LIT2_data);
#define _OMC_LIT2 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT2)
#define _OMC_LIT3_data "A"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT3,1,_OMC_LIT3_data);
#define _OMC_LIT3 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT3)
#define _OMC_LIT4_data "Z"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT4,1,_OMC_LIT4_data);
#define _OMC_LIT4 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT4)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT5,1,5) {&NFUnit_Token_T__MUL__desc,}};
#define _OMC_LIT5 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT5)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT6,1,7) {&NFUnit_Token_T__LPAREN__desc,}};
#define _OMC_LIT6 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT6)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT7,1,8) {&NFUnit_Token_T__RPAREN__desc,}};
#define _OMC_LIT7 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT7)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT8,1,6) {&NFUnit_Token_T__DIV__desc,}};
#define _OMC_LIT8 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT8)
#define _OMC_LIT9_data "."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT9,1,_OMC_LIT9_data);
#define _OMC_LIT9 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT9)
#define _OMC_LIT10_data "("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT10,1,_OMC_LIT10_data);
#define _OMC_LIT10 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT10)
#define _OMC_LIT11_data ")"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT11,1,_OMC_LIT11_data);
#define _OMC_LIT11 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT11)
#define _OMC_LIT12_data "/"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT12,1,_OMC_LIT12_data);
#define _OMC_LIT12 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT12)
#define _OMC_LIT13_data "+"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT13,1,_OMC_LIT13_data);
#define _OMC_LIT13 MMC_REFSTRINGLIT(_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)
#define _OMC_LIT15_data "y"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT15,1,_OMC_LIT15_data);
#define _OMC_LIT15 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT15)
#define _OMC_LIT16_data "f"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT16,1,_OMC_LIT16_data);
#define _OMC_LIT16 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT16)
#define _OMC_LIT17_data "p"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT17,1,_OMC_LIT17_data);
#define _OMC_LIT17 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT17)
#define _OMC_LIT18_data "u"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT18,1,_OMC_LIT18_data);
#define _OMC_LIT18 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT18)
#define _OMC_LIT19_data "m"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT19,1,_OMC_LIT19_data);
#define _OMC_LIT19 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT19)
#define _OMC_LIT20_data "c"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT20,1,_OMC_LIT20_data);
#define _OMC_LIT20 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT20)
#define _OMC_LIT21_data "d"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT21,1,_OMC_LIT21_data);
#define _OMC_LIT21 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT21)
#define _OMC_LIT22_data "h"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT22,1,_OMC_LIT22_data);
#define _OMC_LIT22 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT22)
#define _OMC_LIT23_data "k"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT23,1,_OMC_LIT23_data);
#define _OMC_LIT23 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT23)
#define _OMC_LIT24_data "M"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT24,1,_OMC_LIT24_data);
#define _OMC_LIT24 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT24)
#define _OMC_LIT25_data "G"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT25,1,_OMC_LIT25_data);
#define _OMC_LIT25 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT25)
#define _OMC_LIT26_data "T"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT26,1,_OMC_LIT26_data);
#define _OMC_LIT26 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT26)
#define _OMC_LIT27_data "P"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT27,1,_OMC_LIT27_data);
#define _OMC_LIT27 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT27)
#define _OMC_LIT28_data "E"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT28,1,_OMC_LIT28_data);
#define _OMC_LIT28 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT28)
#define _OMC_LIT29_data "Y"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT29,1,_OMC_LIT29_data);
#define _OMC_LIT29 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT29)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT30,1.0);
#define _OMC_LIT30 MMC_REFREALLIT(_OMC_LIT_STRUCT30)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT31,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT31 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT31)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT32,2,5) {&NFUnit_Unit_UNKNOWN__desc,_OMC_LIT0}};
#define _OMC_LIT32 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT32)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT33,0.0);
#define _OMC_LIT33 MMC_REFREALLIT(_OMC_LIT_STRUCT33)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT34,8,3) {&SourceInfo_SOURCEINFO__desc,_OMC_LIT0,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT33}};
#define _OMC_LIT34 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT34)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT35,1,5) {&ErrorTypes_MessageType_TRANSLATION__desc,}};
#define _OMC_LIT35 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT35)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT36,1,6) {&ErrorTypes_Severity_NOTIFICATION__desc,}};
#define _OMC_LIT36 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT36)
#define _OMC_LIT37_data "Invalid unit expression '%s'."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT37,29,_OMC_LIT37_data);
#define _OMC_LIT37 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT37)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT38,5,3) {&ErrorTypes_Message_MESSAGE__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(520)),_OMC_LIT35,_OMC_LIT36,_OMC_LIT37}};
#define _OMC_LIT38 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT38)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT39,2,1) {MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */)),MMC_REFSTRUCTLIT(mmc_nil)}};
#define _OMC_LIT39 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT39)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT40,2,1) {MMC_IMMEDIATE(MMC_TAGFIXNUM(1 /* true */)),_OMC_LIT39}};
#define _OMC_LIT40 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT40)
#define _OMC_LIT41_data "NFUnit.parseUnitString: failed to parse unit string "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT41,52,_OMC_LIT41_data);
#define _OMC_LIT41 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT41)
#define _OMC_LIT42_data "failtrace"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT42,9,_OMC_LIT42_data);
#define _OMC_LIT42 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT42)
#define _OMC_LIT43_data "Sets whether to print a failtrace or not."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT43,41,_OMC_LIT43_data);
#define _OMC_LIT43 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT43)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT44,5,3) {&Flags_DebugFlag_DEBUG__FLAG__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT42,MMC_IMMEDIATE(MMC_TAGFIXNUM(0 /* false */)),_OMC_LIT43}};
#define _OMC_LIT44 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT44)
#define _OMC_LIT45_data "Q"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT45,1,_OMC_LIT45_data);
#define _OMC_LIT45 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT45)
#define _OMC_LIT46_data "R"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT46,1,_OMC_LIT46_data);
#define _OMC_LIT46 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT46)
#define _OMC_LIT47_data "da"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT47,2,_OMC_LIT47_data);
#define _OMC_LIT47 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT47)
#define _OMC_LIT48_data "n"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT48,1,_OMC_LIT48_data);
#define _OMC_LIT48 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT48)
#define _OMC_LIT49_data "r"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT49,1,_OMC_LIT49_data);
#define _OMC_LIT49 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT49)
#define _OMC_LIT50_data "q"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT50,1,_OMC_LIT50_data);
#define _OMC_LIT50 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT50)
#define _OMC_LIT51_data "mol"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT51,3,_OMC_LIT51_data);
#define _OMC_LIT51 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT51)
#define _OMC_LIT52_data "cd"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT52,2,_OMC_LIT52_data);
#define _OMC_LIT52 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT52)
#define _OMC_LIT53_data "s"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT53,1,_OMC_LIT53_data);
#define _OMC_LIT53 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT53)
#define _OMC_LIT54_data "K"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT54,1,_OMC_LIT54_data);
#define _OMC_LIT54 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT54)
#define _OMC_LIT55_data "g"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT55,1,_OMC_LIT55_data);
#define _OMC_LIT55 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT55)
#define _OMC_LIT56_data "1"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT56,1,_OMC_LIT56_data);
#define _OMC_LIT56 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT56)
#define _OMC_LIT57_data "function Unit.unitString failed for \""
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT57,37,_OMC_LIT57_data);
#define _OMC_LIT57 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT57)
#define _OMC_LIT58_data "\"."
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT58,2,_OMC_LIT58_data);
#define _OMC_LIT58 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT58)
#define _OMC_LIT59_data " * "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT59,3,_OMC_LIT59_data);
#define _OMC_LIT59 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT59)
#define _OMC_LIT60_data "mol^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT60,5,_OMC_LIT60_data);
#define _OMC_LIT60 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT60)
#define _OMC_LIT61_data "cd^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT61,4,_OMC_LIT61_data);
#define _OMC_LIT61 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT61)
#define _OMC_LIT62_data "m^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT62,3,_OMC_LIT62_data);
#define _OMC_LIT62 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT62)
#define _OMC_LIT63_data "s^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT63,3,_OMC_LIT63_data);
#define _OMC_LIT63 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT63)
#define _OMC_LIT64_data "A^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT64,3,_OMC_LIT64_data);
#define _OMC_LIT64 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT64)
#define _OMC_LIT65_data "K^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT65,3,_OMC_LIT65_data);
#define _OMC_LIT65 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT65)
#define _OMC_LIT66_data "g^("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT66,3,_OMC_LIT66_data);
#define _OMC_LIT66 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT66)
#define _OMC_LIT67_data "MASTER"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT67,6,_OMC_LIT67_data);
#define _OMC_LIT67 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT67)
#define _OMC_LIT68_data ", "
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT68,2,_OMC_LIT68_data);
#define _OMC_LIT68 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT68)
#define _OMC_LIT69_data "UNKOWN("
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT69,7,_OMC_LIT69_data);
#define _OMC_LIT69 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT69)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT70,2,0) {_OMC_LIT56,_OMC_LIT31}};
#define _OMC_LIT70 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT70)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT71,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT71 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT71)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT72,2,0) {_OMC_LIT53,_OMC_LIT71}};
#define _OMC_LIT72 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT72)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT73,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT73 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT73)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT74,2,0) {_OMC_LIT19,_OMC_LIT73}};
#define _OMC_LIT74 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT74)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT75,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT75 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT75)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT76,2,0) {_OMC_LIT55,_OMC_LIT75}};
#define _OMC_LIT76 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT76)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT77,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT77 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT77)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT78,2,0) {_OMC_LIT3,_OMC_LIT77}};
#define _OMC_LIT78 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT78)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT79,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT79 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT79)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT80,2,0) {_OMC_LIT54,_OMC_LIT79}};
#define _OMC_LIT80 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT80)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT81,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT81 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT81)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT82,2,0) {_OMC_LIT51,_OMC_LIT81}};
#define _OMC_LIT82 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT82)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT83,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT30}};
#define _OMC_LIT83 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT83)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT84,2,0) {_OMC_LIT52,_OMC_LIT83}};
#define _OMC_LIT84 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT84)
#define _OMC_LIT85_data "rad"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT85,3,_OMC_LIT85_data);
#define _OMC_LIT85 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT85)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT86,2,0) {_OMC_LIT85,_OMC_LIT31}};
#define _OMC_LIT86 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT86)
#define _OMC_LIT87_data "Hz"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT87,2,_OMC_LIT87_data);
#define _OMC_LIT87 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT87)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT88,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT88 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT88)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT89,2,0) {_OMC_LIT87,_OMC_LIT88}};
#define _OMC_LIT89 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT89)
#define _OMC_LIT90_data "N"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT90,1,_OMC_LIT90_data);
#define _OMC_LIT90 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT90)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT91,1000.0);
#define _OMC_LIT91 MMC_REFREALLIT(_OMC_LIT_STRUCT91)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT92,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT92 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT92)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT93,2,0) {_OMC_LIT90,_OMC_LIT92}};
#define _OMC_LIT93 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT93)
#define _OMC_LIT94_data "Pa"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT94,2,_OMC_LIT94_data);
#define _OMC_LIT94 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT94)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT95,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT95 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT95)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT96,2,0) {_OMC_LIT94,_OMC_LIT95}};
#define _OMC_LIT96 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT96)
#define _OMC_LIT97_data "J"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT97,1,_OMC_LIT97_data);
#define _OMC_LIT97 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT97)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT98,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT98 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT98)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT99,2,0) {_OMC_LIT97,_OMC_LIT98}};
#define _OMC_LIT99 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT99)
#define _OMC_LIT100_data "W"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT100,1,_OMC_LIT100_data);
#define _OMC_LIT100 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT100)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT101,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT101 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT101)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT102,2,0) {_OMC_LIT100,_OMC_LIT101}};
#define _OMC_LIT102 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT102)
#define _OMC_LIT103_data "C"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT103,1,_OMC_LIT103_data);
#define _OMC_LIT103 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT103)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT104,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT104 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT104)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT105,2,0) {_OMC_LIT103,_OMC_LIT104}};
#define _OMC_LIT105 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT105)
#define _OMC_LIT106_data "V"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT106,1,_OMC_LIT106_data);
#define _OMC_LIT106 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT106)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT107,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT107 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT107)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT108,2,0) {_OMC_LIT106,_OMC_LIT107}};
#define _OMC_LIT108 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT108)
#define _OMC_LIT109_data "F"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT109,1,_OMC_LIT109_data);
#define _OMC_LIT109 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT109)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT110,0.001);
#define _OMC_LIT110 MMC_REFREALLIT(_OMC_LIT_STRUCT110)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT111,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(4)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT110}};
#define _OMC_LIT111 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT111)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT112,2,0) {_OMC_LIT109,_OMC_LIT111}};
#define _OMC_LIT112 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT112)
#define _OMC_LIT113_data "Ohm"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT113,3,_OMC_LIT113_data);
#define _OMC_LIT113 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT113)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT114,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT114 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT114)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT115,2,0) {_OMC_LIT113,_OMC_LIT114}};
#define _OMC_LIT115 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT115)
#define _OMC_LIT116_data "S"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT116,1,_OMC_LIT116_data);
#define _OMC_LIT116 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT116)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT117,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT110}};
#define _OMC_LIT117 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT117)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT118,2,0) {_OMC_LIT116,_OMC_LIT117}};
#define _OMC_LIT118 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT118)
#define _OMC_LIT119_data "Wb"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT119,2,_OMC_LIT119_data);
#define _OMC_LIT119 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT119)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT120,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT120 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT120)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT121,2,0) {_OMC_LIT119,_OMC_LIT120}};
#define _OMC_LIT121 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT121)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT122,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT122 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT122)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT123,2,0) {_OMC_LIT26,_OMC_LIT122}};
#define _OMC_LIT123 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT123)
#define _OMC_LIT124_data "H"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT124,1,_OMC_LIT124_data);
#define _OMC_LIT124 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT124)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT125,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT91}};
#define _OMC_LIT125 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT125)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT126,2,0) {_OMC_LIT124,_OMC_LIT125}};
#define _OMC_LIT126 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT126)
#define _OMC_LIT127_data "degC"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT127,4,_OMC_LIT127_data);
#define _OMC_LIT127 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT127)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT128,2,0) {_OMC_LIT127,_OMC_LIT79}};
#define _OMC_LIT128 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT128)
#define _OMC_LIT129_data "kat"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT129,3,_OMC_LIT129_data);
#define _OMC_LIT129 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT129)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT130,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT30}};
#define _OMC_LIT130 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT130)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT131,2,0) {_OMC_LIT129,_OMC_LIT130}};
#define _OMC_LIT131 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT131)
#define _OMC_LIT132_data "min"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT132,3,_OMC_LIT132_data);
#define _OMC_LIT132 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT132)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT133,60.0);
#define _OMC_LIT133 MMC_REFREALLIT(_OMC_LIT_STRUCT133)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT134,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT133}};
#define _OMC_LIT134 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT134)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT135,2,0) {_OMC_LIT132,_OMC_LIT134}};
#define _OMC_LIT135 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT135)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT136,3600.0);
#define _OMC_LIT136 MMC_REFREALLIT(_OMC_LIT_STRUCT136)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT137,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT136}};
#define _OMC_LIT137 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT137)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT138,2,0) {_OMC_LIT22,_OMC_LIT137}};
#define _OMC_LIT138 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT138)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT139,86400.0);
#define _OMC_LIT139 MMC_REFREALLIT(_OMC_LIT_STRUCT139)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT140,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT139}};
#define _OMC_LIT140 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT140)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT141,2,0) {_OMC_LIT21,_OMC_LIT140}};
#define _OMC_LIT141 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT141)
#define _OMC_LIT142_data "l"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT142,1,_OMC_LIT142_data);
#define _OMC_LIT142 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT142)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT143,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(3)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT110}};
#define _OMC_LIT143 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT143)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT144,2,0) {_OMC_LIT142,_OMC_LIT143}};
#define _OMC_LIT144 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT144)
#define _OMC_LIT145_data "bar"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT145,3,_OMC_LIT145_data);
#define _OMC_LIT145 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT145)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT146,1e8);
#define _OMC_LIT146 MMC_REFREALLIT(_OMC_LIT_STRUCT146)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT147,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(-2)),MMC_IMMEDIATE(MMC_TAGFIXNUM(-1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),_OMC_LIT146}};
#define _OMC_LIT147 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT147)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT148,2,0) {_OMC_LIT145,_OMC_LIT147}};
#define _OMC_LIT148 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT148)
#define _OMC_LIT149_data "degF"
static const MMC_DEFSTRINGLIT(_OMC_LIT_STRUCT149,4,_OMC_LIT149_data);
#define _OMC_LIT149 MMC_REFSTRINGLIT(_OMC_LIT_STRUCT149)
static const MMC_DEFREALLIT(_OMC_LIT_STRUCT150,0.5555555555555556);
#define _OMC_LIT150 MMC_REFREALLIT(_OMC_LIT_STRUCT150)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT151,9,3) {&NFUnit_Unit_UNIT__desc,MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(0)),MMC_IMMEDIATE(MMC_TAGFIXNUM(1)),_OMC_LIT150}};
#define _OMC_LIT151 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT151)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT152,2,0) {_OMC_LIT149,_OMC_LIT151}};
#define _OMC_LIT152 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT152)
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_1,2,1) {_OMC_LIT152,MMC_REFSTRUCTLIT(mmc_nil)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_2,2,1) {_OMC_LIT148,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_1)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_3,2,1) {_OMC_LIT144,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_2)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_4,2,1) {_OMC_LIT141,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_3)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_5,2,1) {_OMC_LIT138,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_4)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_6,2,1) {_OMC_LIT135,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_5)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_7,2,1) {_OMC_LIT131,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_6)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_8,2,1) {_OMC_LIT128,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_7)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_9,2,1) {_OMC_LIT126,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_8)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_10,2,1) {_OMC_LIT123,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_9)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_11,2,1) {_OMC_LIT121,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_10)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_12,2,1) {_OMC_LIT118,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_11)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_13,2,1) {_OMC_LIT115,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_12)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_14,2,1) {_OMC_LIT112,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_13)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_15,2,1) {_OMC_LIT108,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_14)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_16,2,1) {_OMC_LIT105,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_15)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_17,2,1) {_OMC_LIT102,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_16)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_18,2,1) {_OMC_LIT99,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_17)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_19,2,1) {_OMC_LIT96,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_18)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_20,2,1) {_OMC_LIT93,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_19)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_21,2,1) {_OMC_LIT89,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_20)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_22,2,1) {_OMC_LIT86,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_21)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_23,2,1) {_OMC_LIT84,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_22)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_24,2,1) {_OMC_LIT82,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_23)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_25,2,1) {_OMC_LIT80,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_24)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_26,2,1) {_OMC_LIT78,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_25)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_27,2,1) {_OMC_LIT76,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_26)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_28,2,1) {_OMC_LIT74,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_27)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_29,2,1) {_OMC_LIT72,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_28)}};
static const MMC_DEFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_30,2,1) {_OMC_LIT70,MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_29)}};
#define _OMC_LIT153 MMC_REFSTRUCTLIT(_OMC_LIT_STRUCT153_cons_30)
#include "util/modelica.h"

#include "NFUnit_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_NFUnit_popNumber(threadData_t *threadData, modelica_metatype _inCharList, modelica_string *out_outNumber);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_popNumber,2,0) {(void*) boxptr_NFUnit_popNumber,0}};
#define boxvar_NFUnit_popNumber MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_popNumber)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_popUnit(threadData_t *threadData, modelica_metatype _inCharList, modelica_string *out_outUnit);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_popUnit,2,0) {(void*) boxptr_NFUnit_popUnit,0}};
#define boxvar_NFUnit_popUnit MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_popUnit)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_lexer(threadData_t *threadData, modelica_metatype _inCharList);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_lexer,2,0) {(void*) boxptr_NFUnit_lexer,0}};
#define boxvar_NFUnit_lexer MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_lexer)
PROTECTED_FUNCTION_STATIC modelica_real omc_NFUnit_getPrefix(threadData_t *threadData, modelica_string _inS, modelica_string _inS2, modelica_string *out_outUnit);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_NFUnit_getPrefix(threadData_t *threadData, modelica_metatype _inS, modelica_metatype _inS2, modelica_metatype *out_outUnit);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_getPrefix,2,0) {(void*) boxptr_NFUnit_getPrefix,0}};
#define boxvar_NFUnit_getPrefix MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_getPrefix)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_unitToken2unit(threadData_t *threadData, modelica_string _inS, modelica_metatype _inHtS2U);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_unitToken2unit,2,0) {(void*) boxptr_NFUnit_unitToken2unit,0}};
#define boxvar_NFUnit_unitToken2unit MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_unitToken2unit)
PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_parser3(threadData_t *threadData, modelica_metatype _inMul, modelica_metatype _inTokenList, modelica_metatype _inUnit, modelica_metatype _inHtS2U);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_parser3,2,0) {(void*) boxptr_NFUnit_parser3,0}};
#define boxvar_NFUnit_parser3 MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_parser3)
PROTECTED_FUNCTION_STATIC modelica_string omc_NFUnit_prefix2String(threadData_t *threadData, modelica_real _inReal);
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_NFUnit_prefix2String(threadData_t *threadData, modelica_metatype _inReal);
static const MMC_DEFSTRUCTLIT(boxvar_lit_NFUnit_prefix2String,2,0) {(void*) boxptr_NFUnit_prefix2String,0}};
#define boxvar_NFUnit_prefix2String MMC_REFSTRUCTLIT(boxvar_lit_NFUnit_prefix2String)

PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_popNumber(threadData_t *threadData, modelica_metatype _inCharList, modelica_string *out_outNumber)
{
  modelica_metatype _outCharList = NULL;
  modelica_string _outNumber = NULL;
  modelica_string tmp1_c1 __attribute__((unused)) = 0;
  modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outCharList has no default value.
  // _outNumber has no default value.
  
  
  { /* matchcontinue expression */
    volatile modelica_metatype tmp4_1;
    tmp4_1 = _inCharList;
    {
      modelica_string _s1 = NULL;
      modelica_string _s2 = NULL;
      modelica_metatype _strRest = NULL;
      modelica_integer _i;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _s1 has no default value.
      // _s2 has no default value.
      // _strRest has no default value.
      // _i has no default value.
      tmp4 = 0;
      MMC_TRY_INTERNAL(mmc_jumper)
      tmp3_top:
      threadData->mmc_jumper = &new_mmc_jumper;
      for (; tmp4 < 3; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (!listEmpty(tmp4_1)) goto tmp3_end;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
          tmpMeta[0+0] = tmpMeta6;
          tmp1_c1 = _OMC_LIT0;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_boolean tmp9;
          modelica_metatype tmpMeta10;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta7 = MMC_CAR(tmp4_1);
          tmpMeta8 = MMC_CDR(tmp4_1);
          _s1 = tmpMeta7;
          _strRest = tmpMeta8;
          /* Pattern matching succeeded */
          _i = stringInt(_s1);

          /* Pattern-matching assignment */
          tmp9 = (stringEqual(intString(_i), _s1));
          if (1 /* true */ != tmp9) goto goto_2;

          _strRest = omc_NFUnit_popNumber(threadData, _strRest ,&_s2);
          tmpMeta10 = stringAppend(_s1,_s2);
          tmpMeta[0+0] = _strRest;
          tmp1_c1 = tmpMeta10;
          goto tmp3_done;
        }
        case 2: {
          
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _inCharList;
          tmp1_c1 = _OMC_LIT0;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      tmp3_done:
      (void)tmp4;
      MMC_RESTORE_INTERNAL(mmc_jumper);
      goto tmp3_done2;
      goto_2:;
      MMC_CATCH_INTERNAL(mmc_jumper);
      if (++tmp4 < 3) {
        goto tmp3_top;
      }
      MMC_THROW_INTERNAL();
      tmp3_done2:;
    }
  }
  _outCharList = tmpMeta[0+0];
  _outNumber = tmp1_c1;
  _return: OMC_LABEL_UNUSED
  if (out_outNumber) { *out_outNumber = _outNumber; }
  return _outCharList;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_popUnit(threadData_t *threadData, modelica_metatype _inCharList, modelica_string *out_outUnit)
{
  modelica_metatype _outCharList = NULL;
  modelica_string _outUnit = NULL;
  modelica_string tmp1_c1 __attribute__((unused)) = 0;
  modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outCharList has no default value.
  // _outUnit has no default value.
  
  
  { /* matchcontinue expression */
    volatile modelica_metatype tmp4_1;
    tmp4_1 = _inCharList;
    {
      modelica_string _s1 = NULL;
      modelica_string _s2 = NULL;
      modelica_metatype _strRest = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _s1 has no default value.
      // _s2 has no default value.
      // _strRest has no default value.
      tmp4 = 0;
      MMC_TRY_INTERNAL(mmc_jumper)
      tmp3_top:
      threadData->mmc_jumper = &new_mmc_jumper;
      for (; tmp4 < 4; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (!listEmpty(tmp4_1)) goto tmp3_end;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
          tmpMeta[0+0] = tmpMeta6;
          tmp1_c1 = _OMC_LIT0;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_boolean tmp9;
          modelica_metatype tmpMeta10;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta7 = MMC_CAR(tmp4_1);
          tmpMeta8 = MMC_CDR(tmp4_1);
          _s1 = tmpMeta7;
          _strRest = tmpMeta8;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp9 = ((stringCompare(_s1, _OMC_LIT1) >= ((modelica_integer) 0)) && (stringCompare(_s1, _OMC_LIT2) <= ((modelica_integer) 0)));
          if (1 /* true */ != tmp9) goto goto_2;

          _strRest = omc_NFUnit_popUnit(threadData, _strRest ,&_s2);
          tmpMeta10 = stringAppend(_s1,_s2);
          tmpMeta[0+0] = _strRest;
          tmp1_c1 = tmpMeta10;
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          modelica_boolean tmp13;
          modelica_metatype tmpMeta14;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta11 = MMC_CAR(tmp4_1);
          tmpMeta12 = MMC_CDR(tmp4_1);
          _s1 = tmpMeta11;
          _strRest = tmpMeta12;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmp13 = ((stringCompare(_s1, _OMC_LIT3) >= ((modelica_integer) 0)) && (stringCompare(_s1, _OMC_LIT4) <= ((modelica_integer) 0)));
          if (1 /* true */ != tmp13) goto goto_2;

          _strRest = omc_NFUnit_popUnit(threadData, _strRest ,&_s2);
          tmpMeta14 = stringAppend(_s1,_s2);
          tmpMeta[0+0] = _strRest;
          tmp1_c1 = tmpMeta14;
          goto tmp3_done;
        }
        case 3: {
          
          /* Pattern matching succeeded */
          tmpMeta[0+0] = _inCharList;
          tmp1_c1 = _OMC_LIT0;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      tmp3_done:
      (void)tmp4;
      MMC_RESTORE_INTERNAL(mmc_jumper);
      goto tmp3_done2;
      goto_2:;
      MMC_CATCH_INTERNAL(mmc_jumper);
      if (++tmp4 < 4) {
        goto tmp3_top;
      }
      MMC_THROW_INTERNAL();
      tmp3_done2:;
    }
  }
  _outCharList = tmpMeta[0+0];
  _outUnit = tmp1_c1;
  _return: OMC_LABEL_UNUSED
  if (out_outUnit) { *out_outUnit = _outUnit; }
  return _outCharList;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_lexer(threadData_t *threadData, modelica_metatype _inCharList)
{
  modelica_metatype _outTokenList = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outTokenList has no default value.
  { /* matchcontinue expression */
    volatile modelica_metatype tmp4_1;
    tmp4_1 = _inCharList;
    {
      modelica_metatype _charList = NULL;
      modelica_string _number = NULL;
      modelica_string _unit = NULL;
      modelica_metatype _tokenList = NULL;
      modelica_integer _i;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _charList has no default value.
      // _number has no default value.
      // _unit has no default value.
      // _tokenList has no default value.
      // _i has no default value.
      tmp4 = 0;
      MMC_TRY_INTERNAL(mmc_jumper)
      tmp3_top:
      threadData->mmc_jumper = &new_mmc_jumper;
      for (; tmp4 < 9; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (!listEmpty(tmp4_1)) goto tmp3_end;
          tmp4 += 6; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta6 = MMC_REFSTRUCTLIT(mmc_nil);
          tmpMeta1 = tmpMeta6;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta7 = MMC_CAR(tmp4_1);
          tmpMeta8 = MMC_CDR(tmp4_1);
          if (1 != MMC_STRLEN(tmpMeta7) || strcmp(MMC_STRINGDATA(_OMC_LIT9), MMC_STRINGDATA(tmpMeta7)) != 0) goto tmp3_end;
          _charList = tmpMeta8;
          tmp4 += 5; /* Pattern matching succeeded; we may skip some cases if we fail */
          _tokenList = omc_NFUnit_lexer(threadData, _charList);
          tmpMeta9 = mmc_mk_cons(_OMC_LIT5, _tokenList);
          tmpMeta1 = tmpMeta9;
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta10 = MMC_CAR(tmp4_1);
          tmpMeta11 = MMC_CDR(tmp4_1);
          if (1 != MMC_STRLEN(tmpMeta10) || strcmp(MMC_STRINGDATA(_OMC_LIT10), MMC_STRINGDATA(tmpMeta10)) != 0) goto tmp3_end;
          _charList = tmpMeta11;
          tmp4 += 4; /* Pattern matching succeeded; we may skip some cases if we fail */
          _tokenList = omc_NFUnit_lexer(threadData, _charList);
          tmpMeta12 = mmc_mk_cons(_OMC_LIT6, _tokenList);
          tmpMeta1 = tmpMeta12;
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          modelica_metatype tmpMeta15;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta13 = MMC_CAR(tmp4_1);
          tmpMeta14 = MMC_CDR(tmp4_1);
          if (1 != MMC_STRLEN(tmpMeta13) || strcmp(MMC_STRINGDATA(_OMC_LIT11), MMC_STRINGDATA(tmpMeta13)) != 0) goto tmp3_end;
          _charList = tmpMeta14;
          tmp4 += 3; /* Pattern matching succeeded; we may skip some cases if we fail */
          _tokenList = omc_NFUnit_lexer(threadData, _charList);
          tmpMeta15 = mmc_mk_cons(_OMC_LIT7, _tokenList);
          tmpMeta1 = tmpMeta15;
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta16;
          modelica_metatype tmpMeta17;
          modelica_metatype tmpMeta18;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta16 = MMC_CAR(tmp4_1);
          tmpMeta17 = MMC_CDR(tmp4_1);
          if (1 != MMC_STRLEN(tmpMeta16) || strcmp(MMC_STRINGDATA(_OMC_LIT12), MMC_STRINGDATA(tmpMeta16)) != 0) goto tmp3_end;
          _charList = tmpMeta17;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          _tokenList = omc_NFUnit_lexer(threadData, _charList);
          tmpMeta18 = mmc_mk_cons(_OMC_LIT8, _tokenList);
          tmpMeta1 = tmpMeta18;
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta19;
          modelica_metatype tmpMeta20;
          modelica_boolean tmp21;
          modelica_metatype tmpMeta22;
          modelica_metatype tmpMeta23;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta19 = MMC_CAR(tmp4_1);
          tmpMeta20 = MMC_CDR(tmp4_1);
          if (1 != MMC_STRLEN(tmpMeta19) || strcmp(MMC_STRINGDATA(_OMC_LIT13), MMC_STRINGDATA(tmpMeta19)) != 0) goto tmp3_end;
          _charList = tmpMeta20;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          _charList = omc_NFUnit_popNumber(threadData, _charList ,&_number);

          /* Pattern-matching assignment */
          tmp21 = (stringEqual(_number, _OMC_LIT0));
          if (0 /* false */ != tmp21) goto goto_2;

          _tokenList = omc_NFUnit_lexer(threadData, _charList);

          _i = stringInt(_number);
          tmpMeta23 = mmc_mk_box2(3, &NFUnit_Token_T__NUMBER__desc, mmc_mk_integer(_i));
          tmpMeta22 = mmc_mk_cons(tmpMeta23, _tokenList);
          tmpMeta1 = tmpMeta22;
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta24;
          modelica_metatype tmpMeta25;
          modelica_boolean tmp26;
          modelica_metatype tmpMeta27;
          modelica_metatype tmpMeta28;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta24 = MMC_CAR(tmp4_1);
          tmpMeta25 = MMC_CDR(tmp4_1);
          if (1 != MMC_STRLEN(tmpMeta24) || strcmp(MMC_STRINGDATA(_OMC_LIT14), MMC_STRINGDATA(tmpMeta24)) != 0) goto tmp3_end;
          _charList = tmpMeta25;
          /* Pattern matching succeeded */
          _charList = omc_NFUnit_popNumber(threadData, _charList ,&_number);

          /* Pattern-matching assignment */
          tmp26 = (stringEqual(_number, _OMC_LIT0));
          if (0 /* false */ != tmp26) goto goto_2;

          _tokenList = omc_NFUnit_lexer(threadData, _charList);

          _i = (-stringInt(_number));
          tmpMeta28 = mmc_mk_box2(3, &NFUnit_Token_T__NUMBER__desc, mmc_mk_integer(_i));
          tmpMeta27 = mmc_mk_cons(tmpMeta28, _tokenList);
          tmpMeta1 = tmpMeta27;
          goto tmp3_done;
        }
        case 7: {
          modelica_boolean tmp29;
          modelica_metatype tmpMeta30;
          modelica_metatype tmpMeta31;
          
          _charList = tmp4_1;
          /* Pattern matching succeeded */
          _charList = omc_NFUnit_popNumber(threadData, _charList ,&_number);

          /* Pattern-matching assignment */
          tmp29 = (stringEqual(_number, _OMC_LIT0));
          if (0 /* false */ != tmp29) goto goto_2;

          _tokenList = omc_NFUnit_lexer(threadData, _charList);

          _i = stringInt(_number);
          tmpMeta31 = mmc_mk_box2(3, &NFUnit_Token_T__NUMBER__desc, mmc_mk_integer(_i));
          tmpMeta30 = mmc_mk_cons(tmpMeta31, _tokenList);
          tmpMeta1 = tmpMeta30;
          goto tmp3_done;
        }
        case 8: {
          modelica_boolean tmp32;
          modelica_metatype tmpMeta33;
          modelica_metatype tmpMeta34;
          
          _charList = tmp4_1;
          /* Pattern matching succeeded */
          _charList = omc_NFUnit_popUnit(threadData, _charList ,&_unit);

          /* Pattern-matching assignment */
          tmp32 = (stringEqual(_unit, _OMC_LIT0));
          if (0 /* false */ != tmp32) goto goto_2;

          _tokenList = omc_NFUnit_lexer(threadData, _charList);
          tmpMeta34 = mmc_mk_box2(4, &NFUnit_Token_T__UNIT__desc, _unit);
          tmpMeta33 = mmc_mk_cons(tmpMeta34, _tokenList);
          tmpMeta1 = tmpMeta33;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      tmp3_done:
      (void)tmp4;
      MMC_RESTORE_INTERNAL(mmc_jumper);
      goto tmp3_done2;
      goto_2:;
      MMC_CATCH_INTERNAL(mmc_jumper);
      if (++tmp4 < 9) {
        goto tmp3_top;
      }
      MMC_THROW_INTERNAL();
      tmp3_done2:;
    }
  }
  _outTokenList = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outTokenList;
}

PROTECTED_FUNCTION_STATIC modelica_real omc_NFUnit_getPrefix(threadData_t *threadData, modelica_string _inS, modelica_string _inS2, modelica_string *out_outUnit)
{
  modelica_real _outR;
  modelica_string _outUnit = NULL;
  modelica_real tmp1_c0 __attribute__((unused)) = 0;
  modelica_string tmp1_c1 __attribute__((unused)) = 0;
  modelica_metatype tmpMeta[2] __attribute__((unused)) = {0};
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outR has no default value.
  // _outUnit has no default value.
  
  
  { /* matchcontinue expression */
    volatile modelica_string tmp4_1;
    tmp4_1 = _inS;
    {
      modelica_metatype _strRest = NULL;
      modelica_string _s = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _strRest has no default value.
      // _s has no default value.
      tmp4 = 0;
      MMC_TRY_INTERNAL(mmc_jumper)
      tmp3_top:
      threadData->mmc_jumper = &new_mmc_jumper;
      for (; tmp4 < 19; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT15), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 18; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta6 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta6)) goto goto_2;
          tmpMeta7 = MMC_CAR(tmpMeta6);
          tmpMeta8 = MMC_CDR(tmpMeta6);
          _strRest = tmpMeta8;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e-24;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT2), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 17; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta9 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta9)) goto goto_2;
          tmpMeta10 = MMC_CAR(tmpMeta9);
          tmpMeta11 = MMC_CDR(tmpMeta9);
          _strRest = tmpMeta11;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e-21;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT1), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 16; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta12 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta12)) goto goto_2;
          tmpMeta13 = MMC_CAR(tmpMeta12);
          tmpMeta14 = MMC_CDR(tmpMeta12);
          _strRest = tmpMeta14;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e-18;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          modelica_metatype tmpMeta17;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT16), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 15; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta15 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta15)) goto goto_2;
          tmpMeta16 = MMC_CAR(tmpMeta15);
          tmpMeta17 = MMC_CDR(tmpMeta15);
          _strRest = tmpMeta17;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e-15;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta18;
          modelica_metatype tmpMeta19;
          modelica_metatype tmpMeta20;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT17), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 14; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta18 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta18)) goto goto_2;
          tmpMeta19 = MMC_CAR(tmpMeta18);
          tmpMeta20 = MMC_CDR(tmpMeta18);
          _strRest = tmpMeta20;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e-12;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta21;
          modelica_metatype tmpMeta22;
          modelica_metatype tmpMeta23;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT18), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 13; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta21 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta21)) goto goto_2;
          tmpMeta22 = MMC_CAR(tmpMeta21);
          tmpMeta23 = MMC_CDR(tmpMeta21);
          _strRest = tmpMeta23;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e-6;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta24;
          modelica_metatype tmpMeta25;
          modelica_metatype tmpMeta26;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT19), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 12; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta24 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta24)) goto goto_2;
          tmpMeta25 = MMC_CAR(tmpMeta24);
          tmpMeta26 = MMC_CDR(tmpMeta24);
          _strRest = tmpMeta26;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 0.001;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 7: {
          modelica_metatype tmpMeta27;
          modelica_metatype tmpMeta28;
          modelica_metatype tmpMeta29;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT20), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 11; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta27 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta27)) goto goto_2;
          tmpMeta28 = MMC_CAR(tmpMeta27);
          tmpMeta29 = MMC_CDR(tmpMeta27);
          _strRest = tmpMeta29;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 0.01;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta30;
          modelica_metatype tmpMeta31;
          modelica_metatype tmpMeta32;
          modelica_metatype tmpMeta33;
          modelica_metatype tmpMeta34;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT21), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          /* Pattern matching succeeded */
          _strRest = stringListStringChar(_inS2);

          /* Pattern-matching assignment */
          tmpMeta30 = _strRest;
          if (listEmpty(tmpMeta30)) goto goto_2;
          tmpMeta31 = MMC_CAR(tmpMeta30);
          tmpMeta32 = MMC_CDR(tmpMeta30);
          if (1 != MMC_STRLEN(tmpMeta31) || strcmp("d", MMC_STRINGDATA(tmpMeta31)) != 0) goto goto_2;
          if (listEmpty(tmpMeta32)) goto goto_2;
          tmpMeta33 = MMC_CAR(tmpMeta32);
          tmpMeta34 = MMC_CDR(tmpMeta32);
          if (1 != MMC_STRLEN(tmpMeta33) || strcmp("a", MMC_STRINGDATA(tmpMeta33)) != 0) goto goto_2;
          _strRest = tmpMeta34;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 10.0;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 9: {
          modelica_metatype tmpMeta35;
          modelica_metatype tmpMeta36;
          modelica_metatype tmpMeta37;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT21), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 9; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta35 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta35)) goto goto_2;
          tmpMeta36 = MMC_CAR(tmpMeta35);
          tmpMeta37 = MMC_CDR(tmpMeta35);
          _strRest = tmpMeta37;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 0.1;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 10: {
          modelica_metatype tmpMeta38;
          modelica_metatype tmpMeta39;
          modelica_metatype tmpMeta40;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT22), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 8; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta38 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta38)) goto goto_2;
          tmpMeta39 = MMC_CAR(tmpMeta38);
          tmpMeta40 = MMC_CDR(tmpMeta38);
          _strRest = tmpMeta40;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 100.0;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 11: {
          modelica_metatype tmpMeta41;
          modelica_metatype tmpMeta42;
          modelica_metatype tmpMeta43;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT23), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 7; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta41 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta41)) goto goto_2;
          tmpMeta42 = MMC_CAR(tmpMeta41);
          tmpMeta43 = MMC_CDR(tmpMeta41);
          _strRest = tmpMeta43;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1000.0;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 12: {
          modelica_metatype tmpMeta44;
          modelica_metatype tmpMeta45;
          modelica_metatype tmpMeta46;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT24), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 6; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta44 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta44)) goto goto_2;
          tmpMeta45 = MMC_CAR(tmpMeta44);
          tmpMeta46 = MMC_CDR(tmpMeta44);
          _strRest = tmpMeta46;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e6;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 13: {
          modelica_metatype tmpMeta47;
          modelica_metatype tmpMeta48;
          modelica_metatype tmpMeta49;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT25), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 5; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta47 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta47)) goto goto_2;
          tmpMeta48 = MMC_CAR(tmpMeta47);
          tmpMeta49 = MMC_CDR(tmpMeta47);
          _strRest = tmpMeta49;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e9;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 14: {
          modelica_metatype tmpMeta50;
          modelica_metatype tmpMeta51;
          modelica_metatype tmpMeta52;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT26), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 4; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta50 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta50)) goto goto_2;
          tmpMeta51 = MMC_CAR(tmpMeta50);
          tmpMeta52 = MMC_CDR(tmpMeta50);
          _strRest = tmpMeta52;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e12;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 15: {
          modelica_metatype tmpMeta53;
          modelica_metatype tmpMeta54;
          modelica_metatype tmpMeta55;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT27), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 3; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta53 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta53)) goto goto_2;
          tmpMeta54 = MMC_CAR(tmpMeta53);
          tmpMeta55 = MMC_CDR(tmpMeta53);
          _strRest = tmpMeta55;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e15;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 16: {
          modelica_metatype tmpMeta56;
          modelica_metatype tmpMeta57;
          modelica_metatype tmpMeta58;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT28), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta56 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta56)) goto goto_2;
          tmpMeta57 = MMC_CAR(tmpMeta56);
          tmpMeta58 = MMC_CDR(tmpMeta56);
          _strRest = tmpMeta58;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e18;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 17: {
          modelica_metatype tmpMeta59;
          modelica_metatype tmpMeta60;
          modelica_metatype tmpMeta61;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT4), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          /* Pattern-matching assignment */
          tmpMeta59 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta59)) goto goto_2;
          tmpMeta60 = MMC_CAR(tmpMeta59);
          tmpMeta61 = MMC_CDR(tmpMeta59);
          _strRest = tmpMeta61;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e21;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        case 18: {
          modelica_metatype tmpMeta62;
          modelica_metatype tmpMeta63;
          modelica_metatype tmpMeta64;
          if (1 != MMC_STRLEN(tmp4_1) || strcmp(MMC_STRINGDATA(_OMC_LIT29), MMC_STRINGDATA(tmp4_1)) != 0) goto tmp3_end;
          /* Pattern matching succeeded */
          /* Pattern-matching assignment */
          tmpMeta62 = stringListStringChar(_inS2);
          if (listEmpty(tmpMeta62)) goto goto_2;
          tmpMeta63 = MMC_CAR(tmpMeta62);
          tmpMeta64 = MMC_CDR(tmpMeta62);
          _strRest = tmpMeta64;

          _s = stringAppendList(_strRest);
          tmp1_c0 = 1e24;
          tmp1_c1 = _s;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      tmp3_done:
      (void)tmp4;
      MMC_RESTORE_INTERNAL(mmc_jumper);
      goto tmp3_done2;
      goto_2:;
      MMC_CATCH_INTERNAL(mmc_jumper);
      if (++tmp4 < 19) {
        goto tmp3_top;
      }
      MMC_THROW_INTERNAL();
      tmp3_done2:;
    }
  }
  _outR = tmp1_c0;
  _outUnit = tmp1_c1;
  _return: OMC_LABEL_UNUSED
  if (out_outUnit) { *out_outUnit = _outUnit; }
  return _outR;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_NFUnit_getPrefix(threadData_t *threadData, modelica_metatype _inS, modelica_metatype _inS2, modelica_metatype *out_outUnit)
{
  modelica_real _outR;
  modelica_metatype out_outR;
  _outR = omc_NFUnit_getPrefix(threadData, _inS, _inS2, out_outUnit);
  out_outR = mmc_mk_rcon(_outR);
  /* skip box _outUnit; String */
  return out_outR;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_unitToken2unit(threadData_t *threadData, modelica_string _inS, modelica_metatype _inHtS2U)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype _opt_unit = NULL;
  modelica_string _s = NULL;
  modelica_real _r;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  // _opt_unit has no default value.
  // _s has no default value.
  // _r has no default value.
  _opt_unit = omc_UnorderedMap_get(threadData, _inS, _inHtS2U);

  if(isSome(_opt_unit))
  {
    /* Pattern-matching assignment */
    tmpMeta1 = _opt_unit;
    if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
    tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
    _outUnit = tmpMeta2;
  }
  else
  {
    _s = stringGetStringChar(_inS, ((modelica_integer) 1));

    _r = omc_NFUnit_getPrefix(threadData, _s, _inS ,&_s);

    _outUnit = omc_NFUnit_unitToken2unit(threadData, _s, _inHtS2U);

    _outUnit = omc_NFUnit_unitMulReal(threadData, _outUnit, _r);
  }
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}

PROTECTED_FUNCTION_STATIC modelica_metatype omc_NFUnit_parser3(threadData_t *threadData, modelica_metatype _inMul, modelica_metatype _inTokenList, modelica_metatype _inUnit, modelica_metatype _inHtS2U)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  { /* matchcontinue expression */
    volatile modelica_metatype tmp4_1;volatile modelica_metatype tmp4_2;
    tmp4_1 = _inMul;
    tmp4_2 = _inTokenList;
    {
      modelica_string _s = NULL;
      modelica_metatype _tokens = NULL;
      modelica_metatype _ut = NULL;
      modelica_integer _exponent;
      modelica_boolean _bMul;
      modelica_boolean _b;
      modelica_metatype _bRest = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _s has no default value.
      // _tokens has no default value.
      // _ut has no default value.
      // _exponent has no default value.
      // _bMul has no default value.
      // _b has no default value.
      // _bRest has no default value.
      tmp4 = 0;
      MMC_TRY_INTERNAL(mmc_jumper)
      tmp3_top:
      threadData->mmc_jumper = &new_mmc_jumper;
      for (; tmp4 < 10; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_integer tmp8;
          if (!listEmpty(tmp4_2)) goto tmp3_end;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta6 = MMC_CAR(tmp4_1);
          tmpMeta7 = MMC_CDR(tmp4_1);
          tmp8 = mmc_unbox_integer(tmpMeta6);
          if (1 /* true */ != tmp8) goto tmp3_end;
          if (!listEmpty(tmpMeta7)) goto tmp3_end;
          tmp4 += 8; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta1 = _inUnit;
          goto tmp3_done;
        }
        case 1: {
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_integer tmp11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          modelica_integer tmp15;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta9 = MMC_CAR(tmp4_1);
          tmpMeta10 = MMC_CDR(tmp4_1);
          tmp11 = mmc_unbox_integer(tmpMeta9);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta12 = MMC_CAR(tmp4_2);
          tmpMeta13 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta12,0,1) == 0) goto tmp3_end;
          tmpMeta14 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta12), 2));
          tmp15 = mmc_unbox_integer(tmpMeta14);
          if (1 != tmp15) goto tmp3_end;
          _bMul = tmp11  /* pattern as ty=Boolean */;
          _bRest = tmpMeta10;
          _tokens = tmpMeta13;
          tmp4 += 7; /* Pattern matching succeeded; we may skip some cases if we fail */
          _ut = _OMC_LIT31;

          _ut = (_bMul?omc_NFUnit_unitMul(threadData, _inUnit, _ut):omc_NFUnit_unitDiv(threadData, _inUnit, _ut));
          tmpMeta1 = omc_NFUnit_parser3(threadData, _bRest, _tokens, _ut, _inHtS2U);
          goto tmp3_done;
        }
        case 2: {
          modelica_metatype tmpMeta16;
          modelica_metatype tmpMeta17;
          modelica_integer tmp18;
          modelica_metatype tmpMeta19;
          modelica_metatype tmpMeta20;
          modelica_metatype tmpMeta21;
          modelica_metatype tmpMeta22;
          modelica_metatype tmpMeta23;
          modelica_metatype tmpMeta24;
          modelica_integer tmp25;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta16 = MMC_CAR(tmp4_1);
          tmpMeta17 = MMC_CDR(tmp4_1);
          tmp18 = mmc_unbox_integer(tmpMeta16);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta19 = MMC_CAR(tmp4_2);
          tmpMeta20 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta19,1,1) == 0) goto tmp3_end;
          tmpMeta21 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta19), 2));
          if (listEmpty(tmpMeta20)) goto tmp3_end;
          tmpMeta22 = MMC_CAR(tmpMeta20);
          tmpMeta23 = MMC_CDR(tmpMeta20);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta22,0,1) == 0) goto tmp3_end;
          tmpMeta24 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta22), 2));
          tmp25 = mmc_unbox_integer(tmpMeta24);
          _bMul = tmp18  /* pattern as ty=Boolean */;
          _bRest = tmpMeta17;
          _s = tmpMeta21;
          _exponent = tmp25  /* pattern as ty=Integer */;
          _tokens = tmpMeta23;
          /* Pattern matching succeeded */
          _ut = omc_NFUnit_unitToken2unit(threadData, _s, _inHtS2U);

          _ut = omc_NFUnit_unitPow(threadData, _ut, _exponent);

          _ut = (_bMul?omc_NFUnit_unitMul(threadData, _inUnit, _ut):omc_NFUnit_unitDiv(threadData, _inUnit, _ut));
          tmpMeta1 = omc_NFUnit_parser3(threadData, _bRest, _tokens, _ut, _inHtS2U);
          goto tmp3_done;
        }
        case 3: {
          modelica_metatype tmpMeta26;
          modelica_metatype tmpMeta27;
          modelica_integer tmp28;
          modelica_metatype tmpMeta29;
          modelica_metatype tmpMeta30;
          modelica_metatype tmpMeta31;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta26 = MMC_CAR(tmp4_1);
          tmpMeta27 = MMC_CDR(tmp4_1);
          tmp28 = mmc_unbox_integer(tmpMeta26);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta29 = MMC_CAR(tmp4_2);
          tmpMeta30 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta29,1,1) == 0) goto tmp3_end;
          tmpMeta31 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta29), 2));
          _bMul = tmp28  /* pattern as ty=Boolean */;
          _bRest = tmpMeta27;
          _s = tmpMeta31;
          _tokens = tmpMeta30;
          tmp4 += 5; /* Pattern matching succeeded; we may skip some cases if we fail */
          _ut = omc_NFUnit_unitToken2unit(threadData, _s, _inHtS2U);

          _ut = (_bMul?omc_NFUnit_unitMul(threadData, _inUnit, _ut):omc_NFUnit_unitDiv(threadData, _inUnit, _ut));
          tmpMeta1 = omc_NFUnit_parser3(threadData, _bRest, _tokens, _ut, _inHtS2U);
          goto tmp3_done;
        }
        case 4: {
          modelica_metatype tmpMeta32;
          modelica_metatype tmpMeta33;
          modelica_integer tmp34;
          modelica_metatype tmpMeta35;
          modelica_metatype tmpMeta36;
          modelica_metatype tmpMeta37;
          modelica_metatype tmpMeta38;
          modelica_metatype tmpMeta39;
          modelica_metatype tmpMeta40;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta32 = MMC_CAR(tmp4_1);
          tmpMeta33 = MMC_CDR(tmp4_1);
          tmp34 = mmc_unbox_integer(tmpMeta32);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta35 = MMC_CAR(tmp4_2);
          tmpMeta36 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta35,2,0) == 0) goto tmp3_end;
          if (listEmpty(tmpMeta36)) goto tmp3_end;
          tmpMeta37 = MMC_CAR(tmpMeta36);
          tmpMeta38 = MMC_CDR(tmpMeta36);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta37,4,0) == 0) goto tmp3_end;
          _bMul = tmp34  /* pattern as ty=Boolean */;
          _tokens = tmpMeta38;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta40 = mmc_mk_cons(mmc_mk_boolean(_bMul), _inMul);
          tmpMeta39 = mmc_mk_cons(mmc_mk_boolean(_bMul), tmpMeta40);
          tmpMeta1 = omc_NFUnit_parser3(threadData, tmpMeta39, _tokens, _inUnit, _inHtS2U);
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta41;
          modelica_metatype tmpMeta42;
          modelica_integer tmp43;
          modelica_metatype tmpMeta44;
          modelica_metatype tmpMeta45;
          modelica_metatype tmpMeta46;
          modelica_metatype tmpMeta47;
          modelica_metatype tmpMeta48;
          modelica_metatype tmpMeta49;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta41 = MMC_CAR(tmp4_1);
          tmpMeta42 = MMC_CDR(tmp4_1);
          tmp43 = mmc_unbox_integer(tmpMeta41);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta44 = MMC_CAR(tmp4_2);
          tmpMeta45 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta44,3,0) == 0) goto tmp3_end;
          if (listEmpty(tmpMeta45)) goto tmp3_end;
          tmpMeta46 = MMC_CAR(tmpMeta45);
          tmpMeta47 = MMC_CDR(tmpMeta45);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta46,4,0) == 0) goto tmp3_end;
          _bMul = tmp43  /* pattern as ty=Boolean */;
          _tokens = tmpMeta47;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          _b = (!_bMul);
          tmpMeta49 = mmc_mk_cons(mmc_mk_boolean(_b), _inMul);
          tmpMeta48 = mmc_mk_cons(mmc_mk_boolean(_b), tmpMeta49);
          tmpMeta1 = omc_NFUnit_parser3(threadData, tmpMeta48, _tokens, _inUnit, _inHtS2U);
          goto tmp3_done;
        }
        case 6: {
          modelica_metatype tmpMeta50;
          modelica_metatype tmpMeta51;
          modelica_metatype tmpMeta52;
          modelica_metatype tmpMeta53;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta50 = MMC_CAR(tmp4_1);
          tmpMeta51 = MMC_CDR(tmp4_1);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta52 = MMC_CAR(tmp4_2);
          tmpMeta53 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta52,5,0) == 0) goto tmp3_end;
          _bRest = tmpMeta51;
          _tokens = tmpMeta53;
          tmp4 += 2; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta1 = omc_NFUnit_parser3(threadData, _bRest, _tokens, _inUnit, _inHtS2U);
          goto tmp3_done;
        }
        case 7: {
          modelica_metatype tmpMeta54;
          modelica_metatype tmpMeta55;
          modelica_integer tmp56;
          modelica_metatype tmpMeta57;
          modelica_metatype tmpMeta58;
          modelica_metatype tmpMeta59;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta54 = MMC_CAR(tmp4_1);
          tmpMeta55 = MMC_CDR(tmp4_1);
          tmp56 = mmc_unbox_integer(tmpMeta54);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta57 = MMC_CAR(tmp4_2);
          tmpMeta58 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta57,2,0) == 0) goto tmp3_end;
          _bMul = tmp56  /* pattern as ty=Boolean */;
          _tokens = tmpMeta58;
          tmp4 += 1; /* Pattern matching succeeded; we may skip some cases if we fail */
          tmpMeta59 = mmc_mk_cons(mmc_mk_boolean(_bMul), _inMul);
          tmpMeta1 = omc_NFUnit_parser3(threadData, tmpMeta59, _tokens, _inUnit, _inHtS2U);
          goto tmp3_done;
        }
        case 8: {
          modelica_metatype tmpMeta60;
          modelica_metatype tmpMeta61;
          modelica_integer tmp62;
          modelica_metatype tmpMeta63;
          modelica_metatype tmpMeta64;
          modelica_metatype tmpMeta65;
          if (listEmpty(tmp4_1)) goto tmp3_end;
          tmpMeta60 = MMC_CAR(tmp4_1);
          tmpMeta61 = MMC_CDR(tmp4_1);
          tmp62 = mmc_unbox_integer(tmpMeta60);
          if (listEmpty(tmp4_2)) goto tmp3_end;
          tmpMeta63 = MMC_CAR(tmp4_2);
          tmpMeta64 = MMC_CDR(tmp4_2);
          if (mmc__uniontype__metarecord__typedef__equal(tmpMeta63,3,0) == 0) goto tmp3_end;
          _bMul = tmp62  /* pattern as ty=Boolean */;
          _tokens = tmpMeta64;
          /* Pattern matching succeeded */
          _b = (!_bMul);
          tmpMeta65 = mmc_mk_cons(mmc_mk_boolean(_b), _inMul);
          tmpMeta1 = omc_NFUnit_parser3(threadData, tmpMeta65, _tokens, _inUnit, _inHtS2U);
          goto tmp3_done;
        }
        case 9: {
          
          /* Pattern matching succeeded */
          tmpMeta1 = _OMC_LIT32;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      tmp3_done:
      (void)tmp4;
      MMC_RESTORE_INTERNAL(mmc_jumper);
      goto tmp3_done2;
      goto_2:;
      MMC_CATCH_INTERNAL(mmc_jumper);
      if (++tmp4 < 10) {
        goto tmp3_top;
      }
      MMC_THROW_INTERNAL();
      tmp3_done2:;
    }
  }
  _outUnit = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}

DLLDirection
modelica_metatype omc_NFUnit_parseUnitString(threadData_t *threadData, modelica_string _inUnitString, modelica_metatype _inKnownUnits, modelica_metatype _info)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype _charList = NULL;
  modelica_metatype _tokenList = NULL;
  modelica_metatype tmpMeta6;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  // _charList has no default value.
  // _tokenList has no default value.
  _charList = stringListStringChar(_inUnitString);

  if(listEmpty(_charList))
  {
    MMC_THROW_INTERNAL();
  }

  { /* matchcontinue expression */
    {
      volatile mmc_switch_type tmp3;
      int tmp4;
      tmp3 = 0;
      MMC_TRY_INTERNAL(mmc_jumper)
      tmp2_top:
      threadData->mmc_jumper = &new_mmc_jumper;
      for (; tmp3 < 2; tmp3++) {
        switch (MMC_SWITCH_CAST(tmp3)) {
        case 0: {
          /* Pattern matching succeeded */
          _tokenList = omc_NFUnit_lexer(threadData, _charList);
          goto tmp2_done;
        }
        case 1: {
          modelica_metatype tmpMeta5;
          /* Pattern matching succeeded */
          tmpMeta5 = mmc_mk_cons(_inUnitString, MMC_REFSTRUCTLIT(mmc_nil));
          omc_Error_addSourceMessage(threadData, _OMC_LIT38, tmpMeta5, _info);

          goto goto_1;
          goto tmp2_done;
        }
        }
        goto tmp2_end;
        tmp2_end: ;
      }
      goto goto_1;
      tmp2_done:
      (void)tmp3;
      MMC_RESTORE_INTERNAL(mmc_jumper);
      goto tmp2_done2;
      goto_1:;
      MMC_CATCH_INTERNAL(mmc_jumper);
      if (++tmp3 < 2) {
        goto tmp2_top;
      }
      MMC_THROW_INTERNAL();
      tmp2_done2:;
    }
  }
  ;

  _outUnit = omc_NFUnit_parser3(threadData, _OMC_LIT40, _tokenList, _OMC_LIT31, _inKnownUnits);

  if((!omc_NFUnit_isUnit(threadData, _outUnit)))
  {
    if(omc_Flags_isSet(threadData, _OMC_LIT44))
    {
      tmpMeta6 = stringAppend(_OMC_LIT41,_inUnitString);
      omc_Debug_traceln(threadData, tmpMeta6);
    }
  }
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}

PROTECTED_FUNCTION_STATIC modelica_string omc_NFUnit_prefix2String(threadData_t *threadData, modelica_real _inReal)
{
  modelica_string _outPrefix = NULL;
  modelica_string tmp1 = 0;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outPrefix has no default value.
  { /* match expression */
    modelica_real tmp4_1;
    tmp4_1 = _inReal;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 25; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (1e30 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT45;
          goto tmp3_done;
        }
        case 1: {
          if (1e27 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT46;
          goto tmp3_done;
        }
        case 2: {
          if (1e24 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT29;
          goto tmp3_done;
        }
        case 3: {
          if (1e21 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT4;
          goto tmp3_done;
        }
        case 4: {
          if (1e18 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT28;
          goto tmp3_done;
        }
        case 5: {
          if (1e15 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT27;
          goto tmp3_done;
        }
        case 6: {
          if (1e12 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT26;
          goto tmp3_done;
        }
        case 7: {
          if (1e9 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT25;
          goto tmp3_done;
        }
        case 8: {
          if (1e6 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT24;
          goto tmp3_done;
        }
        case 9: {
          if (1000.0 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT23;
          goto tmp3_done;
        }
        case 10: {
          if (100.0 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT22;
          goto tmp3_done;
        }
        case 11: {
          if (10.0 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT47;
          goto tmp3_done;
        }
        case 12: {
          if (0.1 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT21;
          goto tmp3_done;
        }
        case 13: {
          if (0.01 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT20;
          goto tmp3_done;
        }
        case 14: {
          if (0.001 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT19;
          goto tmp3_done;
        }
        case 15: {
          if (1e-6 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT18;
          goto tmp3_done;
        }
        case 16: {
          if (1e-9 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT48;
          goto tmp3_done;
        }
        case 17: {
          if (1e-12 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT17;
          goto tmp3_done;
        }
        case 18: {
          if (1e-15 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT16;
          goto tmp3_done;
        }
        case 19: {
          if (1e-18 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT1;
          goto tmp3_done;
        }
        case 20: {
          if (1e-21 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT2;
          goto tmp3_done;
        }
        case 21: {
          if (1e-24 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT15;
          goto tmp3_done;
        }
        case 22: {
          if (1e-27 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT49;
          goto tmp3_done;
        }
        case 23: {
          if (1e-30 != tmp4_1) goto tmp3_end;
          /* Pattern matching succeeded */
          tmp1 = _OMC_LIT50;
          goto tmp3_done;
        }
        case 24: {
          
          /* Pattern matching succeeded */
          tmp1 = realString(_inReal);
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outPrefix = tmp1;
  _return: OMC_LABEL_UNUSED
  return _outPrefix;
}
PROTECTED_FUNCTION_STATIC modelica_metatype boxptr_NFUnit_prefix2String(threadData_t *threadData, modelica_metatype _inReal)
{
  modelica_real tmp1;
  modelica_string _outPrefix = NULL;
  tmp1 = mmc_unbox_real(_inReal);
  _outPrefix = omc_NFUnit_prefix2String(threadData, tmp1);
  /* skip box _outPrefix; String */
  return _outPrefix;
}

DLLDirection
modelica_string omc_NFUnit_unitString(threadData_t *threadData, modelica_metatype _inUnit, modelica_metatype _inHtU2S)
{
  modelica_string _outString = NULL;
  modelica_metatype _opt_s = NULL;
  modelica_string _s = NULL;
  modelica_string _s1 = NULL;
  modelica_string _s2 = NULL;
  modelica_string _s3 = NULL;
  modelica_string _s4 = NULL;
  modelica_string _s5 = NULL;
  modelica_string _s6 = NULL;
  modelica_string _s7 = NULL;
  modelica_string _sExponent = NULL;
  modelica_boolean _b;
  modelica_metatype _unit = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_string tmp3 = 0;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outString has no default value.
  // _opt_s has no default value.
  // _s has no default value.
  // _s1 has no default value.
  // _s2 has no default value.
  // _s3 has no default value.
  // _s4 has no default value.
  // _s5 has no default value.
  // _s6 has no default value.
  // _s7 has no default value.
  // _sExponent has no default value.
  // _b has no default value.
  // _unit has no default value.
  _opt_s = omc_UnorderedMap_get(threadData, _inUnit, _inHtU2S);

  if(isSome(_opt_s))
  {
    /* Pattern-matching assignment */
    tmpMeta1 = _opt_s;
    if (optionNone(tmpMeta1)) MMC_THROW_INTERNAL();
    tmpMeta2 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta1), 1));
    _outString = tmpMeta2;

    goto _return;
  }

  { /* match expression */
    modelica_metatype tmp6_1;
    tmp6_1 = _inUnit;
    {
      volatile mmc_switch_type tmp6;
      int tmp7;
      tmp6 = 0;
      for (; tmp6 < 2; tmp6++) {
        switch (MMC_SWITCH_CAST(tmp6)) {
        case 0: {
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          modelica_metatype tmpMeta17;
          modelica_metatype tmpMeta18;
          modelica_metatype tmpMeta19;
          modelica_metatype tmpMeta20;
          modelica_metatype tmpMeta21;
          modelica_metatype tmpMeta22;
          modelica_metatype tmpMeta23;
          modelica_metatype tmpMeta24;
          modelica_metatype tmpMeta25;
          modelica_metatype tmpMeta26;
          modelica_metatype tmpMeta27;
          modelica_boolean tmp28;
          modelica_string tmp29;
          if (mmc__uniontype__metarecord__typedef__equal(tmp6_1,0,8) == 0) goto tmp5_end;
          
          _unit = tmp6_1;
          /* Pattern matching succeeded */
          _s = ((mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 9)))) == 1.0)?_OMC_LIT0:omc_NFUnit_prefix2String(threadData, mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 9))))));

          _b = 0 /* false */;

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7))))));

          tmpMeta8 = stringAppend(_OMC_LIT51,_sExponent);
          _s1 = tmpMeta8;

          _s1 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7)))) == ((modelica_integer) 0))?_OMC_LIT0:_s1);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7)))) != ((modelica_integer) 0)));

          _s2 = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) != ((modelica_integer) 0)))?_OMC_LIT9:_OMC_LIT0);

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8))))));

          tmpMeta9 = stringAppend(_s2,_OMC_LIT52);
          tmpMeta10 = stringAppend(tmpMeta9,_sExponent);
          _s2 = tmpMeta10;

          _s2 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) == ((modelica_integer) 0))?_OMC_LIT0:_s2);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) != ((modelica_integer) 0)));

          _s3 = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) != ((modelica_integer) 0)))?_OMC_LIT9:_OMC_LIT0);

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3))))));

          tmpMeta11 = stringAppend(_s3,_OMC_LIT19);
          tmpMeta12 = stringAppend(tmpMeta11,_sExponent);
          _s3 = tmpMeta12;

          _s3 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) == ((modelica_integer) 0))?_OMC_LIT0:_s3);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) != ((modelica_integer) 0)));

          _s4 = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) != ((modelica_integer) 0)))?_OMC_LIT9:_OMC_LIT0);

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2))))));

          tmpMeta13 = stringAppend(_s4,_OMC_LIT53);
          tmpMeta14 = stringAppend(tmpMeta13,_sExponent);
          _s4 = tmpMeta14;

          _s4 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) == ((modelica_integer) 0))?_OMC_LIT0:_s4);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) != ((modelica_integer) 0)));

          _s5 = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) != ((modelica_integer) 0)))?_OMC_LIT9:_OMC_LIT0);

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5))))));

          tmpMeta15 = stringAppend(_s5,_OMC_LIT3);
          tmpMeta16 = stringAppend(tmpMeta15,_sExponent);
          _s5 = tmpMeta16;

          _s5 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) == ((modelica_integer) 0))?_OMC_LIT0:_s5);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) != ((modelica_integer) 0)));

          _s6 = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) != ((modelica_integer) 0)))?_OMC_LIT9:_OMC_LIT0);

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6))))));

          tmpMeta17 = stringAppend(_s6,_OMC_LIT54);
          tmpMeta18 = stringAppend(tmpMeta17,_sExponent);
          _s6 = tmpMeta18;

          _s6 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) == ((modelica_integer) 0))?_OMC_LIT0:_s6);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) != ((modelica_integer) 0)));

          _s7 = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) != ((modelica_integer) 0)))?_OMC_LIT9:_OMC_LIT0);

          _sExponent = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) == ((modelica_integer) 1))?_OMC_LIT0:intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4))))));

          tmpMeta19 = stringAppend(_s7,_OMC_LIT55);
          tmpMeta20 = stringAppend(tmpMeta19,_sExponent);
          _s7 = tmpMeta20;

          _s7 = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) == ((modelica_integer) 0))?_OMC_LIT0:_s7);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) != ((modelica_integer) 0)));
          tmp28 = (modelica_boolean)_b;
          if(tmp28)
          {
            tmpMeta21 = stringAppend(_s,_s1);
            tmpMeta22 = stringAppend(tmpMeta21,_s2);
            tmpMeta23 = stringAppend(tmpMeta22,_s3);
            tmpMeta24 = stringAppend(tmpMeta23,_s4);
            tmpMeta25 = stringAppend(tmpMeta24,_s5);
            tmpMeta26 = stringAppend(tmpMeta25,_s6);
            tmpMeta27 = stringAppend(tmpMeta26,_s7);
            tmp29 = tmpMeta27;
          }
          else
          {
            tmp29 = _OMC_LIT56;
          }
          tmp3 = tmp29;
          goto tmp5_done;
        }
        case 1: {
          modelica_metatype tmpMeta30;
          modelica_metatype tmpMeta31;
          
          /* Pattern matching succeeded */
          tmpMeta30 = stringAppend(_OMC_LIT57,omc_NFUnit_unit2string(threadData, _inUnit));
          tmpMeta31 = stringAppend(tmpMeta30,_OMC_LIT58);
          omc_Error_addCompilerWarning(threadData, tmpMeta31);
          goto goto_4;
          goto tmp5_done;
        }
        }
        goto tmp5_end;
        tmp5_end: ;
      }
      goto goto_4;
      goto_4:;
      MMC_THROW_INTERNAL();
      goto tmp5_done;
      tmp5_done:;
    }
  }
  _outString = tmp3;
  _return: OMC_LABEL_UNUSED
  return _outString;
}

DLLDirection
modelica_metatype omc_NFUnit_unitRoot(threadData_t *threadData, modelica_metatype _inUnit, modelica_real _inExponent)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inUnit;
    {
      modelica_real _r;
      modelica_real _factor;
      modelica_integer _i;
      modelica_integer _s;
      modelica_integer _m;
      modelica_integer _g;
      modelica_integer _A;
      modelica_integer _K;
      modelica_integer _mol;
      modelica_integer _cd;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _r has no default value.
      // _factor has no default value.
      // _i has no default value.
      // _s has no default value.
      // _m has no default value.
      // _g has no default value.
      // _A has no default value.
      // _K has no default value.
      // _mol has no default value.
      // _cd has no default value.
      tmp4 = 0;
      for (; tmp4 < 1; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_real tmp6;
          modelica_real tmp7;
          modelica_real tmp8;
          modelica_real tmp9;
          modelica_real tmp10;
          modelica_real tmp11;
          modelica_real tmp12;
          modelica_real tmp13;
          modelica_real tmp14;
          modelica_integer tmp15;
          modelica_boolean tmp16;
          modelica_real tmp17;
          modelica_integer tmp18;
          modelica_boolean tmp19;
          modelica_real tmp20;
          modelica_integer tmp21;
          modelica_boolean tmp22;
          modelica_real tmp23;
          modelica_integer tmp24;
          modelica_boolean tmp25;
          modelica_real tmp26;
          modelica_integer tmp27;
          modelica_boolean tmp28;
          modelica_real tmp29;
          modelica_integer tmp30;
          modelica_boolean tmp31;
          modelica_real tmp32;
          modelica_integer tmp33;
          modelica_boolean tmp34;
          modelica_metatype tmpMeta35;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          _i = ((modelica_integer)floor(_inExponent));

          tmp6 = _inExponent;
          if (tmp6 == 0) {goto goto_2;}
          _r = (1.0) / tmp6;

          tmp7 = mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 9))));
          tmp8 = _r;
          if(tmp7 < 0.0 && tmp8 != 0.0)
          {
            tmp10 = modf(tmp8, &tmp11);
            
            if(tmp10 > 0.5)
            {
              tmp10 -= 1.0;
              tmp11 += 1.0;
            }
            else if(tmp10 < -0.5)
            {
              tmp10 += 1.0;
              tmp11 -= 1.0;
            }
            
            if(fabs(tmp10) < 1e-10)
              tmp9 = pow(tmp7, tmp11);
            else
            {
              tmp13 = modf(1.0/tmp8, &tmp12);
              if(tmp13 > 0.5)
              {
                tmp13 -= 1.0;
                tmp12 += 1.0;
              }
              else if(tmp13 < -0.5)
              {
                tmp13 += 1.0;
                tmp12 -= 1.0;
              }
              if(fabs(tmp13) < 1e-10 && ((unsigned long)tmp12 & 1))
              {
                tmp9 = -pow(-tmp7, tmp10)*pow(tmp7, tmp11);
              }
              else
              {
                goto goto_2;
              }
            }
          }
          else
          {
            tmp9 = pow(tmp7, tmp8);
          }
          if(isnan(tmp9) || isinf(tmp9))
          {
            goto goto_2;
          }
          _factor = tmp9;

          tmp14 = _inExponent;
          if (tmp14 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 2)))))) / tmp14;

          tmp15 = _i;
          if (tmp15 == 0) {goto goto_2;}
          _s = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 2)))),tmp15).quot;

          /* Pattern-matching assignment */
          tmp16 = (_r == ((modelica_real)_s));
          if (1 /* true */ != tmp16) goto goto_2;

          tmp17 = _inExponent;
          if (tmp17 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 3)))))) / tmp17;

          tmp18 = _i;
          if (tmp18 == 0) {goto goto_2;}
          _m = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 3)))),tmp18).quot;

          /* Pattern-matching assignment */
          tmp19 = (_r == ((modelica_real)_m));
          if (1 /* true */ != tmp19) goto goto_2;

          tmp20 = _inExponent;
          if (tmp20 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 4)))))) / tmp20;

          tmp21 = _i;
          if (tmp21 == 0) {goto goto_2;}
          _g = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 4)))),tmp21).quot;

          /* Pattern-matching assignment */
          tmp22 = (_r == ((modelica_real)_g));
          if (1 /* true */ != tmp22) goto goto_2;

          tmp23 = _inExponent;
          if (tmp23 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 5)))))) / tmp23;

          tmp24 = _i;
          if (tmp24 == 0) {goto goto_2;}
          _A = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 5)))),tmp24).quot;

          /* Pattern-matching assignment */
          tmp25 = (_r == ((modelica_real)_A));
          if (1 /* true */ != tmp25) goto goto_2;

          tmp26 = _inExponent;
          if (tmp26 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 6)))))) / tmp26;

          tmp27 = _i;
          if (tmp27 == 0) {goto goto_2;}
          _K = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 6)))),tmp27).quot;

          /* Pattern-matching assignment */
          tmp28 = (_r == ((modelica_real)_K));
          if (1 /* true */ != tmp28) goto goto_2;

          tmp29 = _inExponent;
          if (tmp29 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 7)))))) / tmp29;

          tmp30 = _i;
          if (tmp30 == 0) {goto goto_2;}
          _mol = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 7)))),tmp30).quot;

          /* Pattern-matching assignment */
          tmp31 = (_r == ((modelica_real)_mol));
          if (1 /* true */ != tmp31) goto goto_2;

          tmp32 = _inExponent;
          if (tmp32 == 0) {goto goto_2;}
          _r = (((modelica_real)mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 8)))))) / tmp32;

          tmp33 = _i;
          if (tmp33 == 0) {goto goto_2;}
          _cd = modelica_div_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 8)))),tmp33).quot;

          /* Pattern-matching assignment */
          tmp34 = (_r == ((modelica_real)_cd));
          if (1 /* true */ != tmp34) goto goto_2;
          tmpMeta35 = mmc_mk_box9(3, &NFUnit_Unit_UNIT__desc, mmc_mk_integer(_s), mmc_mk_integer(_m), mmc_mk_integer(_g), mmc_mk_integer(_A), mmc_mk_integer(_K), mmc_mk_integer(_mol), mmc_mk_integer(_cd), mmc_mk_real(_factor));
          tmpMeta1 = tmpMeta35;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outUnit = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}
modelica_metatype boxptr_NFUnit_unitRoot(threadData_t *threadData, modelica_metatype _inUnit, modelica_metatype _inExponent)
{
  modelica_real tmp1;
  modelica_metatype _outUnit = NULL;
  tmp1 = mmc_unbox_real(_inExponent);
  _outUnit = omc_NFUnit_unitRoot(threadData, _inUnit, tmp1);
  /* skip box _outUnit; NFUnit.Unit */
  return _outUnit;
}

DLLDirection
modelica_metatype omc_NFUnit_unitMulReal(threadData_t *threadData, modelica_metatype _inUnit, modelica_real _inFactor)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inUnit;
    {
      modelica_metatype _unit = NULL;
      volatile mmc_switch_type tmp4;
      int tmp5;
      // _unit has no default value.
      tmp4 = 0;
      for (; tmp4 < 1; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          
          _unit = tmp4_1;
          /* Pattern matching succeeded */
          tmpMeta6 = MMC_TAGPTR(mmc_alloc_words(10));
          memcpy(MMC_UNTAGPTR(tmpMeta6), MMC_UNTAGPTR(_unit), 10*sizeof(modelica_metatype));
          ((modelica_metatype*)MMC_UNTAGPTR(tmpMeta6))[9] = mmc_mk_real((mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 9))))) * (_inFactor));
          _unit = tmpMeta6;
          tmpMeta1 = _unit;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outUnit = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}
modelica_metatype boxptr_NFUnit_unitMulReal(threadData_t *threadData, modelica_metatype _inUnit, modelica_metatype _inFactor)
{
  modelica_real tmp1;
  modelica_metatype _outUnit = NULL;
  tmp1 = mmc_unbox_real(_inFactor);
  _outUnit = omc_NFUnit_unitMulReal(threadData, _inUnit, tmp1);
  /* skip box _outUnit; NFUnit.Unit */
  return _outUnit;
}

DLLDirection
modelica_metatype omc_NFUnit_unitPow(threadData_t *threadData, modelica_metatype _inUnit, modelica_integer _inExp)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inUnit;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 1; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_real tmp6;
          modelica_real tmp7;
          modelica_real tmp8;
          modelica_real tmp9;
          modelica_real tmp10;
          modelica_real tmp11;
          modelica_real tmp12;
          modelica_metatype tmpMeta13;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp6 = mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 9))));
          tmp7 = ((modelica_real)_inExp);
          if(tmp6 < 0.0 && tmp7 != 0.0)
          {
            tmp9 = modf(tmp7, &tmp10);
            
            if(tmp9 > 0.5)
            {
              tmp9 -= 1.0;
              tmp10 += 1.0;
            }
            else if(tmp9 < -0.5)
            {
              tmp9 += 1.0;
              tmp10 -= 1.0;
            }
            
            if(fabs(tmp9) < 1e-10)
              tmp8 = pow(tmp6, tmp10);
            else
            {
              tmp12 = modf(1.0/tmp7, &tmp11);
              if(tmp12 > 0.5)
              {
                tmp12 -= 1.0;
                tmp11 += 1.0;
              }
              else if(tmp12 < -0.5)
              {
                tmp12 += 1.0;
                tmp11 -= 1.0;
              }
              if(fabs(tmp12) < 1e-10 && ((unsigned long)tmp11 & 1))
              {
                tmp8 = -pow(-tmp6, tmp9)*pow(tmp6, tmp10);
              }
              else
              {
                goto goto_2;
              }
            }
          }
          else
          {
            tmp8 = pow(tmp6, tmp7);
          }
          if(isnan(tmp8) || isinf(tmp8))
          {
            goto goto_2;
          }tmpMeta13 = mmc_mk_box9(3, &NFUnit_Unit_UNIT__desc, mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 2))))) * (_inExp)), mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 3))))) * (_inExp)), mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 4))))) * (_inExp)), mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 5))))) * (_inExp)), mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 6))))) * (_inExp)), mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 7))))) * (_inExp)), mmc_mk_integer((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit), 8))))) * (_inExp)), mmc_mk_real(tmp8));
          tmpMeta1 = tmpMeta13;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outUnit = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}
modelica_metatype boxptr_NFUnit_unitPow(threadData_t *threadData, modelica_metatype _inUnit, modelica_metatype _inExp)
{
  modelica_integer tmp1;
  modelica_metatype _outUnit = NULL;
  tmp1 = mmc_unbox_integer(_inExp);
  _outUnit = omc_NFUnit_unitPow(threadData, _inUnit, tmp1);
  /* skip box _outUnit; NFUnit.Unit */
  return _outUnit;
}

DLLDirection
modelica_metatype omc_NFUnit_unitDiv(threadData_t *threadData, modelica_metatype _inUnit1, modelica_metatype _inUnit2)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _inUnit1;
    tmp4_2 = _inUnit2;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 1; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_real tmp6;
          modelica_metatype tmpMeta7;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,8) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp6 = mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 9))));
          if (tmp6 == 0) {goto goto_2;}
          tmpMeta7 = mmc_mk_box9(3, &NFUnit_Unit_UNIT__desc, mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 2)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 2)))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 3)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 3)))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 4)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 4)))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 5)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 5)))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 6)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 6)))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 7)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 7)))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 8)))) - (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 8)))))), mmc_mk_real((mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 9))))) / tmp6));
          tmpMeta1 = tmpMeta7;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outUnit = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}

DLLDirection
modelica_metatype omc_NFUnit_unitMul(threadData_t *threadData, modelica_metatype _inUnit1, modelica_metatype _inUnit2)
{
  modelica_metatype _outUnit = NULL;
  modelica_metatype tmpMeta1;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outUnit has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _inUnit1;
    tmp4_2 = _inUnit2;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 1; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          modelica_metatype tmpMeta6;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,8) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmpMeta6 = mmc_mk_box9(3, &NFUnit_Unit_UNIT__desc, mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 2)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 2))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 3)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 3))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 4)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 4))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 5)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 5))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 6)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 6))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 7)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 7))))), mmc_mk_integer(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 8)))) + mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 8))))), mmc_mk_real((mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit1), 9))))) * (mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_inUnit2), 9)))))));
          tmpMeta1 = tmpMeta6;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outUnit = tmpMeta1;
  _return: OMC_LABEL_UNUSED
  return _outUnit;
}

DLLDirection
modelica_string omc_NFUnit_unit2string(threadData_t *threadData, modelica_metatype _unit)
{
  modelica_string _outString = NULL;
  modelica_string tmp1 = 0;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outString has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _unit;
    {
      modelica_string _s = NULL;
      modelica_string _str = NULL;
      modelica_boolean _b;
      int tmp4;
      // _s has no default value.
      // _str has no default value.
      // _b has no default value.
      {
        switch (MMC_SWITCH_CAST(valueConstructor(tmp4_1))) {
        case 3: {
          modelica_metatype tmpMeta5;
          modelica_metatype tmpMeta6;
          modelica_metatype tmpMeta7;
          modelica_metatype tmpMeta8;
          modelica_metatype tmpMeta9;
          modelica_metatype tmpMeta10;
          modelica_metatype tmpMeta11;
          modelica_metatype tmpMeta12;
          modelica_metatype tmpMeta13;
          modelica_metatype tmpMeta14;
          modelica_metatype tmpMeta15;
          modelica_metatype tmpMeta16;
          modelica_metatype tmpMeta17;
          modelica_metatype tmpMeta18;
          modelica_metatype tmpMeta19;
          modelica_metatype tmpMeta20;
          modelica_metatype tmpMeta21;
          modelica_metatype tmpMeta22;
          modelica_metatype tmpMeta23;
          modelica_metatype tmpMeta24;
          modelica_metatype tmpMeta25;
          modelica_metatype tmpMeta26;
          modelica_metatype tmpMeta27;
          modelica_metatype tmpMeta28;
          modelica_metatype tmpMeta29;
          modelica_metatype tmpMeta30;
          modelica_metatype tmpMeta31;
          modelica_metatype tmpMeta32;
          modelica_metatype tmpMeta33;
          
          /* Pattern matching succeeded */
          tmpMeta5 = stringAppend(realString(mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 9))))),_OMC_LIT59);
          _str = tmpMeta5;

          _b = 0 /* false */;

          tmpMeta6 = stringAppend(_OMC_LIT60,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7))))));
          tmpMeta7 = stringAppend(tmpMeta6,_OMC_LIT11);
          _s = tmpMeta7;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 7)))) != ((modelica_integer) 0)));

          tmpMeta8 = stringAppend(_str,_s);
          _str = tmpMeta8;

          _s = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) != ((modelica_integer) 0)))?_OMC_LIT59:_OMC_LIT0);

          tmpMeta9 = stringAppend(_str,_s);
          _str = tmpMeta9;

          tmpMeta10 = stringAppend(_OMC_LIT61,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8))))));
          tmpMeta11 = stringAppend(tmpMeta10,_OMC_LIT11);
          _s = tmpMeta11;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 8)))) != ((modelica_integer) 0)));

          tmpMeta12 = stringAppend(_str,_s);
          _str = tmpMeta12;

          _s = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) != ((modelica_integer) 0)))?_OMC_LIT59:_OMC_LIT0);

          tmpMeta13 = stringAppend(_str,_s);
          _str = tmpMeta13;

          tmpMeta14 = stringAppend(_OMC_LIT62,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3))))));
          tmpMeta15 = stringAppend(tmpMeta14,_OMC_LIT11);
          _s = tmpMeta15;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 3)))) != ((modelica_integer) 0)));

          tmpMeta16 = stringAppend(_str,_s);
          _str = tmpMeta16;

          _s = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) != ((modelica_integer) 0)))?_OMC_LIT59:_OMC_LIT0);

          tmpMeta17 = stringAppend(_str,_s);
          _str = tmpMeta17;

          tmpMeta18 = stringAppend(_OMC_LIT63,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2))))));
          tmpMeta19 = stringAppend(tmpMeta18,_OMC_LIT11);
          _s = tmpMeta19;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2)))) != ((modelica_integer) 0)));

          tmpMeta20 = stringAppend(_str,_s);
          _str = tmpMeta20;

          _s = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) != ((modelica_integer) 0)))?_OMC_LIT59:_OMC_LIT0);

          tmpMeta21 = stringAppend(_str,_s);
          _str = tmpMeta21;

          tmpMeta22 = stringAppend(_OMC_LIT64,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5))))));
          tmpMeta23 = stringAppend(tmpMeta22,_OMC_LIT11);
          _s = tmpMeta23;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 5)))) != ((modelica_integer) 0)));

          tmpMeta24 = stringAppend(_str,_s);
          _str = tmpMeta24;

          _s = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) != ((modelica_integer) 0)))?_OMC_LIT59:_OMC_LIT0);

          tmpMeta25 = stringAppend(_str,_s);
          _str = tmpMeta25;

          tmpMeta26 = stringAppend(_OMC_LIT65,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6))))));
          tmpMeta27 = stringAppend(tmpMeta26,_OMC_LIT11);
          _s = tmpMeta27;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 6)))) != ((modelica_integer) 0)));

          tmpMeta28 = stringAppend(_str,_s);
          _str = tmpMeta28;

          _s = ((_b && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) != ((modelica_integer) 0)))?_OMC_LIT59:_OMC_LIT0);

          tmpMeta29 = stringAppend(_str,_s);
          _str = tmpMeta29;

          tmpMeta30 = stringAppend(_OMC_LIT66,intString(mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4))))));
          tmpMeta31 = stringAppend(tmpMeta30,_OMC_LIT11);
          _s = tmpMeta31;

          _s = ((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) == ((modelica_integer) 0))?_OMC_LIT0:_s);

          _b = (_b || (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 4)))) != ((modelica_integer) 0)));

          tmpMeta32 = stringAppend(_str,_s);
          _str = tmpMeta32;
          tmpMeta33 = stringAppend(_str,(_b?_OMC_LIT0:_OMC_LIT56));
          tmp1 = tmpMeta33;
          goto tmp3_done;
        }
        case 4: {
          
          /* Pattern matching succeeded */
          tmp1 = omc_List_toString(threadData, (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2))), boxvar_NFComponentRef_toString, _OMC_LIT67, _OMC_LIT10, _OMC_LIT68, _OMC_LIT11, 1 /* true */, ((modelica_integer) 0));
          goto tmp3_done;
        }
        case 5: {
          modelica_metatype tmpMeta34;
          modelica_metatype tmpMeta35;
          
          /* Pattern matching succeeded */
          tmpMeta34 = stringAppend(_OMC_LIT69,(MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit), 2))));
          tmpMeta35 = stringAppend(tmpMeta34,_OMC_LIT11);
          tmp1 = tmpMeta35;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _outString = tmp1;
  _return: OMC_LABEL_UNUSED
  return _outString;
}

DLLDirection
modelica_boolean omc_NFUnit_isEqual(threadData_t *threadData, modelica_metatype _unit1, modelica_metatype _unit2)
{
  modelica_boolean _res;
  modelica_boolean tmp1 = 0;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;modelica_metatype tmp4_2;
    tmp4_1 = _unit1;
    tmp4_2 = _unit2;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 4; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,0,8) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = ((((((((mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 2)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 2))))) && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 3)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 3)))))) && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 4)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 4)))))) && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 5)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 5)))))) && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 6)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 6)))))) && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 7)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 7)))))) && (mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 8)))) == mmc_unbox_integer((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 8)))))) && omc_NFUnit_realAlmostEqRel(threadData, mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 9)))), mmc_unbox_real((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 9)))), 0.001));
          goto tmp3_done;
        }
        case 1: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,1,1) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          goto tmp3_done;
        }
        case 2: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,2,1) == 0) goto tmp3_end;
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_2,2,1) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = (stringEqual((MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit1), 2))), (MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(_unit2), 2)))));
          goto tmp3_done;
        }
        case 3: {
          
          /* Pattern matching succeeded */
          tmp1 = 0 /* false */;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _res = tmp1;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_NFUnit_isEqual(threadData_t *threadData, modelica_metatype _unit1, modelica_metatype _unit2)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_NFUnit_isEqual(threadData, _unit1, _unit2);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_NFUnit_realAlmostEqRel(threadData_t *threadData, modelica_real _a, modelica_real _b, modelica_real _relTol)
{
  modelica_boolean _c;
  modelica_real tmp1;
  modelica_boolean tmp2;
  modelica_boolean tmp3;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _c has no default value.
  tmp2 = (modelica_boolean)(_a == _b);
  if(tmp2)
  {
    tmp3 = 1 /* true */;
  }
  else
  {
    tmp1 = fabs(_a) + fabs(_b);
    if (tmp1 == 0) {MMC_THROW_INTERNAL();}
    tmp3 = (_relTol > (fabs(_a - _b)) / tmp1);
  }
  _c = tmp3;
  _return: OMC_LABEL_UNUSED
  return _c;
}
modelica_metatype boxptr_NFUnit_realAlmostEqRel(threadData_t *threadData, modelica_metatype _a, modelica_metatype _b, modelica_metatype _relTol)
{
  modelica_real tmp1;
  modelica_real tmp2;
  modelica_real tmp3;
  modelica_boolean _c;
  modelica_metatype out_c;
  tmp1 = mmc_unbox_real(_a);
  tmp2 = mmc_unbox_real(_b);
  tmp3 = mmc_unbox_real(_relTol);
  _c = omc_NFUnit_realAlmostEqRel(threadData, tmp1, tmp2, tmp3);
  out_c = mmc_mk_icon(_c);
  return out_c;
}

DLLDirection
modelica_integer omc_NFUnit_hash(threadData_t *threadData, modelica_metatype _inKey)
{
  modelica_integer _outHash;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  _outHash = stringHashDjb2(omc_NFUnit_unit2string(threadData, _inKey));
  _return: OMC_LABEL_UNUSED
  return _outHash;
}
modelica_metatype boxptr_NFUnit_hash(threadData_t *threadData, modelica_metatype _inKey)
{
  modelica_integer _outHash;
  modelica_metatype out_outHash;
  _outHash = omc_NFUnit_hash(threadData, _inKey);
  out_outHash = mmc_mk_icon(_outHash);
  return out_outHash;
}

DLLDirection
modelica_boolean omc_NFUnit_isMaster(threadData_t *threadData, modelica_metatype _unit)
{
  modelica_boolean _res;
  modelica_boolean tmp1 = 0;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _res has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _unit;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,1,1) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          tmp1 = 0 /* false */;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _res = tmp1;
  _return: OMC_LABEL_UNUSED
  return _res;
}
modelica_metatype boxptr_NFUnit_isMaster(threadData_t *threadData, modelica_metatype _unit)
{
  modelica_boolean _res;
  modelica_metatype out_res;
  _res = omc_NFUnit_isMaster(threadData, _unit);
  out_res = mmc_mk_icon(_res);
  return out_res;
}

DLLDirection
modelica_boolean omc_NFUnit_isUnit(threadData_t *threadData, modelica_metatype _inUnit)
{
  modelica_boolean _b;
  modelica_boolean tmp1 = 0;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _b has no default value.
  { /* match expression */
    modelica_metatype tmp4_1;
    tmp4_1 = _inUnit;
    {
      volatile mmc_switch_type tmp4;
      int tmp5;
      tmp4 = 0;
      for (; tmp4 < 2; tmp4++) {
        switch (MMC_SWITCH_CAST(tmp4)) {
        case 0: {
          if (mmc__uniontype__metarecord__typedef__equal(tmp4_1,0,8) == 0) goto tmp3_end;
          
          /* Pattern matching succeeded */
          tmp1 = 1 /* true */;
          goto tmp3_done;
        }
        case 1: {
          
          /* Pattern matching succeeded */
          tmp1 = 0 /* false */;
          goto tmp3_done;
        }
        }
        goto tmp3_end;
        tmp3_end: ;
      }
      goto goto_2;
      goto_2:;
      MMC_THROW_INTERNAL();
      goto tmp3_done;
      tmp3_done:;
    }
  }
  _b = tmp1;
  _return: OMC_LABEL_UNUSED
  return _b;
}
modelica_metatype boxptr_NFUnit_isUnit(threadData_t *threadData, modelica_metatype _inUnit)
{
  modelica_boolean _b;
  modelica_metatype out_b;
  _b = omc_NFUnit_isUnit(threadData, _inUnit);
  out_b = mmc_mk_icon(_b);
  return out_b;
}

DLLDirection
modelica_metatype omc_NFUnit_newCrefUnitTable(threadData_t *threadData, modelica_integer _size)
{
  modelica_metatype _table = NULL;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _table has no default value.
  _table = omc_UnorderedMap_new(threadData, boxvar_NFComponentRef_hash, boxvar_NFComponentRef_isEqual, _size);
  _return: OMC_LABEL_UNUSED
  return _table;
}
modelica_metatype boxptr_NFUnit_newCrefUnitTable(threadData_t *threadData, modelica_metatype _size)
{
  modelica_integer tmp1;
  modelica_metatype _table = NULL;
  tmp1 = mmc_unbox_integer(_size);
  _table = omc_NFUnit_newCrefUnitTable(threadData, tmp1);
  /* skip box _table; UnorderedMap<NFComponentRef,NFUnit.Unit> */
  return _table;
}

DLLDirection
modelica_metatype omc_NFUnit_getKnownUnitsInverse(threadData_t *threadData)
{
  modelica_metatype _outKnownUnitsInverse = NULL;
  modelica_string _s = NULL;
  modelica_metatype _ut = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outKnownUnitsInverse has no default value.
  // _s has no default value.
  // _ut has no default value.
  _outKnownUnitsInverse = omc_UnorderedMap_new(threadData, boxvar_NFUnit_hash, boxvar_NFUnit_isEqual, omc_Util_nextPrime(threadData, ((modelica_integer) 30)));

  {
    modelica_metatype _unit;
    for (tmpMeta1 = _OMC_LIT153; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
    {
      _unit = MMC_CAR(tmpMeta1);
      /* Pattern-matching assignment */
      tmpMeta2 = _unit;
      tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
      tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
      _s = tmpMeta3;
      _ut = tmpMeta4;

      omc_UnorderedMap_tryAdd(threadData, _ut, _s, _outKnownUnitsInverse);
    }
  }
  _return: OMC_LABEL_UNUSED
  return _outKnownUnitsInverse;
}

DLLDirection
modelica_metatype omc_NFUnit_getKnownUnits(threadData_t *threadData)
{
  modelica_metatype _outKnownUnits = NULL;
  modelica_string _s = NULL;
  modelica_metatype _ut = NULL;
  modelica_metatype tmpMeta1;
  modelica_metatype tmpMeta2;
  modelica_metatype tmpMeta3;
  modelica_metatype tmpMeta4;
  modelica_metatype tmpMeta5;
  MMC_SO();
  _tailrecursive: OMC_LABEL_UNUSED
  // _outKnownUnits has no default value.
  // _s has no default value.
  // _ut has no default value.
  _outKnownUnits = omc_UnorderedMap_new(threadData, boxvar_stringHashDjb2, boxvar_stringEq, omc_Util_nextPrime(threadData, ((modelica_integer) 30)));

  {
    modelica_metatype _unit;
    for (tmpMeta1 = _OMC_LIT153; !listEmpty(tmpMeta1); tmpMeta1=MMC_CDR(tmpMeta1))
    {
      _unit = MMC_CAR(tmpMeta1);
      /* Pattern-matching assignment */
      tmpMeta2 = _unit;
      tmpMeta3 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 1));
      tmpMeta4 = MMC_FETCH(MMC_OFFSET(MMC_UNTAGPTR(tmpMeta2), 2));
      _s = tmpMeta3;
      _ut = tmpMeta4;

      omc_UnorderedMap_add(threadData, _s, _ut, _outKnownUnits);
    }
  }
  _return: OMC_LABEL_UNUSED
  return _outKnownUnits;
}

